summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorGravatar bunnei2019-01-28 19:32:32 -0500
committerGravatar GitHub2019-01-28 19:32:32 -0500
commitc608d3a9790f2838aca3c6c03aaf178b05973da9 (patch)
tree2073e97d60489a10219cfb5e3bf9d21372898d1d /src/core
parentMerge pull request #2064 from lioncash/vi-stub (diff)
parentservice/pm: Implement SetMaintenanceBoot() (diff)
downloadyuzu-c608d3a9790f2838aca3c6c03aaf178b05973da9.tar.gz
yuzu-c608d3a9790f2838aca3c6c03aaf178b05973da9.tar.xz
yuzu-c608d3a9790f2838aca3c6c03aaf178b05973da9.zip
Merge pull request #2065 from lioncash/pm
service/pm: Implement SetMaintenanceBoot
Diffstat (limited to 'src/core')
-rw-r--r--src/core/hle/service/pm/pm.cpp15
-rw-r--r--src/core/hle/service/pm/pm.h7
2 files changed, 19 insertions, 3 deletions
diff --git a/src/core/hle/service/pm/pm.cpp b/src/core/hle/service/pm/pm.cpp
index 53e7da9c3..6b27dc4a3 100644
--- a/src/core/hle/service/pm/pm.cpp
+++ b/src/core/hle/service/pm/pm.cpp
@@ -13,7 +13,7 @@ public:
13 explicit BootMode() : ServiceFramework{"pm:bm"} { 13 explicit BootMode() : ServiceFramework{"pm:bm"} {
14 static const FunctionInfo functions[] = { 14 static const FunctionInfo functions[] = {
15 {0, &BootMode::GetBootMode, "GetBootMode"}, 15 {0, &BootMode::GetBootMode, "GetBootMode"},
16 {1, nullptr, "SetMaintenanceBoot"}, 16 {1, &BootMode::SetMaintenanceBoot, "SetMaintenanceBoot"},
17 }; 17 };
18 RegisterHandlers(functions); 18 RegisterHandlers(functions);
19 } 19 }
@@ -24,8 +24,19 @@ private:
24 24
25 IPC::ResponseBuilder rb{ctx, 3}; 25 IPC::ResponseBuilder rb{ctx, 3};
26 rb.Push(RESULT_SUCCESS); 26 rb.Push(RESULT_SUCCESS);
27 rb.Push<u32>(static_cast<u32>(SystemBootMode::Normal)); // Normal boot mode 27 rb.PushEnum(boot_mode);
28 } 28 }
29
30 void SetMaintenanceBoot(Kernel::HLERequestContext& ctx) {
31 LOG_DEBUG(Service_PM, "called");
32
33 boot_mode = SystemBootMode::Maintenance;
34
35 IPC::ResponseBuilder rb{ctx, 2};
36 rb.Push(RESULT_SUCCESS);
37 }
38
39 SystemBootMode boot_mode = SystemBootMode::Normal;
29}; 40};
30 41
31class DebugMonitor final : public ServiceFramework<DebugMonitor> { 42class DebugMonitor final : public ServiceFramework<DebugMonitor> {
diff --git a/src/core/hle/service/pm/pm.h b/src/core/hle/service/pm/pm.h
index 370f2ed72..cc8d3f215 100644
--- a/src/core/hle/service/pm/pm.h
+++ b/src/core/hle/service/pm/pm.h
@@ -9,7 +9,12 @@ class ServiceManager;
9} 9}
10 10
11namespace Service::PM { 11namespace Service::PM {
12enum class SystemBootMode : u32 { Normal = 0, Maintenance = 1 }; 12
13enum class SystemBootMode {
14 Normal,
15 Maintenance,
16};
17
13/// Registers all PM services with the specified service manager. 18/// Registers all PM services with the specified service manager.
14void InstallInterfaces(SM::ServiceManager& service_manager); 19void InstallInterfaces(SM::ServiceManager& service_manager);
15 20