summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/pm
diff options
context:
space:
mode:
authorDavid <25727384+ogniK5377@users.noreply.github.com>2018-08-24 00:31:45 +0200
committerbunnei <bunneidev@gmail.com>2018-08-24 00:31:45 +0200
commit5049ca5d8c667ed973ad3ed83d82369243b2a16b (patch)
treefc8f62d63f32f44954594ae169778ebea59bf113 /src/core/hle/service/pm
parentMerge pull request #1160 from bunnei/surface-reserve (diff)
downloadyuzu-5049ca5d8c667ed973ad3ed83d82369243b2a16b.tar
yuzu-5049ca5d8c667ed973ad3ed83d82369243b2a16b.tar.gz
yuzu-5049ca5d8c667ed973ad3ed83d82369243b2a16b.tar.bz2
yuzu-5049ca5d8c667ed973ad3ed83d82369243b2a16b.tar.lz
yuzu-5049ca5d8c667ed973ad3ed83d82369243b2a16b.tar.xz
yuzu-5049ca5d8c667ed973ad3ed83d82369243b2a16b.tar.zst
yuzu-5049ca5d8c667ed973ad3ed83d82369243b2a16b.zip
Diffstat (limited to 'src/core/hle/service/pm')
-rw-r--r--src/core/hle/service/pm/pm.cpp13
-rw-r--r--src/core/hle/service/pm/pm.h2
2 files changed, 13 insertions, 2 deletions
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 @@
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
+#include "core/hle/ipc_helpers.h"
+#include "core/hle/service/pm/pm.h"
#include "core/hle/service/service.h"
namespace Service::PM {
@@ -10,11 +12,20 @@ class BootMode final : public ServiceFramework<BootMode> {
public:
explicit BootMode() : ServiceFramework{"pm:bm"} {
static const FunctionInfo functions[] = {
- {0, nullptr, "GetBootMode"},
+ {0, &BootMode::GetBootMode, "GetBootMode"},
{1, nullptr, "SetMaintenanceBoot"},
};
RegisterHandlers(functions);
}
+
+private:
+ void GetBootMode(Kernel::HLERequestContext& ctx) {
+ IPC::ResponseBuilder rb{ctx, 3};
+ rb.Push(RESULT_SUCCESS);
+ rb.Push<u32>(static_cast<u32>(SystemBootMode::Normal)); // Normal boot mode
+
+ LOG_DEBUG(Service_PM, "called");
+ }
};
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;
}
namespace Service::PM {
-
+enum class SystemBootMode : u32 { Normal = 0, Maintenance = 1 };
/// Registers all PM services with the specified service manager.
void InstallInterfaces(SM::ServiceManager& service_manager);