misc cleanup
[rpi-open-firmware.git] / arm_chainloader / main.c
1 #include <stdint.h>
2 #include <chainloader.h>
3 #include <hardware.h>
4 #include <stdbool.h>
5
6 extern uintptr_t* _end;
7
8 #define logf(fmt, ...) printf("[BRINGUP:%s]: " fmt, __FUNCTION__, ##__VA_ARGS__);
9
10 static void heap_init() {
11 void* start_of_heap = (void*)MEM_HEAP_START;
12 size_t hs = MEM_HEAP_SIZE;
13
14 logf("Initializing heap at 0x%x with size 0x%x\n", start_of_heap, hs);
15
16 init_memory_pool(hs, start_of_heap);
17 }
18
19 void main(bool security_supported) {
20 /* wait for peripheral access */
21 while(ARM_ID != ARM_IDVAL);
22 udelay(500);
23
24 logf("Started on ARM, continuing boot from here ...\n");
25
26 logf("Firmware data: SDRAM_SIZE=%d, VPU_CPUID=0x%X\n",
27 g_FirmwareData.sdram_size,
28 g_FirmwareData.vpu_cpuid);
29
30 if (security_supported) {
31 logf("Security extensions are supported!\n");
32 }
33
34 heap_init();
35
36 /* c++ runtime */
37 __cxx_init();
38
39 panic("Nothing else to do!");
40 }
This page took 0.066101 seconds and 4 git commands to generate.