From ec655069d0259389358e43afa6b42fc0954fdd2c Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Sun, 31 Jan 2021 09:06:54 -0800 Subject: [PATCH] meso: update for new fatal encoding --- .../board/nintendo/nx/kern_k_system_control.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/libraries/libmesosphere/source/board/nintendo/nx/kern_k_system_control.cpp b/libraries/libmesosphere/source/board/nintendo/nx/kern_k_system_control.cpp index df41785d5..783ef1904 100644 --- a/libraries/libmesosphere/source/board/nintendo/nx/kern_k_system_control.cpp +++ b/libraries/libmesosphere/source/board/nintendo/nx/kern_k_system_control.cpp @@ -314,12 +314,12 @@ namespace ams::kern::board::nintendo::nx { g_secure_applet_memory_used = false; } - u64 GetVersionIdentifier() { - u64 value = kern::GetTargetFirmware(); - value |= static_cast(ATMOSPHERE_RELEASE_VERSION_MICRO) << 32; - value |= static_cast(ATMOSPHERE_RELEASE_VERSION_MINOR) << 40; - value |= static_cast(ATMOSPHERE_RELEASE_VERSION_MAJOR) << 48; - value |= static_cast('M') << 56; + u32 GetVersionIdentifier() { + u32 value = 0; + value |= static_cast(ATMOSPHERE_RELEASE_VERSION_MICRO) << 0; + value |= static_cast(ATMOSPHERE_RELEASE_VERSION_MINOR) << 8; + value |= static_cast(ATMOSPHERE_RELEASE_VERSION_MAJOR) << 16; + value |= static_cast('M') << 24; return value; } @@ -584,8 +584,8 @@ namespace ams::kern::board::nintendo::nx { f_ctx->module_base = KMemoryLayout::GetKernelCodeRegionExtents().GetAddress(); /* Set afsr1. */ - f_ctx->afsr0 = 0; - f_ctx->afsr1 = GetVersionIdentifier(); + f_ctx->afsr0 = GetVersionIdentifier(); + f_ctx->afsr1 = static_cast(kern::GetTargetFirmware()); /* Set efsr/far. */ f_ctx->far = cpu::GetFarEl1();