1
0
Fork 0
mirror of https://github.com/Atmosphere-NX/Atmosphere.git synced 2024-12-18 00:12:03 +00:00

Exosphere: Fix bug, we now make it past MMU enable.

This commit is contained in:
Michael Scire 2018-05-18 06:58:49 -06:00
parent ea905725c4
commit 6954925f71
2 changed files with 4 additions and 4 deletions

View file

@ -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) { void coldboot_init(coldboot_crt0_reloc_list_t *reloc_list, uintptr_t start_cold) {
//MAILBOX_NX_SECMON_BOOT_TIME = TIMERUS_CNTR_1US_0; //MAILBOX_NX_SECMON_BOOT_TIME = TIMERUS_CNTR_1US_0;
MAKE_REG32(0x7000E400ULL) = 0x10;
/* Custom approach */ /* Custom approach */
reloc_list->reloc_base = start_cold; 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++) { 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); 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(); flush_dcache_all();
invalidate_icache_all(); invalidate_icache_all();

View file

@ -124,10 +124,10 @@ _post_cold_crt0_reloc:
blo 2b blo 2b
/* X0 = TZ-in-DRAM, X1 = relocation-list-in-DRAM. */ /* X0 = TZ-in-DRAM, X1 = relocation-list-in-DRAM. */
ldr x0, =0x80010000 mov x0, x20
mov x1, x20 ldr x1, =0x80010000
/* Set size in coldboot relocation list. */ /* Set size in coldboot relocation list. */
str x21, [x1, #0x8] str x21, [x0, #0x8]
bl coldboot_init bl coldboot_init
ldr x16, =__jump_to_main_cold ldr x16, =__jump_to_main_cold