mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-11-17 17:36:44 +00:00
Exosphere: Fix crt0 bug resulting in bad relocation calculations
This commit is contained in:
parent
f8cf7adad7
commit
02e01360fd
2 changed files with 5 additions and 3 deletions
|
@ -131,13 +131,14 @@ uintptr_t get_coldboot_crt0_stack_address(void) {
|
|||
return TZRAM_GET_SEGMENT_PA(TZRAM_SEGMENT_ID_CORE3_STACK) + 0x800;
|
||||
}
|
||||
|
||||
void coldboot_init(coldboot_crt0_reloc_list_t *reloc_list, boot_func_list_t *func_list, boot_func_list_t *func_list_warmboot) {
|
||||
MAILBOX_NX_SECMON_BOOT_TIME = TIMERUS_CNTR_1US_0;
|
||||
void coldboot_init(coldboot_crt0_reloc_list_t *reloc_list, boot_func_list_t *func_list, boot_func_list_t *func_list_warmboot, uintptr_t start_cold) {
|
||||
//MAILBOX_NX_SECMON_BOOT_TIME = TIMERUS_CNTR_1US_0;
|
||||
|
||||
boot_func_list_t func_copy = *func_list;
|
||||
/* Custom approach */
|
||||
reloc_list->reloc_base = (uintptr_t)__start_cold;
|
||||
reloc_list->reloc_base = start_cold;
|
||||
translate_func_list(reloc_list, func_list, false);
|
||||
|
||||
|
||||
/*
|
||||
From https://events.static.linuxfound.org/sites/events/files/slides/slides_17.pdf :
|
||||
|
|
|
@ -90,6 +90,7 @@ __start_cold:
|
|||
mov x19, x0
|
||||
adr x1, g_coldboot_crt0_main_func_list
|
||||
ldr x2, =g_warmboot_crt0_main_func_list
|
||||
adr x3, __start_cold
|
||||
bl coldboot_init
|
||||
|
||||
ldr x16, =__jump_to_main_cold
|
||||
|
|
Loading…
Reference in a new issue