mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-06 22:25:41 +12:00
Make some things panic for later
This commit is contained in:
parent
687c99cab6
commit
ec7c0b86b7
5 changed files with 25 additions and 1 deletions
|
@ -92,6 +92,7 @@ private:
|
|||
void clearEvent();
|
||||
void createAddressArbiter();
|
||||
void createEvent();
|
||||
void createMemoryBlock();
|
||||
void createMutex();
|
||||
void createThread();
|
||||
void controlMemory();
|
||||
|
|
|
@ -10,6 +10,7 @@ class CECDService {
|
|||
MAKE_LOG_FUNCTION(log, cecdLogger)
|
||||
|
||||
// Service commands
|
||||
void getEventHandle(u32 messagePointer);
|
||||
|
||||
public:
|
||||
CECDService(Memory& mem) : mem(mem) {}
|
||||
|
|
|
@ -38,6 +38,7 @@ void Kernel::serviceSVC(u32 svc) {
|
|||
case 0x17: createEvent(); break;
|
||||
case 0x18: signalEvent(); break;
|
||||
case 0x19: clearEvent(); break;
|
||||
case 0x1E: createMemoryBlock(); break;
|
||||
case 0x1F: mapMemoryBlock(); break;
|
||||
case 0x21: createAddressArbiter(); break;
|
||||
case 0x22: arbitrateAddress(); break;
|
||||
|
|
|
@ -120,8 +120,19 @@ void Kernel::mapMemoryBlock() {
|
|||
default: Helpers::panic("Mapping unknown shared memory block: %X", block);
|
||||
}
|
||||
} else {
|
||||
Helpers::panic("MapMemoryBlock where the handle does not refer to GSP memory");
|
||||
Helpers::panic("MapMemoryBlock where the handle does not refer to a known piece of kernel shared mem");
|
||||
}
|
||||
|
||||
regs[0] = SVCResult::Success;
|
||||
}
|
||||
|
||||
void Kernel::createMemoryBlock() {
|
||||
const u32 addr = regs[1];
|
||||
const u32 size = regs[2];
|
||||
const u32 myPermission = regs[3];
|
||||
const u32 otherPermission = regs[4];
|
||||
logSVC("CreateMemoryBlock (addr = %08X, size = %08X, myPermission = %d, otherPermission = %d)\n", addr, size, myPermission, otherPermission);
|
||||
|
||||
regs[0] = SVCResult::Success; regs[1] = 0x66666666;
|
||||
//Helpers::panic("Kernel::CreateMemoryBlock");
|
||||
}
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
namespace CECDCommands {
|
||||
enum : u32 {
|
||||
GetEventHandle = 0x000F0000
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -16,6 +17,15 @@ void CECDService::reset() {}
|
|||
void CECDService::handleSyncRequest(u32 messagePointer) {
|
||||
const u32 command = mem.read32(messagePointer);
|
||||
switch (command) {
|
||||
case CECDCommands::GetEventHandle: getEventHandle(messagePointer); break;
|
||||
default: Helpers::panic("CECD service requested. Command: %08X\n", command);
|
||||
}
|
||||
}
|
||||
|
||||
void CECDService::getEventHandle(u32 messagePointer) {
|
||||
log("CECD::GetEventHandle (stubbed)\n");
|
||||
Helpers::panic("TODO: Actually implement CECD::GetEventHandle");
|
||||
|
||||
mem.write32(messagePointer + 4, Result::Success);
|
||||
mem.write32(messagePointer + 12, 0x66666666);
|
||||
}
|
Loading…
Add table
Reference in a new issue