From 2b5e8b5c65c0cb530ed6d9bb8b643b2b350955ba Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Sun, 31 Jan 2021 09:02:18 -0800 Subject: [PATCH] ams: take three tries to edit a structure --- libraries/libstratosphere/source/ams/ams_environment.cpp | 6 +++--- .../include/vapours/ams/ams_fatal_error_context.hpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) 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. */