mirror of
https://github.com/wiiu-env/CustomRPXLoader.git
synced 2024-11-22 09:59:17 +01:00
Fix flushing the correct addresses
This commit is contained in:
parent
d950ea9432
commit
3e42af85fa
@ -74,7 +74,8 @@ ModuleDataFactory::load(const std::string &path, uint32_t destination_address, u
|
|||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t baseOffset = (destination_address - sizeOfModule) & 0xFFFFFF00;
|
uint32_t targetAddress = (destination_address - sizeOfModule) & 0xFFFFFF00;
|
||||||
|
uint32_t baseOffset = targetAddress;
|
||||||
|
|
||||||
uint32_t offset_text = baseOffset;
|
uint32_t offset_text = baseOffset;
|
||||||
uint32_t offset_data = offset_text;
|
uint32_t offset_data = offset_text;
|
||||||
@ -161,10 +162,10 @@ ModuleDataFactory::load(const std::string &path, uint32_t destination_address, u
|
|||||||
moduleData.addRelocationData(reloc);
|
moduleData.addRelocationData(reloc);
|
||||||
}
|
}
|
||||||
|
|
||||||
DEBUG_FUNCTION_LINE("DCFlushRange %08X - %08X", baseOffset, baseOffset + totalSize);
|
DEBUG_FUNCTION_LINE("DCFlushRange %08X - %08X", targetAddress, destination_address);
|
||||||
DCFlushRange((void *) baseOffset, totalSize);
|
DCFlushRange((void *) targetAddress, destination_address - targetAddress);
|
||||||
DEBUG_FUNCTION_LINE("ICInvalidateRange %08X - %08X", baseOffset, baseOffset + totalSize);
|
DEBUG_FUNCTION_LINE("ICInvalidateRange %08X - %08X", targetAddress, destination_address);
|
||||||
ICInvalidateRange((void *) baseOffset, totalSize);
|
ICInvalidateRange((void *) targetAddress, destination_address - targetAddress);
|
||||||
|
|
||||||
free(destinations);
|
free(destinations);
|
||||||
free(buffer);
|
free(buffer);
|
||||||
|
Loading…
Reference in New Issue
Block a user