diff --git a/libraries/libstratosphere/source/ams/ams_environment.cpp b/libraries/libstratosphere/source/ams/ams_environment.cpp index e18a8019b..a42776b23 100644 --- a/libraries/libstratosphere/source/ams/ams_environment.cpp +++ b/libraries/libstratosphere/source/ams/ams_environment.cpp @@ -73,11 +73,11 @@ namespace ams { ams_ctx.sp = ctx->sp.x; ams_ctx.pc = ctx->pc.x; ams_ctx.pstate = ctx->pstate; - ams_ctx.afsr0 = ctx->afsr0; - ams_ctx.afsr1 = (static_cast(::ams::exosphere::GetVersion(ATMOSPHERE_RELEASE_VERSION)) << 32) | static_cast(hos::GetVersion()); + ams_ctx.afsr0 = static_cast(::ams::exosphere::GetVersion(ATMOSPHERE_RELEASE_VERSION)); if (svc::IsKernelMesosphere()) { - ams_ctx.afsr1 |= (static_cast('M') << (BITSIZEOF(u64) - BITSIZEOF(u8))); + ams_ctx.afsr0 |= (static_cast('M') << (BITSIZEOF(u32) - BITSIZEOF(u8))); } + ams_ctx.afsr1 = static_cast(hos::GetVersion()); ams_ctx.far = ctx->far.x; ams_ctx.report_identifier = armGetSystemTick(); diff --git a/libraries/libvapours/include/vapours/ams/ams_fatal_error_context.hpp b/libraries/libvapours/include/vapours/ams/ams_fatal_error_context.hpp index cbdd39ab3..986d6c48f 100644 --- a/libraries/libvapours/include/vapours/ams/ams_fatal_error_context.hpp +++ b/libraries/libvapours/include/vapours/ams/ams_fatal_error_context.hpp @@ -48,7 +48,7 @@ namespace ams::impl { u64 module_base; u32 pstate; u32 afsr0; - u64 afsr1; + u32 afsr1; u32 esr; u64 far; u64 report_identifier; /* Normally just system tick. */