1
0
Fork 0
mirror of https://github.com/Atmosphere-NX/Atmosphere.git synced 2024-11-13 23:46:40 +00:00

Fix bugs required to successfully hand off to kernel

This commit is contained in:
Michael Scire 2018-03-03 06:15:46 -08:00
parent 93864f2289
commit 48e8d9c7de
3 changed files with 3 additions and 5 deletions

View file

@ -58,8 +58,6 @@ void core_jump_to_lower_el(void) {
__sev(); __sev();
/* Nintendo jumps to EL1, we jump to EL2. Both are supported with all current packages2. */ /* 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); __jump_to_lower_el(arg, ep, 2);
} }

View file

@ -214,7 +214,7 @@ __jump_to_lower_el:
msr elr_el3, x1 msr elr_el3, x1
mov w1, #(0b1111 << 6 | 1) /* DAIF set and SP = SP_ELx*/ 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 msr spsr_el3, x1
bl __set_exception_entry_stack_pointer bl __set_exception_entry_stack_pointer

View file

@ -28,8 +28,8 @@ void warmboot_crt0_critical_section_enter(volatile critical_section_t *critical_
} }
void set_memory_registers_enable_mmu(void) { 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 vbar = TZRAM_GET_SEGMENT_ADDRESS(TZRAM_SEGEMENT_ID_SECMON_EVT) + 0x800;
static const uintptr_t ttbr0 = vbar - 64; static const uintptr_t ttbr0 = TZRAM_GET_SEGMENT_PA(TZRAM_SEGEMENT_ID_SECMON_EVT) + 0x800 - 64;
/* /*
- Disable table walk descriptor access prefetch. - Disable table walk descriptor access prefetch.