mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-12-27 12:46:03 +00:00
Make clear_bss work regardless of load address
This commit is contained in:
parent
1d621f3bf4
commit
4025781f1c
1 changed files with 6 additions and 2 deletions
|
@ -136,8 +136,9 @@ FAR_REACHING static void invalidate_icache_all_inner_shareable_tzram_pa(void) {
|
|||
}
|
||||
|
||||
FAR_REACHING static void clear_bss(void) {
|
||||
memset((void *)__pk2ldr_bss_start__, 0, __pk2ldr_end__ - __pk2ldr_bss_start__);
|
||||
memset((void *)__main_bss_start__, 0, __main_end__ - __main_bss_start__);
|
||||
volatile uintptr_t v = (uintptr_t)memset;
|
||||
((void (*)(void *, int, size_t))v)((void *)__pk2ldr_bss_start__, 0, __pk2ldr_end__ - __pk2ldr_bss_start__);
|
||||
((void (*)(void *, int, size_t))v)((void *)__main_bss_start__, 0, __main_end__ - __main_bss_start__);
|
||||
}
|
||||
|
||||
uintptr_t get_coldboot_crt0_stack_address(void) {
|
||||
|
@ -153,7 +154,10 @@ void coldboot_init(void) {
|
|||
/* TODO: initialize DMA controllers, etc. */
|
||||
configure_ttbls();
|
||||
set_memory_registers_enable_mmu_tzram_pa();
|
||||
|
||||
|
||||
copy_other_sections();
|
||||
|
||||
|
||||
flush_dcache_all_tzram_pa();
|
||||
invalidate_icache_all_inner_shareable_tzram_pa();
|
||||
|
|
Loading…
Reference in a new issue