mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-22 23:55:12 +00:00
Kernel/aarch64: Only identity map kernel image, instead of all of RAM
For the initial page tables we only need to identity map the kernel image, the rest of the memory will be managed by the MemoryManager. The linker script is updated to get the kernel image start and end addresses.
This commit is contained in:
committed by
Andreas Kling
parent
cdf59c86ac
commit
a62732ee2f
@@ -72,8 +72,14 @@ bool MemoryManager::is_initialized()
|
||||
|
||||
static UNMAP_AFTER_INIT VirtualRange kernel_virtual_range()
|
||||
{
|
||||
#if ARCH(AARCH64)
|
||||
// NOTE: We currently identity map the kernel image for aarch64, so the kernel virtual range
|
||||
// is the complete memory range.
|
||||
return VirtualRange { VirtualAddress((FlatPtr)0), 0x3F000000 };
|
||||
#else
|
||||
size_t kernel_range_start = kernel_mapping_base + 2 * MiB; // The first 2 MiB are used for mapping the pre-kernel
|
||||
return VirtualRange { VirtualAddress(kernel_range_start), KERNEL_PD_END - kernel_range_start };
|
||||
#endif
|
||||
}
|
||||
|
||||
MemoryManager::GlobalData::GlobalData()
|
||||
|
||||
Reference in New Issue
Block a user