summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>1999-10-27 02:22:52 +0000
committerjhb <jhb@FreeBSD.org>1999-10-27 02:22:52 +0000
commit281681d59fe63db78b45cedb3b86df4676aa228b (patch)
tree75362683d8b5295840d3899845535e5a70490554
parent65bd95f881cd6cf4edb875ea3bb2d8bfd819453d (diff)
downloadFreeBSD-src-281681d59fe63db78b45cedb3b86df4676aa228b.zip
FreeBSD-src-281681d59fe63db78b45cedb3b86df4676aa228b.tar.gz
If PAGING is defined then actually turn it on when entering protected
mode.
-rw-r--r--sys/boot/i386/btx/btx/btx.S5
-rw-r--r--sys/boot/i386/btx/btx/btx.s5
2 files changed, 10 insertions, 0 deletions
diff --git a/sys/boot/i386/btx/btx/btx.S b/sys/boot/i386/btx/btx/btx.S
index 81bf7d1..c315b56 100644
--- a/sys/boot/i386/btx/btx/btx.S
+++ b/sys/boot/i386/btx/btx/btx.S
@@ -202,8 +202,13 @@ ifdef(`PAGING',`
')
lgdtwm(gdtdesc) # Set GDT
movl %cr0,%eax # Switch to
+ifdef(`PAGING',`
+ o16 # protected mode
+ orl $0x80000001,%eax # and enable paging
+',`
o16 # protected mode
orl $0x01,%eax #
+')
movl %eax,%cr0 #
jmpfwi(SEL_SCODE,init.8) # To 32-bit code
init.8: xorl %ecx,%ecx # Zero
diff --git a/sys/boot/i386/btx/btx/btx.s b/sys/boot/i386/btx/btx/btx.s
index 81bf7d1..c315b56 100644
--- a/sys/boot/i386/btx/btx/btx.s
+++ b/sys/boot/i386/btx/btx/btx.s
@@ -202,8 +202,13 @@ ifdef(`PAGING',`
')
lgdtwm(gdtdesc) # Set GDT
movl %cr0,%eax # Switch to
+ifdef(`PAGING',`
+ o16 # protected mode
+ orl $0x80000001,%eax # and enable paging
+',`
o16 # protected mode
orl $0x01,%eax #
+')
movl %eax,%cr0 #
jmpfwi(SEL_SCODE,init.8) # To 32-bit code
init.8: xorl %ecx,%ecx # Zero
OpenPOWER on IntegriCloud