1
0
Fork 0
mirror of https://github.com/Atmosphere-NX/Atmosphere.git synced 2024-11-18 18:06:40 +00:00
Atmosphere/exosphere/coldboot_main.c
TuxSH a00e68e94a Write a significant chunk of coldboot init...
...merge start.cold.s and start.warm.s, other changes, etc.
2018-02-25 03:34:15 +01:00

22 lines
674 B
C

#include "utils.h"
#include "mmu.h"
#include "memory_map.h"
extern void (*__fini_array_start[])(void);
extern void (*__fini_array_end[])(void);
extern void _fini(void);
extern void __jump_to_lower_el(uint64_t arg, uintptr_t ep, unsigned int el);
void coldboot_main(void);
/* Needs to be called for EL3->EL3 chainloading (and only in that case). TODO: use it */
static void __libc_fini_array(void) __attribute__((used)) {
for (size_t i = __fini_array_end - __fini_array_start; i > 0; i--)
__fini_array_start[i - 1]();
_fini(); /* FIXME: do we have this gcc-provided symbol if we build with -nostartfiles? */
}
void coldboot_main(void) {
/* TODO */
}