From 6954925f7181e09ca1dc36d0c01b066c5c662b4d Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Fri, 18 May 2018 06:58:49 -0600 Subject: [PATCH] Exosphere: Fix bug, we now make it past MMU enable. --- exosphere/src/coldboot_init.c | 2 +- exosphere/src/start.s | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/exosphere/src/coldboot_init.c b/exosphere/src/coldboot_init.c index 03125dcf1..67bab8c09 100644 --- a/exosphere/src/coldboot_init.c +++ b/exosphere/src/coldboot_init.c @@ -122,7 +122,6 @@ uintptr_t get_coldboot_crt0_stack_address(void) { void coldboot_init(coldboot_crt0_reloc_list_t *reloc_list, uintptr_t start_cold) { //MAILBOX_NX_SECMON_BOOT_TIME = TIMERUS_CNTR_1US_0; - MAKE_REG32(0x7000E400ULL) = 0x10; /* Custom approach */ reloc_list->reloc_base = start_cold; @@ -161,6 +160,7 @@ void coldboot_init(coldboot_crt0_reloc_list_t *reloc_list, uintptr_t start_cold) for(size_t i = 0; i < reloc_list->nb_relocs_post_mmu_init; i++) { do_relocation(reloc_list, reloc_list->nb_relocs_pre_mmu_init + i); } + // MAKE_REG32(MMIO_GET_DEVICE_ADDRESS(MMIO_DEVID_RTC_PMC) + 0x400ull) = 0x10; flush_dcache_all(); invalidate_icache_all(); diff --git a/exosphere/src/start.s b/exosphere/src/start.s index 9cac2d09d..e3e0bdc61 100644 --- a/exosphere/src/start.s +++ b/exosphere/src/start.s @@ -124,10 +124,10 @@ _post_cold_crt0_reloc: blo 2b /* X0 = TZ-in-DRAM, X1 = relocation-list-in-DRAM. */ - ldr x0, =0x80010000 - mov x1, x20 + mov x0, x20 + ldr x1, =0x80010000 /* Set size in coldboot relocation list. */ - str x21, [x1, #0x8] + str x21, [x0, #0x8] bl coldboot_init ldr x16, =__jump_to_main_cold