summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2019-01-29 01:32:32 +0100
committerGitHub <noreply@github.com>2019-01-29 01:32:32 +0100
commitc608d3a9790f2838aca3c6c03aaf178b05973da9 (patch)
tree2073e97d60489a10219cfb5e3bf9d21372898d1d
parentMerge pull request #2064 from lioncash/vi-stub (diff)
parentservice/pm: Implement SetMaintenanceBoot() (diff)
downloadyuzu-c608d3a9790f2838aca3c6c03aaf178b05973da9.tar
yuzu-c608d3a9790f2838aca3c6c03aaf178b05973da9.tar.gz
yuzu-c608d3a9790f2838aca3c6c03aaf178b05973da9.tar.bz2
yuzu-c608d3a9790f2838aca3c6c03aaf178b05973da9.tar.lz
yuzu-c608d3a9790f2838aca3c6c03aaf178b05973da9.tar.xz
yuzu-c608d3a9790f2838aca3c6c03aaf178b05973da9.tar.zst
yuzu-c608d3a9790f2838aca3c6c03aaf178b05973da9.zip
-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:
explicit BootMode() : ServiceFramework{"pm:bm"} {
static const FunctionInfo functions[] = {
{0, &BootMode::GetBootMode, "GetBootMode"},
- {1, nullptr, "SetMaintenanceBoot"},
+ {1, &BootMode::SetMaintenanceBoot, "SetMaintenanceBoot"},
};
RegisterHandlers(functions);
}
@@ -24,8 +24,19 @@ private:
IPC::ResponseBuilder rb{ctx, 3};
rb.Push(RESULT_SUCCESS);
- rb.Push<u32>(static_cast<u32>(SystemBootMode::Normal)); // Normal boot mode
+ rb.PushEnum(boot_mode);
}
+
+ void SetMaintenanceBoot(Kernel::HLERequestContext& ctx) {
+ LOG_DEBUG(Service_PM, "called");
+
+ boot_mode = SystemBootMode::Maintenance;
+
+ IPC::ResponseBuilder rb{ctx, 2};
+ rb.Push(RESULT_SUCCESS);
+ }
+
+ SystemBootMode boot_mode = SystemBootMode::Normal;
};
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 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;
}
namespace Service::PM {
-enum class SystemBootMode : u32 { Normal = 0, Maintenance = 1 };
+
+enum class SystemBootMode {
+ Normal,
+ Maintenance,
+};
+
/// Registers all PM services with the specified service manager.
void InstallInterfaces(SM::ServiceManager& service_manager);