Commit Graph

175 Commits

Author SHA1 Message Date
keihan
29c72c57f0 netbsd.org -> NetBSD.org
All "netbsd.org" is now gone from src/sys/arch.
2003-12-04 13:05:15 +00:00
fvdl
c7242676d3 Don't use an alternate stack for the trace/breakpoint trap. It can be
called from userspace, and that messes things up.

Thanks to Mark Kettenis to pointing out that not using an alt stack
solved the "loop on gdb sig continuation" issue.
2003-12-01 00:00:07 +00:00
fvdl
22bb1f01c7 Reenable interrupts sooner in the idle_exit case. 2003-11-30 23:58:51 +00:00
fvdl
d8ec3cb507 Keep mxcsr and mxcsr_mask across the fake init in process_read_fpregs.
From Mark Kettenis.
2003-11-30 12:59:30 +00:00
fvdl
ebc6dbad07 Define the mcount function in assembler, and have it save all registers
used for argument passing, plus %rax (used to pass the number of float
arguments to varargs functions), to avoid having it clobber caller-saved
registers. mcount is emitted "under the radar", so the compiler doesn't
know it should do this.

Change the kernel mcount entry/exit macros to use plain cli/sti, like on i386.
2003-11-28 23:22:45 +00:00
christos
a21fdf3b43 bye, bye _MCONTEXT_TO_SIGCONTEXT and vice versa. 2003-11-25 23:11:52 +00:00
fvdl
6f7ba6556b Add and enable sk/skc drivers. 2003-11-22 14:20:47 +00:00
wiz
ee1b406595 Spell address with two d's. Inspired by similar changes in OpenBSD,
originating from Jonathon Gray and forwarded by jmc@openbsd.
2003-11-10 08:51:51 +00:00
fvdl
0a3fa4cdb1 Trim ramdisk and remove some unneeded options. 2003-11-10 00:52:28 +00:00
fvdl
f601ca945b Add POSIX 1003.1b semaphores. 2003-11-08 21:38:18 +00:00
fvdl
664bce39ae Remove extraneous ( 2003-11-05 13:58:00 +00:00
fvdl
51c222e5a2 Add igphy. 2003-11-05 13:51:29 +00:00
dsl
2ffbd2ab99 Remove p_nras from struct proc - use LIST_EMPTY(&p->p_raslist) instead.
Remove p_raslock and rename p_lwplock p_lock (one lock is enough).
Simplify window test when adding a ras and correct test on VM_MAXUSER_ADDRESS.
Avoid unpredictable branch in i386 locore.S
(pad fields left in struct proc to avoid kernel bump)
2003-11-04 10:33:15 +00:00
cl
ef56cc40ab Reduce code duplication by adding mi_userret() in sys/userret.h
containing signal posting, kernel-exit handling and sa_upcall processing.

XXX the pc532, sparc, sparc64 and vax ports should have their
XXX userret() code rearranged to use this.
2003-10-31 16:44:34 +00:00
simonb
6d85c5e0d5 Don't pass the (unused) return value args to the
trace_enter()/systrace_enter() functions.
2003-10-31 03:28:12 +00:00
fvdl
0e7c77bbd4 Add ahd, bce, ataraid 2003-10-25 20:41:36 +00:00
fvdl
d0d0179583 Add ahd, bce, ataraid. 2003-10-25 20:26:54 +00:00
fvdl
b9d0173421 Call check_mcontext to validate a register set passed in by ptrace. 2003-10-23 17:45:14 +00:00
fvdl
118d6961e7 Add auvia. 2003-10-23 01:14:43 +00:00
fvdl
878ae8047e Remove use of NULL as an integer value. 2003-10-22 22:51:36 +00:00
jdolecek
958d4a6d68 add kttcp major 2003-10-22 17:12:54 +00:00
jdolecek
51c4eb4597 add majors for mly, dpti, dpt, twe, joy, radio, cir 2003-10-22 17:08:13 +00:00
jdolecek
ee510816af add wsfont major to archs which have the other wscons devices 2003-10-22 16:53:22 +00:00
kleink
5d1a2f48d2 Use a common <machine/math.h> for amd64 and i386. 2003-10-22 11:54:23 +00:00
fvdl
80d06975ab Fix int vs. NULL comparison. 2003-10-21 01:45:25 +00:00
fvdl
a7ee73261e Correct argument to preempt(). 2003-10-21 00:46:09 +00:00
fvdl
e9ee9a82c7 Don't use err and trapno from a copied in mcontext. 2003-10-19 18:14:42 +00:00
cl
ed9c2d7075 don't uvm_swapout LWPs which are LSONPROC on another cpu.
uvm_swapout_threads will swapout LWPs which are running on another CPU:
- uvm_swapout_threads considers LWPs running on another CPU for swapout
  if their l_swtime is high
- uvm_swapout_threads considers LWPs on the runqueue for swapout if their
  l_swtime is high but these LWPs might be running by the time uvm_swapout
  is called

symptoms of failure: panic in setrunqueue

fixes PR kern/23095
2003-10-19 17:45:35 +00:00
briggs
1c36c6dcdb Add SIGTRAMP_VALID(). 2003-10-18 18:34:09 +00:00
lukem
7d84b90c92 Use one 'atabus* at ata?' instead of multiple 'atabus* at FOOide? channel ?'
Use  'atapibus* at atapi?'  instead of  'atapibus* at atabus?'
2003-10-18 08:30:12 +00:00
fvdl
c8c91c50dd Correct VM_MAXUSER_ADDRESS definitions, it was wasting a few pages. 2003-10-17 20:27:00 +00:00
fvdl
5b12e0425d Put the ucontext pointer in %r15 for signal delivery, so that it is
saved across the handler call.
2003-10-17 16:24:31 +00:00
jdolecek
6b5eef9a33 add major for nsmb, at #98 to be in sync with i386 2003-10-15 18:27:20 +00:00
drochner
ecbadcc56c fix typo (harmless as long as pmap_update() is a noop) 2003-10-15 09:44:55 +00:00
fvdl
14cdf7ae6d Proper checks for kmem reads beyond _end 2003-10-14 22:33:29 +00:00
fvdl
8639708413 Pass the right argument pointer to trace_enter/trace_exit. 2003-10-14 18:54:34 +00:00
fvdl
759027f9ca Define a 32bit compat version of the siginfo sendsig, and rename the
old one to reflect it's COMPAT_16 status.
2003-10-13 18:47:10 +00:00
fvdl
6781db3e2a Do checks on passed in context values (sigreturn/setcontext) explicitly;
can't rely on catching the trap on iret for a few reasons.
2003-10-13 18:45:59 +00:00
fvdl
0deb20a334 Define 32bit versions of signal frames and contexts. 2003-10-13 18:41:11 +00:00
fvdl
ef0bb54192 Define a few macros to validate userspace selectors. 2003-10-13 18:40:16 +00:00
fvdl
dc921bb48e Define mcontext32_t (if COMPAT_NETBSD32). 2003-10-13 18:38:34 +00:00
fvdl
4505ad3141 Define all frame members as unsigned, to avoid any possibility of
sign extension on these values.
2003-10-13 18:38:02 +00:00
jdolecek
ef5bb330f5 reassing majors for crypto and pf to use the newly defined MI major
range
2003-10-10 22:42:39 +00:00
jdolecek
4e915c9ccd update the comment - the space for machine-dependant majors
is reduced to 0-143
follows discussion on tech-kern
2003-10-10 21:21:25 +00:00
thorpej
901da40cf9 Add some accessor macros for the ucontext:
* _UC_MACHINE_PC() - access the program counter
* _UC_MACHINE_INTRV() - access the integer return value register
* _UC_MACHINE_SET_PC() - set the program counter (this requires
  special handling on some platforms).
2003-10-08 22:43:01 +00:00
fvdl
ba7165e37f Adapt for ksiginfo changes. 2003-10-08 19:58:54 +00:00
fvdl
995d3a4d2f Do proper FPU trap reporting for SIGFPE, copied from the i386 port. 2003-10-08 19:55:39 +00:00
thorpej
80649e0513 Use KSI_INIT_TRAP(). 2003-10-08 19:21:52 +00:00
bouyer
f5a6a0a843 Add new per-chip pciide drivers. 2003-10-08 11:55:43 +00:00
bouyer
54433c63d2 Add atabus. 2003-10-08 11:02:18 +00:00
lukem
1c33b4e6a4 Overhaul MBR handling (part 1):
<sys/bootblock.h>:
    *	Added definitions for the Master Boot Record (MBR) used by
	a variety of systems (primarily i386), including the format
	of the BIOS Parameter Block (BPB).
	This information was cribbed from a variety of sources
	including <sys/disklabel_mbr.h> which this is a superset of.

	As part of this, some data structure elements and #defines
	were renamed to be more "namespace friendly" and consistent
	with other bootblocks and MBR documentation.
	Update all uses of the old names to the new names.

<sys/disklabel_mbr.h>:
    *	Deprecated in favor of <sys/bootblock.h> (the latter is more
	"host tool" friendly).

amd64 & i386:
    *	Renamed /usr/mdec/bootxx_dosfs to /usr/mdec/bootxx_msdos, to
	be consistent with the naming convention of the msdosfs tools.

    *	Removed /usr/mdec/bootxx_ufs, as it's equivalent to bootxx_ffsv1
	and it's confusing to have two functionally equivalent bootblocks,
	especially given that "ufs" has multiple meanings (it could be
	a synonym for "ffs", or the group of ffs/lfs/ext2fs file systems).

    *	Rework pbr.S (the first sector of bootxx_*):
	    +	Ensure that BPB (bytes 11..89) and the partition table
		(bytes 446..509) do not contain code.
	    +	Add support for booting from FAT partitions if BOOT_FROM_FAT
		is defined.  (Only set for bootxx_msdos).
	    +	Remove "dummy" partition 3; if people want to installboot(8)
		these to the start of the disk they can use fdisk(8) to
		create a real MBR partition table...
	    +	Compile with TERSE_ERROR so it fits because of the above.
		Whilst this is less user friendly, I feel it's important
		to have a valid partition table and BPB in the MBR/PBR.

    *	Renamed /usr/mdec/biosboot to /usr/mdec/boot, to be consistent
	with other platforms.

    *	Enable SUPPORT_DOSFS in /usr/mdec/boot (stage2), so that
    	we can boot off FAT partitions.

    *	Crank version of /usr/mdec/boot to 3.1, and fix some of the other
	entries in the version file.

installboot(8) (i386):
    *	Read the existing MBR of the filesystem and retain the BIOS
    	Parameter Block (BPB) in bytes 11..89 and the MBR partition
	table in bytes 446..509.  (Previously installboot(8) would
	trash those two sections of the MBR.)

mbrlabel(8):
    *	Use sys/lib/libkern/xlat_mbr_fstype.c instead of homegrown code
	to map the MBR partition type to the NetBSD disklabel type.


Test built "make release" for i386, and new bootblocks verified to work
(even off FAT!).
2003-10-08 04:25:43 +00:00
fvdl
b894e42a80 SIGINFO support.
Todo: 32bit compat support (COMPAT_NETBSD32 will not compile right now,
as it won't on other platforms).
2003-10-06 22:53:47 +00:00
jdolecek
e6286b949a Add some framework for MI assignment of device majors - add sys/dev/majors
which is automatically included during kernel config, and add comments
to individual machine-dependant majors.* files to assign new MI majors
in MI file.

Range 0-191 is reserved for machine-specific assignments, range
192+ are MI assignments.

Follows recent discussion on tech-kern@
2003-10-05 08:04:24 +00:00
nathanw
4d59420344 Move __cpu_simple_lock_t and __SIMPLELOCK_{UN,}LOCKED to machine/types.h
so that they can be used in a namespace-friendly way.
2003-09-26 22:45:41 +00:00
christos
597d36cd65 Add needed header file. 2003-09-26 21:28:45 +00:00
christos
9eb9621f0e fix fallout from frame to frame * conversion. 2003-09-26 21:24:34 +00:00
christos
a0a66e38c7 move MI stuff to the MI include. 2003-09-26 18:09:13 +00:00
christos
85d91a39fe add catch up with const sigset_t * 2003-09-26 18:05:01 +00:00
christos
4f76392503 catch up with const sigset_t * 2003-09-26 18:04:11 +00:00
simonb
550b4bef88 Fix "constify sendsig/trapsignal" fallout for non-siginfo'd archs. Test
compiled on most architectures.
2003-09-26 12:02:55 +00:00
fvdl
8f8298758f LONG_BIT should be 64. From Nicolas Joly. 2003-09-19 12:09:51 +00:00
cl
2532f4497c add MD part of SA/pthread pagefault handling on amd64 2003-09-16 15:49:06 +00:00
kleink
d440784b30 __{BEGIN,END}_DECLS-wrap prototypes. 2003-09-11 09:40:11 +00:00
fvdl
5a759ef06c Move the bulk of pci_intr_string into a seperate intr_string function. Use
that new function to print the pciide compat interrupt in pciide_machdep.c.
Share pciide_machdep.c between amd64 and i386.
2003-09-06 17:44:36 +00:00
itojun
fc918f8713 add rnd(4) device to installation media.
necessary for many purposes, including password seeding, tcp sequence number,
and more.  see tech-security
2003-09-06 03:25:23 +00:00
fvdl
cd1ddca4f8 Use MPBIOS_SCANPCI by default. 2003-09-01 00:35:44 +00:00
fvdl
e8769fc0a0 Update a few types and formats. 2003-08-31 23:24:04 +00:00
fvdl
2d5fec0580 Remove a lot of stuff, making it closer to the i386 INSTALL. 2003-08-30 20:09:04 +00:00
itojun
8ebd15f8cd add udav* 2003-08-22 07:52:48 +00:00
itojun
4440262659 create /dev/crypto 2003-08-22 05:06:22 +00:00
fvdl
c43b35423e Pass pointers to frames from assembly, do not use the 'frame on stack
as argument passed by value' trick, as gcc 3.3.x makes (valid) assumptions
about the stack that will not be true. Costs 2 instructions per trap/syscall
on i386, 4 per interrupt for MP. One instruction per trap/syscall on amd64,
2 per interrupt for MP. I expect gcc 3.3.1 to make up for this by better
optimization (it'd better..)

While here, make amd64 compile again by using subr_mbr_disk.c
2003-08-20 21:48:35 +00:00
agc
aad01611e7 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22364, verified by myself.
2003-08-07 16:26:28 +00:00
bouyer
7c840df334 Add esiop at pci to GENERIC which already have siop at pci.
esiop has been tested enouth now.
esiop not added to INSTALL kernels because of possible space constraint.
siop should be able to drive all adapters supported by esiop.
2003-08-06 12:32:03 +00:00
dsl
0ca66aa416 mbr partition stuff isn't saved here (or anywhere else) anymore. 2003-08-04 10:09:10 +00:00
itojun
3f14c71f75 reserve cdev major # for PF. ok'ed by technical-exec 2003-07-27 14:17:57 +00:00
thorpej
063033a023 Since everyone uses clock_subr.c (or should, if they don't currently),
list it in conf/files instead of in every port's files.*.
2003-07-27 01:17:37 +00:00
lukem
37dbc5a71b __KERNEL_RCSID() 2003-07-14 23:32:28 +00:00
kochi
9ab543513d o cleanup usage of ACPI_ACTIVATE_DEV/ACPI_PCI_FIXUP
o delete usage of ENABLE_DEBUGGER

As ACPI_ACTIVATE_DEV/ACPI_PCI_FIXUP are defflag'ed in files.acpi,
these options don't have to have a value.
2003-07-06 04:03:21 +00:00
martin
d505b18964 Make sure to include opt_foo.h if a defflag option FOO is used. 2003-06-23 11:00:59 +00:00
drochner
1a03e79900 don't #include <sys/dkstat.h> where it is (appearently) unused 2003-06-18 08:58:34 +00:00
fvdl
7dd7f8baa2 Handle 64bit DMA addresses on PCI for platforms that can (currently only
enabled on amd64). Add a dmat64 field to various PCI attach structures,
and pass it down where needed. Implement a simple new function called
pci_dma64_available(pa) to test if 64bit DMA addresses may be used.
This returns 1 iff _PCI_HAVE_DMA64 is defined in <machine/pci_machdep.h>,
and there is more than 4G of memory.
2003-06-15 23:08:53 +00:00
fvdl
afff857edc Add the options MPBIOS_SCANPCI and MPACPI_SCANPCI to configure PCI roots
with the MPBIOS/ACPI bus information, by walking through the buses, and
descending down every bus that hasn't been marked configured yet.
2003-05-29 20:22:28 +00:00
fvdl
3e4b8e3852 Another pair of locks to pacify UVM (XXX -- not needed). 2003-05-27 20:05:35 +00:00
christos
ecaad897e4 make this compile again with -DDEBUG 2003-05-27 16:46:16 +00:00
christos
f74633f4ed another dependency on assym.h 2003-05-27 16:46:03 +00:00
fvdl
c08a75d828 Correct a few maximum values. 2003-05-25 19:29:35 +00:00
christos
56064ce6e8 Add ACPI gunk. 2003-05-21 17:23:35 +00:00
christos
dfc37ed355 clock.o depends on config_time.h 2003-05-17 05:39:35 +00:00
fvdl
db7d3c35bc Decrease the ramdisk size a bit to allow for more options to be added
to the kernel, and still have it fit in 2.88M.
2003-05-15 14:02:00 +00:00
wiz
abefb9582b There are no olms or omms drivers for amd64. 2003-05-15 07:33:51 +00:00
fvdl
e3b6ff6748 Add #if NACPI around acpi attach args. 2003-05-15 02:20:51 +00:00
fvdl
f8a204c941 Add RCS Id and/or copyright notice. 2003-05-14 12:22:34 +00:00
fvdl
d840dd2438 While the previous change actually made the code do what it intended,
it was still wrong. cpu_switch() must return 1 when it switched to
a different LWP, 0 if it didn't. It was doing exactly the reverse.
2003-05-13 09:35:16 +00:00
fvdl
1a53be1e96 Return the correct value in cpu_switch; from Stephan Uphoff for i386. 2003-05-13 08:33:58 +00:00
fvdl
d75682ade1 include <machine/mpacpi.h> 2003-05-11 21:54:49 +00:00
fvdl
83e3d0cccf Add commented out acpi. 2003-05-11 21:41:00 +00:00
fvdl
07ad7b2791 Empty sleep stub function. 2003-05-11 21:39:41 +00:00
fvdl
59f5ef76ed ACPI support. Wakeup code still to be done. 2003-05-11 21:39:00 +00:00
fvdl
31024872ed Reselect the ioapic register for each read or write. 2003-05-11 15:46:57 +00:00
yamt
a421df4c74 remove L_BIGLOCK check for kernel-mode pagefaults in trap().
syscall() and its variants actually does copyin() without biglock.

ok'ed by Frank van der Linden.
2003-05-11 15:19:19 +00:00