mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-24 11:46:58 -04:00
PRODINFO: Revamp blanking/write disallow policy. (#913)
* exo/fusee: hookup new prodinfo settings * fusee: new scheme doesn't need FLAGS_DEFAULT * fusee: fix c/p errors * ams.mitm: completely revamp prodinfo backup mechanism * ams.mitm: Implement revamped blanking/write policy * strat: make early boot more debuggable * exo: condense flag logic
This commit is contained in:
parent
6ac1ff6f24
commit
3bc2d79384
42 changed files with 1355 additions and 142 deletions
|
@ -51,19 +51,32 @@ namespace ams::exosphere {
|
|||
|
||||
namespace {
|
||||
|
||||
inline Result GetRcmBugPatched(bool *out) {
|
||||
u64 tmp = 0;
|
||||
R_TRY(spl::smc::ConvertResult(spl::smc::GetConfig(&tmp, 1, SplConfigItem_ExosphereHasRcmBugPatch)));
|
||||
*out = (tmp != 0);
|
||||
return ResultSuccess();
|
||||
inline u64 GetU64ConfigItem(spl::ConfigItem cfg) {
|
||||
u64 tmp;
|
||||
R_ABORT_UNLESS(spl::smc::ConvertResult(spl::smc::GetConfig(std::addressof(tmp), 1, static_cast<::SplConfigItem>(cfg))));
|
||||
return tmp;
|
||||
}
|
||||
|
||||
inline bool GetBooleanConfigItem(spl::ConfigItem cfg) {
|
||||
return GetU64ConfigItem(cfg) != 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
bool IsRcmBugPatched() {
|
||||
bool rcm_bug_patched;
|
||||
R_ABORT_UNLESS(GetRcmBugPatched(&rcm_bug_patched));
|
||||
return rcm_bug_patched;
|
||||
return GetBooleanConfigItem(spl::ConfigItem::ExosphereHasRcmBugPatch);
|
||||
}
|
||||
|
||||
bool ShouldBlankProdInfo() {
|
||||
return GetBooleanConfigItem(spl::ConfigItem::ExosphereBlankProdInfo);
|
||||
}
|
||||
|
||||
bool ShouldAllowWritesToProdInfo() {
|
||||
return GetBooleanConfigItem(spl::ConfigItem::ExosphereAllowCalWrites);
|
||||
}
|
||||
|
||||
u64 GetDeviceId() {
|
||||
return GetU64ConfigItem(spl::ConfigItem::DeviceId);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue