[Memory] GetPhysicalAddress - Added case to assume that input address is already physical
- Restored break on Indirect Buffer failure (Hopefully it won't break anything)
This commit is contained in:
@@ -29,7 +29,7 @@ void COMMAND_PROCESSOR::ExecuteIndirectBuffer(uint32_t ptr,
|
|||||||
// Return up a level if we encounter a bad packet.
|
// Return up a level if we encounter a bad packet.
|
||||||
XELOGE("**** INDIRECT RINGBUFFER: Failed to execute packet.");
|
XELOGE("**** INDIRECT RINGBUFFER: Failed to execute packet.");
|
||||||
assert_always();
|
assert_always();
|
||||||
// break;
|
break;
|
||||||
}
|
}
|
||||||
} while (reader_.read_count());
|
} while (reader_.read_count());
|
||||||
|
|
||||||
|
|||||||
@@ -527,9 +527,15 @@ uint32_t Memory::HostToGuestVirtualThunk(const void* context,
|
|||||||
|
|
||||||
uint32_t Memory::GetPhysicalAddress(uint32_t address) const {
|
uint32_t Memory::GetPhysicalAddress(uint32_t address) const {
|
||||||
const BaseHeap* heap = LookupHeap(address);
|
const BaseHeap* heap = LookupHeap(address);
|
||||||
if (!heap || heap->heap_type() != HeapType::kGuestPhysical) {
|
if (!heap) {
|
||||||
return UINT32_MAX;
|
return UINT32_MAX;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Assumption that we already received physical address, so just return it.
|
||||||
|
if (heap->heap_type() != HeapType::kGuestPhysical && address < 0x1FFFFFFF) {
|
||||||
|
return address;
|
||||||
|
}
|
||||||
|
|
||||||
return static_cast<const PhysicalHeap*>(heap)->GetPhysicalAddress(address);
|
return static_cast<const PhysicalHeap*>(heap)->GetPhysicalAddress(address);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user