Revert "[APU] Temp XMA context allocation region workaround"
This reverts commit 968c337d22
.
This commit is contained in:
parent
968c337d22
commit
e35c609224
|
@ -105,11 +105,8 @@ X_STATUS XmaDecoder::Setup(kernel::KernelState* kernel_state) {
|
||||||
reinterpret_cast<cpu::MMIOWriteCallback>(MMIOWriteRegisterThunk));
|
reinterpret_cast<cpu::MMIOWriteCallback>(MMIOWriteRegisterThunk));
|
||||||
|
|
||||||
// Setup XMA context data.
|
// Setup XMA context data.
|
||||||
// TODO(Triang3l): Find out what address is used on a real console and why it
|
context_data_first_ptr_ = memory()->SystemHeapAlloc(
|
||||||
// doesn't work when allocated in 4 KB pages.
|
sizeof(XMA_CONTEXT_DATA) * kContextCount, 256, kSystemHeapPhysical);
|
||||||
context_data_first_ptr_ =
|
|
||||||
memory()->SystemHeapAlloc(sizeof(XMA_CONTEXT_DATA) * kContextCount, 256,
|
|
||||||
kSystemHeapPhysical | kSystemHeapLargePages);
|
|
||||||
context_data_last_ptr_ =
|
context_data_last_ptr_ =
|
||||||
context_data_first_ptr_ + (sizeof(XMA_CONTEXT_DATA) * kContextCount - 1);
|
context_data_first_ptr_ + (sizeof(XMA_CONTEXT_DATA) * kContextCount - 1);
|
||||||
register_file_[XE_XMA_REG_CONTEXT_ARRAY_ADDRESS].u32 =
|
register_file_[XE_XMA_REG_CONTEXT_ARRAY_ADDRESS].u32 =
|
||||||
|
|
|
@ -507,9 +507,7 @@ uint32_t Memory::SystemHeapAlloc(uint32_t size, uint32_t alignment,
|
||||||
uint32_t system_heap_flags) {
|
uint32_t system_heap_flags) {
|
||||||
// TODO(benvanik): lightweight pool.
|
// TODO(benvanik): lightweight pool.
|
||||||
bool is_physical = !!(system_heap_flags & kSystemHeapPhysical);
|
bool is_physical = !!(system_heap_flags & kSystemHeapPhysical);
|
||||||
auto heap = LookupHeapByType(
|
auto heap = LookupHeapByType(is_physical, 4096);
|
||||||
is_physical,
|
|
||||||
(system_heap_flags & kSystemHeapLargePages) ? (64 * 1024) : 4096);
|
|
||||||
uint32_t address;
|
uint32_t address;
|
||||||
if (!heap->Alloc(size, alignment,
|
if (!heap->Alloc(size, alignment,
|
||||||
kMemoryAllocationReserve | kMemoryAllocationCommit,
|
kMemoryAllocationReserve | kMemoryAllocationCommit,
|
||||||
|
|
|
@ -31,7 +31,6 @@ class Memory;
|
||||||
enum SystemHeapFlag : uint32_t {
|
enum SystemHeapFlag : uint32_t {
|
||||||
kSystemHeapVirtual = 1 << 0,
|
kSystemHeapVirtual = 1 << 0,
|
||||||
kSystemHeapPhysical = 1 << 1,
|
kSystemHeapPhysical = 1 << 1,
|
||||||
kSystemHeapLargePages = 1 << 2,
|
|
||||||
|
|
||||||
kSystemHeapDefault = kSystemHeapVirtual,
|
kSystemHeapDefault = kSystemHeapVirtual,
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue