mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 21:22:46 +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
					
				
					 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.
 |     // Register used memory regions that we know of.
 | ||||||
|     m_global_data.with([&](auto& global_data) { |     m_global_data.with([&](auto& global_data) { | ||||||
|         global_data.used_memory_ranges.ensure_capacity(4); |         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) }); |         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()) }); |         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) { |         if (multiboot_flags & 0x4) { | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Timon Kruiper
						Timon Kruiper