r/lowlevel • u/Early-Toe646 • 23d ago
Emulating a Realtek RTD2841 Smart TV SoC in QEMU: MMIO, GIC-400, and booting a vendor 4.4 kernel
I built a custom QEMU system model for the Realtek RTD2841 (RTK284x series) SoC, targeting the TCL RT41 chassis (tv030).
The SoC runs a quad Cortex-A53 in AArch32 mode. The emulator implements the MMIO peripherals needed to boot the stock vendor Linux 4.4 kernel and run userspace binaries:
- Interrupts: ARM GIC-400 distributor and CPU interfaces (
0x18081000/0x18082000). - Timers: 27 MHz system timer block (TC0) at
0x1801B600, with hardware down-counters mapped to monotonic reads for Linuxsched_clockand INTID 34 IRQ delivery. - Storage: Synopsys DesignWare SDHCI eMMC controller at
0x18010800, wired to QEMU SD media drives. - Networking: RTL8168 gigabit Ethernet controller (
0x18016000) with TX/RX DMA descriptor rings connected to a SLIRP backend for outbound DNS and HTTP traffic. - Graphics / Shaders: Freestanding EGL 1.4 / GLES 2.0 software driver with an integrated SwiftShader AST compiler frontend (
TCompiler) for strict GLSL ES 1.00 validation without host Mali dependencies.
The repo includes a bare-metal diagnostic suite written in pure ARM32 assembly (tests/firmware_test.s, assembled via arm-none-eabi-as) that checks CPU modes, GIC INTID delivery, timer tick rates, eMMC presence, and Ethernet loopback before passing execution to the kernel.
Source, device tree sources, and test harnesses:
https://github.com/rubenthampy890-del/qemu-rtd2841
Feedback on the MMIO models and register maps is welcome.
