summaryrefslogtreecommitdiffstats
path: root/sys/i386
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>2001-05-20 17:01:20 +0000
committerbde <bde@FreeBSD.org>2001-05-20 17:01:20 +0000
commitfe3ed5cadca20fbbc88e70b0e90ba5261ab16058 (patch)
tree0fb52f5903fd252444f2c609efdacba78412b35b /sys/i386
parent20d39ffc04278fc10ff2ca16a7de8f2ad3597130 (diff)
downloadFreeBSD-src-fe3ed5cadca20fbbc88e70b0e90ba5261ab16058.zip
FreeBSD-src-fe3ed5cadca20fbbc88e70b0e90ba5261ab16058.tar.gz
Use a critical region to protect pushing of curproc's npx state to
curpcb in vm86_bioscall(). I don't know if the state is ever in the npx at that point.
Diffstat (limited to 'sys/i386')
-rw-r--r--sys/i386/i386/vm86bios.s5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/i386/i386/vm86bios.s b/sys/i386/i386/vm86bios.s
index e5522bc..e12ac41 100644
--- a/sys/i386/i386/vm86bios.s
+++ b/sys/i386/i386/vm86bios.s
@@ -65,6 +65,8 @@ ENTRY(vm86_bioscall)
pushl %gs
#ifdef DEV_NPX
+ pushfl
+ cli
movl PCPU(CURPROC),%ecx
cmpl %ecx,PCPU(NPXPROC) /* do we need to save fp? */
jne 1f
@@ -77,9 +79,10 @@ ENTRY(vm86_bioscall)
call npxsave
popl %ecx
popl %edx /* recover our pcb */
+1:
+ popfl
#endif
-1:
movl SCR_VMFRAME(%edx),%ebx /* target frame location */
movl %ebx,%edi /* destination */
movl SCR_ARGFRAME(%edx),%esi /* source (set on entry) */
OpenPOWER on IntegriCloud