Oops (Chihiro again)

This commit is contained in:
ergo720 2017-12-19 16:21:20 +01:00
parent ad47a2902b
commit ac7f933069
1 changed files with 2 additions and 3 deletions

View File

@ -234,15 +234,14 @@ void VMManager::InitializeChihiro()
m_MaxContiguousAddress = CHIHIRO_CONTIGUOUS_MEMORY_LIMIT; m_MaxContiguousAddress = CHIHIRO_CONTIGUOUS_MEMORY_LIMIT;
m_MaxPhysicalMemory = CHIHIRO_MEMORY_SIZE; m_MaxPhysicalMemory = CHIHIRO_MEMORY_SIZE;
// Allocate the nv2a instance memory and the memory holding the PFN database (the latter is not not emulated) // Allocate the nv2a instance memory and the memory holding the PFN database (the latter is not not emulated)
VMAIter upper_mem_vma_handle = CarveVMA(m_Base + m_MaxContiguousAddress, 48 * PAGE_SIZE); VMAIter upper_mem_vma_handle = CarveVMA(m_Base + m_MaxContiguousAddress, 48 * PAGE_SIZE);
VirtualMemoryArea& upper_mem_vma = upper_mem_vma_handle->second; VirtualMemoryArea& upper_mem_vma = upper_mem_vma_handle->second;
upper_mem_vma.type = VMAType::Allocated; upper_mem_vma.type = VMAType::Allocated;
upper_mem_vma.permissions = PAGE_EXECUTE_READWRITE; upper_mem_vma.permissions = PAGE_EXECUTE_READWRITE;
upper_mem_vma.backing_block = AllocatePhysicalMemoryRange(48 * PAGE_SIZE, m_MaxContiguousAddress, CHIHIRO_MEMORY_SIZE); upper_mem_vma.backing_block = AllocatePhysicalMemoryRange(48 * PAGE_SIZE, m_MaxContiguousAddress, CHIHIRO_MEMORY_SIZE);
MergeAdjacentVMA(upper_mem_vma_handle);
UpdatePageTableForVMA(upper_mem_vma); UpdatePageTableForVMA(upper_mem_vma);
m_ImageMemoryInUse += 16 * PAGE_SIZE; m_ImageMemoryInUse += 48 * PAGE_SIZE;
// Map the contiguous memory // Map the contiguous memory
UnmapRange(CONTIGUOUS_MEMORY_BASE); UnmapRange(CONTIGUOUS_MEMORY_BASE);