mirror of
https://github.com/taigrr/gopher-os
synced 2025-01-18 04:43:13 -08:00
Enable page write protection for both kernel and user space
If the WP bit in CR0 is not set then write protection for pages is only enforced for user-land code.
This commit is contained in:
parent
42ee2d1325
commit
56d23f50ae
@ -304,9 +304,9 @@ _rt0_enter_long_mode:
|
||||
or eax, (1 << 8) | (1<<11)
|
||||
wrmsr
|
||||
|
||||
; Finally enable paging
|
||||
; Finally enable paging (bit 31) and user/kernel page write protection (bit 16)
|
||||
mov eax, cr0
|
||||
or eax, 1 << 31
|
||||
or eax, (1 << 31) | (1<<16)
|
||||
mov cr0, eax
|
||||
|
||||
; We are in 32-bit compatibility submode. We need to load a 64bit GDT
|
||||
|
Loading…
x
Reference in New Issue
Block a user