unified VC4 and ARM runtime code (including C++ runtime), updated some minor bits
[rpi-open-firmware.git] / arm_chainloader / main.c
1 #include <stdint.h>
2 #include <chainloader.h>
3 #include <hardware.h>
4
5 extern uintptr_t* _end;
6
7 #define logf(fmt, ...) printf("[BRINGUP:%s]: " fmt, __FUNCTION__, ##__VA_ARGS__);
8
9 static void heap_init() {
10 void* start_of_heap = (void*)MEM_HEAP_START;
11 size_t hs = MEM_HEAP_SIZE;
12
13 logf("Initializing heap at 0x%x with size 0x%x\n", start_of_heap, hs);
14
15 init_memory_pool(hs, start_of_heap);
16 }
17
18 void main() {
19 /* wait for peripheral access */
20 while(ARM_ID != ARM_IDVAL);
21
22 logf("Started on ARM, continuing boot from here ...\n");
23
24 heap_init();
25
26 /* c++ runtime */
27 __cxx_init();
28
29 panic("Nothing else to do!");
30 }
This page took 0.070429 seconds and 4 git commands to generate.