-
Notifications
You must be signed in to change notification settings - Fork 6.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extend qemu_cortex_r5 test coverage #20217
Comments
Sample qemu RPU boot command line using the latest dts: |
What debugger is that? |
@andrewboie It is gdb with the gdb-dashboard. |
ZynqMP SoC embeds two separate processor types: Cortex-R for RPU and Cortex-A for APU. Since the current Zephyr architecture cannot support AMP of Cortex-R and Cortex-A within one project, the RPU and APU should be considered separate platforms. This commit relocates the device tree nodes that are not common between RPU and APU to a separate dtsi file (zynqmp_rpu.dtsi). When Cortex-A53 APU support is added in the future, an additional dtsi file (zynqmp_apu.dtsi) for specifying the APU device tree should be added. For more details, refer to the issue zephyrproject-rtos#20217. Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
This commit fixes the following problems with the RPU device tree: 1. The core type of the RPU of ZynqMP SoC is Cortex-R5F, not Cortex-R4. 2. RPU and APU use different interrupt controllers (PL390 GICv1 and GIC-400 GICv2, respectively) mapped to the same CPU local bus address region but with different offsets for the distributor and CPU interrupt control register sets. The GIC address mapping specified by the current dts is that of an APU and does not apply to the PL390 GICv1 of an RPU (refer to the "Zynq UltraScale+ Devices Register Reference" document from Xilinx for more information). For more details, refer to the issue zephyrproject-rtos#20217. Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
The Xilinx ZynqMP SoC embeds both Cortex-R "RPU" and Cortex-A "APU" cores. Since the current Zephyr architecture cannot support AMP of Cortex-R and Cortex-A within the same project, the RPU and APU should be considered separate platforms and handled accordingly. This commit re-purposes the SOC_XILINX_ZYNQMP symbol as a helper symbol indicating that Xilinx ZynqMP SoC is used, and adds a new symbol, SOC_XILINX_ZYNQMP_RPU, for specifying the actual build target platform. When Cortex-A support is added in the future, SOC_XILINX_ZYNQMP_APU symbol should be added and used to conditionally handle APU-specific code. For more details, refer to the issue zephyrproject-rtos#20217. Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
This commit removes the ignore tags for the tests that work after the changes in the PR zephyrproject-rtos#20267. In the future, this ignored testing tag list will be further reduced as critical bugs for the qemu_cortex_r5 platform are addressed (see zephyrproject-rtos#20217). Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
ZynqMP SoC embeds two separate processor types: Cortex-R for RPU and Cortex-A for APU. Since the current Zephyr architecture cannot support AMP of Cortex-R and Cortex-A within one project, the RPU and APU should be considered separate platforms. This commit relocates the device tree nodes that are not common between RPU and APU to a separate dtsi file (zynqmp_rpu.dtsi). When Cortex-A53 APU support is added in the future, an additional dtsi file (zynqmp_apu.dtsi) for specifying the APU device tree should be added. For more details, refer to the issue #20217. Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
This commit fixes the following problems with the RPU device tree: 1. The core type of the RPU of ZynqMP SoC is Cortex-R5F, not Cortex-R4. 2. RPU and APU use different interrupt controllers (PL390 GICv1 and GIC-400 GICv2, respectively) mapped to the same CPU local bus address region but with different offsets for the distributor and CPU interrupt control register sets. The GIC address mapping specified by the current dts is that of an APU and does not apply to the PL390 GICv1 of an RPU (refer to the "Zynq UltraScale+ Devices Register Reference" document from Xilinx for more information). For more details, refer to the issue #20217. Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
The Xilinx ZynqMP SoC embeds both Cortex-R "RPU" and Cortex-A "APU" cores. Since the current Zephyr architecture cannot support AMP of Cortex-R and Cortex-A within the same project, the RPU and APU should be considered separate platforms and handled accordingly. This commit re-purposes the SOC_XILINX_ZYNQMP symbol as a helper symbol indicating that Xilinx ZynqMP SoC is used, and adds a new symbol, SOC_XILINX_ZYNQMP_RPU, for specifying the actual build target platform. When Cortex-A support is added in the future, SOC_XILINX_ZYNQMP_APU symbol should be added and used to conditionally handle APU-specific code. For more details, refer to the issue #20217. Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
All PRs merged. |
@stephanosio not familiar with this platform, but what's the CPU clock frequency for this QEMU, thanks |
@wentongwu In terms of QEMU, it is meaningless to talk about the CPU clock frequency for obvious reasons. When running on real hardware (ZCU102), the clock frequency would depend on various configurations (e.g. on-board oscillator frequency, PLL configuration, ... handled by the PMU). |
@stephanosio yes, for normal mode we don't need that, but I'm trying to enable QEMU icount mode for qemu_cortex_r5, and it need CPU clock frequency to do some math, if any interest, please take a look #22904 and #14173 . Thanks |
At the time of writing, the
qemu_cortex_r5
board based onxilinx_zynqmp
SoC is only able to run very basic non-multitasking samples and tests (e.g.hello_world
sample).In order to improve test coverage on the
qemu_cortex_r5
platform and facilitate CI testing of the ARM Cortex-R port, QEMU needs to be patched to provide a better emulation of the RPU of the Xilinx ZynqMP SoC; at the same time, incorrectxilinx_zynqmp
SoC implementation on Zephyr needs to be fixed.QEMU Tasks
PATCH: arm/xlnx-zynqmp: put APUs and RPUs in separate CPU clusters(https://patchwork.kernel.org/patch/10717697)
PATCH: xlnx-zynqmp: add the timers(https://patchwork.kernel.org/patch/10048347)
PATCH: xlnx-zynqmp: add PL390 GIC for RPU(WIP)
A pull request incorporating the above patches is to be made on zephyr_rtos/qemu. As for the new patch(es), a pull request will be made on Xilinx/qemu and, hopefully, Xilinx will submit an upstream patch.It seems the hard-coded qemu machine type
-machine xlnx-zcu102
(currently being used as the default "run" environment by qemu_cortex_r5 board) is simply obsolete. Both RPU GIC and TTCs are properly mapped when emulating with-machine arm-generic-fdt
using the latestzcu102-arm.dts
from Xilinx/qemu-devicetrees.arm-generic-fdt
machine type support to Zephyr SDK qemu (this machine type is currently only available in Xilinx/qemu)Zephyr Tasks
Implement tickless capability for xlnx_psttc_timer #19869 Implement tickless API for Cadence TTC system timer driver(withdrawn)Note
xilinx_zynqmp
toxilinx_zynqmp_rpu
; when Cortex-A support is added in the future, addxilinx_zynqmp_apu
;qemu_cortex_a53
should then utilisexilinx_zynqmp_apu
). -> This has been addressed in the PR Refactor and fix xilinx_zynqmp SoC definition #20267.The text was updated successfully, but these errors were encountered: