Jason Xu 9c5c2813a0 Update QEMU command in all README and Makefile %!s(int64=2) %!d(string=hai) anos
..
Makefile 426205e2a3 Added makefiles for LLVM Clang %!s(int64=5) %!d(string=hai) anos
Makefile.clang 9c5c2813a0 Update QEMU command in all README and Makefile %!s(int64=2) %!d(string=hai) anos
Makefile.gcc 9c5c2813a0 Update QEMU command in all README and Makefile %!s(int64=2) %!d(string=hai) anos
OLVASSEL.md 9c5c2813a0 Update QEMU command in all README and Makefile %!s(int64=2) %!d(string=hai) anos
README.md 9c5c2813a0 Update QEMU command in all README and Makefile %!s(int64=2) %!d(string=hai) anos
gpio.h 7ace64ba9f Initial commit %!s(int64=7) %!d(string=hai) anos
kernel8.img 8ce0f75b47 Recompiled with latest gcc %!s(int64=4) %!d(string=hai) anos
link.ld 7ace64ba9f Initial commit %!s(int64=7) %!d(string=hai) anos
main.c a798ff59f4 Fixed issue #3 %!s(int64=6) %!d(string=hai) anos
mbox.c 214885df63 compute the mailbox cmd only once %!s(int64=6) %!d(string=hai) anos
mbox.h 7ace64ba9f Initial commit %!s(int64=7) %!d(string=hai) anos
start.S ea4691947c Improve comments wrt stack setup %!s(int64=3) %!d(string=hai) anos
uart.c c59ad439f4 Enable UART0 FIFOs %!s(int64=3) %!d(string=hai) anos
uart.h 7ace64ba9f Initial commit %!s(int64=7) %!d(string=hai) anos

README.md

Tutorial 05 - UART0, PL011

This tutorial does the same as tutorial 04, but it prints the serial number on UART0. As such, it can be used easily with qemu, like

$ qemu-system-aarch64 -M raspi3b -kernel kernel8.img -serial stdio
My serial number is: 0000000000000000

Uart.h, uart.c

Before we could use a rate divisor value, we must establish a valid clock rate for the PL011. It's done via mailboxes, with the same property channel we used earlier. Otherwise this interface is identical to the UART1 one.

Main

We query the board's serial number and then we display it on the serial console.