mirror of
https://github.com/wiiu-env/WUMSLoader.git
synced 2025-01-26 06:55:29 +01:00
reloactor: Add KiIsEffectiveRangeValid patch
This commit is contained in:
parent
6695815a6e
commit
0225c49e3a
@ -95,10 +95,20 @@ DECL(uint32_t, IPCKDriver_ValidatePhysicalAddress, uint32_t u1, uint32_t physSta
|
|||||||
return real_IPCKDriver_ValidatePhysicalAddress(u1, physStart, physEnd);
|
return real_IPCKDriver_ValidatePhysicalAddress(u1, physStart, physEnd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DECL(uint32_t, KiIsEffectiveRangeValid, uint32_t addressSpace, uint32_t virtualAddress, uint32_t size) {
|
||||||
|
uint32_t result = real_KiIsEffectiveRangeValid(addressSpace, virtualAddress, size);
|
||||||
|
if (result == 0) {
|
||||||
|
if(MemoryMappingEffectiveToPhysicalPTR != 0){
|
||||||
|
return ((uint32_t (*)(uint32_t)) ((uint32_t *) MemoryMappingEffectiveToPhysicalPTR))(virtualAddress);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
hooks_magic_t method_hooks_hooks_static[] __attribute__((section(".data"))) = {
|
hooks_magic_t method_hooks_hooks_static[] __attribute__((section(".data"))) = {
|
||||||
MAKE_MAGIC(KiEffectiveToPhysical, LIB_CORE_INIT, STATIC_FUNCTION),
|
MAKE_MAGIC(KiEffectiveToPhysical, LIB_CORE_INIT, STATIC_FUNCTION),
|
||||||
MAKE_MAGIC(KiPhysicalToEffectiveCached, LIB_CORE_INIT, STATIC_FUNCTION),
|
MAKE_MAGIC(KiPhysicalToEffectiveCached, LIB_CORE_INIT, STATIC_FUNCTION),
|
||||||
MAKE_MAGIC(KiPhysicalToEffectiveUncached, LIB_CORE_INIT, STATIC_FUNCTION),
|
MAKE_MAGIC(KiPhysicalToEffectiveUncached, LIB_CORE_INIT, STATIC_FUNCTION),
|
||||||
|
MAKE_MAGIC(KiIsEffectiveRangeValid, LIB_CORE_INIT, STATIC_FUNCTION),
|
||||||
MAKE_MAGIC(IPCKDriver_ValidatePhysicalAddress, LIB_CORE_INIT, STATIC_FUNCTION),
|
MAKE_MAGIC(IPCKDriver_ValidatePhysicalAddress, LIB_CORE_INIT, STATIC_FUNCTION),
|
||||||
MAKE_MAGIC(OSDynLoad_Acquire, LIB_CORE_INIT, STATIC_FUNCTION),
|
MAKE_MAGIC(OSDynLoad_Acquire, LIB_CORE_INIT, STATIC_FUNCTION),
|
||||||
MAKE_MAGIC(OSDynLoad_FindExport, LIB_CORE_INIT, STATIC_FUNCTION)
|
MAKE_MAGIC(OSDynLoad_FindExport, LIB_CORE_INIT, STATIC_FUNCTION)
|
||||||
|
@ -253,6 +253,8 @@ uint32_t GetAddressOfFunction(const char *functionName, uint32_t library) {
|
|||||||
return 0xffee0a3c;
|
return 0xffee0a3c;
|
||||||
}else if(strcmp(functionName, "IPCKDriver_ValidatePhysicalAddress") == 0){
|
}else if(strcmp(functionName, "IPCKDriver_ValidatePhysicalAddress") == 0){
|
||||||
return 0xfff0cb5c;
|
return 0xfff0cb5c;
|
||||||
|
}else if(strcmp(functionName, "KiIsEffectiveRangeValid") == 0){
|
||||||
|
return 0xffee0d6c;
|
||||||
}
|
}
|
||||||
|
|
||||||
OSDynLoad_Module rpl_handle = 0;
|
OSDynLoad_Module rpl_handle = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user