diff options
| -rw-r--r-- | src/core/hle/service/am/am.cpp | 12 | ||||
| -rw-r--r-- | src/core/hle/service/am/am.h | 1 | ||||
| -rw-r--r-- | src/core/hle/service/pm/pm.cpp | 13 | ||||
| -rw-r--r-- | src/core/hle/service/pm/pm.h | 2 |
4 files changed, 25 insertions, 3 deletions
diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp index 78d551a8a..7e3cf6d58 100644 --- a/src/core/hle/service/am/am.cpp +++ b/src/core/hle/service/am/am.cpp | |||
| @@ -18,6 +18,7 @@ | |||
| 18 | #include "core/hle/service/apm/apm.h" | 18 | #include "core/hle/service/apm/apm.h" |
| 19 | #include "core/hle/service/filesystem/filesystem.h" | 19 | #include "core/hle/service/filesystem/filesystem.h" |
| 20 | #include "core/hle/service/nvflinger/nvflinger.h" | 20 | #include "core/hle/service/nvflinger/nvflinger.h" |
| 21 | #include "core/hle/service/pm/pm.h" | ||
| 21 | #include "core/hle/service/set/set.h" | 22 | #include "core/hle/service/set/set.h" |
| 22 | #include "core/settings.h" | 23 | #include "core/settings.h" |
| 23 | 24 | ||
| @@ -309,7 +310,7 @@ ICommonStateGetter::ICommonStateGetter() : ServiceFramework("ICommonStateGetter" | |||
| 309 | {5, &ICommonStateGetter::GetOperationMode, "GetOperationMode"}, | 310 | {5, &ICommonStateGetter::GetOperationMode, "GetOperationMode"}, |
| 310 | {6, &ICommonStateGetter::GetPerformanceMode, "GetPerformanceMode"}, | 311 | {6, &ICommonStateGetter::GetPerformanceMode, "GetPerformanceMode"}, |
| 311 | {7, nullptr, "GetCradleStatus"}, | 312 | {7, nullptr, "GetCradleStatus"}, |
| 312 | {8, nullptr, "GetBootMode"}, | 313 | {8, &ICommonStateGetter::GetBootMode, "GetBootMode"}, |
| 313 | {9, &ICommonStateGetter::GetCurrentFocusState, "GetCurrentFocusState"}, | 314 | {9, &ICommonStateGetter::GetCurrentFocusState, "GetCurrentFocusState"}, |
| 314 | {10, nullptr, "RequestToAcquireSleepLock"}, | 315 | {10, nullptr, "RequestToAcquireSleepLock"}, |
| 315 | {11, nullptr, "ReleaseSleepLock"}, | 316 | {11, nullptr, "ReleaseSleepLock"}, |
| @@ -334,6 +335,15 @@ ICommonStateGetter::ICommonStateGetter() : ServiceFramework("ICommonStateGetter" | |||
| 334 | event = Kernel::Event::Create(Kernel::ResetType::OneShot, "ICommonStateGetter:Event"); | 335 | event = Kernel::Event::Create(Kernel::ResetType::OneShot, "ICommonStateGetter:Event"); |
| 335 | } | 336 | } |
| 336 | 337 | ||
| 338 | void ICommonStateGetter::GetBootMode(Kernel::HLERequestContext& ctx) { | ||
| 339 | IPC::ResponseBuilder rb{ctx, 3}; | ||
| 340 | rb.Push(RESULT_SUCCESS); | ||
| 341 | |||
| 342 | rb.Push<u8>(static_cast<u8>(Service::PM::SystemBootMode::Normal)); // Normal boot mode | ||
| 343 | |||
| 344 | LOG_DEBUG(Service_AM, "called"); | ||
| 345 | } | ||
| 346 | |||
| 337 | void ICommonStateGetter::GetEventHandle(Kernel::HLERequestContext& ctx) { | 347 | void ICommonStateGetter::GetEventHandle(Kernel::HLERequestContext& ctx) { |
| 338 | event->Signal(); | 348 | event->Signal(); |
| 339 | 349 | ||
diff --git a/src/core/hle/service/am/am.h b/src/core/hle/service/am/am.h index b763aff6f..9e8bb4e43 100644 --- a/src/core/hle/service/am/am.h +++ b/src/core/hle/service/am/am.h | |||
| @@ -116,6 +116,7 @@ private: | |||
| 116 | void GetDefaultDisplayResolutionChangeEvent(Kernel::HLERequestContext& ctx); | 116 | void GetDefaultDisplayResolutionChangeEvent(Kernel::HLERequestContext& ctx); |
| 117 | void GetOperationMode(Kernel::HLERequestContext& ctx); | 117 | void GetOperationMode(Kernel::HLERequestContext& ctx); |
| 118 | void GetPerformanceMode(Kernel::HLERequestContext& ctx); | 118 | void GetPerformanceMode(Kernel::HLERequestContext& ctx); |
| 119 | void GetBootMode(Kernel::HLERequestContext& ctx); | ||
| 119 | 120 | ||
| 120 | Kernel::SharedPtr<Kernel::Event> event; | 121 | Kernel::SharedPtr<Kernel::Event> event; |
| 121 | }; | 122 | }; |
diff --git a/src/core/hle/service/pm/pm.cpp b/src/core/hle/service/pm/pm.cpp index e20a25689..6ec35ca60 100644 --- a/src/core/hle/service/pm/pm.cpp +++ b/src/core/hle/service/pm/pm.cpp | |||
| @@ -2,6 +2,8 @@ | |||
| 2 | // Licensed under GPLv2 or any later version | 2 | // Licensed under GPLv2 or any later version |
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
| 5 | #include "core/hle/ipc_helpers.h" | ||
| 6 | #include "core/hle/service/pm/pm.h" | ||
| 5 | #include "core/hle/service/service.h" | 7 | #include "core/hle/service/service.h" |
| 6 | 8 | ||
| 7 | namespace Service::PM { | 9 | namespace Service::PM { |
| @@ -10,11 +12,20 @@ class BootMode final : public ServiceFramework<BootMode> { | |||
| 10 | public: | 12 | public: |
| 11 | explicit BootMode() : ServiceFramework{"pm:bm"} { | 13 | explicit BootMode() : ServiceFramework{"pm:bm"} { |
| 12 | static const FunctionInfo functions[] = { | 14 | static const FunctionInfo functions[] = { |
| 13 | {0, nullptr, "GetBootMode"}, | 15 | {0, &BootMode::GetBootMode, "GetBootMode"}, |
| 14 | {1, nullptr, "SetMaintenanceBoot"}, | 16 | {1, nullptr, "SetMaintenanceBoot"}, |
| 15 | }; | 17 | }; |
| 16 | RegisterHandlers(functions); | 18 | RegisterHandlers(functions); |
| 17 | } | 19 | } |
| 20 | |||
| 21 | private: | ||
| 22 | void GetBootMode(Kernel::HLERequestContext& ctx) { | ||
| 23 | IPC::ResponseBuilder rb{ctx, 3}; | ||
| 24 | rb.Push(RESULT_SUCCESS); | ||
| 25 | rb.Push<u32>(static_cast<u32>(SystemBootMode::Normal)); // Normal boot mode | ||
| 26 | |||
| 27 | LOG_DEBUG(Service_PM, "called"); | ||
| 28 | } | ||
| 18 | }; | 29 | }; |
| 19 | 30 | ||
| 20 | class DebugMonitor final : public ServiceFramework<DebugMonitor> { | 31 | class DebugMonitor final : public ServiceFramework<DebugMonitor> { |
diff --git a/src/core/hle/service/pm/pm.h b/src/core/hle/service/pm/pm.h index 9fc19fed6..370f2ed72 100644 --- a/src/core/hle/service/pm/pm.h +++ b/src/core/hle/service/pm/pm.h | |||
| @@ -9,7 +9,7 @@ class ServiceManager; | |||
| 9 | } | 9 | } |
| 10 | 10 | ||
| 11 | namespace Service::PM { | 11 | namespace Service::PM { |
| 12 | 12 | enum class SystemBootMode : u32 { Normal = 0, Maintenance = 1 }; | |
| 13 | /// Registers all PM services with the specified service manager. | 13 | /// Registers all PM services with the specified service manager. |
| 14 | void InstallInterfaces(SM::ServiceManager& service_manager); | 14 | void InstallInterfaces(SM::ServiceManager& service_manager); |
| 15 | 15 | ||