mirror of
https://github.com/Atmosphere-NX/Atmosphere
synced 2024-12-22 20:31:14 +00:00
ams: take three tries to edit a structure
This commit is contained in:
parent
f31ecb5c23
commit
2b5e8b5c65
2 changed files with 4 additions and 4 deletions
|
@ -73,11 +73,11 @@ namespace ams {
|
||||||
ams_ctx.sp = ctx->sp.x;
|
ams_ctx.sp = ctx->sp.x;
|
||||||
ams_ctx.pc = ctx->pc.x;
|
ams_ctx.pc = ctx->pc.x;
|
||||||
ams_ctx.pstate = ctx->pstate;
|
ams_ctx.pstate = ctx->pstate;
|
||||||
ams_ctx.afsr0 = ctx->afsr0;
|
ams_ctx.afsr0 = static_cast<u32>(::ams::exosphere::GetVersion(ATMOSPHERE_RELEASE_VERSION));
|
||||||
ams_ctx.afsr1 = (static_cast<u64>(::ams::exosphere::GetVersion(ATMOSPHERE_RELEASE_VERSION)) << 32) | static_cast<u64>(hos::GetVersion());
|
|
||||||
if (svc::IsKernelMesosphere()) {
|
if (svc::IsKernelMesosphere()) {
|
||||||
ams_ctx.afsr1 |= (static_cast<u64>('M') << (BITSIZEOF(u64) - BITSIZEOF(u8)));
|
ams_ctx.afsr0 |= (static_cast<u32>('M') << (BITSIZEOF(u32) - BITSIZEOF(u8)));
|
||||||
}
|
}
|
||||||
|
ams_ctx.afsr1 = static_cast<u32>(hos::GetVersion());
|
||||||
ams_ctx.far = ctx->far.x;
|
ams_ctx.far = ctx->far.x;
|
||||||
ams_ctx.report_identifier = armGetSystemTick();
|
ams_ctx.report_identifier = armGetSystemTick();
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,7 @@ namespace ams::impl {
|
||||||
u64 module_base;
|
u64 module_base;
|
||||||
u32 pstate;
|
u32 pstate;
|
||||||
u32 afsr0;
|
u32 afsr0;
|
||||||
u64 afsr1;
|
u32 afsr1;
|
||||||
u32 esr;
|
u32 esr;
|
||||||
u64 far;
|
u64 far;
|
||||||
u64 report_identifier; /* Normally just system tick. */
|
u64 report_identifier; /* Normally just system tick. */
|
||||||
|
|
Loading…
Reference in a new issue