mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:28:12 +00:00
Kernel: Use the Multiboot memory map info to inform our paging setup.
This makes it possible to run Serenity with more than 64 MB of RAM. Because each physical page is represented by a PhysicalPage object, and such objects are allocated using kmalloc_eternal(), more RAM means more pressure on kmalloc_eternal(), so we're gonna need a better strategy for this. But for now, let's just celebrate that we can use the 128 MB of RAM we've been telling QEMU to run with. :^)
This commit is contained in:
parent
8258b699db
commit
9da62f52a1
4 changed files with 63 additions and 30 deletions
|
@ -64,8 +64,6 @@ public:
|
|||
|
||||
void remap_region(PageDirectory&, Region&);
|
||||
|
||||
size_t ram_size() const { return m_ram_size; }
|
||||
|
||||
int user_physical_pages_in_existence() const { return s_user_physical_pages_in_existence; }
|
||||
int super_physical_pages_in_existence() const { return s_super_physical_pages_in_existence; }
|
||||
|
||||
|
@ -214,7 +212,8 @@ private:
|
|||
PageTableEntry ensure_pte(PageDirectory&, VirtualAddress);
|
||||
|
||||
RetainPtr<PageDirectory> m_kernel_page_directory;
|
||||
dword* m_page_table_zero;
|
||||
dword* m_page_table_zero { nullptr };
|
||||
dword* m_page_table_one { nullptr };
|
||||
|
||||
VirtualAddress m_quickmap_addr;
|
||||
|
||||
|
@ -225,7 +224,6 @@ private:
|
|||
HashTable<Region*> m_user_regions;
|
||||
HashTable<Region*> m_kernel_regions;
|
||||
|
||||
size_t m_ram_size { 0 };
|
||||
bool m_quickmap_in_use { false };
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue