Skip to content

Commit a2d4e4b

Browse files
committed
qemu: Update to qemu 5.1
Signed-off-by: Kumar Gala <[email protected]>
1 parent 29a0367 commit a2d4e4b

12 files changed

+136
-192
lines changed

meta-zephyr-sdk/recipes-devtools/qemu/files/0001-qemu-nios2-Add-Altera-MAX-10-board-support-for-Zephy.patch

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From e896d97b008901e79003fc9fb5acc20ba0a062f9 Mon Sep 17 00:00:00 2001
1+
From f5f10b5944a1e98d4f73521f7f2cc72319a5002a Mon Sep 17 00:00:00 2001
22
From: Ramakrishna Pallala <[email protected]>
33
Date: Fri, 17 May 2019 10:15:15 -0500
4-
Subject: [PATCH] qemu/nios2: Add Altera MAX 10 board support for Zephyr OS
4+
Subject: [PATCH 1/9] qemu/nios2: Add Altera MAX 10 board support for Zephyr OS
55

66
Exisitng 10m50_devboard is not supporting qemu-niso2 on Zephyr OS
77
and the reason might be that the softcpu build may be different
@@ -12,8 +12,8 @@ So added support for Zephyr qemu-nios2 board.
1212
Signed-off-by: Ramakrishna Pallala <[email protected]>
1313
---
1414
hw/nios2/Makefile.objs | 2 +-
15-
hw/nios2/altera_10m50_zephyr.c | 165 +++++++++++++++++++++++++++++++++
16-
2 files changed, 166 insertions(+), 1 deletion(-)
15+
hw/nios2/altera_10m50_zephyr.c | 164 +++++++++++++++++++++++++++++++++
16+
2 files changed, 165 insertions(+), 1 deletion(-)
1717
create mode 100644 hw/nios2/altera_10m50_zephyr.c
1818

1919
diff --git a/hw/nios2/Makefile.objs b/hw/nios2/Makefile.objs
@@ -27,10 +27,10 @@ index 3e017981ba..4b05c2aa7f 100644
2727
obj-$(CONFIG_NIOS2_GENERIC_NOMMU) += generic_nommu.o
2828
diff --git a/hw/nios2/altera_10m50_zephyr.c b/hw/nios2/altera_10m50_zephyr.c
2929
new file mode 100644
30-
index 0000000000..d3cb558c19
30+
index 0000000000..c49adf7cc3
3131
--- /dev/null
3232
+++ b/hw/nios2/altera_10m50_zephyr.c
33-
@@ -0,0 +1,165 @@
33+
@@ -0,0 +1,164 @@
3434
+/*
3535
+ * Copyright (c) 2018 Intel Corporation
3636
+ *
@@ -115,9 +115,9 @@ index 0000000000..d3cb558c19
115115
+ MemoryRegion *ram = g_new(MemoryRegion, 1);
116116
+
117117
+ cpu = NIOS2_CPU(object_new(TYPE_NIOS2_CPU));
118-
+ object_property_set_bool(OBJECT(cpu), false, "mmu_present",
118+
+ object_property_set_bool(OBJECT(cpu), "mmu_present", false,
119119
+ &error_abort);
120-
+ object_property_set_bool(OBJECT(cpu), true, "realized", &error_abort);
120+
+ object_property_set_bool(OBJECT(cpu), "realized", true, &error_abort);
121121
+
122122
+ machine_opts = qemu_get_machine_opts();
123123
+ kernel_filename = qemu_opt_get(machine_opts, "kernel");
@@ -133,10 +133,9 @@ index 0000000000..d3cb558c19
133133
+ cpu_irq = nios2_cpu_pic_init(cpu);
134134
+
135135
+ /* Register: Internal Interrupt Controller (IIC) */
136-
+ dev = qdev_create(NULL, "altera,iic");
137-
+ object_property_add_const_link(OBJECT(dev), "cpu", OBJECT(cpu),
138-
+ &error_abort);
139-
+ qdev_init_nofail(dev);
136+
+ dev = qdev_new("altera,iic");
137+
+ object_property_add_const_link(OBJECT(dev), "cpu", OBJECT(cpu));
138+
+ sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
140139
+ sysbus_connect_irq(SYS_BUS_DEVICE(dev), 0, cpu_irq[0]);
141140
+ for (i = 0; i < 32; i++) {
142141
+ irq[i] = qdev_get_gpio_in(dev, i);
@@ -147,9 +146,9 @@ index 0000000000..d3cb558c19
147146
+ 115200, serial_hd(0), DEVICE_NATIVE_ENDIAN);
148147
+
149148
+ /* Register: Timer sys_clk_timer */
150-
+ dev = qdev_create(NULL, "ALTR.timer");
149+
+ dev = qdev_new("ALTR.timer");
151150
+ qdev_prop_set_uint32(dev, "clock-frequency", TIMER_0_FREQ);
152-
+ qdev_init_nofail(dev);
151+
+ sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
153152
+ sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, TIMER_0_BASE);
154153
+ sysbus_connect_irq(SYS_BUS_DEVICE(dev), 0, irq[TIMER_0_IRQ_IDX]);
155154
+
@@ -197,5 +196,5 @@ index 0000000000..d3cb558c19
197196
+
198197
+DEFINE_MACHINE("altera_10m50_zephyr", altera_10m50_zephyr_machine_init)
199198
--
200-
2.17.1
199+
2.25.4
201200

meta-zephyr-sdk/recipes-devtools/qemu/files/0001-hw-sparc-Add-leon-at697-machine.patch renamed to meta-zephyr-sdk/recipes-devtools/qemu/files/0002-hw-sparc-Add-leon-at697-machine.patch

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From 68db83222de1fcedc274c8e895f2ad5af3f7287e Mon Sep 17 00:00:00 2001
1+
From a879ceaaa4291d901701306ef9c3ffb25029a3bb Mon Sep 17 00:00:00 2001
22
From: Yasushi SHOJI <[email protected]>
33
Date: Wed, 9 Mar 2016 12:22:16 +0100
4-
Subject: [PATCH 1/4] hw/sparc: Add leon (at697) machine
4+
Subject: [PATCH 2/9] hw/sparc: Add leon (at697) machine
55

66
This commit add LEON2 support. It is taken from AdaCore Qemu
77
repository at https://github.com/adacore/qemu.
@@ -961,7 +961,7 @@ index 355b07ae05..6c71aaf345 100644
961961
+leon_readl(uint64_t addr, uint32_t val) "addr:0x%"PRIx64" val:0x%x"
962962
+leon_writel(uint64_t addr, uint32_t val) "addr:0x%"PRIx64" val:0x%x"
963963
diff --git a/target/sparc/cpu.c b/target/sparc/cpu.c
964-
index 3f05aba9d6..21c8f80225 100644
964+
index cf21efd85f..f620e2dd5f 100644
965965
--- a/target/sparc/cpu.c
966966
+++ b/target/sparc/cpu.c
967967
@@ -514,7 +514,7 @@ static const sparc_def_t sparc_defs[] = {
@@ -974,5 +974,5 @@ index 3f05aba9d6..21c8f80225 100644
974974
.mmu_cxr_mask = 0x0000003f,
975975
.mmu_sfsr_mask = 0xffffffff,
976976
--
977-
2.17.1
977+
2.25.4
978978

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From e15e39df22e05e46fa6290b7159f58af2018cb4b Mon Sep 17 00:00:00 2001
1+
From 761c13e2bc6c6a065766227bf93a477a130dc59b Mon Sep 17 00:00:00 2001
22
From: Yasushi SHOJI <[email protected]>
33
Date: Thu, 5 Sep 2019 11:06:56 +0900
4-
Subject: [PATCH 2/4] hw/sparc/leon: Fix compilation errors
4+
Subject: [PATCH 3/9] hw/sparc/leon: Fix compilation errors
55

66
The previous commit, taken from AdaCore repository as is for future
77
reference, depends on other commit in the AdaCore repository and fails
@@ -87,5 +87,5 @@ index 316bd70288..cab394ba4b 100644
8787
if (kernel_filename != NULL) {
8888
long kernel_size;
8989
--
90-
2.17.1
90+
2.25.4
9191

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From 7c55b9caf16c6d4b65a790546a6ad14002a9c571 Mon Sep 17 00:00:00 2001
1+
From b353246e6af1de0f26966838f6362e05772ce2c2 Mon Sep 17 00:00:00 2001
22
From: Yasushi SHOJI <[email protected]>
33
Date: Fri, 17 May 2019 21:42:30 +0900
4-
Subject: [PATCH 3/4] hw/sparc/leon: timer: Call leon_timer_io_read() for
4+
Subject: [PATCH 4/9] hw/sparc/leon: timer: Call leon_timer_io_read() for
55
TIMER_1_COUNTER_REGISTER
66

77
Accessing timer1 counter register (offset 0x40) always returned 0
@@ -43,5 +43,5 @@ index cab394ba4b..d2dc8e55c8 100644
4343
break;
4444

4545
--
46-
2.17.1
46+
2.25.4
4747

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From 462345d42cb9bdb7b33bdf47bae42e0708ba79c4 Mon Sep 17 00:00:00 2001
1+
From 7ba9af98896dce92972257a4f2f98fa074bacd45 Mon Sep 17 00:00:00 2001
22
From: Yasushi SHOJI <[email protected]>
33
Date: Mon, 9 Dec 2019 11:56:20 +0900
4-
Subject: [PATCH 4/4] hw/sparc/leon: Switch to transaction-based ptimer API
4+
Subject: [PATCH 5/9] hw/sparc/leon: Switch to transaction-based ptimer API
55

66
Switch the leon code away from old ptimers to the new
77
transaction-based ptimer API. This requires adding begin/commit calls
@@ -15,7 +15,7 @@ Signed-off-by: Yasushi SHOJI <[email protected]>
1515
1 file changed, 17 insertions(+), 5 deletions(-)
1616

1717
diff --git a/hw/sparc/leon.c b/hw/sparc/leon.c
18-
index d2dc8e55c8..57ec9c1b1a 100644
18+
index d2dc8e55c8..384dde035b 100644
1919
--- a/hw/sparc/leon.c
2020
+++ b/hw/sparc/leon.c
2121
@@ -156,7 +156,6 @@ typedef struct LeonUartState {
@@ -99,5 +99,5 @@ index d2dc8e55c8..57ec9c1b1a 100644
9999

100100
static uint64_t leon_io_read(void *opaque, hwaddr addr,
101101
--
102-
2.17.1
102+
2.25.4
103103

meta-zephyr-sdk/recipes-devtools/qemu/files/0005-riscv-sifive_e-Support-changing-CPU-type.patch

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)