mirror of
				https://git.suyu.dev/suyu/suyu
				synced 2025-10-30 15:39:02 -05:00 
			
		
		
		
	core/memory: Create a special MapMemoryRegion for physical memory.
This allows us to create a fastmem arena within the memory.cpp helpers.
This commit is contained in:
		| @@ -14,6 +14,9 @@ namespace Kernel { | ||||
| // - Second to ensure all host backing memory used is aligned to 256 bytes due | ||||
| // to strict alignment restrictions on GPU memory. | ||||
|  | ||||
| using PhysicalMemory = std::vector<u8, Common::AlignmentAllocator<u8, 256>>; | ||||
| using PhysicalMemoryVector = std::vector<u8, Common::AlignmentAllocator<u8, 256>>; | ||||
| class PhysicalMemory final : public PhysicalMemoryVector { | ||||
|     using PhysicalMemoryVector::PhysicalMemoryVector; | ||||
| }; | ||||
|  | ||||
| } // namespace Kernel | ||||
|   | ||||
| @@ -780,8 +780,7 @@ void VMManager::UpdatePageTableForVMA(const VirtualMemoryArea& vma) { | ||||
|         memory.UnmapRegion(page_table, vma.base, vma.size); | ||||
|         break; | ||||
|     case VMAType::AllocatedMemoryBlock: | ||||
|         memory.MapMemoryRegion(page_table, vma.base, vma.size, | ||||
|                                vma.backing_block->data() + vma.offset); | ||||
|         memory.MapMemoryRegion(page_table, vma.base, vma.size, *vma.backing_block, vma.offset); | ||||
|         break; | ||||
|     case VMAType::BackingMemory: | ||||
|         memory.MapMemoryRegion(page_table, vma.base, vma.size, vma.backing_memory); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Markus Wick
					Markus Wick