1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-25 11:37:56 +00:00
freebsd/sys/i386
Bruce Evans 701ac88055 Use the MI macro TRAPF_USERMODE() instead of open-coded checks for
SEL_UPL and sometimes PSL_VM.  This is just a style change on amd64,
but on i386 it fixes 1 unimportant place where the PSL_VM check was
missing and starts fixing 1 important place where the PSL_VM check
had a logic error.

Fix logic errors in treating vm86 bioscall mode as kernel mode.  The
main place checked all the necessary flags, but put the necessary
parentheses for the PSL_VM and PCB_VM86CALL checks in the wrong
place.  The broken case is only reached if a vm86 bioscall uses a
%cs which is nonzero mod 4, but that is unusual -- most bios calls
start with %cs = 0xc000 or 0xf000 and rarely change it.  Another
place was missing the check for PCB_VM86CALL, but was only reachable
if there are bugs virtualizing PSL_I.

Add a macro TF_HAS_STACKREGS() and use this instead of converting
open-coded checks of SEL_UPL, etc. to TRAPF_USERMODE() when we only
care about whether the frame has stack registers.  This fixes 3
places in my recent fix for register variables in vm86 mode where I
messed up the PSL_VM check and cleans up other places.
2016-09-14 12:57:40 +00:00
..
acpica If x86 CPU implementation of the MWAIT instruction reasonably 2015-05-09 12:28:48 +00:00
bios Make it explicit that D_MEM cdevsw d_flag is to signify that the 2016-05-01 17:46:56 +00:00
cloudabi32 Convert pointers obtained from the threadattr_t structure with TO_PTR(). 2016-08-24 10:13:18 +00:00
conf Make CloudABI work on i386. 2016-08-22 17:37:31 +00:00
i386 Use the MI macro TRAPF_USERMODE() instead of open-coded checks for 2016-09-14 12:57:40 +00:00
ibcs2 Don't create pointless backups of generated files in "make sysent". 2016-07-28 21:29:04 +00:00
include Remove support for idle page zeroing. 2016-09-03 20:38:13 +00:00
isa Remove the spic(4) driver for the Sony Vaoi Jogdial. 2016-08-19 23:39:08 +00:00
linux Don't create pointless backups of generated files in "make sysent". 2016-07-28 21:29:04 +00:00
pci As <machine/pmap.h> is included from <vm/pmap.h>, there is no need to 2016-02-22 09:02:20 +00:00
svr4 sys: use our roundup2/rounddown2() macros when param.h is available. 2016-04-21 19:57:40 +00:00
xbox
Makefile