VdHSIOCalibrationLock.

This commit is contained in:
Ben Vanik 2013-05-31 21:40:15 -07:00
parent 4e6e27d9ac
commit 31199dd41d
1 changed files with 9 additions and 0 deletions

View File

@ -12,6 +12,7 @@
#include <xenia/kernel/shim_utils.h>
#include <xenia/kernel/modules/xboxkrnl/kernel_state.h>
#include <xenia/kernel/modules/xboxkrnl/xboxkrnl_private.h>
#include <xenia/kernel/modules/xboxkrnl/xboxkrnl_rtl.h>
using namespace xe;
@ -203,4 +204,12 @@ void xe::kernel::xboxkrnl::RegisterVideoExports(
"xboxkrnl.exe", ordinals::VdGpuClockInMHz,
pVdGpuClockInMHz);
XESETUINT32BE(mem + pVdGpuClockInMHz, 500);
// VdHSIOCalibrationLock (28b)
// CriticalSection.
uint32_t pVdHSIOCalibrationLock = xe_memory_heap_alloc(memory, 0, 28, 0);
export_resolver->SetVariableMapping(
"xboxkrnl.exe", ordinals::VdHSIOCalibrationLock,
pVdHSIOCalibrationLock);
xeRtlInitializeCriticalSectionAndSpinCount(pVdHSIOCalibrationLock, 10000);
}