From 254e035cc27d5787348849b65619a702ae0d42e3 Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Tue, 31 Dec 2019 10:42:17 +0100 Subject: handle atags in C code, print (some of) it's contents --- setup.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'setup.c') diff --git a/setup.c b/setup.c index be71547..f0a9d0a 100644 --- a/setup.c +++ b/setup.c @@ -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 -- cgit v1.2.3