Mercurial > lcfOS
diff kernel/arch/qemu_vexpress/vexpressA9.c3 @ 389:2ec730e45ea1
Added check for recursive struct
author | Windel Bouwman |
---|---|
date | Fri, 16 May 2014 12:29:31 +0200 |
parents | kernel/arch/vexpressA9.c3@e07c2a9abac1 |
children | 0fb6633c42f6 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/kernel/arch/qemu_vexpress/vexpressA9.c3 Fri May 16 12:29:31 2014 +0200 @@ -0,0 +1,32 @@ +module arch; +import io; + + +function void init() +{ + // putc(65) + io.print2("PFR0 = ", pfr0()); + io.print2("PFR1 = ", pfr1()); + io.print2("MMFR0 = ", mmfr0()); + + // This below is not compatible with all qemu versions: + // io.print2("MPUIR = ", arch.mpuir()); +} + +function void putc(int c) +{ + var int *UART0DR; + UART0DR = cast<int*>(0x109000); // UART0 DR register when remapped at 1MB + *UART0DR = c; +} + +function void halt() +{ + while(true) {} +} + +function int pfr0(); +function int pfr1(); +function int mmfr0(); +// function int mpuir(); +