[APU] Physical address in XE_XMA_REG_CONTEXT_ARRAY_ADDRESS
This commit is contained in:
parent
e35c609224
commit
b25c50164f
|
@ -105,12 +105,17 @@ X_STATUS XmaDecoder::Setup(kernel::KernelState* kernel_state) {
|
|||
reinterpret_cast<cpu::MMIOWriteCallback>(MMIOWriteRegisterThunk));
|
||||
|
||||
// Setup XMA context data.
|
||||
// The Xbox 360 kernel allocates the contexts with X_PAGE_NOCACHE |
|
||||
// X_PAGE_READWRITE and writes MmGetPhysicalAddress for the address to the
|
||||
// register.
|
||||
context_data_first_ptr_ = memory()->SystemHeapAlloc(
|
||||
sizeof(XMA_CONTEXT_DATA) * kContextCount, 256, kSystemHeapPhysical);
|
||||
context_data_last_ptr_ =
|
||||
context_data_first_ptr_ + (sizeof(XMA_CONTEXT_DATA) * kContextCount - 1);
|
||||
register_file_[XE_XMA_REG_CONTEXT_ARRAY_ADDRESS].u32 =
|
||||
context_data_first_ptr_;
|
||||
memory()
|
||||
->LookupHeap(context_data_first_ptr_)
|
||||
->GetPhysicalAddress(context_data_first_ptr_);
|
||||
|
||||
// Setup XMA contexts.
|
||||
for (int i = 0; i < kContextCount; ++i) {
|
||||
|
|
Loading…
Reference in New Issue