Qemu for ultra96

Kinsey Moore kinsey.moore at oarcorp.com
Thu Apr 22 15:59:57 UTC 2021


On 4/22/2021 08:47, Alireza Banejad wrote:
> Hello
> I want to know could I run applications for the ultra96 bsp in qemu?
> I tried the qemu-system-arm with the virt machine and cpu specified as 
> cortex-a7 yet I don't get anything
> I also tried the qemu-system-aarch64 specifying the machine as 
> xlnx-zcu102 and it still couldn't run the application.
> BTW the application is just the hello sample from the testsuite
> In reality I actually could run applications that were built with the 
> xilinx_zynqmp_ultra96 on a actual zcu102 board
> But I don't understand why this doesn't happen in qemu
> I don't have the board right now that why I need to test my 
> applications in qemu
> Long story short, how can I run my applications built for 
> xilinx_zynqmp_ultra96 in qemu??
>
The issue that you're having is that the ARM xilinx_zynqmp_ultra96 BSP 
is designed to run on the Ultrascale+ ZynqMP chip in 32-bit mode instead 
of 64-bit mode. qemu-system-aarch64 is the correct QEMU to use, but it 
starts in EL1/AArch64 mode by default. I haven't seen a way to directly 
start AArch32/ARMv7 code on the virtualized Cortex-A53 CPU, but on real 
hardware it would be controlled by the AA64nAA32 signal line. From what 
I can find, similar discussions have happened around the Raspberry Pi 
platform and as of 2019 there was no way to configure direct boot to 
AArch32.

Two viable options:

Write a piece of shim code to drop from EL1 to 32-bit mode based on the 
ARMv8 bare metal boot code (what you need is there, almost verbatim).

Recompile QEMU to get the functionality you want (the relevant code is 
in hw/arm/boot.c, look for EM_AARCH64).


Kinsey



More information about the devel mailing list