mirror of
https://github.com/Atmosphere-NX/Atmosphere-libs.git
synced 2025-06-28 14:02:40 +02:00
use svcCallSecureMonitor instead of talking to spl.
This commit is contained in:
parent
2f1fa654f2
commit
fb12edcbba
@ -35,7 +35,16 @@ static void _CacheValues(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
u32 target_fw = 0;
|
u32 target_fw = 0;
|
||||||
GetAtmosphereApiVersion(nullptr, nullptr, nullptr, &target_fw, nullptr);
|
{
|
||||||
|
SecmonArgs args = {0};
|
||||||
|
args.X[0] = 0xC3000002; /* smcGetConfig */
|
||||||
|
args.X[1] = 65000; /* ConfigItem_ExosphereVersion */
|
||||||
|
if (R_FAILED(svcCallSecureMonitor(&args)) || args.X[0] != 0) {
|
||||||
|
std::abort();
|
||||||
|
}
|
||||||
|
|
||||||
|
target_fw = (args.X[1] >> 0x08) & 0xFF;
|
||||||
|
}
|
||||||
|
|
||||||
switch (static_cast<AtmosphereTargetFirmware>(target_fw)) {
|
switch (static_cast<AtmosphereTargetFirmware>(target_fw)) {
|
||||||
case AtmosphereTargetFirmware_100:
|
case AtmosphereTargetFirmware_100:
|
||||||
|
Loading…
Reference in New Issue
Block a user