diff --git a/src/boot.S b/src/boot.S index 56f4da7..0cba543 100644 --- a/src/boot.S +++ b/src/boot.S @@ -16,5 +16,5 @@ _start: mov sp, #LOW_MEMORY // Initialize the kernel stack pointer to +4mb, growing downwards bl kernel_main // kernel_main() -halt: +halt: // Doesn't actually shut down the other cores for now, just makes them spin endlessly b halt \ No newline at end of file diff --git a/src/kernel.c b/src/kernel.c index e6447bc..0a20c05 100644 --- a/src/kernel.c +++ b/src/kernel.c @@ -36,7 +36,8 @@ void kernel_main(void) delay(1000); uart_send_string("Hello, world!\r\n"); - /*while (1) { + while (1) { + // Echo back chars, the way a normal console would. uart_send(uart_recv()); - }*/ + } } diff --git a/src/mini_uart.c b/src/mini_uart.c index 6294e98..3c25a5a 100644 --- a/src/mini_uart.c +++ b/src/mini_uart.c @@ -58,12 +58,12 @@ void uart_init(void) void uart_send(char c) { - while(get32(UART_FR) & (1<<5)); + while (get32(UART_FR) & (1<<5)); put32(UART_DR, c); } char uart_recv() { - while(get32(UART_FR) & (1<<4)); + while (get32(UART_FR) & (1<<4)); return put32(UART_DR) & 0xFF; }