Stub NDM::ClearHalfAwakeMacFilter

This commit is contained in:
wheremyfoodat 2023-08-20 00:48:07 +03:00
parent 48b19b2588
commit fc2747a3d3
2 changed files with 15 additions and 6 deletions

View file

@ -11,6 +11,7 @@ class NDMService {
MAKE_LOG_FUNCTION(log, ndmLogger)
// Service commands
void clearHalfAwakeMacFilter(u32 messagePointer);
void overrideDefaultDaemons(u32 messagePointer);
void resumeDaemons(u32 messagePointer);
void resumeScheduler(u32 messagePointer);

View file

@ -7,7 +7,8 @@ namespace NDMCommands {
SuspendDaemons = 0x00060040,
ResumeDaemons = 0x00070040,
SuspendScheduler = 0x00080040,
ResumeScheduler = 0x00090000
ResumeScheduler = 0x00090000,
ClearHalfAwakeMacFilter = 0x00170000,
};
}
@ -16,6 +17,7 @@ void NDMService::reset() {}
void NDMService::handleSyncRequest(u32 messagePointer) {
const u32 command = mem.read32(messagePointer);
switch (command) {
case NDMCommands::ClearHalfAwakeMacFilter: clearHalfAwakeMacFilter(messagePointer); break;
case NDMCommands::OverrideDefaultDaemons: overrideDefaultDaemons(messagePointer); break;
case NDMCommands::ResumeDaemons: resumeDaemons(messagePointer); break;
case NDMCommands::ResumeScheduler: resumeScheduler(messagePointer); break;
@ -26,31 +28,37 @@ void NDMService::handleSyncRequest(u32 messagePointer) {
}
void NDMService::overrideDefaultDaemons(u32 messagePointer) {
log("NDM::OverrideDefaultDaemons(stubbed)\n");
log("NDM::OverrideDefaultDaemons (stubbed)\n");
mem.write32(messagePointer, IPC::responseHeader(0x14, 1, 0));
mem.write32(messagePointer + 4, Result::Success);
}
void NDMService::resumeDaemons(u32 messagePointer) {
log("NDM::resumeDaemons(stubbed)\n");
log("NDM::resumeDaemons (stubbed)\n");
mem.write32(messagePointer, IPC::responseHeader(0x7, 1, 0));
mem.write32(messagePointer + 4, Result::Success);
}
void NDMService::suspendDaemons(u32 messagePointer) {
log("NDM::SuspendDaemons(stubbed)\n");
log("NDM::SuspendDaemons (stubbed)\n");
mem.write32(messagePointer, IPC::responseHeader(0x6, 1, 0));
mem.write32(messagePointer + 4, Result::Success);
}
void NDMService::resumeScheduler(u32 messagePointer) {
log("NDM::ResumeScheduler(stubbed)\n");
log("NDM::ResumeScheduler (stubbed)\n");
mem.write32(messagePointer, IPC::responseHeader(0x9, 1, 0));
mem.write32(messagePointer + 4, Result::Success);
}
void NDMService::suspendScheduler(u32 messagePointer) {
log("NDM::SuspendScheduler(stubbed)\n");
log("NDM::SuspendScheduler (stubbed)\n");
mem.write32(messagePointer, IPC::responseHeader(0x8, 1, 0));
mem.write32(messagePointer + 4, Result::Success);
}
void NDMService::clearHalfAwakeMacFilter(u32 messagePointer) {
log("NDM::ClearHalfAwakeMacFilter (stubbed)\n");
mem.write32(messagePointer, IPC::responseHeader(0x17, 1, 0));
mem.write32(messagePointer + 4, Result::Success);
}