mirror of
https://github.com/Atmosphere-NX/Atmosphere
synced 2024-11-09 22:56:35 +00:00
Fix bugs required to successfully hand off to kernel
This commit is contained in:
parent
93864f2289
commit
48e8d9c7de
3 changed files with 3 additions and 5 deletions
|
@ -58,8 +58,6 @@ void core_jump_to_lower_el(void) {
|
|||
__sev();
|
||||
|
||||
/* Nintendo jumps to EL1, we jump to EL2. Both are supported with all current packages2. */
|
||||
/* TODO: Remove this panic() when we're ready to test Kernel handoff. */
|
||||
panic(0x7A700001);
|
||||
__jump_to_lower_el(arg, ep, 2);
|
||||
}
|
||||
|
||||
|
|
|
@ -214,7 +214,7 @@ __jump_to_lower_el:
|
|||
msr elr_el3, x1
|
||||
|
||||
mov w1, #(0b1111 << 6 | 1) /* DAIF set and SP = SP_ELx*/
|
||||
orr w1, w2, w2, lsl#2
|
||||
orr w1, w1, w2, lsl#2
|
||||
msr spsr_el3, x1
|
||||
|
||||
bl __set_exception_entry_stack_pointer
|
||||
|
|
|
@ -28,8 +28,8 @@ void warmboot_crt0_critical_section_enter(volatile critical_section_t *critical_
|
|||
}
|
||||
|
||||
void set_memory_registers_enable_mmu(void) {
|
||||
static const uintptr_t vbar = TZRAM_GET_SEGMENT_PA(TZRAM_SEGEMENT_ID_SECMON_EVT) + 0x800;
|
||||
static const uintptr_t ttbr0 = vbar - 64;
|
||||
static const uintptr_t vbar = TZRAM_GET_SEGMENT_ADDRESS(TZRAM_SEGEMENT_ID_SECMON_EVT) + 0x800;
|
||||
static const uintptr_t ttbr0 = TZRAM_GET_SEGMENT_PA(TZRAM_SEGEMENT_ID_SECMON_EVT) + 0x800 - 64;
|
||||
|
||||
/*
|
||||
- Disable table walk descriptor access prefetch.
|
||||
|
|
Loading…
Reference in a new issue