mirror of
https://github.com/Atmosphere-NX/Atmosphere
synced 2024-12-22 12:21:18 +00:00
pm: add new 19.0.0 commands
This is functionally correct, but I have no idea what these are meant to represent. These functions are completely unused on NX.
This commit is contained in:
parent
a6e14c5989
commit
49763aee92
4 changed files with 19 additions and 3 deletions
|
@ -19,8 +19,10 @@
|
|||
#include <stratosphere/pm/pm_types.hpp>
|
||||
#include <stratosphere/sf.hpp>
|
||||
|
||||
#define AMS_PM_I_BOOT_MODE_INTERFACE_INTERFACE_INFO(C, H) \
|
||||
AMS_SF_METHOD_INFO(C, H, 0, void, GetBootMode, (sf::Out<u32> out), (out)) \
|
||||
AMS_SF_METHOD_INFO(C, H, 1, void, SetMaintenanceBoot, (), ())
|
||||
#define AMS_PM_I_BOOT_MODE_INTERFACE_INTERFACE_INFO(C, H) \
|
||||
AMS_SF_METHOD_INFO(C, H, 0, void, GetBootMode, (sf::Out<u32> out), (out)) \
|
||||
AMS_SF_METHOD_INFO(C, H, 1, void, SetMaintenanceBoot, (), ()) \
|
||||
AMS_SF_METHOD_INFO(C, H, 2, void, GetUnknown, (sf::Out<u32> out), (out)) \
|
||||
AMS_SF_METHOD_INFO(C, H, 3, Result, SetUnknown, (u32 val), (val))
|
||||
|
||||
AMS_SF_DEFINE_INTERFACE(ams::pm::impl, IBootModeInterface, AMS_PM_I_BOOT_MODE_INTERFACE_INTERFACE_INFO, 0x96D01649)
|
||||
|
|
|
@ -27,5 +27,6 @@ namespace ams::pm {
|
|||
R_DEFINE_ERROR_RESULT(DebugHookInUse, 4);
|
||||
R_DEFINE_ERROR_RESULT(ApplicationRunning, 5);
|
||||
R_DEFINE_ERROR_RESULT(InvalidSize, 6);
|
||||
R_DEFINE_ERROR_RESULT(Unknown7, 7);
|
||||
|
||||
}
|
||||
|
|
|
@ -22,6 +22,7 @@ namespace ams::pm {
|
|||
|
||||
/* Global bootmode. */
|
||||
constinit BootMode g_boot_mode = BootMode::Normal;
|
||||
constinit u32 g_unknown = 0;
|
||||
|
||||
}
|
||||
|
||||
|
@ -47,4 +48,14 @@ namespace ams::pm {
|
|||
pm::bm::SetMaintenanceBoot();
|
||||
}
|
||||
|
||||
void BootModeService::GetUnknown(sf::Out<u32> out) {
|
||||
out.SetValue(g_unknown);
|
||||
}
|
||||
|
||||
Result BootModeService::SetUnknown(u32 val) {
|
||||
R_UNLESS(val <= 3, pm::ResultUnknown7());
|
||||
g_unknown = val;
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -22,6 +22,8 @@ namespace ams::pm {
|
|||
public:
|
||||
void GetBootMode(sf::Out<u32> out);
|
||||
void SetMaintenanceBoot();
|
||||
void GetUnknown(sf::Out<u32> out);
|
||||
Result SetUnknown(u32 val);
|
||||
};
|
||||
static_assert(pm::impl::IsIBootModeInterface<BootModeService>);
|
||||
|
||||
|
|
Loading…
Reference in a new issue