mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:57:35 +00:00
Kernel: Detect support for no-execute (NX) CPU features
Previously we assumed all hosts would have support for IA32_EFER.NXE. This is mostly true for newer hardware, but older hardware will crash and burn if you try to use this feature. Now we check for support via CPUID.80000001[20].
This commit is contained in:
parent
5be6a43860
commit
17aef7dc99
3 changed files with 32 additions and 12 deletions
|
@ -111,6 +111,8 @@ private:
|
|||
|
||||
PageTableEntry& ensure_pte(PageDirectory&, VirtualAddress);
|
||||
|
||||
bool has_nx_support() const { return m_has_nx_support; }
|
||||
|
||||
RefPtr<PageDirectory> m_kernel_page_directory;
|
||||
PageTableEntry* m_low_page_tables[4] { nullptr };
|
||||
|
||||
|
@ -130,6 +132,7 @@ private:
|
|||
InlineLinkedList<VMObject> m_vmobjects;
|
||||
|
||||
bool m_quickmap_in_use { false };
|
||||
bool m_has_nx_support { false };
|
||||
};
|
||||
|
||||
struct ProcessPagingScope {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue