Skip to content

Commit 978ce91

Browse files
committed
qemu: Adding patch to fix qemu rx
This commit adding 2 patch to fix for qemu_rx - 1st patch is to fix for timer accurarcy issue - 2nd patch is to fix for flow of execute interrupt handling function for normal interrup and CPU exception Signed-off-by: Duy Nguyen <duy.nguyen.xa@renesas.com>
1 parent 97e45bf commit 978ce91

19 files changed

+297
-49
lines changed

meta-zephyr-sdk/recipes-devtools/qemu/files/0001-target-xtensa-add-translation-for-wsr.mpucfg.patch

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From 7524720962d103fbf7c324b43aa84f26b6cc8835 Mon Sep 17 00:00:00 2001
1+
From 9d1f4796cfcdac896bd9b94f065e8704fe5661ff Mon Sep 17 00:00:00 2001
22
From: Max Filippov <jcmvbkbc@gmail.com>
33
Date: Thu, 14 Dec 2023 18:08:26 -0800
4-
Subject: [PATCH 01/16] target/xtensa: add translation for wsr.mpucfg
4+
Subject: [PATCH 01/18] target/xtensa: add translation for wsr.mpucfg
55

66
Although MPUCFG is not writable, the opcode wsr.mpucfg is defined and it
77
just does nothing. Define wsr.mpucfg as nop.
@@ -12,10 +12,10 @@ Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
1212
1 file changed, 9 insertions(+)
1313

