From 28bbb56f349721bf8d2b7221427e925a3960f8da Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Mon, 30 Dec 2019 23:41:04 +0100 Subject: inform about values passed to the kernel --- setup.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'setup.c') diff --git a/setup.c b/setup.c index 3542043..be71547 100644 --- a/setup.c +++ b/setup.c @@ -3,17 +3,28 @@ #include "demo_functionality.h" #include "paging.h" -void setup(void) +void setup(uint32_t r0, uint32_t machine_type, + uint32_t atags) { uart_init(); // When we attach screen session after loading kernel with socat // we miss kernel's greeting... So we'll make the kernel wait for // one char we're going to send from within screen - getchar(); + //getchar(); puts("Hello, kernel World!"); + prints("ARM machine type: 0x"); printhext(machine_type); puts(""); + + // 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 some info demo_paging_support(); -- cgit v1.2.3