mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-06-02 23:59:49 -04:00
ams: expose reboot payload for kernel panic
This commit is contained in:
parent
8d46d901d9
commit
48b4dd48a4
12 changed files with 97 additions and 51 deletions
|
@ -29,7 +29,7 @@ namespace ams::spl::smc {
|
|||
}
|
||||
|
||||
/* Functions. */
|
||||
Result SetConfig(spl::ConfigItem which, const u64 *value, size_t num_qwords);
|
||||
Result SetConfig(spl::ConfigItem which, const void *address, const u64 *value, size_t num_qwords);
|
||||
Result GetConfig(u64 *out, size_t num_qwords, spl::ConfigItem which);
|
||||
Result GetResult(Result *out, AsyncOperationKey op);
|
||||
Result GetResultData(Result *out, void *out_buf, size_t out_buf_size, AsyncOperationKey op);
|
||||
|
@ -59,8 +59,12 @@ namespace ams::spl::smc {
|
|||
Result AtmosphereGetEmummcConfig(void *out_config, void *out_paths, u32 storage_id);
|
||||
|
||||
/* Helpers. */
|
||||
inline Result SetConfig(spl::ConfigItem which, const u64 *value, size_t num_qwords) {
|
||||
return SetConfig(which, nullptr, value, num_qwords);
|
||||
}
|
||||
|
||||
inline Result SetConfig(spl::ConfigItem which, const u64 value) {
|
||||
return SetConfig(which, &value, 1);
|
||||
return SetConfig(which, std::addressof(value), 1);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -222,6 +222,7 @@ namespace ams::spl {
|
|||
ExosphereBlankProdInfo = 65005,
|
||||
ExosphereAllowCalWrites = 65006,
|
||||
ExosphereEmummcType = 65007,
|
||||
ExospherePayloadAddress = 65008,
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -235,3 +236,4 @@ constexpr inline SplConfigItem SplConfigItem_ExosphereHasRcmBugPatch = static_ca
|
|||
constexpr inline SplConfigItem SplConfigItem_ExosphereBlankProdInfo = static_cast<SplConfigItem>(65005);
|
||||
constexpr inline SplConfigItem SplConfigItem_ExosphereAllowCalWrites = static_cast<SplConfigItem>(65006);
|
||||
constexpr inline SplConfigItem SplConfigItem_ExosphereEmummcType = static_cast<SplConfigItem>(65007);
|
||||
constexpr inline SplConfigItem SplConfigItem_ExospherePayloadAddress = static_cast<SplConfigItem>(65008);
|
||||
|
|
|
@ -17,12 +17,12 @@
|
|||
|
||||
namespace ams::spl::smc {
|
||||
|
||||
Result SetConfig(spl::ConfigItem which, const u64 *value, size_t num_qwords) {
|
||||
Result SetConfig(spl::ConfigItem which, const void *address, const u64 *value, size_t num_qwords) {
|
||||
SecmonArgs args;
|
||||
|
||||
args.X[0] = static_cast<u64>(FunctionId::SetConfig);
|
||||
args.X[1] = static_cast<u64>(which);
|
||||
args.X[2] = 0;
|
||||
args.X[2] = reinterpret_cast<u64>(address);
|
||||
for (size_t i = 0; i < std::min(size_t(4), num_qwords); i++) {
|
||||
args.X[3 + i] = value[i];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue