mirror of
https://github.com/taigrr/gopher-os
synced 2025-01-18 04:43:13 -08:00
Enable support for the no-execute (NX) bit
This commit is contained in:
parent
886c7b10fa
commit
1b88764676
@ -297,10 +297,11 @@ _rt0_enter_long_mode:
|
|||||||
or eax, 1 << 5
|
or eax, 1 << 5
|
||||||
mov cr4, eax
|
mov cr4, eax
|
||||||
|
|
||||||
; Now enable long mode by modifying the EFER MSR
|
; Now enable long mode (bit 8) and the no-execute support (bit 11) by
|
||||||
|
; modifying the EFER MSR
|
||||||
mov ecx, 0xc0000080
|
mov ecx, 0xc0000080
|
||||||
rdmsr ; read msr value to eax
|
rdmsr ; read msr value to eax
|
||||||
or eax, 1 << 8
|
or eax, (1 << 8) | (1<<11)
|
||||||
wrmsr
|
wrmsr
|
||||||
|
|
||||||
; Finally enable paging
|
; Finally enable paging
|
||||||
|
Loading…
x
Reference in New Issue
Block a user