mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-20 01:45:07 -04:00
pm: actually implement GetBootFinishedEvent
This commit is contained in:
parent
f38965d0bd
commit
d6502c174a
5 changed files with 108 additions and 84 deletions
|
@ -13,7 +13,7 @@
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <switch.h>
|
#include <switch.h>
|
||||||
#include <stratosphere.hpp>
|
#include <stratosphere.hpp>
|
||||||
#include "pm_process_track.hpp"
|
#include "pm_process_track.hpp"
|
||||||
|
@ -23,9 +23,9 @@ void ProcessTracking::MainLoop(void *arg) {
|
||||||
/* Make a new waitable manager. */
|
/* Make a new waitable manager. */
|
||||||
auto process_waiter = new WaitableManager(1);
|
auto process_waiter = new WaitableManager(1);
|
||||||
process_waiter->AddWaitable(Registration::GetProcessLaunchStartEvent());
|
process_waiter->AddWaitable(Registration::GetProcessLaunchStartEvent());
|
||||||
|
|
||||||
/* Service processes. */
|
/* Service processes. */
|
||||||
process_waiter->Process();
|
process_waiter->Process();
|
||||||
|
|
||||||
delete process_waiter;
|
delete process_waiter;
|
||||||
}
|
}
|
|
@ -35,6 +35,7 @@ static std::atomic<u64> g_debug_on_launch_tid(0);
|
||||||
static IEvent *g_process_event = nullptr;
|
static IEvent *g_process_event = nullptr;
|
||||||
static IEvent *g_debug_title_event = nullptr;
|
static IEvent *g_debug_title_event = nullptr;
|
||||||
static IEvent *g_debug_application_event = nullptr;
|
static IEvent *g_debug_application_event = nullptr;
|
||||||
|
static IEvent *g_boot_finished_event = nullptr;
|
||||||
|
|
||||||
static u8 g_ac_buf[4 * sizeof(LoaderProgramInfo)];
|
static u8 g_ac_buf[4 * sizeof(LoaderProgramInfo)];
|
||||||
|
|
||||||
|
@ -46,10 +47,11 @@ void Registration::InitializeSystemResources() {
|
||||||
g_process_event = CreateWriteOnlySystemEvent();
|
g_process_event = CreateWriteOnlySystemEvent();
|
||||||
g_debug_title_event = CreateWriteOnlySystemEvent();
|
g_debug_title_event = CreateWriteOnlySystemEvent();
|
||||||
g_debug_application_event = CreateWriteOnlySystemEvent();
|
g_debug_application_event = CreateWriteOnlySystemEvent();
|
||||||
|
g_boot_finished_event = CreateWriteOnlySystemEvent();
|
||||||
|
|
||||||
/* Auto-clear non-system event. */
|
/* Auto-clear non-system event. */
|
||||||
g_process_launch_start_event = CreateHosEvent(&Registration::ProcessLaunchStartCallback);
|
g_process_launch_start_event = CreateHosEvent(&Registration::ProcessLaunchStartCallback);
|
||||||
|
|
||||||
ResourceLimitUtils::InitializeLimits();
|
ResourceLimitUtils::InitializeLimits();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,55 +74,55 @@ void Registration::HandleProcessLaunch() {
|
||||||
new_process.tid_sid = g_process_launch_state.tid_sid;
|
new_process.tid_sid = g_process_launch_state.tid_sid;
|
||||||
std::memset(g_ac_buf, 0xCC, sizeof(g_ac_buf));
|
std::memset(g_ac_buf, 0xCC, sizeof(g_ac_buf));
|
||||||
u8 *acid_sac = g_ac_buf, *aci0_sac = acid_sac + sizeof(LoaderProgramInfo), *fac = aci0_sac + sizeof(LoaderProgramInfo), *fah = fac + sizeof(LoaderProgramInfo);
|
u8 *acid_sac = g_ac_buf, *aci0_sac = acid_sac + sizeof(LoaderProgramInfo), *fac = aci0_sac + sizeof(LoaderProgramInfo), *fah = fac + sizeof(LoaderProgramInfo);
|
||||||
|
|
||||||
/* Check that this is a real program. */
|
/* Check that this is a real program. */
|
||||||
if (R_FAILED((rc = ldrPmGetProgramInfo(new_process.tid_sid.title_id, new_process.tid_sid.storage_id, &program_info)))) {
|
if (R_FAILED((rc = ldrPmGetProgramInfo(new_process.tid_sid.title_id, new_process.tid_sid.storage_id, &program_info)))) {
|
||||||
goto HANDLE_PROCESS_LAUNCH_END;
|
goto HANDLE_PROCESS_LAUNCH_END;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Get the resource limit handle, ensure that we can launch the program. */
|
/* Get the resource limit handle, ensure that we can launch the program. */
|
||||||
if ((program_info.application_type & 3) == 1 && HasApplicationProcess(NULL)) {
|
if ((program_info.application_type & 3) == 1 && HasApplicationProcess(NULL)) {
|
||||||
rc = ResultPmApplicationRunning;
|
rc = ResultPmApplicationRunning;
|
||||||
goto HANDLE_PROCESS_LAUNCH_END;
|
goto HANDLE_PROCESS_LAUNCH_END;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Try to register the title for launch in loader... */
|
/* Try to register the title for launch in loader... */
|
||||||
if (R_FAILED((rc = ldrPmRegisterTitle(new_process.tid_sid.title_id, new_process.tid_sid.storage_id, &new_process.ldr_queue_index)))) {
|
if (R_FAILED((rc = ldrPmRegisterTitle(new_process.tid_sid.title_id, new_process.tid_sid.storage_id, &new_process.ldr_queue_index)))) {
|
||||||
goto HANDLE_PROCESS_LAUNCH_END;
|
goto HANDLE_PROCESS_LAUNCH_END;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Make sure the previous application is cleaned up. */
|
/* Make sure the previous application is cleaned up. */
|
||||||
if ((program_info.application_type & 3) == 1) {
|
if ((program_info.application_type & 3) == 1) {
|
||||||
ResourceLimitUtils::EnsureApplicationResourcesAvailable();
|
ResourceLimitUtils::EnsureApplicationResourcesAvailable();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Try to create the process... */
|
/* Try to create the process... */
|
||||||
if (R_FAILED((rc = ldrPmCreateProcess(LAUNCHFLAGS_ARGLOW(launch_flags) | LAUNCHFLAGS_ARGHIGH(launch_flags), new_process.ldr_queue_index, ResourceLimitUtils::GetResourceLimitHandle(program_info.application_type), &new_process.handle)))) {
|
if (R_FAILED((rc = ldrPmCreateProcess(LAUNCHFLAGS_ARGLOW(launch_flags) | LAUNCHFLAGS_ARGHIGH(launch_flags), new_process.ldr_queue_index, ResourceLimitUtils::GetResourceLimitHandle(program_info.application_type), &new_process.handle)))) {
|
||||||
goto PROCESS_CREATION_FAILED;
|
goto PROCESS_CREATION_FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Get the new process's id. */
|
/* Get the new process's id. */
|
||||||
svcGetProcessId(&new_process.pid, new_process.handle);
|
svcGetProcessId(&new_process.pid, new_process.handle);
|
||||||
|
|
||||||
/* Register with FS. */
|
/* Register with FS. */
|
||||||
memcpy(fac, program_info.ac_buffer + program_info.acid_sac_size + program_info.aci0_sac_size, program_info.acid_fac_size);
|
memcpy(fac, program_info.ac_buffer + program_info.acid_sac_size + program_info.aci0_sac_size, program_info.acid_fac_size);
|
||||||
memcpy(fah, program_info.ac_buffer + program_info.acid_sac_size + program_info.aci0_sac_size + program_info.acid_fac_size, program_info.aci0_fah_size);
|
memcpy(fah, program_info.ac_buffer + program_info.acid_sac_size + program_info.aci0_sac_size + program_info.acid_fac_size, program_info.aci0_fah_size);
|
||||||
if (R_FAILED((rc = fsprRegisterProgram(new_process.pid, new_process.tid_sid.title_id, new_process.tid_sid.storage_id, fah, program_info.aci0_fah_size, fac, program_info.acid_fac_size)))) {
|
if (R_FAILED((rc = fsprRegisterProgram(new_process.pid, new_process.tid_sid.title_id, new_process.tid_sid.storage_id, fah, program_info.aci0_fah_size, fac, program_info.acid_fac_size)))) {
|
||||||
goto FS_REGISTRATION_FAILED;
|
goto FS_REGISTRATION_FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Register with SM. */
|
/* Register with SM. */
|
||||||
memcpy(acid_sac, program_info.ac_buffer, program_info.acid_sac_size);
|
memcpy(acid_sac, program_info.ac_buffer, program_info.acid_sac_size);
|
||||||
memcpy(aci0_sac, program_info.ac_buffer + program_info.acid_sac_size, program_info.aci0_sac_size);
|
memcpy(aci0_sac, program_info.ac_buffer + program_info.acid_sac_size, program_info.aci0_sac_size);
|
||||||
if (R_FAILED((rc = smManagerRegisterProcess(new_process.pid, acid_sac, program_info.acid_sac_size, aci0_sac, program_info.aci0_sac_size)))) {
|
if (R_FAILED((rc = smManagerRegisterProcess(new_process.pid, acid_sac, program_info.acid_sac_size, aci0_sac, program_info.aci0_sac_size)))) {
|
||||||
goto SM_REGISTRATION_FAILED;
|
goto SM_REGISTRATION_FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Setup process flags. */
|
/* Setup process flags. */
|
||||||
if (program_info.application_type & 1) {
|
if (program_info.application_type & 1) {
|
||||||
new_process.flags |= PROCESSFLAGS_APPLICATION;
|
new_process.flags |= PROCESSFLAGS_APPLICATION;
|
||||||
}
|
}
|
||||||
if ((GetRuntimeFirmwareVersion() >= FirmwareVersion_200) && LAUNCHFLAGS_NOTIYDEBUGSPECIAL(launch_flags) && (program_info.application_type & 4)) {
|
if ((GetRuntimeFirmwareVersion() >= FirmwareVersion_200) && LAUNCHFLAGS_NOTIYDEBUGSPECIAL(launch_flags) && (program_info.application_type & 4)) {
|
||||||
new_process.flags |= PROCESSFLAGS_NOTIFYDEBUGSPECIAL;
|
new_process.flags |= PROCESSFLAGS_NOTIFYDEBUGSPECIAL;
|
||||||
}
|
}
|
||||||
if (LAUNCHFLAGS_NOTIFYWHENEXITED(launch_flags)) {
|
if (LAUNCHFLAGS_NOTIFYWHENEXITED(launch_flags)) {
|
||||||
|
@ -129,10 +131,10 @@ void Registration::HandleProcessLaunch() {
|
||||||
if (LAUNCHFLAGS_NOTIFYDEBUGEVENTS(launch_flags) && (GetRuntimeFirmwareVersion() < FirmwareVersion_200 || (program_info.application_type & 4))) {
|
if (LAUNCHFLAGS_NOTIFYDEBUGEVENTS(launch_flags) && (GetRuntimeFirmwareVersion() < FirmwareVersion_200 || (program_info.application_type & 4))) {
|
||||||
new_process.flags |= PROCESSFLAGS_NOTIFYDEBUGEVENTS;
|
new_process.flags |= PROCESSFLAGS_NOTIFYDEBUGEVENTS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Add process to the list. */
|
/* Add process to the list. */
|
||||||
Registration::AddProcessToList(std::make_shared<Registration::Process>(new_process));
|
Registration::AddProcessToList(std::make_shared<Registration::Process>(new_process));
|
||||||
|
|
||||||
/* Signal, if relevant. */
|
/* Signal, if relevant. */
|
||||||
if (new_process.tid_sid.title_id == g_debug_on_launch_tid.load()) {
|
if (new_process.tid_sid.title_id == g_debug_on_launch_tid.load()) {
|
||||||
g_debug_title_event->Signal();
|
g_debug_title_event->Signal();
|
||||||
|
@ -146,39 +148,39 @@ void Registration::HandleProcessLaunch() {
|
||||||
rc = ResultSuccess;
|
rc = ResultSuccess;
|
||||||
} else {
|
} else {
|
||||||
rc = svcStartProcess(new_process.handle, program_info.main_thread_priority, program_info.default_cpu_id, program_info.main_thread_stack_size);
|
rc = svcStartProcess(new_process.handle, program_info.main_thread_priority, program_info.default_cpu_id, program_info.main_thread_stack_size);
|
||||||
|
|
||||||
if (R_SUCCEEDED(rc)) {
|
if (R_SUCCEEDED(rc)) {
|
||||||
SetProcessState(new_process.pid, ProcessState_Running);
|
SetProcessState(new_process.pid, ProcessState_Running);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (R_FAILED(rc)) {
|
if (R_FAILED(rc)) {
|
||||||
Registration::RemoveProcessFromList(new_process.pid);
|
Registration::RemoveProcessFromList(new_process.pid);
|
||||||
smManagerUnregisterProcess(new_process.pid);
|
smManagerUnregisterProcess(new_process.pid);
|
||||||
}
|
}
|
||||||
|
|
||||||
SM_REGISTRATION_FAILED:
|
SM_REGISTRATION_FAILED:
|
||||||
if (R_FAILED(rc)) {
|
if (R_FAILED(rc)) {
|
||||||
fsprUnregisterProgram(new_process.pid);
|
fsprUnregisterProgram(new_process.pid);
|
||||||
}
|
}
|
||||||
|
|
||||||
FS_REGISTRATION_FAILED:
|
FS_REGISTRATION_FAILED:
|
||||||
if (R_FAILED(rc)) {
|
if (R_FAILED(rc)) {
|
||||||
svcCloseHandle(new_process.handle);
|
svcCloseHandle(new_process.handle);
|
||||||
new_process.handle = 0;
|
new_process.handle = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
PROCESS_CREATION_FAILED:
|
PROCESS_CREATION_FAILED:
|
||||||
if (R_FAILED(rc)) {
|
if (R_FAILED(rc)) {
|
||||||
ldrPmUnregisterTitle(new_process.ldr_queue_index);
|
ldrPmUnregisterTitle(new_process.ldr_queue_index);
|
||||||
}
|
}
|
||||||
|
|
||||||
HANDLE_PROCESS_LAUNCH_END:
|
HANDLE_PROCESS_LAUNCH_END:
|
||||||
g_process_launch_state.result = rc;
|
g_process_launch_state.result = rc;
|
||||||
if (R_SUCCEEDED(rc)) {
|
if (R_SUCCEEDED(rc)) {
|
||||||
*out_pid = new_process.pid;
|
*out_pid = new_process.pid;
|
||||||
}
|
}
|
||||||
|
|
||||||
g_sema_finish_launch.Signal();
|
g_sema_finish_launch.Signal();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -187,25 +189,25 @@ Result Registration::LaunchDebugProcess(u64 pid) {
|
||||||
std::scoped_lock<ProcessList &> lk(GetProcessList());
|
std::scoped_lock<ProcessList &> lk(GetProcessList());
|
||||||
LoaderProgramInfo program_info = {0};
|
LoaderProgramInfo program_info = {0};
|
||||||
Result rc;
|
Result rc;
|
||||||
|
|
||||||
std::shared_ptr<Registration::Process> proc = GetProcess(pid);
|
std::shared_ptr<Registration::Process> proc = GetProcess(pid);
|
||||||
if (proc == NULL) {
|
if (proc == NULL) {
|
||||||
return ResultPmProcessNotFound;
|
return ResultPmProcessNotFound;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (proc->state >= ProcessState_Running) {
|
if (proc->state >= ProcessState_Running) {
|
||||||
return ResultPmAlreadyStarted;
|
return ResultPmAlreadyStarted;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check that this is a real program. */
|
/* Check that this is a real program. */
|
||||||
if (R_FAILED((rc = ldrPmGetProgramInfo(proc->tid_sid.title_id, proc->tid_sid.storage_id, &program_info)))) {
|
if (R_FAILED((rc = ldrPmGetProgramInfo(proc->tid_sid.title_id, proc->tid_sid.storage_id, &program_info)))) {
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (R_SUCCEEDED((rc = svcStartProcess(proc->handle, program_info.main_thread_priority, program_info.default_cpu_id, program_info.main_thread_stack_size)))) {
|
if (R_SUCCEEDED((rc = svcStartProcess(proc->handle, program_info.main_thread_priority, program_info.default_cpu_id, program_info.main_thread_stack_size)))) {
|
||||||
proc->state = ProcessState_Running;
|
proc->state = ProcessState_Running;
|
||||||
}
|
}
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -216,11 +218,11 @@ Result Registration::LaunchProcess(u64 title_id, FsStorageId storage_id, u64 lau
|
||||||
g_process_launch_state.tid_sid.storage_id = storage_id;
|
g_process_launch_state.tid_sid.storage_id = storage_id;
|
||||||
g_process_launch_state.launch_flags = launch_flags;
|
g_process_launch_state.launch_flags = launch_flags;
|
||||||
g_process_launch_state.out_pid = out_pid;
|
g_process_launch_state.out_pid = out_pid;
|
||||||
|
|
||||||
/* Start a launch, and wait for it to exit. */
|
/* Start a launch, and wait for it to exit. */
|
||||||
g_process_launch_start_event->Signal();
|
g_process_launch_start_event->Signal();
|
||||||
g_sema_finish_launch.Wait();
|
g_sema_finish_launch.Wait();
|
||||||
|
|
||||||
return g_process_launch_state.result;
|
return g_process_launch_state.result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -230,15 +232,15 @@ Result Registration::LaunchProcessByTidSid(TidSid tid_sid, u64 launch_flags, u64
|
||||||
|
|
||||||
Result Registration::HandleSignaledProcess(std::shared_ptr<Registration::Process> process) {
|
Result Registration::HandleSignaledProcess(std::shared_ptr<Registration::Process> process) {
|
||||||
u64 tmp;
|
u64 tmp;
|
||||||
|
|
||||||
/* Reset the signal. */
|
/* Reset the signal. */
|
||||||
svcResetSignal(process->handle);
|
svcResetSignal(process->handle);
|
||||||
|
|
||||||
ProcessState old_state;
|
ProcessState old_state;
|
||||||
old_state = process->state;
|
old_state = process->state;
|
||||||
svcGetProcessInfo(&tmp, process->handle, ProcessInfoType_ProcessState);
|
svcGetProcessInfo(&tmp, process->handle, ProcessInfoType_ProcessState);
|
||||||
process->state = (ProcessState)tmp;
|
process->state = (ProcessState)tmp;
|
||||||
|
|
||||||
if (old_state == ProcessState_Crashed && process->state != ProcessState_Crashed) {
|
if (old_state == ProcessState_Crashed && process->state != ProcessState_Crashed) {
|
||||||
process->flags &= ~PROCESSFLAGS_CRASH_DEBUG;
|
process->flags &= ~PROCESSFLAGS_CRASH_DEBUG;
|
||||||
}
|
}
|
||||||
|
@ -307,18 +309,18 @@ void Registration::FinalizeExitedProcess(std::shared_ptr<Registration::Process>
|
||||||
if (R_FAILED(ldrPmUnregisterTitle(process->ldr_queue_index))) {
|
if (R_FAILED(ldrPmUnregisterTitle(process->ldr_queue_index))) {
|
||||||
std::abort();
|
std::abort();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Close the process's handle. */
|
/* Close the process's handle. */
|
||||||
svcCloseHandle(process->handle);
|
svcCloseHandle(process->handle);
|
||||||
process->handle = 0;
|
process->handle = 0;
|
||||||
|
|
||||||
/* Insert into dead process list, if relevant. */
|
/* Insert into dead process list, if relevant. */
|
||||||
if (signal_debug_process_5x) {
|
if (signal_debug_process_5x) {
|
||||||
std::scoped_lock<ProcessList &> dead_lk(g_dead_process_list);
|
std::scoped_lock<ProcessList &> dead_lk(g_dead_process_list);
|
||||||
|
|
||||||
g_dead_process_list.processes.push_back(process);
|
g_dead_process_list.processes.push_back(process);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Remove NOTE: This probably frees process. */
|
/* Remove NOTE: This probably frees process. */
|
||||||
RemoveProcessFromList(process->pid);
|
RemoveProcessFromList(process->pid);
|
||||||
}
|
}
|
||||||
|
@ -337,7 +339,7 @@ void Registration::AddProcessToList(std::shared_ptr<Registration::Process> proce
|
||||||
|
|
||||||
void Registration::RemoveProcessFromList(u64 pid) {
|
void Registration::RemoveProcessFromList(u64 pid) {
|
||||||
std::scoped_lock<ProcessList &> lk(GetProcessList());
|
std::scoped_lock<ProcessList &> lk(GetProcessList());
|
||||||
|
|
||||||
/* Remove process from list. */
|
/* Remove process from list. */
|
||||||
for (unsigned int i = 0; i < g_process_list.processes.size(); i++) {
|
for (unsigned int i = 0; i < g_process_list.processes.size(); i++) {
|
||||||
std::shared_ptr<Registration::Process> process = g_process_list.processes[i];
|
std::shared_ptr<Registration::Process> process = g_process_list.processes[i];
|
||||||
|
@ -352,10 +354,10 @@ void Registration::RemoveProcessFromList(u64 pid) {
|
||||||
|
|
||||||
void Registration::SetProcessState(u64 pid, ProcessState new_state) {
|
void Registration::SetProcessState(u64 pid, ProcessState new_state) {
|
||||||
std::scoped_lock<ProcessList &> lk(GetProcessList());
|
std::scoped_lock<ProcessList &> lk(GetProcessList());
|
||||||
|
|
||||||
/* Set process state. */
|
/* Set process state. */
|
||||||
for (auto &process : g_process_list.processes) {
|
for (auto &process : g_process_list.processes) {
|
||||||
if (process->pid == pid) {
|
if (process->pid == pid) {
|
||||||
process->state = new_state;
|
process->state = new_state;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -364,7 +366,7 @@ void Registration::SetProcessState(u64 pid, ProcessState new_state) {
|
||||||
|
|
||||||
bool Registration::HasApplicationProcess(std::shared_ptr<Registration::Process> *out) {
|
bool Registration::HasApplicationProcess(std::shared_ptr<Registration::Process> *out) {
|
||||||
std::scoped_lock<ProcessList &> lk(GetProcessList());
|
std::scoped_lock<ProcessList &> lk(GetProcessList());
|
||||||
|
|
||||||
for (auto &process : g_process_list.processes) {
|
for (auto &process : g_process_list.processes) {
|
||||||
if (process->flags & PROCESSFLAGS_APPLICATION) {
|
if (process->flags & PROCESSFLAGS_APPLICATION) {
|
||||||
if (out != nullptr) {
|
if (out != nullptr) {
|
||||||
|
@ -373,31 +375,31 @@ bool Registration::HasApplicationProcess(std::shared_ptr<Registration::Process>
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<Registration::Process> Registration::GetProcess(u64 pid) {
|
std::shared_ptr<Registration::Process> Registration::GetProcess(u64 pid) {
|
||||||
std::scoped_lock<ProcessList &> lk(GetProcessList());
|
std::scoped_lock<ProcessList &> lk(GetProcessList());
|
||||||
|
|
||||||
for (auto &process : g_process_list.processes) {
|
for (auto &process : g_process_list.processes) {
|
||||||
if (process->pid == pid) {
|
if (process->pid == pid) {
|
||||||
return process;
|
return process;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<Registration::Process> Registration::GetProcessByTitleId(u64 tid) {
|
std::shared_ptr<Registration::Process> Registration::GetProcessByTitleId(u64 tid) {
|
||||||
std::scoped_lock<ProcessList &> lk(GetProcessList());
|
std::scoped_lock<ProcessList &> lk(GetProcessList());
|
||||||
|
|
||||||
for (auto &process : g_process_list.processes) {
|
for (auto &process : g_process_list.processes) {
|
||||||
if (process->tid_sid.title_id == tid) {
|
if (process->tid_sid.title_id == tid) {
|
||||||
return process;
|
return process;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -405,14 +407,14 @@ std::shared_ptr<Registration::Process> Registration::GetProcessByTitleId(u64 tid
|
||||||
Result Registration::GetDebugProcessIds(u64 *out_pids, u32 max_out, u32 *num_out) {
|
Result Registration::GetDebugProcessIds(u64 *out_pids, u32 max_out, u32 *num_out) {
|
||||||
std::scoped_lock<ProcessList &> lk(GetProcessList());
|
std::scoped_lock<ProcessList &> lk(GetProcessList());
|
||||||
u32 num = 0;
|
u32 num = 0;
|
||||||
|
|
||||||
|
|
||||||
for (auto &process : g_process_list.processes) {
|
for (auto &process : g_process_list.processes) {
|
||||||
if (process->flags & PROCESSFLAGS_CRASH_DEBUG && num < max_out) {
|
if (process->flags & PROCESSFLAGS_CRASH_DEBUG && num < max_out) {
|
||||||
out_pids[num++] = process->pid;
|
out_pids[num++] = process->pid;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
*num_out = num;
|
*num_out = num;
|
||||||
return ResultSuccess;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
@ -425,7 +427,7 @@ void Registration::GetProcessEventType(u64 *out_pid, u64 *out_type) {
|
||||||
/* Scope to manage process list lock. */
|
/* Scope to manage process list lock. */
|
||||||
{
|
{
|
||||||
std::scoped_lock<ProcessList &> lk(GetProcessList());
|
std::scoped_lock<ProcessList &> lk(GetProcessList());
|
||||||
|
|
||||||
for (auto &p : g_process_list.processes) {
|
for (auto &p : g_process_list.processes) {
|
||||||
if ((GetRuntimeFirmwareVersion() >= FirmwareVersion_200) && p->state >= ProcessState_Running && p->flags & PROCESSFLAGS_DEBUGDETACHED) {
|
if ((GetRuntimeFirmwareVersion() >= FirmwareVersion_200) && p->state >= ProcessState_Running && p->flags & PROCESSFLAGS_DEBUGDETACHED) {
|
||||||
p->flags &= ~PROCESSFLAGS_DEBUGDETACHED;
|
p->flags &= ~PROCESSFLAGS_DEBUGDETACHED;
|
||||||
|
@ -461,7 +463,7 @@ void Registration::GetProcessEventType(u64 *out_pid, u64 *out_type) {
|
||||||
*out_pid = 0;
|
*out_pid = 0;
|
||||||
*out_type = 0;
|
*out_type = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((GetRuntimeFirmwareVersion() >= FirmwareVersion_500)) {
|
if ((GetRuntimeFirmwareVersion() >= FirmwareVersion_500)) {
|
||||||
std::scoped_lock<ProcessList &> dead_lk(g_dead_process_list);
|
std::scoped_lock<ProcessList &> dead_lk(g_dead_process_list);
|
||||||
|
|
||||||
|
@ -501,3 +503,19 @@ Result Registration::DisableDebug(u32 which) {
|
||||||
}
|
}
|
||||||
return ResultSuccess;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Handle Registration::GetDebugTitleEventHandle() {
|
||||||
|
return g_debug_title_event->GetHandle();
|
||||||
|
}
|
||||||
|
|
||||||
|
Handle Registration::GetDebugApplicationEventHandle() {
|
||||||
|
return g_debug_application_event->GetHandle();
|
||||||
|
}
|
||||||
|
|
||||||
|
Handle Registration::GetBootFinishedEventHandle() {
|
||||||
|
return g_boot_finished_event->GetHandle();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Registration::SignalBootFinished() {
|
||||||
|
g_boot_finished_event->Signal();
|
||||||
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
#include <switch.h>
|
#include <switch.h>
|
||||||
#include <stratosphere.hpp>
|
#include <stratosphere.hpp>
|
||||||
|
@ -98,7 +98,7 @@ enum {
|
||||||
- and PROCESSFLAGS_NOTIFYDEBUGEVENTS is set
|
- and PROCESSFLAGS_NOTIFYDEBUGEVENTS is set
|
||||||
*/
|
*/
|
||||||
PROCESSFLAGS_DEBUGSUSPENDED = 0x020,
|
PROCESSFLAGS_DEBUGSUSPENDED = 0x020,
|
||||||
|
|
||||||
/*
|
/*
|
||||||
set in HandleProcessLaunch when
|
set in HandleProcessLaunch when
|
||||||
- program_info.application_type & 1
|
- program_info.application_type & 1
|
||||||
|
@ -148,7 +148,7 @@ enum {
|
||||||
PROCESSEVENTTYPE_500_RUNNING = 4, // debug detached or running
|
PROCESSEVENTTYPE_500_RUNNING = 4, // debug detached or running
|
||||||
PROCESSEVENTTYPE_500_SUSPENDED = 5, // debug suspended
|
PROCESSEVENTTYPE_500_SUSPENDED = 5, // debug suspended
|
||||||
};
|
};
|
||||||
|
|
||||||
class Registration {
|
class Registration {
|
||||||
public:
|
public:
|
||||||
struct TidSid {
|
struct TidSid {
|
||||||
|
@ -163,7 +163,7 @@ class Registration {
|
||||||
ProcessState state;
|
ProcessState state;
|
||||||
u32 flags;
|
u32 flags;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ProcessLaunchState {
|
struct ProcessLaunchState {
|
||||||
TidSid tid_sid;
|
TidSid tid_sid;
|
||||||
u64 launch_flags;
|
u64 launch_flags;
|
||||||
|
@ -175,14 +175,14 @@ class Registration {
|
||||||
static IWaitable *GetProcessLaunchStartEvent();
|
static IWaitable *GetProcessLaunchStartEvent();
|
||||||
static ProcessList &GetProcessList();
|
static ProcessList &GetProcessList();
|
||||||
static Result ProcessLaunchStartCallback(u64 timeout);
|
static Result ProcessLaunchStartCallback(u64 timeout);
|
||||||
|
|
||||||
static Result HandleSignaledProcess(std::shared_ptr<Process> process);
|
static Result HandleSignaledProcess(std::shared_ptr<Process> process);
|
||||||
static void FinalizeExitedProcess(std::shared_ptr<Process> process);
|
static void FinalizeExitedProcess(std::shared_ptr<Process> process);
|
||||||
|
|
||||||
static void AddProcessToList(std::shared_ptr<Process> process);
|
static void AddProcessToList(std::shared_ptr<Process> process);
|
||||||
static void RemoveProcessFromList(u64 pid);
|
static void RemoveProcessFromList(u64 pid);
|
||||||
static void SetProcessState(u64 pid, ProcessState new_state);
|
static void SetProcessState(u64 pid, ProcessState new_state);
|
||||||
|
|
||||||
static std::shared_ptr<Registration::Process> GetProcess(u64 pid);
|
static std::shared_ptr<Registration::Process> GetProcess(u64 pid);
|
||||||
static std::shared_ptr<Registration::Process> GetProcessByTitleId(u64 tid);
|
static std::shared_ptr<Registration::Process> GetProcessByTitleId(u64 tid);
|
||||||
static Result GetDebugProcessIds(u64 *out_pids, u32 max_out, u32 *num_out);
|
static Result GetDebugProcessIds(u64 *out_pids, u32 max_out, u32 *num_out);
|
||||||
|
@ -193,13 +193,16 @@ class Registration {
|
||||||
static Result DisableDebug(u32 which);
|
static Result DisableDebug(u32 which);
|
||||||
static Handle GetDebugTitleEventHandle();
|
static Handle GetDebugTitleEventHandle();
|
||||||
static Handle GetDebugApplicationEventHandle();
|
static Handle GetDebugApplicationEventHandle();
|
||||||
|
static Handle GetBootFinishedEventHandle();
|
||||||
|
|
||||||
static void HandleProcessLaunch();
|
static void HandleProcessLaunch();
|
||||||
static Result LaunchDebugProcess(u64 pid);
|
static Result LaunchDebugProcess(u64 pid);
|
||||||
static void SignalFinishLaunchProcess();
|
static void SignalFinishLaunchProcess();
|
||||||
static Result LaunchProcess(u64 title_id, FsStorageId storage_id, u64 launch_flags, u64 *out_pid);
|
static Result LaunchProcess(u64 title_id, FsStorageId storage_id, u64 launch_flags, u64 *out_pid);
|
||||||
static Result LaunchProcessByTidSid(TidSid tid_sid, u64 launch_flags, u64 *out_pid);
|
static Result LaunchProcessByTidSid(TidSid tid_sid, u64 launch_flags, u64 *out_pid);
|
||||||
|
|
||||||
|
static void SignalBootFinished();
|
||||||
|
|
||||||
static bool HasApplicationProcess(std::shared_ptr<Process> *out);
|
static bool HasApplicationProcess(std::shared_ptr<Process> *out);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <switch.h>
|
#include <switch.h>
|
||||||
#include <stratosphere.hpp>
|
#include <stratosphere.hpp>
|
||||||
#include "pm_registration.hpp"
|
#include "pm_registration.hpp"
|
||||||
|
@ -29,7 +29,7 @@ Result ShellService::LaunchProcess(Out<u64> pid, Registration::TidSid tid_sid, u
|
||||||
|
|
||||||
Result ShellService::TerminateProcessId(u64 pid) {
|
Result ShellService::TerminateProcessId(u64 pid) {
|
||||||
std::scoped_lock<ProcessList &> lk(Registration::GetProcessList());
|
std::scoped_lock<ProcessList &> lk(Registration::GetProcessList());
|
||||||
|
|
||||||
auto proc = Registration::GetProcess(pid);
|
auto proc = Registration::GetProcess(pid);
|
||||||
if (proc != nullptr) {
|
if (proc != nullptr) {
|
||||||
return svcTerminateProcess(proc->handle);
|
return svcTerminateProcess(proc->handle);
|
||||||
|
@ -40,7 +40,7 @@ Result ShellService::TerminateProcessId(u64 pid) {
|
||||||
|
|
||||||
Result ShellService::TerminateTitleId(u64 tid) {
|
Result ShellService::TerminateTitleId(u64 tid) {
|
||||||
std::scoped_lock<ProcessList &> lk(Registration::GetProcessList());
|
std::scoped_lock<ProcessList &> lk(Registration::GetProcessList());
|
||||||
|
|
||||||
auto proc = Registration::GetProcessByTitleId(tid);
|
auto proc = Registration::GetProcessByTitleId(tid);
|
||||||
if (proc != NULL) {
|
if (proc != NULL) {
|
||||||
return svcTerminateProcess(proc->handle);
|
return svcTerminateProcess(proc->handle);
|
||||||
|
@ -59,7 +59,7 @@ void ShellService::GetProcessEventType(Out<u64> type, Out<u64> pid) {
|
||||||
|
|
||||||
Result ShellService::FinalizeExitedProcess(u64 pid) {
|
Result ShellService::FinalizeExitedProcess(u64 pid) {
|
||||||
std::scoped_lock<ProcessList &> lk(Registration::GetProcessList());
|
std::scoped_lock<ProcessList &> lk(Registration::GetProcessList());
|
||||||
|
|
||||||
auto proc = Registration::GetProcess(pid);
|
auto proc = Registration::GetProcess(pid);
|
||||||
if (proc == NULL) {
|
if (proc == NULL) {
|
||||||
return ResultPmProcessNotFound;
|
return ResultPmProcessNotFound;
|
||||||
|
@ -73,7 +73,7 @@ Result ShellService::FinalizeExitedProcess(u64 pid) {
|
||||||
|
|
||||||
Result ShellService::ClearProcessNotificationFlag(u64 pid) {
|
Result ShellService::ClearProcessNotificationFlag(u64 pid) {
|
||||||
std::scoped_lock<ProcessList &> lk(Registration::GetProcessList());
|
std::scoped_lock<ProcessList &> lk(Registration::GetProcessList());
|
||||||
|
|
||||||
auto proc = Registration::GetProcess(pid);
|
auto proc = Registration::GetProcess(pid);
|
||||||
if (proc != NULL) {
|
if (proc != NULL) {
|
||||||
proc->flags &= ~PROCESSFLAGS_CRASHED;
|
proc->flags &= ~PROCESSFLAGS_CRASHED;
|
||||||
|
@ -86,13 +86,14 @@ Result ShellService::ClearProcessNotificationFlag(u64 pid) {
|
||||||
void ShellService::NotifyBootFinished() {
|
void ShellService::NotifyBootFinished() {
|
||||||
if (!g_has_boot_finished) {
|
if (!g_has_boot_finished) {
|
||||||
g_has_boot_finished = true;
|
g_has_boot_finished = true;
|
||||||
|
Registration::SignalBootFinished();
|
||||||
EmbeddedBoot2::Main();
|
EmbeddedBoot2::Main();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Result ShellService::GetApplicationProcessId(Out<u64> pid) {
|
Result ShellService::GetApplicationProcessId(Out<u64> pid) {
|
||||||
std::scoped_lock<ProcessList &> lk(Registration::GetProcessList());
|
std::scoped_lock<ProcessList &> lk(Registration::GetProcessList());
|
||||||
|
|
||||||
std::shared_ptr<Registration::Process> app_proc;
|
std::shared_ptr<Registration::Process> app_proc;
|
||||||
if (Registration::HasApplicationProcess(&app_proc)) {
|
if (Registration::HasApplicationProcess(&app_proc)) {
|
||||||
pid.SetValue(app_proc->pid);
|
pid.SetValue(app_proc->pid);
|
||||||
|
@ -113,13 +114,15 @@ Result ShellService::BoostSystemThreadsResourceLimit() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Result ShellService::GetUnimplementedEventHandle(Out<CopiedHandle> event) {
|
void ShellService::GetBootFinishedEvent(Out<CopiedHandle> event) {
|
||||||
/* In 8.0.0, Nintendo added this command which should return an event handle. */
|
/* In 8.0.0, Nintendo added this command, which signals that the boot sysmodule has finished. */
|
||||||
/* In addition, they also added code to create a new event in the global PM constructor. */
|
/* Nintendo only signals it in safe mode FIRM, and this function aborts on normal FIRM. */
|
||||||
/* However, nothing signals this event, and this command currently does std::abort();. */
|
/* We will signal it always, but only allow this function to succeed on safe mode. */
|
||||||
/* We will oblige. */
|
{
|
||||||
std::abort();
|
u64 is_recovery_boot = 0;
|
||||||
|
if (R_FAILED(SmcGetConfig(SplConfigItem_IsRecoveryBoot, &is_recovery_boot)) || !is_recovery_boot) {
|
||||||
/* TODO: Return an event handle, once N makes this command a real thing in the future. */
|
std::abort();
|
||||||
/* TODO: return ResultSuccess; */
|
}
|
||||||
|
}
|
||||||
|
event.SetValue(Registration::GetBootFinishedEventHandle());
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
#include <switch.h>
|
#include <switch.h>
|
||||||
#include <stratosphere.hpp>
|
#include <stratosphere.hpp>
|
||||||
|
@ -42,12 +42,12 @@ enum ShellCmd_5X {
|
||||||
Shell_Cmd_5X_NotifyBootFinished = 5,
|
Shell_Cmd_5X_NotifyBootFinished = 5,
|
||||||
Shell_Cmd_5X_GetApplicationProcessId = 6,
|
Shell_Cmd_5X_GetApplicationProcessId = 6,
|
||||||
Shell_Cmd_5X_BoostSystemMemoryResourceLimit = 7,
|
Shell_Cmd_5X_BoostSystemMemoryResourceLimit = 7,
|
||||||
|
|
||||||
Shell_Cmd_BoostSystemThreadsResourceLimit = 8,
|
Shell_Cmd_BoostSystemThreadsResourceLimit = 8,
|
||||||
Shell_Cmd_GetUnimplementedEventHandle = 9 /* TODO: Rename when Nintendo implements this. */
|
Shell_Cmd_GetBootFinishedEvent = 9,
|
||||||
};
|
};
|
||||||
|
|
||||||
class ShellService final : public IServiceObject {
|
class ShellService final : public IServiceObject {
|
||||||
private:
|
private:
|
||||||
/* Actual commands. */
|
/* Actual commands. */
|
||||||
Result LaunchProcess(Out<u64> pid, Registration::TidSid tid_sid, u32 launch_flags);
|
Result LaunchProcess(Out<u64> pid, Registration::TidSid tid_sid, u32 launch_flags);
|
||||||
|
@ -61,7 +61,7 @@ class ShellService final : public IServiceObject {
|
||||||
Result GetApplicationProcessId(Out<u64> pid);
|
Result GetApplicationProcessId(Out<u64> pid);
|
||||||
Result BoostSystemMemoryResourceLimit(u64 sysmem_size);
|
Result BoostSystemMemoryResourceLimit(u64 sysmem_size);
|
||||||
Result BoostSystemThreadsResourceLimit();
|
Result BoostSystemThreadsResourceLimit();
|
||||||
Result GetUnimplementedEventHandle(Out<CopiedHandle> event);
|
void GetBootFinishedEvent(Out<CopiedHandle> event);
|
||||||
public:
|
public:
|
||||||
DEFINE_SERVICE_DISPATCH_TABLE {
|
DEFINE_SERVICE_DISPATCH_TABLE {
|
||||||
/* 1.0.0-4.0.0 */
|
/* 1.0.0-4.0.0 */
|
||||||
|
@ -74,10 +74,10 @@ class ShellService final : public IServiceObject {
|
||||||
MakeServiceCommandMeta<Shell_Cmd_ClearProcessNotificationFlag, &ShellService::ClearProcessNotificationFlag, FirmwareVersion_Min, FirmwareVersion_400>(),
|
MakeServiceCommandMeta<Shell_Cmd_ClearProcessNotificationFlag, &ShellService::ClearProcessNotificationFlag, FirmwareVersion_Min, FirmwareVersion_400>(),
|
||||||
MakeServiceCommandMeta<Shell_Cmd_NotifyBootFinished, &ShellService::NotifyBootFinished, FirmwareVersion_Min, FirmwareVersion_400>(),
|
MakeServiceCommandMeta<Shell_Cmd_NotifyBootFinished, &ShellService::NotifyBootFinished, FirmwareVersion_Min, FirmwareVersion_400>(),
|
||||||
MakeServiceCommandMeta<Shell_Cmd_GetApplicationProcessId, &ShellService::GetApplicationProcessId, FirmwareVersion_Min, FirmwareVersion_400>(),
|
MakeServiceCommandMeta<Shell_Cmd_GetApplicationProcessId, &ShellService::GetApplicationProcessId, FirmwareVersion_Min, FirmwareVersion_400>(),
|
||||||
|
|
||||||
/* 4.0.0-4.0.0 */
|
/* 4.0.0-4.0.0 */
|
||||||
MakeServiceCommandMeta<Shell_Cmd_BoostSystemMemoryResourceLimit, &ShellService::BoostSystemMemoryResourceLimit, FirmwareVersion_400, FirmwareVersion_400>(),
|
MakeServiceCommandMeta<Shell_Cmd_BoostSystemMemoryResourceLimit, &ShellService::BoostSystemMemoryResourceLimit, FirmwareVersion_400, FirmwareVersion_400>(),
|
||||||
|
|
||||||
/* 5.0.0-* */
|
/* 5.0.0-* */
|
||||||
MakeServiceCommandMeta<Shell_Cmd_5X_LaunchProcess, &ShellService::LaunchProcess, FirmwareVersion_500>(),
|
MakeServiceCommandMeta<Shell_Cmd_5X_LaunchProcess, &ShellService::LaunchProcess, FirmwareVersion_500>(),
|
||||||
MakeServiceCommandMeta<Shell_Cmd_5X_TerminateProcessId, &ShellService::TerminateProcessId, FirmwareVersion_500>(),
|
MakeServiceCommandMeta<Shell_Cmd_5X_TerminateProcessId, &ShellService::TerminateProcessId, FirmwareVersion_500>(),
|
||||||
|
@ -87,11 +87,11 @@ class ShellService final : public IServiceObject {
|
||||||
MakeServiceCommandMeta<Shell_Cmd_5X_NotifyBootFinished, &ShellService::NotifyBootFinished, FirmwareVersion_500>(),
|
MakeServiceCommandMeta<Shell_Cmd_5X_NotifyBootFinished, &ShellService::NotifyBootFinished, FirmwareVersion_500>(),
|
||||||
MakeServiceCommandMeta<Shell_Cmd_5X_GetApplicationProcessId, &ShellService::GetApplicationProcessId, FirmwareVersion_500>(),
|
MakeServiceCommandMeta<Shell_Cmd_5X_GetApplicationProcessId, &ShellService::GetApplicationProcessId, FirmwareVersion_500>(),
|
||||||
MakeServiceCommandMeta<Shell_Cmd_5X_BoostSystemMemoryResourceLimit, &ShellService::BoostSystemMemoryResourceLimit, FirmwareVersion_500>(),
|
MakeServiceCommandMeta<Shell_Cmd_5X_BoostSystemMemoryResourceLimit, &ShellService::BoostSystemMemoryResourceLimit, FirmwareVersion_500>(),
|
||||||
|
|
||||||
/* 7.0.0-* */
|
/* 7.0.0-* */
|
||||||
MakeServiceCommandMeta<Shell_Cmd_BoostSystemThreadsResourceLimit, &ShellService::BoostSystemThreadsResourceLimit, FirmwareVersion_700>(),
|
MakeServiceCommandMeta<Shell_Cmd_BoostSystemThreadsResourceLimit, &ShellService::BoostSystemThreadsResourceLimit, FirmwareVersion_700>(),
|
||||||
|
|
||||||
/* 8.0.0-* */
|
/* 8.0.0-* */
|
||||||
MakeServiceCommandMeta<Shell_Cmd_GetUnimplementedEventHandle, &ShellService::GetUnimplementedEventHandle, FirmwareVersion_800>(),
|
MakeServiceCommandMeta<Shell_Cmd_GetBootFinishedEvent, &ShellService::GetBootFinishedEvent, FirmwareVersion_800>(),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue