summaryrefslogtreecommitdiffstats
path: root/sys/boot
diff options
context:
space:
mode:
Diffstat (limited to 'sys/boot')
-rw-r--r--sys/boot/pc98/btx/btx/btx.S8
-rw-r--r--sys/boot/pc98/btx/btx/btx.s8
2 files changed, 8 insertions, 8 deletions
diff --git a/sys/boot/pc98/btx/btx/btx.S b/sys/boot/pc98/btx/btx/btx.S
index cc8f0f5..e8b5e7f 100644
--- a/sys/boot/pc98/btx/btx/btx.S
+++ b/sys/boot/pc98/btx/btx/btx.S
@@ -271,14 +271,14 @@ exit: cli # Disable interrupts
# Turn off paging.
#
movl %cr0,%eax # Get CR0
-ifdef(`PAGING',`
andl $~0x80000000,%eax # Disable
movl %eax,%cr0 # paging
-')
xorl %ecx,%ecx # Zero
-ifdef(`PAGING',`
movl %ecx,%cr3 # Flush TLB
-')
+#
+# Restore the GDT in case we caught a kernel trap.
+#
+ lgdt gdtdesc # Set GDT
#
# To 16 bits.
#
diff --git a/sys/boot/pc98/btx/btx/btx.s b/sys/boot/pc98/btx/btx/btx.s
index cc8f0f5..e8b5e7f 100644
--- a/sys/boot/pc98/btx/btx/btx.s
+++ b/sys/boot/pc98/btx/btx/btx.s
@@ -271,14 +271,14 @@ exit: cli # Disable interrupts
# Turn off paging.
#
movl %cr0,%eax # Get CR0
-ifdef(`PAGING',`
andl $~0x80000000,%eax # Disable
movl %eax,%cr0 # paging
-')
xorl %ecx,%ecx # Zero
-ifdef(`PAGING',`
movl %ecx,%cr3 # Flush TLB
-')
+#
+# Restore the GDT in case we caught a kernel trap.
+#
+ lgdt gdtdesc # Set GDT
#
# To 16 bits.
#
OpenPOWER on IntegriCloud