summaryrefslogtreecommitdiffstats
path: root/sys/boot/i386/btx
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2000-06-29 01:25:31 +0000
committerjhb <jhb@FreeBSD.org>2000-06-29 01:25:31 +0000
commit2752163f1ef5c474753fd708031d12ac8f818ba8 (patch)
treefe0abe66ee973341e4699f5cdaecc7054e14831d /sys/boot/i386/btx
parent579668ebe92fcc9fc9f444a713083a7b42f6a23f (diff)
downloadFreeBSD-src-2752163f1ef5c474753fd708031d12ac8f818ba8.zip
FreeBSD-src-2752163f1ef5c474753fd708031d12ac8f818ba8.tar.gz
Rework the detecting of the rdmsr and wrmsr instructions in the v86
monitor so that the codepath is cleaner and easier to maintain in the future.
Diffstat (limited to 'sys/boot/i386/btx')
-rw-r--r--sys/boot/i386/btx/btx/btx.S14
-rw-r--r--sys/boot/i386/btx/btx/btx.s14
2 files changed, 14 insertions, 14 deletions
diff --git a/sys/boot/i386/btx/btx/btx.S b/sys/boot/i386/btx/btx/btx.S
index d957bfc..e22fb2e 100644
--- a/sys/boot/i386/btx/btx/btx.S
+++ b/sys/boot/i386/btx/btx/btx.S
@@ -478,16 +478,16 @@ v86mon.2: cmpb $0xf4,%al # HLT?
cmpl $inthlt+0x1,%esi # Is inthlt?
jne v86mon.7 # No (ignore)
jmp intrtn # Return to user mode
-v86mon.3: cmpb $0xf,%al # Is
- jne v86mon.3.1 # this
- cmpb $0x20,(%esi) # a
- jne v86mon.3.1 # MOV EAX,CR0
- cmpb $0xc0,0x1(%esi) # instruction?
- je v86mov # Yes
-v86mon.3.1: cmpb $0x30,(%esi) # Is it a WRMSR?
+v86mon.3: cmpb $0xf,%al # Prefixed instruction?
+ jne v86mon.4 # No
+ cmpb $0x30,(%esi) # Is it a WRMSR?
je v86wrmsr # Yes
cmpb $0x32,(%esi) # Is it a RDMSR?
je v86rdmsr # Yes
+ cmpb $0x20,(%esi) # Is this a
+ jne v86mon.4 # MOV EAX,CR0
+ cmpb $0xc0,0x1(%esi) # instruction?
+ je v86mov # Yes
v86mon.4: cmpb $0xfa,%al # CLI?
je v86cli # Yes
cmpb $0xfb,%al # STI?
diff --git a/sys/boot/i386/btx/btx/btx.s b/sys/boot/i386/btx/btx/btx.s
index d957bfc..e22fb2e 100644
--- a/sys/boot/i386/btx/btx/btx.s
+++ b/sys/boot/i386/btx/btx/btx.s
@@ -478,16 +478,16 @@ v86mon.2: cmpb $0xf4,%al # HLT?
cmpl $inthlt+0x1,%esi # Is inthlt?
jne v86mon.7 # No (ignore)
jmp intrtn # Return to user mode
-v86mon.3: cmpb $0xf,%al # Is
- jne v86mon.3.1 # this
- cmpb $0x20,(%esi) # a
- jne v86mon.3.1 # MOV EAX,CR0
- cmpb $0xc0,0x1(%esi) # instruction?
- je v86mov # Yes
-v86mon.3.1: cmpb $0x30,(%esi) # Is it a WRMSR?
+v86mon.3: cmpb $0xf,%al # Prefixed instruction?
+ jne v86mon.4 # No
+ cmpb $0x30,(%esi) # Is it a WRMSR?
je v86wrmsr # Yes
cmpb $0x32,(%esi) # Is it a RDMSR?
je v86rdmsr # Yes
+ cmpb $0x20,(%esi) # Is this a
+ jne v86mon.4 # MOV EAX,CR0
+ cmpb $0xc0,0x1(%esi) # instruction?
+ je v86mov # Yes
v86mon.4: cmpb $0xfa,%al # CLI?
je v86cli # Yes
cmpb $0xfb,%al # STI?
OpenPOWER on IntegriCloud