diff options
author | Wojtek Kosior <kwojtus@protonmail.com> | 2019-12-31 10:42:17 +0100 |
---|---|---|
committer | Wojtek Kosior <kwojtus@protonmail.com> | 2019-12-31 10:42:17 +0100 |
commit | 254e035cc27d5787348849b65619a702ae0d42e3 (patch) | |
tree | cd678d246011b738135daf5182355ba2b2fdda68 /setup.c | |
parent | 1126a18822701632e5914e441386c7fa5d2cf474 (diff) | |
download | rpi-MMU-example-254e035cc27d5787348849b65619a702ae0d42e3.tar.gz rpi-MMU-example-254e035cc27d5787348849b65619a702ae0d42e3.zip |
handle atags in C code, print (some of) it's contents
Diffstat (limited to 'setup.c')
-rw-r--r-- | setup.c | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -2,9 +2,10 @@ #include "io.h" #include "demo_functionality.h" #include "paging.h" +#include "atags.h" void setup(uint32_t r0, uint32_t machine_type, - uint32_t atags) + struct atag_header *atags) { uart_init(); @@ -17,12 +18,19 @@ void setup(uint32_t r0, uint32_t machine_type, prints("ARM machine type: 0x"); printhext(machine_type); puts(""); - // value 3 introduced by stage1 code, means no atags was found + // value 3 introduced by stage1 code means no atags was found if (r0 == 3) puts("No ATAGS was found!"); else { - prints("ATAGS copied to 0x"); printhex(atags); puts(""); + prints("ATAGS copied to 0x"); + printhex((uint32_t) atags); puts(""); + + puts("__ ATAGS contents __"); + + print_atags(atags); + + puts("__ end of ATAGS contents __"); } // prints some info |