mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-06-04 16:53:48 -04:00
ams: allow bootloader to merely approximate correct target firmware
This commit is contained in:
parent
d41de21753
commit
5708bb1557
24 changed files with 281 additions and 396 deletions
|
@ -18,6 +18,12 @@
|
|||
#include "spl_device_address_mapper.hpp"
|
||||
#include "spl_key_slot_cache.hpp"
|
||||
|
||||
namespace ams::hos {
|
||||
|
||||
void InitializeVersionInternal(bool allow_approximate);
|
||||
|
||||
}
|
||||
|
||||
namespace ams::spl::impl {
|
||||
|
||||
namespace {
|
||||
|
@ -536,7 +542,13 @@ namespace ams::spl::impl {
|
|||
}
|
||||
|
||||
Result SetConfig(ConfigItem key, u64 value) {
|
||||
return smc::ConvertResult(smc::SetConfig(key, value));
|
||||
R_TRY(smc::ConvertResult(smc::SetConfig(key, value)));
|
||||
|
||||
/* Work around for temporary version. */
|
||||
if (key == ConfigItem::ExosphereApiVersion) {
|
||||
hos::InitializeVersionInternal(false);
|
||||
}
|
||||
return ResultSuccess();
|
||||
}
|
||||
|
||||
Result GenerateRandomBytes(void *out, size_t size) {
|
||||
|
|
|
@ -216,6 +216,10 @@ namespace ams::spl {
|
|||
return splGetConfig(static_cast<::SplConfigItem>(item), out);
|
||||
}
|
||||
|
||||
Result SetConfig(ConfigItem item, u64 v) {
|
||||
return splSetConfig(static_cast<::SplConfigItem>(item), v);
|
||||
}
|
||||
|
||||
bool IsDevelopment() {
|
||||
bool is_dev;
|
||||
R_ABORT_UNLESS(splIsDevelopment(std::addressof(is_dev)));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue