mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-06-02 23:59:49 -04:00
kern: fix ARM vs THUMB mode selection on 32-bit entry
This commit is contained in:
parent
36a3909a24
commit
5de853b662
4 changed files with 18 additions and 2 deletions
|
@ -48,6 +48,7 @@ namespace ams::kern::arch::arm64 {
|
|||
|
||||
/* Dump the page tables. */
|
||||
/* GetCurrentProcess().GetPageTable().DumpTable(); */
|
||||
GetCurrentProcess().GetPageTable().DumpMemoryBlocks();
|
||||
|
||||
MESOSPHERE_PANIC("Unhandled Exception in User Mode\n");
|
||||
|
||||
|
|
|
@ -77,9 +77,10 @@ namespace ams::kern::arch::arm64 {
|
|||
if (is_64_bit) {
|
||||
ctx->psr = 0;
|
||||
} else {
|
||||
constexpr u64 PsrArmValue = 0x20;
|
||||
constexpr u64 PsrThumbValue = 0x00;
|
||||
constexpr u64 PsrArmValue = 0x00;
|
||||
constexpr u64 PsrThumbValue = 0x20;
|
||||
ctx->psr = ((pc & 1) == 0 ? PsrArmValue : PsrThumbValue) | (0x10);
|
||||
MESOSPHERE_LOG("Creating User 32-Thread, %016lx\n", GetInteger(pc));
|
||||
}
|
||||
|
||||
/* Set stack pointer. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue