diff --git a/meta-zephyr-sdk/recipes-devtools/qemu/zephyr-qemu_git.bb b/meta-zephyr-sdk/recipes-devtools/qemu/zephyr-qemu_git.bb index 36f9dfb4..a454511c 100644 --- a/meta-zephyr-sdk/recipes-devtools/qemu/zephyr-qemu_git.bb +++ b/meta-zephyr-sdk/recipes-devtools/qemu/zephyr-qemu_git.bb @@ -228,6 +228,8 @@ do_install_append() { # Link Xilinx QEMU executables ln -sf ../xilinx/bin/qemu-system-aarch64 ${D}${bindir}/qemu-system-xilinx-aarch64 ln -sf ../xilinx/bin/qemu-system-microblazeel ${D}${bindir}/qemu-system-xilinx-microblazeel + ln -sf ../xilinx/bin/qemu-system-riscv32 ${D}${bindir}/qemu-system-xilinx-riscv32 + ln -sf ../xilinx/bin/qemu-system-riscv64 ${D}${bindir}/qemu-system-xilinx-riscv64 # Link ARC (Synopsys) QEMU executables ln -sf ../synopsys/bin/qemu-system-arc ${D}${bindir}/qemu-system-arc diff --git a/meta-zephyr-sdk/recipes-devtools/xilinx_qemu/files/0001-Revert-target-arm-Revert-back-to-YIELD-for-WFI.patch b/meta-zephyr-sdk/recipes-devtools/xilinx_qemu/files/0001-Revert-target-arm-Revert-back-to-YIELD-for-WFI.patch deleted file mode 100644 index 157c8f61..00000000 --- a/meta-zephyr-sdk/recipes-devtools/xilinx_qemu/files/0001-Revert-target-arm-Revert-back-to-YIELD-for-WFI.patch +++ /dev/null @@ -1,39 +0,0 @@ -From ef1724e0a558a0f6bc93530114173955bf67cf30 Mon Sep 17 00:00:00 2001 -From: Stephanos Ioannidis -Date: Wed, 8 Jan 2020 17:47:05 +0900 -Subject: [PATCH 1/2] Revert "target/arm: Revert back to YIELD for WFI" - -This reverts commit 5f38ea92fb697b94ad43f01fe162f3ed6e6b0e16. - -The commit 5f38ea92fb697b94ad43f01fe162f3ed6e6b0e16 was probably -introduced in order to improve emulation performance, as well as to -address the stability issue when running co-simulations (refer to the -commit 708639f72be2a9425992ae9dc4b9a098dc804c94). - -This, unfortunately, breaks the WFI instruction; i.e. CPU is not halted -and keeps running regardless of whether an interrupt occurs, and this -is a problem for the Zephyr CI tests that expect the WFI instruction to -do its job (in particular, tests/kernel/context is broken because of -this change). - -Signed-off-by: Stephanos Ioannidis ---- - target/arm/op_helper.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/target/arm/op_helper.c b/target/arm/op_helper.c -index acef79251d..6ab3a75a76 100644 ---- a/target/arm/op_helper.c -+++ b/target/arm/op_helper.c -@@ -304,7 +304,7 @@ void HELPER(wfi)(CPUARMState *env, uint32_t insn_len) - } - - qemu_mutex_lock_iothread(); -- if (use_icount || 1) { -+ if (use_icount) { - cs->exception_index = EXCP_YIELD; - } else { - cs->halted = 1; --- -2.17.1 - diff --git a/meta-zephyr-sdk/recipes-devtools/xilinx_qemu/files/0002-Enable-WFI-CPU-halting-in-icount-mode.patch b/meta-zephyr-sdk/recipes-devtools/xilinx_qemu/files/0002-Enable-WFI-CPU-halting-in-icount-mode.patch deleted file mode 100644 index 798765f8..00000000 --- a/meta-zephyr-sdk/recipes-devtools/xilinx_qemu/files/0002-Enable-WFI-CPU-halting-in-icount-mode.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 6d7ce4d6e5ab8d4222bb41b4e09e3437d534481a Mon Sep 17 00:00:00 2001 -From: Stephanos Ioannidis -Date: Wed, 26 Feb 2020 12:30:55 +0900 -Subject: [PATCH 2/2] Enable WFI CPU halting in icount mode - -This commit enables CPU halting via the WFI instruction in the -icount mode. - -The PetaLinux patch initially disabled WFI CPU halting, possibly for -performance reasons. - -Signed-off-by: Stephanos Ioannidis ---- - target/arm/op_helper.c | 9 +++------ - 1 file changed, 3 insertions(+), 6 deletions(-) - -diff --git a/target/arm/op_helper.c b/target/arm/op_helper.c -index 6ab3a75a76..1199288fdd 100644 ---- a/target/arm/op_helper.c -+++ b/target/arm/op_helper.c -@@ -304,12 +304,9 @@ void HELPER(wfi)(CPUARMState *env, uint32_t insn_len) - } - - qemu_mutex_lock_iothread(); -- if (use_icount) { -- cs->exception_index = EXCP_YIELD; -- } else { -- cs->halted = 1; -- cs->exception_index = EXCP_HLT; -- } -+ -+ cs->halted = 1; -+ cs->exception_index = EXCP_HLT; - - /* Drive STANDBYWFI only if cpu reset-pin is inactive */ - if (cs->reset_pin == false) { --- -2.17.1 - diff --git a/meta-zephyr-sdk/recipes-devtools/xilinx_qemu/xilinx-qemu_git.bb b/meta-zephyr-sdk/recipes-devtools/xilinx_qemu/xilinx-qemu_git.bb index 5773bcb5..e4d2c6ab 100644 --- a/meta-zephyr-sdk/recipes-devtools/xilinx_qemu/xilinx-qemu_git.bb +++ b/meta-zephyr-sdk/recipes-devtools/xilinx_qemu/xilinx-qemu_git.bb @@ -5,10 +5,8 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/files:" LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \ file://COPYING.LIB;endline=24;md5=8c5efda6cf1e1b03dcfd0e6c0d271c7f" -SRCREV = "e40b634b24b37fe521bb2857c5e93ee1d30c2e37" +SRCREV = "01482fa113dcbfa785feb7d513df50d15ec4c5df" SRC_URI = "git://github.com/Xilinx/qemu.git;protocol=https \ - file://0001-Revert-target-arm-Revert-back-to-YIELD-for-WFI.patch \ - file://0002-Enable-WFI-CPU-halting-in-icount-mode.patch \ " BBCLASSEXTEND = "native nativesdk" @@ -194,13 +192,13 @@ inherit autotools pkgconfig #--disable-fdt: Cannot use if supporting arm-generic-fdt machine type -QEMUS_BUILT = "aarch64-softmmu microblazeel-softmmu" +QEMUS_BUILT = "aarch64-softmmu microblazeel-softmmu riscv32-softmmu riscv64-softmmu" QEMU_FLAGS = "--disable-docs --disable-sdl --disable-debug-info --disable-cap-ng \ --disable-libnfs --disable-libusb --disable-libiscsi --disable-usb-redir --disable-linux-aio \ - --disable-guest-agent --disable-libssh --disable-vnc-png --disable-seccomp \ - --disable-tpm --disable-numa --disable-glusterfs --disable-blobs \ + --disable-guest-agent --disable-libssh --disable-seccomp \ + --disable-tpm --disable-numa --disable-glusterfs \ --disable-virtfs --disable-xen --disable-curl --disable-attr --disable-curses --disable-iconv \ - --disable-kvm --disable-sheepdog --disable-parallels --disable-replication \ + --disable-kvm --disable-parallels --disable-replication \ --disable-live-block-migration --disable-dmg \ "