#include "uart.h" #include "psr.h" // entry point - must remain the only function in the file! void PL0_main(void) { // If all went correct, Success! gets printed uart_puts("Success!\n\r"); uart_puts("calling supervisor\n\r"); asm volatile("svc #0"); uart_puts("back from supervisor call\n\r"); // if we're indeed in PL0, we should crash now, when trying to access // memory we're not allowed to char first_kernel_byte[2]; first_kernel_byte[0] = *(char*) ((uint32_t) 0x0); first_kernel_byte[1] = '\0'; uart_puts(first_kernel_byte); while (1) { char c = uart_getc(); uart_putc(c); if (c == '\r') uart_putc('\n'); } }