Commit Graph

124 Commits

Author SHA1 Message Date
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