QEMU Emulation for ARM Cortex-A72

Overview

This board configuration will use QEMU to emulate a Raspberry Pi 4B hardware platform based on the Broadcom BCM2711 SoC.

This configuration provides support for an ARM Cortex-A72 CPU and these devices:

  • ARM architected timer

  • ARM GIC-400 interrupt controller

  • ARM PL011 UART controller

  • Broadcom BCM2835 AUX UART controller

  • Broadcom BCM2835 clock/reset manager (CPRMAN)

  • Broadcom BCM2835 DMA controller

  • Broadcom BCM2835 framebuffer controller

  • Broadcom BCM2835 GPIO controller

  • Broadcom BCM2835 hardware random number generator

  • Broadcom BCM2835 I2C (BSC) controller

  • Broadcom BCM2835 mailbox controller

  • Broadcom BCM2835 SD/MMC host controller

  • Broadcom BCM2835 SPI controller

  • Broadcom BCM2835 system timer

  • Broadcom BCM2835 thermal sensor

  • Broadcom BCM2835 USB host controller

  • Raspberry Pi VideoCore firmware property interface

  • Synopsys DWC2 USB2 host controller

Hardware

Supported Features

The qemu_cortex_a72 board supports the hardware features listed below.

on-chip / on-board
Feature integrated in the SoC / present on the board.
2 / 2
Number of instances that are enabled / disabled.
Click on the label to see the first instance of this feature in the board/SoC DTS files.
vnd,foo
Compatible string for the Devicetree binding matching the feature.
Click on the link to view the binding documentation.

qemu_cortex_a72/bcm2711 target

Type

Location

Description

Compatible

CPU

on-chip

ARM Cortex-A72 CPU1

arm,cortex-a72

Clock control

on-chip

Generic fixed-rate clock provider1

fixed-clock

Firmware

on-board

Raspberry Pi Firmware Interface1

raspberrypi,bcm283x-firmware

GPIO & Headers

on-chip

BCM2711 GPIO11

brcm,bcm2711-gpio

Interrupt controller

on-chip

ARM Generic Interrupt Controller v21

arm,gic-v2

LED

on-board

Group of GPIO-controlled LEDs1

gpio-leds

Mailbox

on-chip

Broadcom BCM2711 VideoCore mailbox1

brcm,bcm2711-mbox

Pin control

on-chip

Broadcom BCM2711 pin controller1

brcm,bcm2711-pinctrl

RNG

on-chip

Broadcom iProc RNG200 Random Number Generator1

brcm,iproc-rng200

Serial controller

on-chip

ARM PL011 UART14

arm,pl011

on-chip

BCM2711 UART1

brcm,bcm2711-aux-uart

SRAM

on-chip

Generic on-chip SRAM2

mmio-sram

Timer

on-chip

per-core ARM architected timer1

arm,armv8-timer

Programming and Debugging

The qemu_cortex_a72 board supports the runners and associated west commands listed below.

flash debug debugserver
qemu ✅ (default) ✅ (default)

Use this configuration to run basic Zephyr applications and kernel tests in the QEMU emulated environment, for example, with the Basic Synchronization sample:

# From the root of the zephyr repository
west build -b qemu_cortex_a72 samples/synchronization
west build -t run

This will build an image with the synchronization sample app, boot it using QEMU, and display the following console output:

*** Booting Zephyr OS build v4.4.0-2646-g284aabd6a6c1 ***
thread_a: Hello World from cpu 0 on qemu_cortex_a72!
thread_b: Hello World from cpu 0 on qemu_cortex_a72!
thread_a: Hello World from cpu 0 on qemu_cortex_a72!
thread_b: Hello World from cpu 0 on qemu_cortex_a72!
thread_a: Hello World from cpu 0 on qemu_cortex_a72!
thread_b: Hello World from cpu 0 on qemu_cortex_a72!
thread_a: Hello World from cpu 0 on qemu_cortex_a72!
thread_b: Hello World from cpu 0 on qemu_cortex_a72!

Exit QEMU by pressing CTRL+A x.

Debugging

Refer to the detailed overview about Application Debugging.

To attach GDB over the QEMU GDB stub (enabled via -s flag):

gdb-multiarch build/zephyr/zephyr.elf \
  -ex "target remote localhost:1234"

References

  1. Raspberry Pi 4 Model B Datasheet

  2. BCM2711 ARM Peripherals