diff options
author | Wojtek Kosior <kwojtus@protonmail.com> | 2019-12-30 23:41:04 +0100 |
---|---|---|
committer | Wojtek Kosior <kwojtus@protonmail.com> | 2019-12-30 23:41:04 +0100 |
commit | 28bbb56f349721bf8d2b7221427e925a3960f8da (patch) | |
tree | 279c449064ad06cf57355e202d4afa93f5da740e | |
parent | a2885ace9af6b78172837734ddd3a0ea269e1734 (diff) | |
download | rpi-MMU-example-28bbb56f349721bf8d2b7221427e925a3960f8da.tar.gz rpi-MMU-example-28bbb56f349721bf8d2b7221427e925a3960f8da.zip |
inform about values passed to the kernel
-rw-r--r-- | setup.c | 15 |
1 files changed, 13 insertions, 2 deletions
@@ -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(); |