From 31199dd41d63dcf084676ab9f76cd30e1f25579e Mon Sep 17 00:00:00 2001 From: Ben Vanik Date: Fri, 31 May 2013 21:40:15 -0700 Subject: [PATCH] VdHSIOCalibrationLock. --- src/xenia/kernel/modules/xboxkrnl/xboxkrnl_video.cc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/xenia/kernel/modules/xboxkrnl/xboxkrnl_video.cc b/src/xenia/kernel/modules/xboxkrnl/xboxkrnl_video.cc index 80fe290ac..1938aab4d 100644 --- a/src/xenia/kernel/modules/xboxkrnl/xboxkrnl_video.cc +++ b/src/xenia/kernel/modules/xboxkrnl/xboxkrnl_video.cc @@ -12,6 +12,7 @@ #include #include #include +#include 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); }