x86: intel64: enable no-execute

Set the NXE bit in the EFER MSR so that the NX bit can
be set in page tables. Otherwise, the NX bit is treated
as reserved and leads to a fault if set.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
Andrew Boie 2019-10-10 11:47:57 -07:00 committed by Andrew Boie
commit e340f8d22e
2 changed files with 3 additions and 2 deletions

View file

@ -26,6 +26,7 @@
#define X86_EFER_MSR 0xC0000080
#define X86_EFER_MSR_LME BIT(8)
#define X86_EFER_MSR_NXE BIT(11)
#ifndef _ASMLANGUAGE
#ifdef __cplusplus