aboutsummaryrefslogtreecommitdiff
path: root/setup.c
diff options
context:
space:
mode:
authorWojtek Kosior <kwojtus@protonmail.com>2019-12-31 10:42:17 +0100
committerWojtek Kosior <kwojtus@protonmail.com>2019-12-31 10:42:17 +0100
commit254e035cc27d5787348849b65619a702ae0d42e3 (patch)
treecd678d246011b738135daf5182355ba2b2fdda68 /setup.c
parent1126a18822701632e5914e441386c7fa5d2cf474 (diff)
downloadrpi-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.c14
1 files changed, 11 insertions, 3 deletions
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