T-Kernel binaries can be executed under QEMU using the following target configurations:
# Run T-Kernel ELF under QEMU ARM virt machine
qemu-system-arm -M virt -kernel btron-qemu.elf -net none -m 512M -serial stdio
# Run T-Kernel on QEMU Raspberry Pi 2B model
qemu-system-arm -M raspi2b -kernel btron-qemu.elf -dtb bcm2709-rpi-2-b.dtb -serial stdio
# Run T-Kernel on x86_64 QEMU microvm with VirtIO MMIO
qemu-system-x86_64 -M microvm -kernel btron-qemu.elf -net none -serial stdio
Under QEMU virt machines, VirtIO MMIO control registers are mapped into physical memory spaces as follows:
| Device Subsystem | VirtIO ID | QEMU MMIO Base Address | IRQ |
|---|---|---|---|
| VirtIO-Console | 3 | 0x10001000 |
48 |
| VirtIO-GPU (2D) | 16 | 0x10002000 |
49 |
| VirtIO-Block | 2 | 0x10003000 |
50 |
| VirtIO-Net | 1 | 0x10004000 |
51 |
To build and test the T-Kernel QEMU binary from the workspace:
# Clean previous object files
make clean
# Build the QEMU T-Kernel ELF image
make qemu
# Execute under QEMU or host simulator
make run-qemu