1414
diff --git a/target/xtensa/translate.c b/target/xtensa/translate.c
15-
index 4f02cefde3..18ca37f0fe 100644
15+
index 34ae2f4e16..6a2df2b5fa 100644
1616
--- a/target/xtensa/translate.c
1717
+++ b/target/xtensa/translate.c
18-
@@ -5304,6 +5304,15 @@ static const XtensaOpcodeOps core_ops[] = {
18+
@@ -5302,6 +5302,15 @@ static const XtensaOpcodeOps core_ops[] = {
1919
XTENSA_OPTION_TRACE_PORT,
2020
},
2121
.op_flags = XTENSA_OP_PRIVILEGED,

meta-zephyr-sdk/recipes-devtools/qemu/files/0002-target-xtensa-import-sample_controller32-core.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From a46011e8eadebc4d8021f6a8522fa0ed52e89428 Mon Sep 17 00:00:00 2001
1+
From c6b0fb047956595be694837065d2885f879ef363 Mon Sep 17 00:00:00 2001
22
From: Max Filippov <jcmvbkbc@gmail.com>
33
Date: Thu, 14 Dec 2023 16:47:09 -0800
4-
Subject: [PATCH 02/16] target/xtensa: import sample_controller32 core
4+
Subject: [PATCH 02/18] target/xtensa: import sample_controller32 core
55

66
This is an LX core with MPU and exclusive access options.
77

meta-zephyr-sdk/recipes-devtools/qemu/files/0003-tests-tcg-xtensa-tidy-test-linker-script.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From ad202784183a635c281749f67ed2411e879facb3 Mon Sep 17 00:00:00 2001
1+
From 80218d2b2bdb0d26061b54335cc6988810736963 Mon Sep 17 00:00:00 2001
22
From: Max Filippov <jcmvbkbc@gmail.com>
33
Date: Thu, 14 Dec 2023 16:46:08 -0800
4-
Subject: [PATCH 03/16] tests/tcg/xtensa: tidy test linker script
4+
Subject: [PATCH 03/18] tests/tcg/xtensa: tidy test linker script
55

66
Drop MEMORY clause and related size definitions and output section
77
region specifications. Drop .rodata output section as the tests don't

meta-zephyr-sdk/recipes-devtools/qemu/files/0004-tests-tcg-xtensa-fix-SR-test-for-configs-with-MPU.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From dd5194b56b7a6ca2faedccfd96137c0304abe394 Mon Sep 17 00:00:00 2001
1+
From 8aec9261a0fb96820a198fb6efa516022c0254d6 Mon Sep 17 00:00:00 2001
22
From: Max Filippov <jcmvbkbc@gmail.com>
33
Date: Thu, 14 Dec 2023 18:14:00 -0800
4-
Subject: [PATCH 04/16] tests/tcg/xtensa: fix SR test for configs with MPU
4+
Subject: [PATCH 04/18] tests/tcg/xtensa: fix SR test for configs with MPU
55

66
- atomctl is available not only in the presence of s32c1i, but also with
77
the exclusive access option

meta-zephyr-sdk/recipes-devtools/qemu/files/0005-target-xtensa-fix-sample_controller32-build-for-QEMU.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From f427b780bb1241b675d7a710d224d233031b709d Mon Sep 17 00:00:00 2001
1+
From e4e79292b28e3b172d54e8262a2523c6d3a1bb0b Mon Sep 17 00:00:00 2001
22
From: Daniel Leung <daniel.leung@intel.com>
33
Date: Tue, 14 May 2024 09:52:26 -0700
4-
Subject: [PATCH 05/16] target/xtensa: fix sample_controller32 build for QEMU 7
4+
Subject: [PATCH 05/18] target/xtensa: fix sample_controller32 build for QEMU 7
55

66
The original patches for adding sample_controller32 are based on
77
QEMU 9. The GDB stub header file is not in the same place between

meta-zephyr-sdk/recipes-devtools/qemu/files/0006-Revert-target-xtensa-Make-use-of-segment-in-pptlb-he.patch

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From ab661500c3afa2ba48d8635089bc9985a149b5a0 Mon Sep 17 00:00:00 2001
1+
From 07f145a986030a59482fa50f8f3be1f1d053af23 Mon Sep 17 00:00:00 2001
22
From: Anas Nashif <anas.nashif@intel.com>
33
Date: Fri, 16 May 2025 17:58:04 -0400
4-
Subject: [PATCH 06/16] Revert "target/xtensa: Make use of 'segment' in pptlb
4+
Subject: [PATCH 06/18] Revert "target/xtensa: Make use of 'segment' in pptlb
55
helper less confusing"
66

77
This reverts commit b42ba4ea4322357fcbfcb0e6e613d79ede84de64.
@@ -10,10 +10,10 @@ This reverts commit b42ba4ea4322357fcbfcb0e6e613d79ede84de64.
1010
1 file changed, 2 insertions(+), 2 deletions(-)
1111

1212
diff --git a/target/xtensa/mmu_helper.c b/target/xtensa/mmu_helper.c
13-
index 63be741a42..d05226c788 100644
13+
index 71330fc84b..06277b02bd 100644
1414
--- a/target/xtensa/mmu_helper.c
1515
+++ b/target/xtensa/mmu_helper.c
16-
@@ -992,7 +992,7 @@ uint32_t HELPER(rptlb1)(CPUXtensaState *env, uint32_t s)
16+
@@ -995,7 +995,7 @@ uint32_t HELPER(rptlb1)(CPUXtensaState *env, uint32_t s)
1717
uint32_t HELPER(pptlb)(CPUXtensaState *env, uint32_t v)
1818
{
1919
unsigned nhits;
@@ -22,7 +22,7 @@ index 63be741a42..d05226c788 100644
2222
unsigned bg_segment;
2323

2424
nhits = xtensa_mpu_lookup(env->mpu_fg, env->config->n_mpu_fg_segments,
25-
@@ -1006,7 +1006,7 @@ uint32_t HELPER(pptlb)(CPUXtensaState *env, uint32_t v)
25+
@@ -1009,7 +1009,7 @@ uint32_t HELPER(pptlb)(CPUXtensaState *env, uint32_t v)
2626
xtensa_mpu_lookup(env->config->mpu_bg,
2727
env->config->n_mpu_bg_segments,
2828
v, &bg_segment);

meta-zephyr-sdk/recipes-devtools/qemu/files/0007-qemu-Add-addition-environment-space-to-boot-loader-q.patch

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From 42a7273b1d4fd681a432d40bc4092c3487b3a556 Mon Sep 17 00:00:00 2001
1+
From c5f6a366e2e5ee6890520c6bcbe68b650c5f70fb Mon Sep 17 00:00:00 2001
22
From: Jason Wessel <jason.wessel@windriver.com>
33
Date: Fri, 28 Mar 2014 17:42:43 +0800
4-
Subject: [PATCH 07/16] qemu: Add addition environment space to boot loader
4+
Subject: [PATCH 07/18] qemu: Add addition environment space to boot loader
55
qemu-system-mips
66

77
Upstream-Status: Inappropriate - OE uses deep paths
@@ -18,7 +18,7 @@ Signed-off-by: Roy Li <rongqing.li@windriver.com>
1818
1 file changed, 1 insertion(+), 1 deletion(-)
1919

2020
diff --git a/hw/mips/malta.c b/hw/mips/malta.c
21-
index 8e9cea70b1..2268a8b618 100644
21+
index cbdbb21056..62681fdae6 100644
2222
--- a/hw/mips/malta.c
2323
+++ b/hw/mips/malta.c
2424
@@ -65,7 +65,7 @@

meta-zephyr-sdk/recipes-devtools/qemu/files/0008-apic-fixup-fallthrough-to-PIC.patch

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From d98f52b978273b4ee394f7ee3c00fdf966a0c2ec Mon Sep 17 00:00:00 2001
1+
From 1d13b726f43482944deea770a7e33b5444754dc3 Mon Sep 17 00:00:00 2001
22
From: Mark Asselstine <mark.asselstine@windriver.com>
33
Date: Tue, 26 Feb 2013 11:43:28 -0500
4-
Subject: [PATCH 08/16] apic: fixup fallthrough to PIC
4+
Subject: [PATCH 08/18] apic: fixup fallthrough to PIC
55

66
Commit 0e21e12bb311c4c1095d0269dc2ef81196ccb60a [Don't route PIC
77
interrupts through the local APIC if the local APIC config says so.]
@@ -29,7 +29,7 @@ Signed-off-by: He Zhe <zhe.he@windriver.com>
2929
1 file changed, 1 insertion(+), 1 deletion(-)
3030

3131
diff --git a/hw/intc/apic.c b/hw/intc/apic.c
32-
index d18c1dbf2c..45dde1fc51 100644
32+
index bcb103560c..a6f1610602 100644
3333
--- a/hw/intc/apic.c
3434
+++ b/hw/intc/apic.c
3535
@@ -758,7 +758,7 @@ int apic_accept_pic_intr(DeviceState *dev)

meta-zephyr-sdk/recipes-devtools/qemu/files/0009-qemu-Do-not-include-file-if-not-exists.patch

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From 19b994a2d608eabfa52e8f327ae6dc0ea3653181 Mon Sep 17 00:00:00 2001
1+
From ef7d37b1e2f16661fc2be4f9972e29e54f877b42 Mon Sep 17 00:00:00 2001
22
From: Oleksiy Obitotskyy <oobitots@cisco.com>
33
Date: Wed, 25 Mar 2020 21:21:35 +0200
4-
Subject: [PATCH 09/16] qemu: Do not include file if not exists
4+
Subject: [PATCH 09/18] qemu: Do not include file if not exists
55

66
Script configure checks for if_alg.h and check failed but
77
if_alg.h still included.
@@ -16,10 +16,10 @@ Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com>
1616
1 file changed, 2 insertions(+)
1717

1818
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
19-
index 8bfe4912e1..d04984f66b 100644
19+
index fc37028597..4f2f3b9e03 100644
2020
--- a/linux-user/syscall.c
2121
+++ b/linux-user/syscall.c
22-
@@ -118,7 +118,9 @@
22+
@@ -119,7 +119,9 @@
2323
#include <linux/blkpg.h>
2424
#include <netpacket/packet.h>
2525
#include <linux/netlink.h>

meta-zephyr-sdk/recipes-devtools/qemu/files/0010-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From 923be76163f1e7a178431ee65c4867cb8e1a2fef Mon Sep 17 00:00:00 2001
1+
From 68478801aecb8b66ce796e87ea44e5258395124d Mon Sep 17 00:00:00 2001
22
From: Richard Purdie <richard.purdie@linuxfoundation.org>
33
Date: Fri, 8 Jan 2021 17:27:06 +0000
4-
Subject: [PATCH 10/16] qemu: Add some user space mmap tweaks to address musl
4+
Subject: [PATCH 10/18] qemu: Add some user space mmap tweaks to address musl
55
32 bit
66

77
When using qemu-i386 to build qemux86 webkitgtk on musl, it sits in an
@@ -23,10 +23,10 @@ Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org
2323
1 file changed, 7 insertions(+), 3 deletions(-)
2424

2525
diff --git a/linux-user/mmap.c b/linux-user/mmap.c
26-
index d1f36e6f16..26ccf8f4dd 100644
26+
index 002e1e668e..912839dec8 100644
2727
--- a/linux-user/mmap.c
2828
+++ b/linux-user/mmap.c
29-
@@ -1108,12 +1108,16 @@ abi_long target_mremap(abi_ulong old_addr, abi_ulong old_size,
29+
@@ -1109,12 +1109,16 @@ abi_long target_mremap(abi_ulong old_addr, abi_ulong old_size,
3030
int prot;
3131
void *host_addr;
3232

0 commit comments

Comments
 (0)