mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
Kernel: Don't reserve Low Memory (0-1MB) on non-x86 architectures
This memory is only reserved on x86(-64) and is usable on other architectures.
This commit is contained in:
parent
1b60126d93
commit
424a974e01
Notes:
sideshowbarker
2024-07-17 06:30:25 +09:00
Author: https://github.com/FireFox317 Commit: https://github.com/SerenityOS/serenity/commit/424a974e01 Pull-request: https://github.com/SerenityOS/serenity/pull/15309 Reviewed-by: https://github.com/bgianfo Reviewed-by: https://github.com/bugreport0 Reviewed-by: https://github.com/nico ✅
1 changed files with 2 additions and 0 deletions
|
@ -243,7 +243,9 @@ UNMAP_AFTER_INIT void MemoryManager::parse_memory_map()
|
|||
// Register used memory regions that we know of.
|
||||
m_global_data.with([&](auto& global_data) {
|
||||
global_data.used_memory_ranges.ensure_capacity(4);
|
||||
#if ARCH(I386) || ARCH(X86_64)
|
||||
global_data.used_memory_ranges.append(UsedMemoryRange { UsedMemoryRangeType::LowMemory, PhysicalAddress(0x00000000), PhysicalAddress(1 * MiB) });
|
||||
#endif
|
||||
global_data.used_memory_ranges.append(UsedMemoryRange { UsedMemoryRangeType::Kernel, PhysicalAddress(virtual_to_low_physical((FlatPtr)start_of_kernel_image)), PhysicalAddress(page_round_up(virtual_to_low_physical((FlatPtr)end_of_kernel_image)).release_value_but_fixme_should_propagate_errors()) });
|
||||
|
||||
if (multiboot_flags & 0x4) {
|
||||
|
|
Loading…
Reference in a new issue