mirror of
https://github.com/wiiu-env/MemoryMappingModule.git
synced 2024-11-25 11:16:53 +01:00
Add sCheckDataRange hook to allow loading .rpl files into our memory region via OSDynload_Acquire (and a custom allocator)
This commit is contained in:
parent
699273c86d
commit
aaf9a1a082
@ -12,6 +12,15 @@ DECL_FUNCTION(int32_t, KiEffectiveToPhysical, uint32_t addressSpace, uint32_t vi
|
||||
}
|
||||
|
||||
|
||||
|
||||
DECL_FUNCTION(int32_t, sCheckDataRange, uint32_t address, uint32_t maxDataSize) {
|
||||
if((address & 0xF0000000) == 0x80000000){
|
||||
return 1;
|
||||
}
|
||||
|
||||
return real_sCheckDataRange(address, maxDataSize);
|
||||
}
|
||||
|
||||
DECL_FUNCTION(int32_t, KiPhysicalToEffectiveCached, uint32_t addressSpace, uint32_t virtualAddress) {
|
||||
int32_t result = real_KiPhysicalToEffectiveCached(addressSpace, virtualAddress);
|
||||
if (result == 0) {
|
||||
@ -47,6 +56,7 @@ DECL_FUNCTION(uint32_t, KiIsEffectiveRangeValid, uint32_t addressSpace, uint32_t
|
||||
}
|
||||
|
||||
function_replacement_data_t function_replacements[] __attribute__((section(".data"))) = {
|
||||
REPLACE_FUNCTION_VIA_ADDRESS(sCheckDataRange, 0x3200cf60, 0x0100cf60),
|
||||
REPLACE_FUNCTION_VIA_ADDRESS(KiEffectiveToPhysical, 0xffee0aac, 0xffee0aac),
|
||||
REPLACE_FUNCTION_VIA_ADDRESS(KiPhysicalToEffectiveCached, 0xffee0a3c, 0xffee0a3c),
|
||||
REPLACE_FUNCTION_VIA_ADDRESS(KiPhysicalToEffectiveUncached, 0xffee0a80, 0xffee0a80),
|
||||
|
Loading…
Reference in New Issue
Block a user