Kernel: Use PAE to allow accessing all physical memory beyond 4GB

We already use PAE for the NX bit, but this changes the PhysicalAddress
structure to be able to hold 64 bit physical addresses. This allows us
to use all the available physical memory.
This commit is contained in:
Tom 2021-07-06 21:35:15 -06:00 committed by Andreas Kling
parent 658b41a06c
commit ad5d9d648b
Notes: sideshowbarker 2024-07-18 10:05:10 +09:00
7 changed files with 87 additions and 86 deletions

View file

@ -64,12 +64,12 @@ MemoryStatsWidget::~MemoryStatsWidget()
{
}
static inline size_t page_count_to_kb(size_t kb)
static inline u64 page_count_to_kb(u64 kb)
{
return (kb * 4096) / 1024;
}
static inline size_t bytes_to_kb(size_t bytes)
static inline u64 bytes_to_kb(u64 bytes)
{
return bytes / 1024;
}
@ -88,12 +88,12 @@ void MemoryStatsWidget::refresh()
[[maybe_unused]] unsigned kmalloc_eternal_allocated = json.get("kmalloc_eternal_allocated").to_u32();
unsigned kmalloc_allocated = json.get("kmalloc_allocated").to_u32();
unsigned kmalloc_available = json.get("kmalloc_available").to_u32();
unsigned user_physical_allocated = json.get("user_physical_allocated").to_u32();
unsigned user_physical_available = json.get("user_physical_available").to_u32();
unsigned user_physical_committed = json.get("user_physical_committed").to_u32();
unsigned user_physical_uncommitted = json.get("user_physical_uncommitted").to_u32();
unsigned super_physical_alloc = json.get("super_physical_allocated").to_u32();
unsigned super_physical_free = json.get("super_physical_available").to_u32();
unsigned user_physical_allocated = json.get("user_physical_allocated").to_u64();
unsigned user_physical_available = json.get("user_physical_available").to_u64();
unsigned user_physical_committed = json.get("user_physical_committed").to_u64();
unsigned user_physical_uncommitted = json.get("user_physical_uncommitted").to_u64();
unsigned super_physical_alloc = json.get("super_physical_allocated").to_u64();
unsigned super_physical_free = json.get("super_physical_available").to_u64();
unsigned kmalloc_call_count = json.get("kmalloc_call_count").to_u32();
unsigned kfree_call_count = json.get("kfree_call_count").to_u32();