pgl: Reimplement the pgl sysmodule (#896)

* pgl: add skeleton folder to stratosphere

* pgl: Add service interface for IShellInterface

* pgl: begin skeletoning shell service, implement two commands.

* pgl: Implement three more commands.

* pgl: implement bool tracking commands

* pgl: Implement TriggerApplicationSnapShotDumper

* pgl: implement InitializeProcessControlTask

* pgl: Implement pgl::srv::Initialize

* pgl: Implement main()

* pgl: Implement (Get)ShellEventObserver

* pgl: implement LaunchProgramFromHost, GetHostContentMetaInfo

* pgl: Implement ProcessControlTask

* settings: fix duplicate object name

* pgl: fix minor bugs in impl
This commit is contained in:
SciresM
2020-04-16 19:55:47 -07:00
committed by GitHub
parent f2944d36ba
commit 98cc051387
42 changed files with 2218 additions and 57 deletions

View File

@@ -23,6 +23,12 @@
namespace ams::pm::shell {
/* Shell API. */
Result LaunchProgram(os::ProcessId *out_process_id, const ncm::ProgramLocation &loc, u32 launch_flags);
Result LaunchProgram(os::ProcessId *out, const ncm::ProgramLocation &loc, u32 launch_flags);
Result TerminateProcess(os::ProcessId process_id);
Result GetProcessEventEvent(os::SystemEvent *out);
Result GetProcessEventInfo(ProcessEventInfo *out);
Result GetApplicationProcessIdForShell(os::ProcessId *out);
Result BoostSystemMemoryResourceLimit(u64 size);
Result EnableApplicationExtraThread();
}

View File

@@ -32,9 +32,29 @@ namespace ams::pm {
ResourceLimitGroup_Count,
};
using LimitableResource = ::LimitableResource;
enum LaunchFlags : u32 {
LaunchFlags_None = 0,
LaunchFlags_SignalOnExit = (1 << 0),
LaunchFlags_SignalOnStart = (1 << 1),
LaunchFlags_SignalOnException = (1 << 2),
LaunchFlags_SignalOnDebugEvent = (1 << 3),
LaunchFlags_StartSuspended = (1 << 4),
LaunchFlags_DisableAslr = (1 << 5),
};
enum class ProcessEvent {
enum LaunchFlagsDeprecated : u32 {
LaunchFlagsDeprecated_None = 0,
LaunchFlagsDeprecated_SignalOnExit = (1 << 0),
LaunchFlagsDeprecated_StartSuspended = (1 << 1),
LaunchFlagsDeprecated_SignalOnException = (1 << 2),
LaunchFlagsDeprecated_DisableAslr = (1 << 3),
LaunchFlagsDeprecated_SignalOnDebugEvent = (1 << 4),
LaunchFlagsDeprecated_SignalOnStart = (1 << 5),
};
constexpr inline u32 LaunchFlagsMask = (1 << 6) - 1;
enum class ProcessEvent : u32 {
None = 0,
Exited = 1,
Started = 2,
@@ -43,7 +63,7 @@ namespace ams::pm {
DebugBreak = 5,
};
enum class ProcessEventDeprecated {
enum class ProcessEventDeprecated : u32 {
None = 0,
Exception = 1,
Exited = 2,