mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:28:12 +00:00
Kernel: Switch the first-8MB-of-upper-3GB pseudo mappings to 4KB pages
This memory range was set up using 2MB pages by the code in boot.S. Because of that, the kernel image protection code didn't work, since it assumed 4KB pages. We now switch to 4KB pages during MemoryManager initialization. This makes the kernel image protection code work correctly again. :^)
This commit is contained in:
parent
e9c65b6566
commit
1d43544e08
2 changed files with 34 additions and 0 deletions
|
@ -150,6 +150,7 @@ private:
|
|||
|
||||
void detect_cpu_features();
|
||||
void setup_low_identity_mapping();
|
||||
void setup_low_pseudo_identity_mapping();
|
||||
void protect_kernel_image();
|
||||
void parse_memory_map();
|
||||
void flush_entire_tlb();
|
||||
|
@ -191,6 +192,8 @@ private:
|
|||
InlineLinkedList<VMObject> m_vmobjects;
|
||||
|
||||
bool m_quickmap_in_use { false };
|
||||
|
||||
RefPtr<PhysicalPage> m_low_pseudo_identity_mapping_pages[4];
|
||||
};
|
||||
|
||||
template<typename Callback>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue