mirror of
https://github.com/hermitcore/libhermit.git
synced 2025-03-09 00:00:03 +01:00
remove "global bit" from the root page tables
- fix wrong usage of the "global bit" - every process has its own pml4 => no global view to the self references
This commit is contained in:
parent
51927e7e6d
commit
4c2244680d
1 changed files with 7 additions and 7 deletions
|
@ -313,7 +313,7 @@ Lno_remap:
|
|||
; Set CR0
|
||||
mov eax, cr0
|
||||
and eax, ~(1 << 30) ; enable caching
|
||||
and eax, ~(1 << 16) ; allow kernel write access to read-only pages
|
||||
and eax, ~(1 << 16) ; allow kernel write access to read-only pages
|
||||
or eax, (1 << 31) ; enable paging
|
||||
or eax, (1 << 0) ; long mode also needs PM-bit set
|
||||
mov cr0, eax
|
||||
|
@ -671,17 +671,17 @@ boot_stack:
|
|||
; Bootstrap page tables are used during the initialization.
|
||||
ALIGN 4096
|
||||
boot_pml4:
|
||||
DQ boot_pdpt + 0x107 ; PG_PRESENT | PG_GLOBAL | PG_RW | PG_USER
|
||||
DQ boot_pdpt + 0x7 ; PG_PRESENT | PG_RW | PG_USER
|
||||
times 510 DQ 0 ; PAGE_MAP_ENTRIES - 2
|
||||
DQ boot_pml4 + 0x303 ; PG_PRESENT | PG_GLOBAL | PG_RW | PG_SELF (self-reference)
|
||||
DQ boot_pml4 + 0x203 ; PG_PRESENT | PG_RW | PG_SELF (self-reference)
|
||||
boot_pdpt:
|
||||
DQ boot_pgd + 0x107 ; PG_PRESENT | PG_GLOBAL | PG_RW | PG_USER
|
||||
DQ boot_pgd + 0x7 ; PG_PRESENT | PG_RW | PG_USER
|
||||
times 510 DQ 0 ; PAGE_MAP_ENTRIES - 2
|
||||
DQ boot_pml4 + 0x303 ; PG_PRESENT | PG_GLOBAL | PG_RW | PG_SELF (self-reference)
|
||||
DQ boot_pml4 + 0x203 ; PG_PRESENT | PG_RW | PG_SELF (self-reference)
|
||||
boot_pgd:
|
||||
DQ boot_pgt + 0x107 ; PG_PRESENT | PG_GLOBAL | PG_RW | PG_USER
|
||||
DQ boot_pgt + 0x7 ; PG_PRESENT | PG_RW | PG_USER
|
||||
times 510 DQ 0 ; PAGE_MAP_ENTRIES - 2
|
||||
DQ boot_pml4 + 0x303 ; PG_PRESENT | PG_GLOBAL | PG_RW | PG_SELF (self-reference)
|
||||
DQ boot_pml4 + 0x203 ; PG_PRESENT | PG_RW | PG_SELF (self-reference)
|
||||
boot_pgt:
|
||||
times 512 DQ 0
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue