If PAGING is defined then actually turn it on when entering protected

mode.
This commit is contained in:
John Baldwin 1999-10-27 02:22:52 +00:00
parent 4b006d7bb7
commit 260c5d350e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=52545
2 changed files with 10 additions and 0 deletions

View File

@ -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

View File

@ -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