From 8033c73f41296d2cd847e1b130ac4e52fcbb2eb6 Mon Sep 17 00:00:00 2001 From: Ben Vanik Date: Mon, 6 Jan 2014 23:19:26 -0800 Subject: [PATCH] Stubbing KeLockL2. --- src/xenia/kernel/xboxkrnl_memory.cc | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/xenia/kernel/xboxkrnl_memory.cc b/src/xenia/kernel/xboxkrnl_memory.cc index 573658f13..ef4de0967 100644 --- a/src/xenia/kernel/xboxkrnl_memory.cc +++ b/src/xenia/kernel/xboxkrnl_memory.cc @@ -446,6 +446,25 @@ SHIM_CALL MmGetPhysicalAddress_shim( } +SHIM_CALL KeLockL2_shim( + PPCContext* ppc_state, KernelState* state) { + // Ignored for now. This is just a perf optimization, I think. + // It may be useful as a hint for CPU-GPU transfer. + + XELOGD( + "KeLockL2(?)"); + + SHIM_SET_RETURN(0); +} + + +SHIM_CALL KeUnlockL2_shim( + PPCContext* ppc_state, KernelState* state) { + XELOGD( + "KeUnlockL2(?)"); +} + + } // namespace kernel } // namespace xe @@ -461,4 +480,7 @@ void xe::kernel::xboxkrnl::RegisterMemoryExports( SHIM_SET_MAPPING("xboxkrnl.exe", MmQueryAllocationSize, state); SHIM_SET_MAPPING("xboxkrnl.exe", MmQueryStatistics, state); SHIM_SET_MAPPING("xboxkrnl.exe", MmGetPhysicalAddress, state); + + SHIM_SET_MAPPING("xboxkrnl.exe", KeLockL2, state); + SHIM_SET_MAPPING("xboxkrnl.exe", KeUnlockL2, state); }