mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 14:12:44 +00:00 
			
		
		
		
	Kernel: Make identity mapping mechanism used during AP boot non-generic
When booting AP's, we identity map a region at 0x8000 while doing the initial bringup sequence. This is the only thing in the kernel that requires an identity mapping, yet we had a bunch of generic API's and a dedicated VirtualRangeAllocator in every PageDirectory for this purpose. This patch simplifies the situation by moving the identity mapping logic to the AP boot code and removing the generic API's.
This commit is contained in:
		
							parent
							
								
									16ac3bbfd7
								
							
						
					
					
						commit
						cdab5b2091
					
				
					 6 changed files with 20 additions and 23 deletions
				
			
		|  | @ -247,10 +247,7 @@ void Region::unmap(ShouldDeallocateVirtualMemoryVirtualRange deallocate_range) | |||
|     } | ||||
|     MM.flush_tlb(m_page_directory, vaddr(), page_count()); | ||||
|     if (deallocate_range == ShouldDeallocateVirtualMemoryVirtualRange::Yes) { | ||||
|         if (m_page_directory->range_allocator().contains(range())) | ||||
|             m_page_directory->range_allocator().deallocate(range()); | ||||
|         else | ||||
|             m_page_directory->identity_range_allocator().deallocate(range()); | ||||
|         m_page_directory->range_allocator().deallocate(range()); | ||||
|     } | ||||
|     m_page_directory = nullptr; | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling