mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-06 06:05:40 +12:00
Implement Luma icache SVCs
This commit is contained in:
parent
33c3e67b31
commit
84c358660c
2 changed files with 19 additions and 0 deletions
|
@ -175,6 +175,8 @@ public:
|
|||
void svcSignalEvent();
|
||||
void svcSetTimer();
|
||||
void svcSleepThread();
|
||||
void svcInvalidateInstructionCacheRange();
|
||||
void svcInvalidateEntireInstructionCache();
|
||||
void connectToPort();
|
||||
void outputDebugString();
|
||||
void waitSynchronization1();
|
||||
|
|
|
@ -69,6 +69,10 @@ void Kernel::serviceSVC(u32 svc) {
|
|||
case 0x3A: getResourceLimitCurrentValues(); break;
|
||||
case 0x3B: getThreadContext(); break;
|
||||
case 0x3D: outputDebugString(); break;
|
||||
|
||||
// Luma SVCs
|
||||
case 0x93: svcInvalidateInstructionCacheRange(); break;
|
||||
case 0x94: svcInvalidateEntireInstructionCache(); break;
|
||||
default: Helpers::panic("Unimplemented svc: %X @ %08X", svc, regs[15]); break;
|
||||
}
|
||||
|
||||
|
@ -300,6 +304,19 @@ void Kernel::duplicateHandle() {
|
|||
void Kernel::clearInstructionCache() { cpu.clearCache(); }
|
||||
void Kernel::clearInstructionCacheRange(u32 start, u32 size) { cpu.clearCacheRange(start, size); }
|
||||
|
||||
void Kernel::svcInvalidateInstructionCacheRange() {
|
||||
const u32 start = regs[0];
|
||||
const u32 size = regs[1];
|
||||
|
||||
clearInstructionCacheRange(start, size);
|
||||
regs[0] = Result::Success;
|
||||
}
|
||||
|
||||
void Kernel::svcInvalidateEntireInstructionCache() {
|
||||
clearInstructionCache();
|
||||
regs[0] = Result::Success;
|
||||
}
|
||||
|
||||
namespace SystemInfoType {
|
||||
enum : u32 {
|
||||
MemoryInformation = 0,
|
||||
|
|
Loading…
Add table
Reference in a new issue