mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2025-01-11 17:04:19 +01:00
If PAGING is defined then actually turn it on when entering protected
mode.
This commit is contained in:
parent
4b006d7bb7
commit
260c5d350e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=52545
@ -202,8 +202,13 @@ ifdef(`PAGING',`
|
|||||||
')
|
')
|
||||||
lgdtwm(gdtdesc) # Set GDT
|
lgdtwm(gdtdesc) # Set GDT
|
||||||
movl %cr0,%eax # Switch to
|
movl %cr0,%eax # Switch to
|
||||||
|
ifdef(`PAGING',`
|
||||||
|
o16 # protected mode
|
||||||
|
orl $0x80000001,%eax # and enable paging
|
||||||
|
',`
|
||||||
o16 # protected mode
|
o16 # protected mode
|
||||||
orl $0x01,%eax #
|
orl $0x01,%eax #
|
||||||
|
')
|
||||||
movl %eax,%cr0 #
|
movl %eax,%cr0 #
|
||||||
jmpfwi(SEL_SCODE,init.8) # To 32-bit code
|
jmpfwi(SEL_SCODE,init.8) # To 32-bit code
|
||||||
init.8: xorl %ecx,%ecx # Zero
|
init.8: xorl %ecx,%ecx # Zero
|
||||||
|
@ -202,8 +202,13 @@ ifdef(`PAGING',`
|
|||||||
')
|
')
|
||||||
lgdtwm(gdtdesc) # Set GDT
|
lgdtwm(gdtdesc) # Set GDT
|
||||||
movl %cr0,%eax # Switch to
|
movl %cr0,%eax # Switch to
|
||||||
|
ifdef(`PAGING',`
|
||||||
|
o16 # protected mode
|
||||||
|
orl $0x80000001,%eax # and enable paging
|
||||||
|
',`
|
||||||
o16 # protected mode
|
o16 # protected mode
|
||||||
orl $0x01,%eax #
|
orl $0x01,%eax #
|
||||||
|
')
|
||||||
movl %eax,%cr0 #
|
movl %eax,%cr0 #
|
||||||
jmpfwi(SEL_SCODE,init.8) # To 32-bit code
|
jmpfwi(SEL_SCODE,init.8) # To 32-bit code
|
||||||
init.8: xorl %ecx,%ecx # Zero
|
init.8: xorl %ecx,%ecx # Zero
|
||||||
|
Loading…
Reference in New Issue
Block a user