Expand description
Machine related implementations.
ConstantsΒ§
- KSEG1 πThe KSEG1 to visit the devices.
- MALTA_
FPGA_ πBASE QEMU MMIO address definitions for FPGA (Used for halt). - MALTA_
PCIIO_ πBASE QEMU MMIO address definitions for PCIIO (Used for text I/O). - MALTA_
SERIAL_ πBASE 16550 Serial UART device definitions (Base). - MALTA_
SERIAL_ πDATA 16550 Serial UART device definitions (Data: Offset: 0x0). - Serial data is ready.
- MALTA_
SERIAL_ πLSR 16550 Serial UART device definitions (LSR: Offset: 0x5). - Serial the is empty.
FunctionsΒ§
- Actually trigger the reboot of the board. But in QEMU, we choose to βno-rebootβ. So the simulation will exit if halt is called.
- Put the character (whose size is 1 byte) into teh serial. Busy-wait if the serial thr is not empty. The
'\r'will be added before a'\n'. - Get a character (whose size is 1 byte) from the serial. Zero will be returned if the data is not ready for reading.