1
The following changes since commit 7efd65423ab22e6f5890ca08ae40c84d6660242f:
1
The following changes since commit a95260486aa7e78d7c7194eba65cf03311ad94ad:
2
2
3
Merge tag 'pull-riscv-to-apply-20230614' of https://github.com/alistair23/qemu into staging (2023-06-14 05:28:51 +0200)
3
Merge tag 'pull-tcg-20231023' of https://gitlab.com/rth7680/qemu into staging (2023-10-23 14:45:46 -0700)
4
4
5
are available in the Git repository at:
5
are available in the Git repository at:
6
6
7
https://github.com/legoater/qemu/ tags/pull-aspeed-20230615
7
https://github.com/legoater/qemu/ tags/pull-aspeed-20231025
8
8
9
for you to fetch changes up to 42bea956f6f7477c06186c7add62fa0107a27a9c:
9
for you to fetch changes up to dd41ce7a6f13ad4f45ebaf52b9fa91fe5fc961df:
10
10
11
target/arm: Allow users to set the number of VFP registers (2023-06-15 18:35:58 +0200)
11
hw/arm/aspeed: Move AspeedSoCState::cpu/vic to Aspeed2400SoCState (2023-10-25 09:52:44 +0200)
12
12
13
----------------------------------------------------------------
13
----------------------------------------------------------------
14
aspeed queue:
14
aspeed queue:
15
15
16
* extension of the rainier machine with VPD contents
16
* Update of Andrew's email
17
* fixes for Coverity issues
17
* Split of AspeedSoCState per 2400/2600/10x0
18
* new "bmc-console" machine option
19
* new "vfp-d32" ARM CPU property
20
18
21
----------------------------------------------------------------
19
----------------------------------------------------------------
22
Cédric Le Goater (5):
20
Andrew Jeffery (1):
23
aspeed/hace: Initialize g_autofree pointer
21
MAINTAINERS: aspeed: Update Andrew's email address
24
aspeed: Introduce a boot_rom region at the machine level
25
aspeed: Use the boot_rom region of the fby35 machine
26
aspeed: Introduce a "bmc-console" machine option
27
target/arm: Allow users to set the number of VFP registers
28
22
29
Ninad Palsule (1):
23
Philippe Mathieu-Daudé (11):
30
hw/arm/aspeed: Add VPD data for Rainier machine
24
hw/arm/aspeed: Extract code common to all boards to a common file
25
hw/arm/aspeed: Rename aspeed_soc_init() as AST2400/2500 specific
26
hw/arm/aspeed: Rename aspeed_soc_realize() as AST2400/2500 specific
27
hw/arm/aspeed: Dynamically allocate AspeedMachineState::soc field
28
hw/arm/aspeed: Introduce TYPE_ASPEED10X0_SOC
29
hw/arm/aspeed: Introduce TYPE_ASPEED2600_SOC
30
hw/arm/aspeed: Introduce TYPE_ASPEED2400_SOC
31
hw/arm/aspeed: Check 'memory' link is set in common aspeed_soc_realize
32
hw/arm/aspeed: Move AspeedSoCState::armv7m to Aspeed10x0SoCState
33
hw/arm/aspeed: Move AspeedSoCState::a7mpcore to Aspeed2600SoCState
34
hw/arm/aspeed: Move AspeedSoCState::cpu/vic to Aspeed2400SoCState
31
35
32
docs/system/arm/aspeed.rst | 11 +++++++++
36
MAINTAINERS | 2 +-
33
hw/arm/aspeed_eeprom.h | 5 ++++
37
include/hw/arm/aspeed_soc.h | 35 +++++-
34
target/arm/cpu.h | 2 ++
38
hw/arm/aspeed.c | 101 +++++++--------
35
hw/arm/aspeed.c | 58 ++++++++++++++++++++++++++++++++++++++--------
39
hw/arm/aspeed_ast10x0.c | 53 ++++----
36
hw/arm/aspeed_ast2600.c | 2 ++
40
hw/arm/{aspeed_soc.c => aspeed_ast2400.c} | 197 +++++++-----------------------
37
hw/arm/aspeed_eeprom.c | 45 ++++++++++++++++++++++++++++++++++-
41
hw/arm/aspeed_ast2600.c | 75 ++++++------
38
hw/arm/fby35.c | 29 ++++++++++++-----------
42
hw/arm/aspeed_soc_common.c | 154 +++++++++++++++++++++++
39
hw/misc/aspeed_hace.c | 2 +-
43
hw/arm/fby35.c | 27 ++--
40
target/arm/cpu.c | 32 +++++++++++++++++++++++++
44
hw/arm/meson.build | 3 +-
41
9 files changed, 160 insertions(+), 26 deletions(-)
45
9 files changed, 363 insertions(+), 284 deletions(-)
46
rename hw/arm/{aspeed_soc.c => aspeed_ast2400.c} (76%)
47
create mode 100644 hw/arm/aspeed_soc_common.c
42
48
diff view generated by jsdifflib
1
As mentioned in docs/devel/style.rst "Automatic memory deallocation":
1
From: Andrew Jeffery <andrew@codeconstruct.com.au>
2
2
3
* Variables declared with g_auto* MUST always be initialized,
3
I've changed employers, have company email that deals with patch-based
4
otherwise the cleanup function will use uninitialized stack memory
4
workflows without too much of a headache, and am trying to steer some
5
content out of my personal mail.
5
6
6
This avoids QEMU to coredump when running the "hash test" command
7
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
7
under Zephyr.
8
9
Cc: Steven Lee <steven_lee@aspeedtech.com>
10
Cc: Joel Stanley <joel@jms.id.au>
11
Cc: qemu-stable@nongnu.org
12
Fixes: c5475b3f9a ("hw: Model ASPEED's Hash and Crypto Engine")
13
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
14
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
15
Reviewed-by: Thomas Huth <thuth@redhat.com>
16
Reviewed-by: Francisco Iglesias <frasse.iglesias@gmail.com>
17
Message-Id: <20230421131547.2177449-1-clg@kaod.org>
18
Signed-off-by: Cédric Le Goater <clg@kaod.org>
19
Reviewed-by: Joel Stanley <joel@jms.id.au>
20
Signed-off-by: Cédric Le Goater <clg@kaod.org>
8
Signed-off-by: Cédric Le Goater <clg@kaod.org>
21
---
9
---
22
hw/misc/aspeed_hace.c | 2 +-
10
MAINTAINERS | 2 +-
23
1 file changed, 1 insertion(+), 1 deletion(-)
11
1 file changed, 1 insertion(+), 1 deletion(-)
24
12
25
diff --git a/hw/misc/aspeed_hace.c b/hw/misc/aspeed_hace.c
13
diff --git a/MAINTAINERS b/MAINTAINERS
26
index XXXXXXX..XXXXXXX 100644
14
index XXXXXXX..XXXXXXX 100644
27
--- a/hw/misc/aspeed_hace.c
15
--- a/MAINTAINERS
28
+++ b/hw/misc/aspeed_hace.c
16
+++ b/MAINTAINERS
29
@@ -XXX,XX +XXX,XX @@ static void do_hash_operation(AspeedHACEState *s, int algo, bool sg_mode,
17
@@ -XXX,XX +XXX,XX @@ F: docs/system/arm/emcraft-sf2.rst
30
bool acc_mode)
18
ASPEED BMCs
31
{
19
M: Cédric Le Goater <clg@kaod.org>
32
struct iovec iov[ASPEED_HACE_MAX_SG];
20
M: Peter Maydell <peter.maydell@linaro.org>
33
- g_autofree uint8_t *digest_buf;
21
-R: Andrew Jeffery <andrew@aj.id.au>
34
+ g_autofree uint8_t *digest_buf = NULL;
22
+R: Andrew Jeffery <andrew@codeconstruct.com.au>
35
size_t digest_len = 0;
23
R: Joel Stanley <joel@jms.id.au>
36
int niov = 0;
24
L: qemu-arm@nongnu.org
37
int i;
25
S: Maintained
38
--
26
--
39
2.40.1
27
2.41.0
40
28
41
29
diff view generated by jsdifflib
New patch
1
1
From: Philippe Mathieu-Daudé <philmd@linaro.org>
2
3
aspeed_soc.c contains definitions specific to the AST2400
4
and AST2500 SoCs, but also some definitions for other AST
5
SoCs: move them to a common file.
6
7
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
8
Reviewed-by: Cédric Le Goater <clg@kaod.org>
9
Signed-off-by: Cédric Le Goater <clg@kaod.org>
10
---
11
hw/arm/aspeed_soc.c | 96 -------------------------------
12
hw/arm/aspeed_soc_common.c | 114 +++++++++++++++++++++++++++++++++++++
13
hw/arm/meson.build | 1 +
14
3 files changed, 115 insertions(+), 96 deletions(-)
15
create mode 100644 hw/arm/aspeed_soc_common.c
16
17
diff --git a/hw/arm/aspeed_soc.c b/hw/arm/aspeed_soc.c
18
index XXXXXXX..XXXXXXX 100644
19
--- a/hw/arm/aspeed_soc.c
20
+++ b/hw/arm/aspeed_soc.c
21
@@ -XXX,XX +XXX,XX @@ static void aspeed_soc_register_types(void)
22
};
23
24
type_init(aspeed_soc_register_types);
25
-
26
-qemu_irq aspeed_soc_get_irq(AspeedSoCState *s, int dev)
27
-{
28
- return ASPEED_SOC_GET_CLASS(s)->get_irq(s, dev);
29
-}
30
-
31
-bool aspeed_soc_uart_realize(AspeedSoCState *s, Error **errp)
32
-{
33
- AspeedSoCClass *sc = ASPEED_SOC_GET_CLASS(s);
34
- SerialMM *smm;
35
-
36
- for (int i = 0, uart = ASPEED_DEV_UART1; i < sc->uarts_num; i++, uart++) {
37
- smm = &s->uart[i];
38
-
39
- /* Chardev property is set by the machine. */
40
- qdev_prop_set_uint8(DEVICE(smm), "regshift", 2);
41
- qdev_prop_set_uint32(DEVICE(smm), "baudbase", 38400);
42
- qdev_set_legacy_instance_id(DEVICE(smm), sc->memmap[uart], 2);
43
- qdev_prop_set_uint8(DEVICE(smm), "endianness", DEVICE_LITTLE_ENDIAN);
44
- if (!sysbus_realize(SYS_BUS_DEVICE(smm), errp)) {
45
- return false;
46
- }
47
-
48
- sysbus_connect_irq(SYS_BUS_DEVICE(smm), 0, aspeed_soc_get_irq(s, uart));
49
- aspeed_mmio_map(s, SYS_BUS_DEVICE(smm), 0, sc->memmap[uart]);
50
- }
51
-
52
- return true;
53
-}
54
-
55
-void aspeed_soc_uart_set_chr(AspeedSoCState *s, int dev, Chardev *chr)
56
-{
57
- AspeedSoCClass *sc = ASPEED_SOC_GET_CLASS(s);
58
- int i = dev - ASPEED_DEV_UART1;
59
-
60
- g_assert(0 <= i && i < ARRAY_SIZE(s->uart) && i < sc->uarts_num);
61
- qdev_prop_set_chr(DEVICE(&s->uart[i]), "chardev", chr);
62
-}
63
-
64
-/*
65
- * SDMC should be realized first to get correct RAM size and max size
66
- * values
67
- */
68
-bool aspeed_soc_dram_init(AspeedSoCState *s, Error **errp)
69
-{
70
- AspeedSoCClass *sc = ASPEED_SOC_GET_CLASS(s);
71
- ram_addr_t ram_size, max_ram_size;
72
-
73
- ram_size = object_property_get_uint(OBJECT(&s->sdmc), "ram-size",
74
- &error_abort);
75
- max_ram_size = object_property_get_uint(OBJECT(&s->sdmc), "max-ram-size",
76
- &error_abort);
77
-
78
- memory_region_init(&s->dram_container, OBJECT(s), "ram-container",
79
- max_ram_size);
80
- memory_region_add_subregion(&s->dram_container, 0, s->dram_mr);
81
-
82
- /*
83
- * Add a memory region beyond the RAM region to let firmwares scan
84
- * the address space with load/store and guess how much RAM the
85
- * SoC has.
86
- */
87
- if (ram_size < max_ram_size) {
88
- DeviceState *dev = qdev_new(TYPE_UNIMPLEMENTED_DEVICE);
89
-
90
- qdev_prop_set_string(dev, "name", "ram-empty");
91
- qdev_prop_set_uint64(dev, "size", max_ram_size - ram_size);
92
- if (!sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), errp)) {
93
- return false;
94
- }
95
-
96
- memory_region_add_subregion_overlap(&s->dram_container, ram_size,
97
- sysbus_mmio_get_region(SYS_BUS_DEVICE(dev), 0), -1000);
98
- }
99
-
100
- memory_region_add_subregion(s->memory,
101
- sc->memmap[ASPEED_DEV_SDRAM], &s->dram_container);
102
- return true;
103
-}
104
-
105
-void aspeed_mmio_map(AspeedSoCState *s, SysBusDevice *dev, int n, hwaddr addr)
106
-{
107
- memory_region_add_subregion(s->memory, addr,
108
- sysbus_mmio_get_region(dev, n));
109
-}
110
-
111
-void aspeed_mmio_map_unimplemented(AspeedSoCState *s, SysBusDevice *dev,
112
- const char *name, hwaddr addr, uint64_t size)
113
-{
114
- qdev_prop_set_string(DEVICE(dev), "name", name);
115
- qdev_prop_set_uint64(DEVICE(dev), "size", size);
116
- sysbus_realize(dev, &error_abort);
117
-
118
- memory_region_add_subregion_overlap(s->memory, addr,
119
- sysbus_mmio_get_region(dev, 0), -1000);
120
-}
121
diff --git a/hw/arm/aspeed_soc_common.c b/hw/arm/aspeed_soc_common.c
122
new file mode 100644
123
index XXXXXXX..XXXXXXX
124
--- /dev/null
125
+++ b/hw/arm/aspeed_soc_common.c
126
@@ -XXX,XX +XXX,XX @@
127
+/*
128
+ * ASPEED SoC family
129
+ *
130
+ * Andrew Jeffery <andrew@aj.id.au>
131
+ * Jeremy Kerr <jk@ozlabs.org>
132
+ *
133
+ * Copyright 2016 IBM Corp.
134
+ *
135
+ * This code is licensed under the GPL version 2 or later. See
136
+ * the COPYING file in the top-level directory.
137
+ */
138
+
139
+#include "qemu/osdep.h"
140
+#include "qapi/error.h"
141
+#include "hw/misc/unimp.h"
142
+#include "hw/arm/aspeed_soc.h"
143
+#include "hw/char/serial.h"
144
+
145
+
146
+qemu_irq aspeed_soc_get_irq(AspeedSoCState *s, int dev)
147
+{
148
+ return ASPEED_SOC_GET_CLASS(s)->get_irq(s, dev);
149
+}
150
+
151
+bool aspeed_soc_uart_realize(AspeedSoCState *s, Error **errp)
152
+{
153
+ AspeedSoCClass *sc = ASPEED_SOC_GET_CLASS(s);
154
+ SerialMM *smm;
155
+
156
+ for (int i = 0, uart = ASPEED_DEV_UART1; i < sc->uarts_num; i++, uart++) {
157
+ smm = &s->uart[i];
158
+
159
+ /* Chardev property is set by the machine. */
160
+ qdev_prop_set_uint8(DEVICE(smm), "regshift", 2);
161
+ qdev_prop_set_uint32(DEVICE(smm), "baudbase", 38400);
162
+ qdev_set_legacy_instance_id(DEVICE(smm), sc->memmap[uart], 2);
163
+ qdev_prop_set_uint8(DEVICE(smm), "endianness", DEVICE_LITTLE_ENDIAN);
164
+ if (!sysbus_realize(SYS_BUS_DEVICE(smm), errp)) {
165
+ return false;
166
+ }
167
+
168
+ sysbus_connect_irq(SYS_BUS_DEVICE(smm), 0, aspeed_soc_get_irq(s, uart));
169
+ aspeed_mmio_map(s, SYS_BUS_DEVICE(smm), 0, sc->memmap[uart]);
170
+ }
171
+
172
+ return true;
173
+}
174
+
175
+void aspeed_soc_uart_set_chr(AspeedSoCState *s, int dev, Chardev *chr)
176
+{
177
+ AspeedSoCClass *sc = ASPEED_SOC_GET_CLASS(s);
178
+ int i = dev - ASPEED_DEV_UART1;
179
+
180
+ g_assert(0 <= i && i < ARRAY_SIZE(s->uart) && i < sc->uarts_num);
181
+ qdev_prop_set_chr(DEVICE(&s->uart[i]), "chardev", chr);
182
+}
183
+
184
+/*
185
+ * SDMC should be realized first to get correct RAM size and max size
186
+ * values
187
+ */
188
+bool aspeed_soc_dram_init(AspeedSoCState *s, Error **errp)
189
+{
190
+ AspeedSoCClass *sc = ASPEED_SOC_GET_CLASS(s);
191
+ ram_addr_t ram_size, max_ram_size;
192
+
193
+ ram_size = object_property_get_uint(OBJECT(&s->sdmc), "ram-size",
194
+ &error_abort);
195
+ max_ram_size = object_property_get_uint(OBJECT(&s->sdmc), "max-ram-size",
196
+ &error_abort);
197
+
198
+ memory_region_init(&s->dram_container, OBJECT(s), "ram-container",
199
+ max_ram_size);
200
+ memory_region_add_subregion(&s->dram_container, 0, s->dram_mr);
201
+
202
+ /*
203
+ * Add a memory region beyond the RAM region to let firmwares scan
204
+ * the address space with load/store and guess how much RAM the
205
+ * SoC has.
206
+ */
207
+ if (ram_size < max_ram_size) {
208
+ DeviceState *dev = qdev_new(TYPE_UNIMPLEMENTED_DEVICE);
209
+
210
+ qdev_prop_set_string(dev, "name", "ram-empty");
211
+ qdev_prop_set_uint64(dev, "size", max_ram_size - ram_size);
212
+ if (!sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), errp)) {
213
+ return false;
214
+ }
215
+
216
+ memory_region_add_subregion_overlap(&s->dram_container, ram_size,
217
+ sysbus_mmio_get_region(SYS_BUS_DEVICE(dev), 0), -1000);
218
+ }
219
+
220
+ memory_region_add_subregion(s->memory,
221
+ sc->memmap[ASPEED_DEV_SDRAM], &s->dram_container);
222
+ return true;
223
+}
224
+
225
+void aspeed_mmio_map(AspeedSoCState *s, SysBusDevice *dev, int n, hwaddr addr)
226
+{
227
+ memory_region_add_subregion(s->memory, addr,
228
+ sysbus_mmio_get_region(dev, n));
229
+}
230
+
231
+void aspeed_mmio_map_unimplemented(AspeedSoCState *s, SysBusDevice *dev,
232
+ const char *name, hwaddr addr, uint64_t size)
233
+{
234
+ qdev_prop_set_string(DEVICE(dev), "name", name);
235
+ qdev_prop_set_uint64(DEVICE(dev), "size", size);
236
+ sysbus_realize(dev, &error_abort);
237
+
238
+ memory_region_add_subregion_overlap(s->memory, addr,
239
+ sysbus_mmio_get_region(dev, 0), -1000);
240
+}
241
diff --git a/hw/arm/meson.build b/hw/arm/meson.build
242
index XXXXXXX..XXXXXXX 100644
243
--- a/hw/arm/meson.build
244
+++ b/hw/arm/meson.build
245
@@ -XXX,XX +XXX,XX @@ arm_ss.add(when: 'CONFIG_FSL_IMX6', if_true: files('fsl-imx6.c'))
246
arm_ss.add(when: 'CONFIG_ASPEED_SOC', if_true: files(
247
'aspeed_soc.c',
248
'aspeed.c',
249
+ 'aspeed_soc_common.c',
250
'aspeed_ast2600.c',
251
'aspeed_ast10x0.c',
252
'aspeed_eeprom.c',
253
--
254
2.41.0
255
256
diff view generated by jsdifflib
New patch
1
From: Philippe Mathieu-Daudé <philmd@linaro.org>
1
2
3
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
4
Reviewed-by: Cédric Le Goater <clg@kaod.org>
5
Signed-off-by: Cédric Le Goater <clg@kaod.org>
6
---
7
hw/arm/aspeed_soc.c | 6 +++---
8
1 file changed, 3 insertions(+), 3 deletions(-)
9
10
diff --git a/hw/arm/aspeed_soc.c b/hw/arm/aspeed_soc.c
11
index XXXXXXX..XXXXXXX 100644
12
--- a/hw/arm/aspeed_soc.c
13
+++ b/hw/arm/aspeed_soc.c
14
@@ -XXX,XX +XXX,XX @@ static qemu_irq aspeed_soc_ast2400_get_irq(AspeedSoCState *s, int dev)
15
return qdev_get_gpio_in(DEVICE(&s->vic), sc->irqmap[dev]);
16
}
17
18
-static void aspeed_soc_init(Object *obj)
19
+static void aspeed_ast2400_soc_init(Object *obj)
20
{
21
AspeedSoCState *s = ASPEED_SOC(obj);
22
AspeedSoCClass *sc = ASPEED_SOC_GET_CLASS(s);
23
@@ -XXX,XX +XXX,XX @@ static void aspeed_soc_ast2400_class_init(ObjectClass *oc, void *data)
24
static const TypeInfo aspeed_soc_ast2400_type_info = {
25
.name = "ast2400-a1",
26
.parent = TYPE_ASPEED_SOC,
27
- .instance_init = aspeed_soc_init,
28
+ .instance_init = aspeed_ast2400_soc_init,
29
.instance_size = sizeof(AspeedSoCState),
30
.class_init = aspeed_soc_ast2400_class_init,
31
};
32
@@ -XXX,XX +XXX,XX @@ static void aspeed_soc_ast2500_class_init(ObjectClass *oc, void *data)
33
static const TypeInfo aspeed_soc_ast2500_type_info = {
34
.name = "ast2500-a1",
35
.parent = TYPE_ASPEED_SOC,
36
- .instance_init = aspeed_soc_init,
37
+ .instance_init = aspeed_ast2400_soc_init,
38
.instance_size = sizeof(AspeedSoCState),
39
.class_init = aspeed_soc_ast2500_class_init,
40
};
41
--
42
2.41.0
43
44
diff view generated by jsdifflib
New patch
1
From: Philippe Mathieu-Daudé <philmd@linaro.org>
1
2
3
Keep aspeed_soc_class_init() generic, set the realize handler
4
to aspeed_ast2400_soc_realize() in each 2400/2500 class_init.
5
6
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
7
Reviewed-by: Cédric Le Goater <clg@kaod.org>
8
Signed-off-by: Cédric Le Goater <clg@kaod.org>
9
---
10
hw/arm/aspeed_soc.c | 15 +++++++++++----
11
1 file changed, 11 insertions(+), 4 deletions(-)
12
13
diff --git a/hw/arm/aspeed_soc.c b/hw/arm/aspeed_soc.c
14
index XXXXXXX..XXXXXXX 100644
15
--- a/hw/arm/aspeed_soc.c
16
+++ b/hw/arm/aspeed_soc.c
17
@@ -XXX,XX +XXX,XX @@ static void aspeed_ast2400_soc_init(Object *obj)
18
object_initialize_child(obj, "video", &s->video, TYPE_UNIMPLEMENTED_DEVICE);
19
}
20
21
-static void aspeed_soc_realize(DeviceState *dev, Error **errp)
22
+static void aspeed_ast2400_soc_realize(DeviceState *dev, Error **errp)
23
{
24
int i;
25
AspeedSoCState *s = ASPEED_SOC(dev);
26
@@ -XXX,XX +XXX,XX @@ static void aspeed_soc_class_init(ObjectClass *oc, void *data)
27
{
28
DeviceClass *dc = DEVICE_CLASS(oc);
29
30
- dc->realize = aspeed_soc_realize;
31
- /* Reason: Uses serial_hds and nd_table in realize() directly */
32
- dc->user_creatable = false;
33
device_class_set_props(dc, aspeed_soc_properties);
34
}
35
36
@@ -XXX,XX +XXX,XX @@ static const TypeInfo aspeed_soc_type_info = {
37
static void aspeed_soc_ast2400_class_init(ObjectClass *oc, void *data)
38
{
39
AspeedSoCClass *sc = ASPEED_SOC_CLASS(oc);
40
+ DeviceClass *dc = DEVICE_CLASS(oc);
41
+
42
+ dc->realize = aspeed_ast2400_soc_realize;
43
+ /* Reason: Uses serial_hds and nd_table in realize() directly */
44
+ dc->user_creatable = false;
45
46
sc->name = "ast2400-a1";
47
sc->cpu_type = ARM_CPU_TYPE_NAME("arm926");
48
@@ -XXX,XX +XXX,XX @@ static const TypeInfo aspeed_soc_ast2400_type_info = {
49
static void aspeed_soc_ast2500_class_init(ObjectClass *oc, void *data)
50
{
51
AspeedSoCClass *sc = ASPEED_SOC_CLASS(oc);
52
+ DeviceClass *dc = DEVICE_CLASS(oc);
53
+
54
+ dc->realize = aspeed_ast2400_soc_realize;
55
+ /* Reason: Uses serial_hds and nd_table in realize() directly */
56
+ dc->user_creatable = false;
57
58
sc->name = "ast2500-a1";
59
sc->cpu_type = ARM_CPU_TYPE_NAME("arm1176");
60
--
61
2.41.0
62
63
diff view generated by jsdifflib
1
This should also avoid Coverity to report a memory leak warning when
1
From: Philippe Mathieu-Daudé <philmd@linaro.org>
2
the QEMU process exits. See CID 1508061.
2
3
3
We want to derivate the big AspeedSoCState object in some more
4
Reviewed-by: Francisco Iglesias <frasse.iglesias@gmail.com>
4
SoC-specific ones. Since the object size will vary, allocate it
5
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
5
dynamically.
6
Signed-off-by: Cédric Le Goater <clg@kaod.org>
6
7
Reviewed-by: Joel Stanley <joel@jms.id.au>
7
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
8
Reviewed-by: Cédric Le Goater <clg@kaod.org>
8
Signed-off-by: Cédric Le Goater <clg@kaod.org>
9
Signed-off-by: Cédric Le Goater <clg@kaod.org>
9
---
10
---
10
hw/arm/aspeed.c | 12 ++++++------
11
hw/arm/aspeed.c | 101 +++++++++++++++++++++++++-----------------------
11
1 file changed, 6 insertions(+), 6 deletions(-)
12
1 file changed, 52 insertions(+), 49 deletions(-)
12
13
13
diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
14
diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
14
index XXXXXXX..XXXXXXX 100644
15
index XXXXXXX..XXXXXXX 100644
15
--- a/hw/arm/aspeed.c
16
--- a/hw/arm/aspeed.c
16
+++ b/hw/arm/aspeed.c
17
+++ b/hw/arm/aspeed.c
17
@@ -XXX,XX +XXX,XX @@ struct AspeedMachineState {
18
@@ -XXX,XX +XXX,XX @@ struct AspeedMachineState {
19
MachineState parent_obj;
18
/* Public */
20
/* Public */
19
21
20
AspeedSoCState soc;
22
- AspeedSoCState soc;
21
+ MemoryRegion boot_rom;
23
+ AspeedSoCState *soc;
24
MemoryRegion boot_rom;
22
bool mmio_exec;
25
bool mmio_exec;
23
char *fmc_model;
26
uint32_t uart_chosen;
24
char *spi_model;
25
@@ -XXX,XX +XXX,XX @@ static void write_boot_rom(BlockBackend *blk, hwaddr addr, size_t rom_size,
27
@@ -XXX,XX +XXX,XX @@ static void write_boot_rom(BlockBackend *blk, hwaddr addr, size_t rom_size,
26
* Create a ROM and copy the flash contents at the expected address
28
static void aspeed_install_boot_rom(AspeedMachineState *bmc, BlockBackend *blk,
27
* (0x0). Boots faster than execute-in-place.
28
*/
29
-static void aspeed_install_boot_rom(AspeedSoCState *soc, BlockBackend *blk,
30
+static void aspeed_install_boot_rom(AspeedMachineState *bmc, BlockBackend *blk,
31
uint64_t rom_size)
29
uint64_t rom_size)
32
{
30
{
33
- MemoryRegion *boot_rom = g_new(MemoryRegion, 1);
31
- AspeedSoCState *soc = &bmc->soc;
34
+ AspeedSoCState *soc = &bmc->soc;
32
+ AspeedSoCState *soc = bmc->soc;
35
33
36
- memory_region_init_rom(boot_rom, NULL, "aspeed.boot_rom", rom_size,
34
memory_region_init_rom(&bmc->boot_rom, NULL, "aspeed.boot_rom", rom_size,
37
+ memory_region_init_rom(&bmc->boot_rom, NULL, "aspeed.boot_rom", rom_size,
38
&error_abort);
35
&error_abort);
39
memory_region_add_subregion_overlap(&soc->spi_boot_container, 0,
36
@@ -XXX,XX +XXX,XX @@ static void sdhci_attach_drive(SDHCIState *sdhci, DriveInfo *dinfo)
40
- boot_rom, 1);
37
static void connect_serial_hds_to_uarts(AspeedMachineState *bmc)
41
+ &bmc->boot_rom, 1);
38
{
42
write_boot_rom(blk, ASPEED_SOC_SPI_BOOT_ADDR, rom_size, &error_abort);
39
AspeedMachineClass *amc = ASPEED_MACHINE_GET_CLASS(bmc);
40
- AspeedSoCState *s = &bmc->soc;
41
+ AspeedSoCState *s = bmc->soc;
42
AspeedSoCClass *sc = ASPEED_SOC_GET_CLASS(s);
43
int uart_chosen = bmc->uart_chosen ? bmc->uart_chosen : amc->uart_default;
44
45
@@ -XXX,XX +XXX,XX @@ static void aspeed_machine_init(MachineState *machine)
46
int i;
47
NICInfo *nd = &nd_table[0];
48
49
- object_initialize_child(OBJECT(machine), "soc", &bmc->soc, amc->soc_name);
50
-
51
- sc = ASPEED_SOC_GET_CLASS(&bmc->soc);
52
+ bmc->soc = ASPEED_SOC(object_new(amc->soc_name));
53
+ object_property_add_child(OBJECT(machine), "soc", OBJECT(bmc->soc));
54
+ object_unref(OBJECT(bmc->soc));
55
+ sc = ASPEED_SOC_GET_CLASS(bmc->soc);
56
57
/*
58
* This will error out if the RAM size is not supported by the
59
* memory controller of the SoC.
60
*/
61
- object_property_set_uint(OBJECT(&bmc->soc), "ram-size", machine->ram_size,
62
+ object_property_set_uint(OBJECT(bmc->soc), "ram-size", machine->ram_size,
63
&error_fatal);
64
65
for (i = 0; i < sc->macs_num; i++) {
66
if ((amc->macs_mask & (1 << i)) && nd->used) {
67
qemu_check_nic_model(nd, TYPE_FTGMAC100);
68
- qdev_set_nic_properties(DEVICE(&bmc->soc.ftgmac100[i]), nd);
69
+ qdev_set_nic_properties(DEVICE(&bmc->soc->ftgmac100[i]), nd);
70
nd++;
71
}
72
}
73
74
- object_property_set_int(OBJECT(&bmc->soc), "hw-strap1", amc->hw_strap1,
75
+ object_property_set_int(OBJECT(bmc->soc), "hw-strap1", amc->hw_strap1,
76
&error_abort);
77
- object_property_set_int(OBJECT(&bmc->soc), "hw-strap2", amc->hw_strap2,
78
+ object_property_set_int(OBJECT(bmc->soc), "hw-strap2", amc->hw_strap2,
79
&error_abort);
80
- object_property_set_link(OBJECT(&bmc->soc), "memory",
81
+ object_property_set_link(OBJECT(bmc->soc), "memory",
82
OBJECT(get_system_memory()), &error_abort);
83
- object_property_set_link(OBJECT(&bmc->soc), "dram",
84
+ object_property_set_link(OBJECT(bmc->soc), "dram",
85
OBJECT(machine->ram), &error_abort);
86
if (machine->kernel_filename) {
87
/*
88
@@ -XXX,XX +XXX,XX @@ static void aspeed_machine_init(MachineState *machine)
89
* that runs to unlock the SCU. In this case set the default to
90
* be unlocked as the kernel expects
91
*/
92
- object_property_set_int(OBJECT(&bmc->soc), "hw-prot-key",
93
+ object_property_set_int(OBJECT(bmc->soc), "hw-prot-key",
94
ASPEED_SCU_PROT_KEY, &error_abort);
95
}
96
connect_serial_hds_to_uarts(bmc);
97
- qdev_realize(DEVICE(&bmc->soc), NULL, &error_abort);
98
+ qdev_realize(DEVICE(bmc->soc), NULL, &error_abort);
99
100
if (defaults_enabled()) {
101
- aspeed_board_init_flashes(&bmc->soc.fmc,
102
+ aspeed_board_init_flashes(&bmc->soc->fmc,
103
bmc->fmc_model ? bmc->fmc_model : amc->fmc_model,
104
amc->num_cs, 0);
105
- aspeed_board_init_flashes(&bmc->soc.spi[0],
106
+ aspeed_board_init_flashes(&bmc->soc->spi[0],
107
bmc->spi_model ? bmc->spi_model : amc->spi_model,
108
1, amc->num_cs);
109
}
110
@@ -XXX,XX +XXX,XX @@ static void aspeed_machine_init(MachineState *machine)
111
amc->i2c_init(bmc);
112
}
113
114
- for (i = 0; i < bmc->soc.sdhci.num_slots; i++) {
115
- sdhci_attach_drive(&bmc->soc.sdhci.slots[i],
116
+ for (i = 0; i < bmc->soc->sdhci.num_slots; i++) {
117
+ sdhci_attach_drive(&bmc->soc->sdhci.slots[i],
118
drive_get(IF_SD, 0, i));
119
}
120
121
- if (bmc->soc.emmc.num_slots) {
122
- sdhci_attach_drive(&bmc->soc.emmc.slots[0],
123
- drive_get(IF_SD, 0, bmc->soc.sdhci.num_slots));
124
+ if (bmc->soc->emmc.num_slots) {
125
+ sdhci_attach_drive(&bmc->soc->emmc.slots[0],
126
+ drive_get(IF_SD, 0, bmc->soc->sdhci.num_slots));
127
}
128
129
if (!bmc->mmio_exec) {
130
- DeviceState *dev = ssi_get_cs(bmc->soc.fmc.spi, 0);
131
+ DeviceState *dev = ssi_get_cs(bmc->soc->fmc.spi, 0);
132
BlockBackend *fmc0 = dev ? m25p80_get_blk(dev) : NULL;
133
134
if (fmc0) {
135
- uint64_t rom_size = memory_region_size(&bmc->soc.spi_boot);
136
+ uint64_t rom_size = memory_region_size(&bmc->soc->spi_boot);
137
aspeed_install_boot_rom(bmc, fmc0, rom_size);
138
}
139
}
140
@@ -XXX,XX +XXX,XX @@ static void aspeed_machine_init(MachineState *machine)
141
142
static void palmetto_bmc_i2c_init(AspeedMachineState *bmc)
143
{
144
- AspeedSoCState *soc = &bmc->soc;
145
+ AspeedSoCState *soc = bmc->soc;
146
DeviceState *dev;
147
uint8_t *eeprom_buf = g_malloc0(32 * 1024);
148
149
@@ -XXX,XX +XXX,XX @@ static void palmetto_bmc_i2c_init(AspeedMachineState *bmc)
150
151
static void quanta_q71l_bmc_i2c_init(AspeedMachineState *bmc)
152
{
153
- AspeedSoCState *soc = &bmc->soc;
154
+ AspeedSoCState *soc = bmc->soc;
155
156
/*
157
* The quanta-q71l platform expects tmp75s which are compatible with
158
@@ -XXX,XX +XXX,XX @@ static void quanta_q71l_bmc_i2c_init(AspeedMachineState *bmc)
159
160
static void ast2500_evb_i2c_init(AspeedMachineState *bmc)
161
{
162
- AspeedSoCState *soc = &bmc->soc;
163
+ AspeedSoCState *soc = bmc->soc;
164
uint8_t *eeprom_buf = g_malloc0(8 * 1024);
165
166
smbus_eeprom_init_one(aspeed_i2c_get_bus(&soc->i2c, 3), 0x50,
167
@@ -XXX,XX +XXX,XX @@ static void ast2500_evb_i2c_init(AspeedMachineState *bmc)
168
169
static void ast2600_evb_i2c_init(AspeedMachineState *bmc)
170
{
171
- AspeedSoCState *soc = &bmc->soc;
172
+ AspeedSoCState *soc = bmc->soc;
173
uint8_t *eeprom_buf = g_malloc0(8 * 1024);
174
175
smbus_eeprom_init_one(aspeed_i2c_get_bus(&soc->i2c, 7), 0x50,
176
@@ -XXX,XX +XXX,XX @@ static void ast2600_evb_i2c_init(AspeedMachineState *bmc)
177
178
static void yosemitev2_bmc_i2c_init(AspeedMachineState *bmc)
179
{
180
- AspeedSoCState *soc = &bmc->soc;
181
+ AspeedSoCState *soc = bmc->soc;
182
183
at24c_eeprom_init(aspeed_i2c_get_bus(&soc->i2c, 4), 0x51, 128 * KiB);
184
at24c_eeprom_init_rom(aspeed_i2c_get_bus(&soc->i2c, 8), 0x51, 128 * KiB,
185
@@ -XXX,XX +XXX,XX @@ static void yosemitev2_bmc_i2c_init(AspeedMachineState *bmc)
186
187
static void romulus_bmc_i2c_init(AspeedMachineState *bmc)
188
{
189
- AspeedSoCState *soc = &bmc->soc;
190
+ AspeedSoCState *soc = bmc->soc;
191
192
/* The romulus board expects Epson RX8900 I2C RTC but a ds1338 is
193
* good enough */
194
@@ -XXX,XX +XXX,XX @@ static void romulus_bmc_i2c_init(AspeedMachineState *bmc)
195
196
static void tiogapass_bmc_i2c_init(AspeedMachineState *bmc)
197
{
198
- AspeedSoCState *soc = &bmc->soc;
199
+ AspeedSoCState *soc = bmc->soc;
200
201
at24c_eeprom_init(aspeed_i2c_get_bus(&soc->i2c, 4), 0x54, 128 * KiB);
202
at24c_eeprom_init_rom(aspeed_i2c_get_bus(&soc->i2c, 6), 0x54, 128 * KiB,
203
@@ -XXX,XX +XXX,XX @@ static void create_pca9552(AspeedSoCState *soc, int bus_id, int addr)
204
205
static void sonorapass_bmc_i2c_init(AspeedMachineState *bmc)
206
{
207
- AspeedSoCState *soc = &bmc->soc;
208
+ AspeedSoCState *soc = bmc->soc;
209
210
/* bus 2 : */
211
i2c_slave_create_simple(aspeed_i2c_get_bus(&soc->i2c, 2), "tmp105", 0x48);
212
@@ -XXX,XX +XXX,XX @@ static void witherspoon_bmc_i2c_init(AspeedMachineState *bmc)
213
{14, LED_COLOR_GREEN, "front-power-3", GPIO_POLARITY_ACTIVE_LOW},
214
{15, LED_COLOR_GREEN, "front-id-5", GPIO_POLARITY_ACTIVE_LOW},
215
};
216
- AspeedSoCState *soc = &bmc->soc;
217
+ AspeedSoCState *soc = bmc->soc;
218
uint8_t *eeprom_buf = g_malloc0(8 * 1024);
219
DeviceState *dev;
220
LEDState *led;
221
@@ -XXX,XX +XXX,XX @@ static void witherspoon_bmc_i2c_init(AspeedMachineState *bmc)
222
223
static void g220a_bmc_i2c_init(AspeedMachineState *bmc)
224
{
225
- AspeedSoCState *soc = &bmc->soc;
226
+ AspeedSoCState *soc = bmc->soc;
227
DeviceState *dev;
228
229
dev = DEVICE(i2c_slave_create_simple(aspeed_i2c_get_bus(&soc->i2c, 3),
230
@@ -XXX,XX +XXX,XX @@ static void g220a_bmc_i2c_init(AspeedMachineState *bmc)
231
232
static void fp5280g2_bmc_i2c_init(AspeedMachineState *bmc)
233
{
234
- AspeedSoCState *soc = &bmc->soc;
235
+ AspeedSoCState *soc = bmc->soc;
236
I2CSlave *i2c_mux;
237
238
/* The at24c256 */
239
@@ -XXX,XX +XXX,XX @@ static void fp5280g2_bmc_i2c_init(AspeedMachineState *bmc)
240
241
static void rainier_bmc_i2c_init(AspeedMachineState *bmc)
242
{
243
- AspeedSoCState *soc = &bmc->soc;
244
+ AspeedSoCState *soc = bmc->soc;
245
I2CSlave *i2c_mux;
246
247
at24c_eeprom_init(aspeed_i2c_get_bus(&soc->i2c, 0), 0x51, 32 * KiB);
248
@@ -XXX,XX +XXX,XX @@ static void get_pca9548_channels(I2CBus *bus, uint8_t mux_addr,
249
250
static void fuji_bmc_i2c_init(AspeedMachineState *bmc)
251
{
252
- AspeedSoCState *soc = &bmc->soc;
253
+ AspeedSoCState *soc = bmc->soc;
254
I2CBus *i2c[144] = {};
255
256
for (int i = 0; i < 16; i++) {
257
@@ -XXX,XX +XXX,XX @@ static void fuji_bmc_i2c_init(AspeedMachineState *bmc)
258
259
static void bletchley_bmc_i2c_init(AspeedMachineState *bmc)
260
{
261
- AspeedSoCState *soc = &bmc->soc;
262
+ AspeedSoCState *soc = bmc->soc;
263
I2CBus *i2c[13] = {};
264
for (int i = 0; i < 13; i++) {
265
if ((i == 8) || (i == 11)) {
266
@@ -XXX,XX +XXX,XX @@ static void bletchley_bmc_i2c_init(AspeedMachineState *bmc)
267
268
static void fby35_i2c_init(AspeedMachineState *bmc)
269
{
270
- AspeedSoCState *soc = &bmc->soc;
271
+ AspeedSoCState *soc = bmc->soc;
272
I2CBus *i2c[16];
273
274
for (int i = 0; i < 16; i++) {
275
@@ -XXX,XX +XXX,XX @@ static void fby35_i2c_init(AspeedMachineState *bmc)
276
277
static void qcom_dc_scm_bmc_i2c_init(AspeedMachineState *bmc)
278
{
279
- AspeedSoCState *soc = &bmc->soc;
280
+ AspeedSoCState *soc = bmc->soc;
281
282
i2c_slave_create_simple(aspeed_i2c_get_bus(&soc->i2c, 15), "tmp105", 0x4d);
43
}
283
}
44
284
45
@@ -XXX,XX +XXX,XX @@ static void aspeed_machine_init(MachineState *machine)
285
static void qcom_dc_scm_firework_i2c_init(AspeedMachineState *bmc)
46
286
{
47
if (mtd0) {
287
- AspeedSoCState *soc = &bmc->soc;
48
uint64_t rom_size = memory_region_size(&bmc->soc.spi_boot);
288
+ AspeedSoCState *soc = bmc->soc;
49
- aspeed_install_boot_rom(&bmc->soc, blk_by_legacy_dinfo(mtd0),
289
I2CSlave *therm_mux, *cpuvr_mux;
50
- rom_size);
290
51
+ aspeed_install_boot_rom(bmc, blk_by_legacy_dinfo(mtd0), rom_size);
291
/* Create the generic DC-SCM hardware */
52
}
292
@@ -XXX,XX +XXX,XX @@ static void aspeed_machine_bletchley_class_init(ObjectClass *oc, void *data)
53
}
293
static void fby35_reset(MachineState *state, ShutdownCause reason)
54
294
{
295
AspeedMachineState *bmc = ASPEED_MACHINE(state);
296
- AspeedGPIOState *gpio = &bmc->soc.gpio;
297
+ AspeedGPIOState *gpio = &bmc->soc->gpio;
298
299
qemu_devices_reset(reason);
300
301
@@ -XXX,XX +XXX,XX @@ static void aspeed_minibmc_machine_init(MachineState *machine)
302
sysclk = clock_new(OBJECT(machine), "SYSCLK");
303
clock_set_hz(sysclk, SYSCLK_FRQ);
304
305
- object_initialize_child(OBJECT(machine), "soc", &bmc->soc, amc->soc_name);
306
- qdev_connect_clock_in(DEVICE(&bmc->soc), "sysclk", sysclk);
307
+ bmc->soc = ASPEED_SOC(object_new(amc->soc_name));
308
+ object_property_add_child(OBJECT(machine), "soc", OBJECT(bmc->soc));
309
+ object_unref(OBJECT(bmc->soc));
310
+ qdev_connect_clock_in(DEVICE(bmc->soc), "sysclk", sysclk);
311
312
- object_property_set_link(OBJECT(&bmc->soc), "memory",
313
+ object_property_set_link(OBJECT(bmc->soc), "memory",
314
OBJECT(get_system_memory()), &error_abort);
315
connect_serial_hds_to_uarts(bmc);
316
- qdev_realize(DEVICE(&bmc->soc), NULL, &error_abort);
317
+ qdev_realize(DEVICE(bmc->soc), NULL, &error_abort);
318
319
- aspeed_board_init_flashes(&bmc->soc.fmc,
320
+ aspeed_board_init_flashes(&bmc->soc->fmc,
321
bmc->fmc_model ? bmc->fmc_model : amc->fmc_model,
322
amc->num_cs,
323
0);
324
325
- aspeed_board_init_flashes(&bmc->soc.spi[0],
326
+ aspeed_board_init_flashes(&bmc->soc->spi[0],
327
bmc->spi_model ? bmc->spi_model : amc->spi_model,
328
amc->num_cs, amc->num_cs);
329
330
- aspeed_board_init_flashes(&bmc->soc.spi[1],
331
+ aspeed_board_init_flashes(&bmc->soc->spi[1],
332
bmc->spi_model ? bmc->spi_model : amc->spi_model,
333
amc->num_cs, (amc->num_cs * 2));
334
335
@@ -XXX,XX +XXX,XX @@ static void aspeed_minibmc_machine_init(MachineState *machine)
336
337
static void ast1030_evb_i2c_init(AspeedMachineState *bmc)
338
{
339
- AspeedSoCState *soc = &bmc->soc;
340
+ AspeedSoCState *soc = bmc->soc;
341
342
/* U10 24C08 connects to SDA/SCL Group 1 by default */
343
uint8_t *eeprom_buf = g_malloc0(32 * 1024);
55
--
344
--
56
2.40.1
345
2.41.0
57
346
58
347
diff view generated by jsdifflib
New patch
1
From: Philippe Mathieu-Daudé <philmd@linaro.org>
1
2
3
TYPE_ASPEED10X0_SOC inherits from TYPE_ASPEED_SOC.
4
In few commits we'll add more fields, but to keep
5
review process simple, don't add any yet.
6
7
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
8
Reviewed-by: Cédric Le Goater <clg@kaod.org>
9
Signed-off-by: Cédric Le Goater <clg@kaod.org>
10
---
11
include/hw/arm/aspeed_soc.h | 7 +++++++
12
hw/arm/aspeed_ast10x0.c | 26 +++++++++++++-------------
13
2 files changed, 20 insertions(+), 13 deletions(-)
14
15
diff --git a/include/hw/arm/aspeed_soc.h b/include/hw/arm/aspeed_soc.h
16
index XXXXXXX..XXXXXXX 100644
17
--- a/include/hw/arm/aspeed_soc.h
18
+++ b/include/hw/arm/aspeed_soc.h
19
@@ -XXX,XX +XXX,XX @@ struct AspeedSoCState {
20
#define TYPE_ASPEED_SOC "aspeed-soc"
21
OBJECT_DECLARE_TYPE(AspeedSoCState, AspeedSoCClass, ASPEED_SOC)
22
23
+struct Aspeed10x0SoCState {
24
+ AspeedSoCState parent;
25
+};
26
+
27
+#define TYPE_ASPEED10X0_SOC "aspeed10x0-soc"
28
+OBJECT_DECLARE_SIMPLE_TYPE(Aspeed10x0SoCState, ASPEED10X0_SOC)
29
+
30
struct AspeedSoCClass {
31
DeviceClass parent_class;
32
33
diff --git a/hw/arm/aspeed_ast10x0.c b/hw/arm/aspeed_ast10x0.c
34
index XXXXXXX..XXXXXXX 100644
35
--- a/hw/arm/aspeed_ast10x0.c
36
+++ b/hw/arm/aspeed_ast10x0.c
37
@@ -XXX,XX +XXX,XX @@ static void aspeed_soc_ast1030_class_init(ObjectClass *klass, void *data)
38
sc->get_irq = aspeed_soc_ast1030_get_irq;
39
}
40
41
-static const TypeInfo aspeed_soc_ast1030_type_info = {
42
- .name = "ast1030-a1",
43
- .parent = TYPE_ASPEED_SOC,
44
- .instance_size = sizeof(AspeedSoCState),
45
- .instance_init = aspeed_soc_ast1030_init,
46
- .class_init = aspeed_soc_ast1030_class_init,
47
- .class_size = sizeof(AspeedSoCClass),
48
+static const TypeInfo aspeed_soc_ast10x0_types[] = {
49
+ {
50
+ .name = TYPE_ASPEED10X0_SOC,
51
+ .parent = TYPE_ASPEED_SOC,
52
+ .instance_size = sizeof(Aspeed10x0SoCState),
53
+ .abstract = true,
54
+ }, {
55
+ .name = "ast1030-a1",
56
+ .parent = TYPE_ASPEED10X0_SOC,
57
+ .instance_init = aspeed_soc_ast1030_init,
58
+ .class_init = aspeed_soc_ast1030_class_init,
59
+ },
60
};
61
62
-static void aspeed_soc_register_types(void)
63
-{
64
- type_register_static(&aspeed_soc_ast1030_type_info);
65
-}
66
-
67
-type_init(aspeed_soc_register_types)
68
+DEFINE_TYPES(aspeed_soc_ast10x0_types)
69
--
70
2.41.0
71
72
diff view generated by jsdifflib
New patch
1
From: Philippe Mathieu-Daudé <philmd@linaro.org>
1
2
3
TYPE_ASPEED2600_SOC inherits from TYPE_ASPEED_SOC.
4
In few commits we'll add more fields, but to keep
5
review process simple, don't add any yet.
6
7
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
8
Reviewed-by: Cédric Le Goater <clg@kaod.org>
9
Signed-off-by: Cédric Le Goater <clg@kaod.org>
10
---
11
include/hw/arm/aspeed_soc.h | 7 +++++++
12
hw/arm/aspeed_ast2600.c | 26 +++++++++++++-------------
13
2 files changed, 20 insertions(+), 13 deletions(-)
14
15
diff --git a/include/hw/arm/aspeed_soc.h b/include/hw/arm/aspeed_soc.h
16
index XXXXXXX..XXXXXXX 100644
17
--- a/include/hw/arm/aspeed_soc.h
18
+++ b/include/hw/arm/aspeed_soc.h
19
@@ -XXX,XX +XXX,XX @@ struct AspeedSoCState {
20
#define TYPE_ASPEED_SOC "aspeed-soc"
21
OBJECT_DECLARE_TYPE(AspeedSoCState, AspeedSoCClass, ASPEED_SOC)
22
23
+struct Aspeed2600SoCState {
24
+ AspeedSoCState parent;
25
+};
26
+
27
+#define TYPE_ASPEED2600_SOC "aspeed2600-soc"
28
+OBJECT_DECLARE_SIMPLE_TYPE(Aspeed2600SoCState, ASPEED2600_SOC)
29
+
30
struct Aspeed10x0SoCState {
31
AspeedSoCState parent;
32
};
33
diff --git a/hw/arm/aspeed_ast2600.c b/hw/arm/aspeed_ast2600.c
34
index XXXXXXX..XXXXXXX 100644
35
--- a/hw/arm/aspeed_ast2600.c
36
+++ b/hw/arm/aspeed_ast2600.c
37
@@ -XXX,XX +XXX,XX @@ static void aspeed_soc_ast2600_class_init(ObjectClass *oc, void *data)
38
sc->get_irq = aspeed_soc_ast2600_get_irq;
39
}
40
41
-static const TypeInfo aspeed_soc_ast2600_type_info = {
42
- .name = "ast2600-a3",
43
- .parent = TYPE_ASPEED_SOC,
44
- .instance_size = sizeof(AspeedSoCState),
45
- .instance_init = aspeed_soc_ast2600_init,
46
- .class_init = aspeed_soc_ast2600_class_init,
47
- .class_size = sizeof(AspeedSoCClass),
48
+static const TypeInfo aspeed_soc_ast2600_types[] = {
49
+ {
50
+ .name = TYPE_ASPEED2600_SOC,
51
+ .parent = TYPE_ASPEED_SOC,
52
+ .instance_size = sizeof(Aspeed2600SoCState),
53
+ .abstract = true,
54
+ }, {
55
+ .name = "ast2600-a3",
56
+ .parent = TYPE_ASPEED2600_SOC,
57
+ .instance_init = aspeed_soc_ast2600_init,
58
+ .class_init = aspeed_soc_ast2600_class_init,
59
+ },
60
};
61
62
-static void aspeed_soc_register_types(void)
63
-{
64
- type_register_static(&aspeed_soc_ast2600_type_info);
65
-};
66
-
67
-type_init(aspeed_soc_register_types)
68
+DEFINE_TYPES(aspeed_soc_ast2600_types)
69
--
70
2.41.0
71
72
diff view generated by jsdifflib
1
From: Ninad Palsule <ninad@linux.ibm.com>
1
From: Philippe Mathieu-Daudé <philmd@linaro.org>
2
2
3
The current modeling of Rainier machine creates zero filled VPDs(EEPROMs).
3
TYPE_ASPEED2400_SOC inherits from TYPE_ASPEED_SOC.
4
This makes some services and applications unhappy and causing them to fail.
4
In few commits we'll add more fields, but to keep
5
Hence this drop adds some fabricated data for system and BMC FRU so that
5
review process simple, don't add any yet.
6
vpd services are happy and active.
7
6
8
Tested:
7
TYPE_ASPEED_SOC is common to various Aspeed SoCs,
9
- The system-vpd.service is active.
8
define it in aspeed_soc_common.c.
10
- VPD service related to bmc is active.
11
9
12
Signed-off-by: Ninad Palsule <ninad@linux.ibm.com>
10
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
13
Reviewed-by: Cédric Le Goater <clg@kaod.org>
11
Reviewed-by: Cédric Le Goater <clg@kaod.org>
14
[ clg: commit title cleanup ]
15
Signed-off-by: Cédric Le Goater <clg@kaod.org>
12
Signed-off-by: Cédric Le Goater <clg@kaod.org>
16
---
13
---
17
hw/arm/aspeed_eeprom.h | 5 +++++
14
include/hw/arm/aspeed_soc.h | 7 +++++
18
hw/arm/aspeed.c | 6 ++++--
15
hw/arm/aspeed_soc.c | 61 +++++++++++--------------------------
19
hw/arm/aspeed_eeprom.c | 45 +++++++++++++++++++++++++++++++++++++++++-
16
hw/arm/aspeed_soc_common.c | 29 ++++++++++++++++++
20
3 files changed, 53 insertions(+), 3 deletions(-)
17
3 files changed, 53 insertions(+), 44 deletions(-)
21
18
22
diff --git a/hw/arm/aspeed_eeprom.h b/hw/arm/aspeed_eeprom.h
19
diff --git a/include/hw/arm/aspeed_soc.h b/include/hw/arm/aspeed_soc.h
23
index XXXXXXX..XXXXXXX 100644
20
index XXXXXXX..XXXXXXX 100644
24
--- a/hw/arm/aspeed_eeprom.h
21
--- a/include/hw/arm/aspeed_soc.h
25
+++ b/hw/arm/aspeed_eeprom.h
22
+++ b/include/hw/arm/aspeed_soc.h
26
@@ -XXX,XX +XXX,XX @@ extern const size_t fby35_bmc_fruid_len;
23
@@ -XXX,XX +XXX,XX @@ struct AspeedSoCState {
27
extern const uint8_t yosemitev2_bmc_fruid[];
24
#define TYPE_ASPEED_SOC "aspeed-soc"
28
extern const size_t yosemitev2_bmc_fruid_len;
25
OBJECT_DECLARE_TYPE(AspeedSoCState, AspeedSoCClass, ASPEED_SOC)
29
26
30
+extern const uint8_t rainier_bb_fruid[];
27
+struct Aspeed2400SoCState {
31
+extern const size_t rainier_bb_fruid_len;
28
+ AspeedSoCState parent;
32
+extern const uint8_t rainier_bmc_fruid[];
33
+extern const size_t rainier_bmc_fruid_len;
34
+
35
#endif
36
diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
37
index XXXXXXX..XXXXXXX 100644
38
--- a/hw/arm/aspeed.c
39
+++ b/hw/arm/aspeed.c
40
@@ -XXX,XX +XXX,XX @@ static void rainier_bmc_i2c_init(AspeedMachineState *bmc)
41
0x48);
42
i2c_slave_create_simple(aspeed_i2c_get_bus(&soc->i2c, 8), TYPE_TMP105,
43
0x4a);
44
- at24c_eeprom_init(aspeed_i2c_get_bus(&soc->i2c, 8), 0x50, 64 * KiB);
45
- at24c_eeprom_init(aspeed_i2c_get_bus(&soc->i2c, 8), 0x51, 64 * KiB);
46
+ at24c_eeprom_init_rom(aspeed_i2c_get_bus(&soc->i2c, 8), 0x50,
47
+ 64 * KiB, rainier_bb_fruid, rainier_bb_fruid_len);
48
+ at24c_eeprom_init_rom(aspeed_i2c_get_bus(&soc->i2c, 8), 0x51,
49
+ 64 * KiB, rainier_bmc_fruid, rainier_bmc_fruid_len);
50
create_pca9552(soc, 8, 0x60);
51
create_pca9552(soc, 8, 0x61);
52
/* Bus 8: ucd90320@11 */
53
diff --git a/hw/arm/aspeed_eeprom.c b/hw/arm/aspeed_eeprom.c
54
index XXXXXXX..XXXXXXX 100644
55
--- a/hw/arm/aspeed_eeprom.c
56
+++ b/hw/arm/aspeed_eeprom.c
57
@@ -XXX,XX +XXX,XX @@ const uint8_t yosemitev2_bmc_fruid[] = {
58
0x6e, 0x66, 0x69, 0x67, 0x20, 0x41, 0xc1, 0x45,
59
};
60
61
+const uint8_t rainier_bb_fruid[] = {
62
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x84,
63
+ 0x28, 0x00, 0x52, 0x54, 0x04, 0x56, 0x48, 0x44, 0x52, 0x56, 0x44, 0x02,
64
+ 0x01, 0x00, 0x50, 0x54, 0x0e, 0x56, 0x54, 0x4f, 0x43, 0x00, 0x00, 0x37,
65
+ 0x00, 0x4a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x46, 0x08, 0x00, 0x00,
66
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x00, 0x52, 0x54,
67
+ 0x04, 0x56, 0x54, 0x4f, 0x43, 0x50, 0x54, 0x38, 0x56, 0x49, 0x4e, 0x49,
68
+ 0x00, 0x00, 0x81, 0x00, 0x3a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0x53,
69
+ 0x59, 0x53, 0x00, 0x00, 0xbb, 0x00, 0x27, 0x00, 0x00, 0x00, 0x00, 0x00,
70
+ 0x56, 0x43, 0x45, 0x4e, 0x00, 0x00, 0xe2, 0x00, 0x27, 0x00, 0x00, 0x00,
71
+ 0x00, 0x00, 0x56, 0x53, 0x42, 0x50, 0x00, 0x00, 0x09, 0x01, 0x19, 0x00,
72
+ 0x00, 0x00, 0x00, 0x00, 0x50, 0x46, 0x01, 0x00, 0x00, 0x00, 0x36, 0x00,
73
+ 0x52, 0x54, 0x04, 0x56, 0x49, 0x4e, 0x49, 0x44, 0x52, 0x04, 0x44, 0x45,
74
+ 0x53, 0x43, 0x48, 0x57, 0x02, 0x30, 0x31, 0x43, 0x43, 0x04, 0x33, 0x34,
75
+ 0x35, 0x36, 0x46, 0x4e, 0x04, 0x46, 0x52, 0x34, 0x39, 0x53, 0x4e, 0x04,
76
+ 0x53, 0x52, 0x31, 0x32, 0x50, 0x4e, 0x04, 0x50, 0x52, 0x39, 0x39, 0x50,
77
+ 0x46, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x52, 0x54,
78
+ 0x04, 0x56, 0x53, 0x59, 0x53, 0x53, 0x45, 0x07, 0x49, 0x42, 0x4d, 0x53,
79
+ 0x59, 0x53, 0x31, 0x54, 0x4d, 0x08, 0x32, 0x32, 0x32, 0x32, 0x2d, 0x32,
80
+ 0x32, 0x32, 0x50, 0x46, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23,
81
+ 0x00, 0x52, 0x54, 0x04, 0x56, 0x43, 0x45, 0x4e, 0x53, 0x45, 0x07, 0x31,
82
+ 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x46, 0x43, 0x08, 0x31, 0x31, 0x31,
83
+ 0x31, 0x2d, 0x31, 0x31, 0x31, 0x50, 0x46, 0x04, 0x00, 0x00, 0x00, 0x00,
84
+ 0x00, 0x00, 0x15, 0x00, 0x52, 0x54, 0x04, 0x56, 0x53, 0x42, 0x50, 0x49,
85
+ 0x4d, 0x04, 0x50, 0x00, 0x10, 0x01, 0x50, 0x46, 0x04, 0x00, 0x00, 0x00,
86
+ 0x00, 0x00,
87
+};
29
+};
88
+
30
+
89
+/* Rainier BMC FRU */
31
+#define TYPE_ASPEED2400_SOC "aspeed2400-soc"
90
+const uint8_t rainier_bmc_fruid[] = {
32
+OBJECT_DECLARE_SIMPLE_TYPE(Aspeed2400SoCState, ASPEED2400_SOC)
91
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x84,
33
+
92
+ 0x28, 0x00, 0x52, 0x54, 0x04, 0x56, 0x48, 0x44, 0x52, 0x56, 0x44, 0x02,
34
struct Aspeed2600SoCState {
93
+ 0x01, 0x00, 0x50, 0x54, 0x0e, 0x56, 0x54, 0x4f, 0x43, 0x00, 0x00, 0x37,
35
AspeedSoCState parent;
94
+ 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x46, 0x08, 0x00, 0x00,
36
};
95
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x52, 0x54,
37
diff --git a/hw/arm/aspeed_soc.c b/hw/arm/aspeed_soc.c
96
+ 0x04, 0x56, 0x54, 0x4f, 0x43, 0x50, 0x54, 0x0e, 0x56, 0x49, 0x4e, 0x49,
38
index XXXXXXX..XXXXXXX 100644
97
+ 0x00, 0x00, 0x57, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x46,
39
--- a/hw/arm/aspeed_soc.c
98
+ 0x01, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x52, 0x54, 0x04, 0x56, 0x49, 0x4e,
40
+++ b/hw/arm/aspeed_soc.c
99
+ 0x49, 0x44, 0x52, 0x04, 0x44, 0x45, 0x53, 0x43, 0x48, 0x57, 0x02, 0x30,
41
@@ -XXX,XX +XXX,XX @@ static void aspeed_ast2400_soc_realize(DeviceState *dev, Error **errp)
100
+ 0x31, 0x50, 0x46, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
42
sysbus_connect_irq(SYS_BUS_DEVICE(&s->hace), 0,
43
aspeed_soc_get_irq(s, ASPEED_DEV_HACE));
44
}
45
-static Property aspeed_soc_properties[] = {
46
- DEFINE_PROP_LINK("memory", AspeedSoCState, memory, TYPE_MEMORY_REGION,
47
- MemoryRegion *),
48
- DEFINE_PROP_LINK("dram", AspeedSoCState, dram_mr, TYPE_MEMORY_REGION,
49
- MemoryRegion *),
50
- DEFINE_PROP_END_OF_LIST(),
51
-};
52
-
53
-static void aspeed_soc_class_init(ObjectClass *oc, void *data)
54
-{
55
- DeviceClass *dc = DEVICE_CLASS(oc);
56
-
57
- device_class_set_props(dc, aspeed_soc_properties);
58
-}
59
-
60
-static const TypeInfo aspeed_soc_type_info = {
61
- .name = TYPE_ASPEED_SOC,
62
- .parent = TYPE_DEVICE,
63
- .instance_size = sizeof(AspeedSoCState),
64
- .class_size = sizeof(AspeedSoCClass),
65
- .class_init = aspeed_soc_class_init,
66
- .abstract = true,
67
-};
68
69
static void aspeed_soc_ast2400_class_init(ObjectClass *oc, void *data)
70
{
71
@@ -XXX,XX +XXX,XX @@ static void aspeed_soc_ast2400_class_init(ObjectClass *oc, void *data)
72
sc->get_irq = aspeed_soc_ast2400_get_irq;
73
}
74
75
-static const TypeInfo aspeed_soc_ast2400_type_info = {
76
- .name = "ast2400-a1",
77
- .parent = TYPE_ASPEED_SOC,
78
- .instance_init = aspeed_ast2400_soc_init,
79
- .instance_size = sizeof(AspeedSoCState),
80
- .class_init = aspeed_soc_ast2400_class_init,
81
-};
82
-
83
static void aspeed_soc_ast2500_class_init(ObjectClass *oc, void *data)
84
{
85
AspeedSoCClass *sc = ASPEED_SOC_CLASS(oc);
86
@@ -XXX,XX +XXX,XX @@ static void aspeed_soc_ast2500_class_init(ObjectClass *oc, void *data)
87
sc->get_irq = aspeed_soc_ast2400_get_irq;
88
}
89
90
-static const TypeInfo aspeed_soc_ast2500_type_info = {
91
- .name = "ast2500-a1",
92
- .parent = TYPE_ASPEED_SOC,
93
- .instance_init = aspeed_ast2400_soc_init,
94
- .instance_size = sizeof(AspeedSoCState),
95
- .class_init = aspeed_soc_ast2500_class_init,
96
-};
97
-static void aspeed_soc_register_types(void)
98
-{
99
- type_register_static(&aspeed_soc_type_info);
100
- type_register_static(&aspeed_soc_ast2400_type_info);
101
- type_register_static(&aspeed_soc_ast2500_type_info);
102
+static const TypeInfo aspeed_soc_ast2400_types[] = {
103
+ {
104
+ .name = TYPE_ASPEED2400_SOC,
105
+ .parent = TYPE_ASPEED_SOC,
106
+ .instance_init = aspeed_ast2400_soc_init,
107
+ .instance_size = sizeof(Aspeed2400SoCState),
108
+ .abstract = true,
109
+ }, {
110
+ .name = "ast2400-a1",
111
+ .parent = TYPE_ASPEED2400_SOC,
112
+ .class_init = aspeed_soc_ast2400_class_init,
113
+ }, {
114
+ .name = "ast2500-a1",
115
+ .parent = TYPE_ASPEED2400_SOC,
116
+ .class_init = aspeed_soc_ast2500_class_init,
117
+ },
118
};
119
120
-type_init(aspeed_soc_register_types);
121
+DEFINE_TYPES(aspeed_soc_ast2400_types)
122
diff --git a/hw/arm/aspeed_soc_common.c b/hw/arm/aspeed_soc_common.c
123
index XXXXXXX..XXXXXXX 100644
124
--- a/hw/arm/aspeed_soc_common.c
125
+++ b/hw/arm/aspeed_soc_common.c
126
@@ -XXX,XX +XXX,XX @@
127
128
#include "qemu/osdep.h"
129
#include "qapi/error.h"
130
+#include "hw/qdev-properties.h"
131
#include "hw/misc/unimp.h"
132
#include "hw/arm/aspeed_soc.h"
133
#include "hw/char/serial.h"
134
@@ -XXX,XX +XXX,XX @@ void aspeed_mmio_map_unimplemented(AspeedSoCState *s, SysBusDevice *dev,
135
memory_region_add_subregion_overlap(s->memory, addr,
136
sysbus_mmio_get_region(dev, 0), -1000);
137
}
138
+
139
+static Property aspeed_soc_properties[] = {
140
+ DEFINE_PROP_LINK("dram", AspeedSoCState, dram_mr, TYPE_MEMORY_REGION,
141
+ MemoryRegion *),
142
+ DEFINE_PROP_LINK("memory", AspeedSoCState, memory, TYPE_MEMORY_REGION,
143
+ MemoryRegion *),
144
+ DEFINE_PROP_END_OF_LIST(),
101
+};
145
+};
102
+
146
+
103
const size_t tiogapass_bmc_fruid_len = sizeof(tiogapass_bmc_fruid);
147
+static void aspeed_soc_class_init(ObjectClass *oc, void *data)
104
const size_t fby35_nic_fruid_len = sizeof(fby35_nic_fruid);
148
+{
105
const size_t fby35_bb_fruid_len = sizeof(fby35_bb_fruid);
149
+ DeviceClass *dc = DEVICE_CLASS(oc);
106
const size_t fby35_bmc_fruid_len = sizeof(fby35_bmc_fruid);
150
+
107
-
151
+ device_class_set_props(dc, aspeed_soc_properties);
108
const size_t yosemitev2_bmc_fruid_len = sizeof(yosemitev2_bmc_fruid);
152
+}
109
+const size_t rainier_bb_fruid_len = sizeof(rainier_bb_fruid);
153
+
110
+const size_t rainier_bmc_fruid_len = sizeof(rainier_bmc_fruid);
154
+static const TypeInfo aspeed_soc_types[] = {
155
+ {
156
+ .name = TYPE_ASPEED_SOC,
157
+ .parent = TYPE_DEVICE,
158
+ .instance_size = sizeof(AspeedSoCState),
159
+ .class_size = sizeof(AspeedSoCClass),
160
+ .class_init = aspeed_soc_class_init,
161
+ .abstract = true,
162
+ },
163
+};
164
+
165
+DEFINE_TYPES(aspeed_soc_types)
111
--
166
--
112
2.40.1
167
2.41.0
113
168
114
169
diff view generated by jsdifflib
New patch
1
From: Philippe Mathieu-Daudé <philmd@linaro.org>
1
2
3
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
4
Reviewed-by: Cédric Le Goater <clg@kaod.org>
5
Signed-off-by: Cédric Le Goater <clg@kaod.org>
6
---
7
hw/arm/aspeed_soc_common.c | 11 +++++++++++
8
1 file changed, 11 insertions(+)
9
10
diff --git a/hw/arm/aspeed_soc_common.c b/hw/arm/aspeed_soc_common.c
11
index XXXXXXX..XXXXXXX 100644
12
--- a/hw/arm/aspeed_soc_common.c
13
+++ b/hw/arm/aspeed_soc_common.c
14
@@ -XXX,XX +XXX,XX @@ void aspeed_mmio_map_unimplemented(AspeedSoCState *s, SysBusDevice *dev,
15
sysbus_mmio_get_region(dev, 0), -1000);
16
}
17
18
+static void aspeed_soc_realize(DeviceState *dev, Error **errp)
19
+{
20
+ AspeedSoCState *s = ASPEED_SOC(dev);
21
+
22
+ if (!s->memory) {
23
+ error_setg(errp, "'memory' link is not set");
24
+ return;
25
+ }
26
+}
27
+
28
static Property aspeed_soc_properties[] = {
29
DEFINE_PROP_LINK("dram", AspeedSoCState, dram_mr, TYPE_MEMORY_REGION,
30
MemoryRegion *),
31
@@ -XXX,XX +XXX,XX @@ static void aspeed_soc_class_init(ObjectClass *oc, void *data)
32
{
33
DeviceClass *dc = DEVICE_CLASS(oc);
34
35
+ dc->realize = aspeed_soc_realize;
36
device_class_set_props(dc, aspeed_soc_properties);
37
}
38
39
--
40
2.41.0
41
42
diff view generated by jsdifflib
1
Most of the Aspeed machines use the UART5 device for the boot console,
1
From: Philippe Mathieu-Daudé <philmd@linaro.org>
2
and QEMU connects the first serial Chardev to this SoC device for this
3
purpose. See routine connect_serial_hds_to_uarts().
4
2
5
Nevertheless, some machines use another boot console, such as the fuji,
3
The v7-M core is specific to the Aspeed 10x0 series,
6
and commit 5d63d0c76c ("hw/arm/aspeed: Allow machine to set UART
4
remove it from the common AspeedSoCState.
7
default") introduced a SoC class attribute 'uart_default' and property
8
to be able to change the boot console device. It was later changed by
9
commit d2b3eaefb4 ("aspeed: Refactor UART init for multi-SoC machines").
10
5
11
The "bmc-console" machine option goes a step further and lets the user define
6
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
12
the UART device from the QEMU command line without introducing a new
7
Reviewed-by: Cédric Le Goater <clg@kaod.org>
13
machine definition. For instance, to use device UART3 (mapped on
14
/dev/ttyS2 under Linux) instead of the default UART5, one would use :
15
16
-M ast2500-evb,bmc-console=uart3
17
18
Cc: Abhishek Singh Dagur <abhishek@drut.io>
19
Signed-off-by: Cédric Le Goater <clg@kaod.org>
20
Reviewed-by: Joel Stanley <joel@jms.id.au>
21
Signed-off-by: Cédric Le Goater <clg@kaod.org>
8
Signed-off-by: Cédric Le Goater <clg@kaod.org>
22
---
9
---
23
docs/system/arm/aspeed.rst | 11 +++++++++++
10
include/hw/arm/aspeed_soc.h | 5 ++---
24
hw/arm/aspeed.c | 40 ++++++++++++++++++++++++++++++++++++--
11
hw/arm/aspeed_ast10x0.c | 27 +++++++++++++++------------
25
2 files changed, 49 insertions(+), 2 deletions(-)
12
hw/arm/fby35.c | 13 ++++++++-----
13
3 files changed, 25 insertions(+), 20 deletions(-)
26
14
27
diff --git a/docs/system/arm/aspeed.rst b/docs/system/arm/aspeed.rst
15
diff --git a/include/hw/arm/aspeed_soc.h b/include/hw/arm/aspeed_soc.h
28
index XXXXXXX..XXXXXXX 100644
16
index XXXXXXX..XXXXXXX 100644
29
--- a/docs/system/arm/aspeed.rst
17
--- a/include/hw/arm/aspeed_soc.h
30
+++ b/docs/system/arm/aspeed.rst
18
+++ b/include/hw/arm/aspeed_soc.h
31
@@ -XXX,XX +XXX,XX @@ Options specific to Aspeed machines are :
19
@@ -XXX,XX +XXX,XX @@
32
20
#define ASPEED_JTAG_NUM 2
33
* ``spi-model`` to change the SPI Flash model.
21
34
22
struct AspeedSoCState {
35
+ * ``bmc-console`` to change the default console device. Most of the
23
- /*< private >*/
36
+ machines use the ``UART5`` device for a boot console, which is
24
DeviceState parent;
37
+ mapped on ``/dev/ttyS4`` under Linux, but it is not always the
25
38
+ case.
26
- /*< public >*/
27
ARMCPU cpu[ASPEED_CPUS_NUM];
28
A15MPPrivState a7mpcore;
29
- ARMv7MState armv7m;
30
MemoryRegion *memory;
31
MemoryRegion *dram_mr;
32
MemoryRegion dram_container;
33
@@ -XXX,XX +XXX,XX @@ OBJECT_DECLARE_SIMPLE_TYPE(Aspeed2600SoCState, ASPEED2600_SOC)
34
35
struct Aspeed10x0SoCState {
36
AspeedSoCState parent;
39
+
37
+
40
For instance, to start the ``ast2500-evb`` machine with a different
38
+ ARMv7MState armv7m;
41
FMC chip and a bigger (64M) SPI chip, use :
39
};
42
40
43
@@ -XXX,XX +XXX,XX @@ FMC chip and a bigger (64M) SPI chip, use :
41
#define TYPE_ASPEED10X0_SOC "aspeed10x0-soc"
44
42
diff --git a/hw/arm/aspeed_ast10x0.c b/hw/arm/aspeed_ast10x0.c
45
-M ast2500-evb,fmc-model=mx25l25635e,spi-model=mx66u51235f
43
index XXXXXXX..XXXXXXX 100644
46
44
--- a/hw/arm/aspeed_ast10x0.c
47
+To change the boot console and use device ``UART3`` (``/dev/ttyS2``
45
+++ b/hw/arm/aspeed_ast10x0.c
48
+under Linux), use :
46
@@ -XXX,XX +XXX,XX @@ static const int aspeed_soc_ast1030_irqmap[] = {
47
48
static qemu_irq aspeed_soc_ast1030_get_irq(AspeedSoCState *s, int dev)
49
{
50
+ Aspeed10x0SoCState *a = ASPEED10X0_SOC(s);
51
AspeedSoCClass *sc = ASPEED_SOC_GET_CLASS(s);
52
53
- return qdev_get_gpio_in(DEVICE(&s->armv7m), sc->irqmap[dev]);
54
+ return qdev_get_gpio_in(DEVICE(&a->armv7m), sc->irqmap[dev]);
55
}
56
57
static void aspeed_soc_ast1030_init(Object *obj)
58
{
59
+ Aspeed10x0SoCState *a = ASPEED10X0_SOC(obj);
60
AspeedSoCState *s = ASPEED_SOC(obj);
61
AspeedSoCClass *sc = ASPEED_SOC_GET_CLASS(s);
62
char socname[8];
63
@@ -XXX,XX +XXX,XX @@ static void aspeed_soc_ast1030_init(Object *obj)
64
g_assert_not_reached();
65
}
66
67
- object_initialize_child(obj, "armv7m", &s->armv7m, TYPE_ARMV7M);
68
+ object_initialize_child(obj, "armv7m", &a->armv7m, TYPE_ARMV7M);
69
70
s->sysclk = qdev_init_clock_in(DEVICE(s), "sysclk", NULL, NULL, 0);
71
72
@@ -XXX,XX +XXX,XX @@ static void aspeed_soc_ast1030_init(Object *obj)
73
74
static void aspeed_soc_ast1030_realize(DeviceState *dev_soc, Error **errp)
75
{
76
+ Aspeed10x0SoCState *a = ASPEED10X0_SOC(dev_soc);
77
AspeedSoCState *s = ASPEED_SOC(dev_soc);
78
AspeedSoCClass *sc = ASPEED_SOC_GET_CLASS(s);
79
DeviceState *armv7m;
80
@@ -XXX,XX +XXX,XX @@ static void aspeed_soc_ast1030_realize(DeviceState *dev_soc, Error **errp)
81
0x40000);
82
83
/* AST1030 CPU Core */
84
- armv7m = DEVICE(&s->armv7m);
85
+ armv7m = DEVICE(&a->armv7m);
86
qdev_prop_set_uint32(armv7m, "num-irq", 256);
87
qdev_prop_set_string(armv7m, "cpu-type", sc->cpu_type);
88
qdev_connect_clock_in(armv7m, "cpuclk", s->sysclk);
89
- object_property_set_link(OBJECT(&s->armv7m), "memory",
90
+ object_property_set_link(OBJECT(&a->armv7m), "memory",
91
OBJECT(s->memory), &error_abort);
92
- sysbus_realize(SYS_BUS_DEVICE(&s->armv7m), &error_abort);
93
+ sysbus_realize(SYS_BUS_DEVICE(&a->armv7m), &error_abort);
94
95
/* Internal SRAM */
96
sram_name = g_strdup_printf("aspeed.sram.%d",
97
- CPU(s->armv7m.cpu)->cpu_index);
98
+ CPU(a->armv7m.cpu)->cpu_index);
99
memory_region_init_ram(&s->sram, OBJECT(s), sram_name, sc->sram_size, &err);
100
if (err != NULL) {
101
error_propagate(errp, err);
102
@@ -XXX,XX +XXX,XX @@ static void aspeed_soc_ast1030_realize(DeviceState *dev_soc, Error **errp)
103
}
104
aspeed_mmio_map(s, SYS_BUS_DEVICE(&s->i2c), 0, sc->memmap[ASPEED_DEV_I2C]);
105
for (i = 0; i < ASPEED_I2C_GET_CLASS(&s->i2c)->num_busses; i++) {
106
- qemu_irq irq = qdev_get_gpio_in(DEVICE(&s->armv7m),
107
+ qemu_irq irq = qdev_get_gpio_in(DEVICE(&a->armv7m),
108
sc->irqmap[ASPEED_DEV_I2C] + i);
109
/* The AST1030 I2C controller has one IRQ per bus. */
110
sysbus_connect_irq(SYS_BUS_DEVICE(&s->i2c.busses[i]), 0, irq);
111
@@ -XXX,XX +XXX,XX @@ static void aspeed_soc_ast1030_realize(DeviceState *dev_soc, Error **errp)
112
}
113
aspeed_mmio_map(s, SYS_BUS_DEVICE(&s->i3c), 0, sc->memmap[ASPEED_DEV_I3C]);
114
for (i = 0; i < ASPEED_I3C_NR_DEVICES; i++) {
115
- qemu_irq irq = qdev_get_gpio_in(DEVICE(&s->armv7m),
116
+ qemu_irq irq = qdev_get_gpio_in(DEVICE(&a->armv7m),
117
sc->irqmap[ASPEED_DEV_I3C] + i);
118
/* The AST1030 I3C controller has one IRQ per bus. */
119
sysbus_connect_irq(SYS_BUS_DEVICE(&s->i3c.devices[i]), 0, irq);
120
@@ -XXX,XX +XXX,XX @@ static void aspeed_soc_ast1030_realize(DeviceState *dev_soc, Error **errp)
121
* On the AST1030 LPC subdevice IRQs are connected straight to the GIC.
122
*/
123
sysbus_connect_irq(SYS_BUS_DEVICE(&s->lpc), 1 + aspeed_lpc_kcs_1,
124
- qdev_get_gpio_in(DEVICE(&s->armv7m),
125
+ qdev_get_gpio_in(DEVICE(&a->armv7m),
126
sc->irqmap[ASPEED_DEV_KCS] + aspeed_lpc_kcs_1));
127
128
sysbus_connect_irq(SYS_BUS_DEVICE(&s->lpc), 1 + aspeed_lpc_kcs_2,
129
- qdev_get_gpio_in(DEVICE(&s->armv7m),
130
+ qdev_get_gpio_in(DEVICE(&a->armv7m),
131
sc->irqmap[ASPEED_DEV_KCS] + aspeed_lpc_kcs_2));
132
133
sysbus_connect_irq(SYS_BUS_DEVICE(&s->lpc), 1 + aspeed_lpc_kcs_3,
134
- qdev_get_gpio_in(DEVICE(&s->armv7m),
135
+ qdev_get_gpio_in(DEVICE(&a->armv7m),
136
sc->irqmap[ASPEED_DEV_KCS] + aspeed_lpc_kcs_3));
137
138
sysbus_connect_irq(SYS_BUS_DEVICE(&s->lpc), 1 + aspeed_lpc_kcs_4,
139
- qdev_get_gpio_in(DEVICE(&s->armv7m),
140
+ qdev_get_gpio_in(DEVICE(&a->armv7m),
141
sc->irqmap[ASPEED_DEV_KCS] + aspeed_lpc_kcs_4));
142
143
/* UART */
144
diff --git a/hw/arm/fby35.c b/hw/arm/fby35.c
145
index XXXXXXX..XXXXXXX 100644
146
--- a/hw/arm/fby35.c
147
+++ b/hw/arm/fby35.c
148
@@ -XXX,XX +XXX,XX @@ struct Fby35State {
149
Clock *bic_sysclk;
150
151
AspeedSoCState bmc;
152
- AspeedSoCState bic;
153
+ Aspeed10x0SoCState bic;
154
155
bool mmio_exec;
156
};
157
@@ -XXX,XX +XXX,XX @@ static void fby35_bmc_init(Fby35State *s)
158
159
static void fby35_bic_init(Fby35State *s)
160
{
161
+ AspeedSoCState *soc;
49
+
162
+
50
+.. code-block:: bash
163
s->bic_sysclk = clock_new(OBJECT(s), "SYSCLK");
51
+
164
clock_set_hz(s->bic_sysclk, 200000000ULL);
52
+ -M ast2500-evb,bmc-console=uart3
165
53
166
object_initialize_child(OBJECT(s), "bic", &s->bic, "ast1030-a1");
54
Aspeed minibmc family boards (``ast1030-evb``)
167
+ soc = ASPEED_SOC(&s->bic);
55
==================================================================
168
56
diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
169
memory_region_init(&s->bic_memory, OBJECT(&s->bic), "bic-memory",
57
index XXXXXXX..XXXXXXX 100644
170
UINT64_MAX);
58
--- a/hw/arm/aspeed.c
171
@@ -XXX,XX +XXX,XX @@ static void fby35_bic_init(Fby35State *s)
59
+++ b/hw/arm/aspeed.c
172
qdev_connect_clock_in(DEVICE(&s->bic), "sysclk", s->bic_sysclk);
60
@@ -XXX,XX +XXX,XX @@ struct AspeedMachineState {
173
object_property_set_link(OBJECT(&s->bic), "memory", OBJECT(&s->bic_memory),
61
AspeedSoCState soc;
174
&error_abort);
62
MemoryRegion boot_rom;
175
- aspeed_soc_uart_set_chr(&s->bic, ASPEED_DEV_UART5, serial_hd(1));
63
bool mmio_exec;
176
+ aspeed_soc_uart_set_chr(soc, ASPEED_DEV_UART5, serial_hd(1));
64
+ uint32_t uart_chosen;
177
qdev_realize(DEVICE(&s->bic), NULL, &error_abort);
65
char *fmc_model;
178
66
char *spi_model;
179
- aspeed_board_init_flashes(&s->bic.fmc, "sst25vf032b", 2, 2);
67
};
180
- aspeed_board_init_flashes(&s->bic.spi[0], "sst25vf032b", 2, 4);
68
@@ -XXX,XX +XXX,XX @@ static void connect_serial_hds_to_uarts(AspeedMachineState *bmc)
181
- aspeed_board_init_flashes(&s->bic.spi[1], "sst25vf032b", 2, 6);
69
AspeedMachineClass *amc = ASPEED_MACHINE_GET_CLASS(bmc);
182
+ aspeed_board_init_flashes(&soc->fmc, "sst25vf032b", 2, 2);
70
AspeedSoCState *s = &bmc->soc;
183
+ aspeed_board_init_flashes(&soc->spi[0], "sst25vf032b", 2, 4);
71
AspeedSoCClass *sc = ASPEED_SOC_GET_CLASS(s);
184
+ aspeed_board_init_flashes(&soc->spi[1], "sst25vf032b", 2, 6);
72
+ int uart_chosen = bmc->uart_chosen ? bmc->uart_chosen : amc->uart_default;
73
74
- aspeed_soc_uart_set_chr(s, amc->uart_default, serial_hd(0));
75
+ aspeed_soc_uart_set_chr(s, uart_chosen, serial_hd(0));
76
for (int i = 1, uart = ASPEED_DEV_UART1; i < sc->uarts_num; i++, uart++) {
77
- if (uart == amc->uart_default) {
78
+ if (uart == uart_chosen) {
79
continue;
80
}
81
aspeed_soc_uart_set_chr(s, uart, serial_hd(i));
82
@@ -XXX,XX +XXX,XX @@ static void aspeed_set_spi_model(Object *obj, const char *value, Error **errp)
83
bmc->spi_model = g_strdup(value);
84
}
185
}
85
186
86
+static char *aspeed_get_bmc_console(Object *obj, Error **errp)
187
static void fby35_init(MachineState *machine)
87
+{
88
+ AspeedMachineState *bmc = ASPEED_MACHINE(obj);
89
+ AspeedMachineClass *amc = ASPEED_MACHINE_GET_CLASS(bmc);
90
+ int uart_chosen = bmc->uart_chosen ? bmc->uart_chosen : amc->uart_default;
91
+
92
+ return g_strdup_printf("uart%d", uart_chosen - ASPEED_DEV_UART1 + 1);
93
+}
94
+
95
+static void aspeed_set_bmc_console(Object *obj, const char *value, Error **errp)
96
+{
97
+ AspeedMachineState *bmc = ASPEED_MACHINE(obj);
98
+ AspeedMachineClass *amc = ASPEED_MACHINE_GET_CLASS(bmc);
99
+ AspeedSoCClass *sc = ASPEED_SOC_CLASS(object_class_by_name(amc->soc_name));
100
+ int val;
101
+
102
+ if (sscanf(value, "uart%u", &val) != 1) {
103
+ error_setg(errp, "Bad value for \"uart\" property");
104
+ return;
105
+ }
106
+
107
+ /* The number of UART depends on the SoC */
108
+ if (val < 1 || val > sc->uarts_num) {
109
+ error_setg(errp, "\"uart\" should be in range [1 - %d]", sc->uarts_num);
110
+ return;
111
+ }
112
+ bmc->uart_chosen = ASPEED_DEV_UART1 + val - 1;
113
+}
114
+
115
static void aspeed_machine_class_props_init(ObjectClass *oc)
116
{
117
object_class_property_add_bool(oc, "execute-in-place",
118
@@ -XXX,XX +XXX,XX @@ static void aspeed_machine_class_props_init(ObjectClass *oc)
119
object_class_property_set_description(oc, "execute-in-place",
120
"boot directly from CE0 flash device");
121
122
+ object_class_property_add_str(oc, "bmc-console", aspeed_get_bmc_console,
123
+ aspeed_set_bmc_console);
124
+ object_class_property_set_description(oc, "bmc-console",
125
+ "Change the default UART to \"uartX\"");
126
+
127
object_class_property_add_str(oc, "fmc-model", aspeed_get_fmc_model,
128
aspeed_set_fmc_model);
129
object_class_property_set_description(oc, "fmc-model",
130
--
188
--
131
2.40.1
189
2.41.0
132
190
133
191
diff view generated by jsdifflib
1
This change completes commits 5aa281d757 ("aspeed: Introduce a
1
From: Philippe Mathieu-Daudé <philmd@linaro.org>
2
spi_boot region under the SoC") and 8b744a6a47 ("aspeed: Add a
2
3
boot_rom overlap region in the SoC spi_boot container") which
3
The v7-A cluster is specific to the Aspeed 2600 series,
4
introduced a spi_boot container at the SoC level to map the boot rom
4
remove it from the common AspeedSoCState.
5
region as an overlap.
5
6
6
The ARM cores belong to the MP cluster, but the array
7
It also fixes a Coverity report (CID 1508061) for a memory leak
7
is currently used by TYPE_ASPEED2600_SOC. We'll clean
8
warning when the QEMU process exits by using an bmc_boot_rom
8
that soon, but for now keep it in Aspeed2600SoCState.
9
MemoryRegion available at the machine level.
9
10
10
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
11
Cc: Peter Delevoryas <peter@pjd.dev>
11
Reviewed-by: Cédric Le Goater <clg@kaod.org>
12
Signed-off-by: Cédric Le Goater <clg@kaod.org>
13
Reviewed-by: Joel Stanley <joel@jms.id.au>
14
Signed-off-by: Cédric Le Goater <clg@kaod.org>
12
Signed-off-by: Cédric Le Goater <clg@kaod.org>
15
---
13
---
16
hw/arm/fby35.c | 29 +++++++++++++++--------------
14
include/hw/arm/aspeed_soc.h | 4 ++-
17
1 file changed, 15 insertions(+), 14 deletions(-)
15
hw/arm/aspeed_ast2600.c | 49 ++++++++++++++++++++-----------------
18
16
hw/arm/fby35.c | 14 ++++++-----
17
3 files changed, 37 insertions(+), 30 deletions(-)
18
19
diff --git a/include/hw/arm/aspeed_soc.h b/include/hw/arm/aspeed_soc.h
20
index XXXXXXX..XXXXXXX 100644
21
--- a/include/hw/arm/aspeed_soc.h
22
+++ b/include/hw/arm/aspeed_soc.h
23
@@ -XXX,XX +XXX,XX @@ struct AspeedSoCState {
24
DeviceState parent;
25
26
ARMCPU cpu[ASPEED_CPUS_NUM];
27
- A15MPPrivState a7mpcore;
28
MemoryRegion *memory;
29
MemoryRegion *dram_mr;
30
MemoryRegion dram_container;
31
@@ -XXX,XX +XXX,XX @@ OBJECT_DECLARE_SIMPLE_TYPE(Aspeed2400SoCState, ASPEED2400_SOC)
32
33
struct Aspeed2600SoCState {
34
AspeedSoCState parent;
35
+
36
+ A15MPPrivState a7mpcore;
37
+ ARMCPU cpu[ASPEED_CPUS_NUM]; /* XXX belong to a7mpcore */
38
};
39
40
#define TYPE_ASPEED2600_SOC "aspeed2600-soc"
41
diff --git a/hw/arm/aspeed_ast2600.c b/hw/arm/aspeed_ast2600.c
42
index XXXXXXX..XXXXXXX 100644
43
--- a/hw/arm/aspeed_ast2600.c
44
+++ b/hw/arm/aspeed_ast2600.c
45
@@ -XXX,XX +XXX,XX @@ static const int aspeed_soc_ast2600_irqmap[] = {
46
47
static qemu_irq aspeed_soc_ast2600_get_irq(AspeedSoCState *s, int dev)
48
{
49
+ Aspeed2600SoCState *a = ASPEED2600_SOC(s);
50
AspeedSoCClass *sc = ASPEED_SOC_GET_CLASS(s);
51
52
- return qdev_get_gpio_in(DEVICE(&s->a7mpcore), sc->irqmap[dev]);
53
+ return qdev_get_gpio_in(DEVICE(&a->a7mpcore), sc->irqmap[dev]);
54
}
55
56
static void aspeed_soc_ast2600_init(Object *obj)
57
{
58
+ Aspeed2600SoCState *a = ASPEED2600_SOC(obj);
59
AspeedSoCState *s = ASPEED_SOC(obj);
60
AspeedSoCClass *sc = ASPEED_SOC_GET_CLASS(s);
61
int i;
62
@@ -XXX,XX +XXX,XX @@ static void aspeed_soc_ast2600_init(Object *obj)
63
}
64
65
for (i = 0; i < sc->num_cpus; i++) {
66
- object_initialize_child(obj, "cpu[*]", &s->cpu[i], sc->cpu_type);
67
+ object_initialize_child(obj, "cpu[*]", &a->cpu[i], sc->cpu_type);
68
}
69
70
snprintf(typename, sizeof(typename), "aspeed.scu-%s", socname);
71
@@ -XXX,XX +XXX,XX @@ static void aspeed_soc_ast2600_init(Object *obj)
72
object_property_add_alias(obj, "hw-prot-key", OBJECT(&s->scu),
73
"hw-prot-key");
74
75
- object_initialize_child(obj, "a7mpcore", &s->a7mpcore,
76
+ object_initialize_child(obj, "a7mpcore", &a->a7mpcore,
77
TYPE_A15MPCORE_PRIV);
78
79
object_initialize_child(obj, "rtc", &s->rtc, TYPE_ASPEED_RTC);
80
@@ -XXX,XX +XXX,XX @@ static uint64_t aspeed_calc_affinity(int cpu)
81
static void aspeed_soc_ast2600_realize(DeviceState *dev, Error **errp)
82
{
83
int i;
84
+ Aspeed2600SoCState *a = ASPEED2600_SOC(dev);
85
AspeedSoCState *s = ASPEED_SOC(dev);
86
AspeedSoCClass *sc = ASPEED_SOC_GET_CLASS(s);
87
Error *err = NULL;
88
@@ -XXX,XX +XXX,XX @@ static void aspeed_soc_ast2600_realize(DeviceState *dev, Error **errp)
89
/* CPU */
90
for (i = 0; i < sc->num_cpus; i++) {
91
if (sc->num_cpus > 1) {
92
- object_property_set_int(OBJECT(&s->cpu[i]), "reset-cbar",
93
+ object_property_set_int(OBJECT(&a->cpu[i]), "reset-cbar",
94
ASPEED_A7MPCORE_ADDR, &error_abort);
95
}
96
- object_property_set_int(OBJECT(&s->cpu[i]), "mp-affinity",
97
+ object_property_set_int(OBJECT(&a->cpu[i]), "mp-affinity",
98
aspeed_calc_affinity(i), &error_abort);
99
100
- object_property_set_int(OBJECT(&s->cpu[i]), "cntfrq", 1125000000,
101
+ object_property_set_int(OBJECT(&a->cpu[i]), "cntfrq", 1125000000,
102
&error_abort);
103
- object_property_set_bool(OBJECT(&s->cpu[i]), "neon", false,
104
+ object_property_set_bool(OBJECT(&a->cpu[i]), "neon", false,
105
&error_abort);
106
- object_property_set_bool(OBJECT(&s->cpu[i]), "vfp-d32", false,
107
+ object_property_set_bool(OBJECT(&a->cpu[i]), "vfp-d32", false,
108
&error_abort);
109
- object_property_set_link(OBJECT(&s->cpu[i]), "memory",
110
+ object_property_set_link(OBJECT(&a->cpu[i]), "memory",
111
OBJECT(s->memory), &error_abort);
112
113
- if (!qdev_realize(DEVICE(&s->cpu[i]), NULL, errp)) {
114
+ if (!qdev_realize(DEVICE(&a->cpu[i]), NULL, errp)) {
115
return;
116
}
117
}
118
119
/* A7MPCORE */
120
- object_property_set_int(OBJECT(&s->a7mpcore), "num-cpu", sc->num_cpus,
121
+ object_property_set_int(OBJECT(&a->a7mpcore), "num-cpu", sc->num_cpus,
122
&error_abort);
123
- object_property_set_int(OBJECT(&s->a7mpcore), "num-irq",
124
+ object_property_set_int(OBJECT(&a->a7mpcore), "num-irq",
125
ROUND_UP(AST2600_MAX_IRQ + GIC_INTERNAL, 32),
126
&error_abort);
127
128
- sysbus_realize(SYS_BUS_DEVICE(&s->a7mpcore), &error_abort);
129
- aspeed_mmio_map(s, SYS_BUS_DEVICE(&s->a7mpcore), 0, ASPEED_A7MPCORE_ADDR);
130
+ sysbus_realize(SYS_BUS_DEVICE(&a->a7mpcore), &error_abort);
131
+ aspeed_mmio_map(s, SYS_BUS_DEVICE(&a->a7mpcore), 0, ASPEED_A7MPCORE_ADDR);
132
133
for (i = 0; i < sc->num_cpus; i++) {
134
- SysBusDevice *sbd = SYS_BUS_DEVICE(&s->a7mpcore);
135
- DeviceState *d = DEVICE(&s->cpu[i]);
136
+ SysBusDevice *sbd = SYS_BUS_DEVICE(&a->a7mpcore);
137
+ DeviceState *d = DEVICE(&a->cpu[i]);
138
139
irq = qdev_get_gpio_in(d, ARM_CPU_IRQ);
140
sysbus_connect_irq(sbd, i, irq);
141
@@ -XXX,XX +XXX,XX @@ static void aspeed_soc_ast2600_realize(DeviceState *dev, Error **errp)
142
}
143
144
/* SRAM */
145
- sram_name = g_strdup_printf("aspeed.sram.%d", CPU(&s->cpu[0])->cpu_index);
146
+ sram_name = g_strdup_printf("aspeed.sram.%d", CPU(&a->cpu[0])->cpu_index);
147
memory_region_init_ram(&s->sram, OBJECT(s), sram_name, sc->sram_size, &err);
148
if (err) {
149
error_propagate(errp, err);
150
@@ -XXX,XX +XXX,XX @@ static void aspeed_soc_ast2600_realize(DeviceState *dev, Error **errp)
151
}
152
aspeed_mmio_map(s, SYS_BUS_DEVICE(&s->i2c), 0, sc->memmap[ASPEED_DEV_I2C]);
153
for (i = 0; i < ASPEED_I2C_GET_CLASS(&s->i2c)->num_busses; i++) {
154
- irq = qdev_get_gpio_in(DEVICE(&s->a7mpcore),
155
+ irq = qdev_get_gpio_in(DEVICE(&a->a7mpcore),
156
sc->irqmap[ASPEED_DEV_I2C] + i);
157
/* The AST2600 I2C controller has one IRQ per bus. */
158
sysbus_connect_irq(SYS_BUS_DEVICE(&s->i2c.busses[i]), 0, irq);
159
@@ -XXX,XX +XXX,XX @@ static void aspeed_soc_ast2600_realize(DeviceState *dev, Error **errp)
160
* offset 0.
161
*/
162
sysbus_connect_irq(SYS_BUS_DEVICE(&s->lpc), 1 + aspeed_lpc_kcs_1,
163
- qdev_get_gpio_in(DEVICE(&s->a7mpcore),
164
+ qdev_get_gpio_in(DEVICE(&a->a7mpcore),
165
sc->irqmap[ASPEED_DEV_KCS] + aspeed_lpc_kcs_1));
166
167
sysbus_connect_irq(SYS_BUS_DEVICE(&s->lpc), 1 + aspeed_lpc_kcs_2,
168
- qdev_get_gpio_in(DEVICE(&s->a7mpcore),
169
+ qdev_get_gpio_in(DEVICE(&a->a7mpcore),
170
sc->irqmap[ASPEED_DEV_KCS] + aspeed_lpc_kcs_2));
171
172
sysbus_connect_irq(SYS_BUS_DEVICE(&s->lpc), 1 + aspeed_lpc_kcs_3,
173
- qdev_get_gpio_in(DEVICE(&s->a7mpcore),
174
+ qdev_get_gpio_in(DEVICE(&a->a7mpcore),
175
sc->irqmap[ASPEED_DEV_KCS] + aspeed_lpc_kcs_3));
176
177
sysbus_connect_irq(SYS_BUS_DEVICE(&s->lpc), 1 + aspeed_lpc_kcs_4,
178
- qdev_get_gpio_in(DEVICE(&s->a7mpcore),
179
+ qdev_get_gpio_in(DEVICE(&a->a7mpcore),
180
sc->irqmap[ASPEED_DEV_KCS] + aspeed_lpc_kcs_4));
181
182
/* HACE */
183
@@ -XXX,XX +XXX,XX @@ static void aspeed_soc_ast2600_realize(DeviceState *dev, Error **errp)
184
}
185
aspeed_mmio_map(s, SYS_BUS_DEVICE(&s->i3c), 0, sc->memmap[ASPEED_DEV_I3C]);
186
for (i = 0; i < ASPEED_I3C_NR_DEVICES; i++) {
187
- irq = qdev_get_gpio_in(DEVICE(&s->a7mpcore),
188
+ irq = qdev_get_gpio_in(DEVICE(&a->a7mpcore),
189
sc->irqmap[ASPEED_DEV_I3C] + i);
190
/* The AST2600 I3C controller has one IRQ per bus. */
191
sysbus_connect_irq(SYS_BUS_DEVICE(&s->i3c.devices[i]), 0, irq);
19
diff --git a/hw/arm/fby35.c b/hw/arm/fby35.c
192
diff --git a/hw/arm/fby35.c b/hw/arm/fby35.c
20
index XXXXXXX..XXXXXXX 100644
193
index XXXXXXX..XXXXXXX 100644
21
--- a/hw/arm/fby35.c
194
--- a/hw/arm/fby35.c
22
+++ b/hw/arm/fby35.c
195
+++ b/hw/arm/fby35.c
196
@@ -XXX,XX +XXX,XX @@ struct Fby35State {
197
MemoryRegion bic_memory;
198
Clock *bic_sysclk;
199
200
- AspeedSoCState bmc;
201
+ Aspeed2600SoCState bmc;
202
Aspeed10x0SoCState bic;
203
204
bool mmio_exec;
23
@@ -XXX,XX +XXX,XX @@ static void fby35_bmc_write_boot_rom(DriveInfo *dinfo, MemoryRegion *mr,
205
@@ -XXX,XX +XXX,XX @@ static void fby35_bmc_write_boot_rom(DriveInfo *dinfo, MemoryRegion *mr,
24
206
25
static void fby35_bmc_init(Fby35State *s)
207
static void fby35_bmc_init(Fby35State *s)
26
{
208
{
27
- DriveInfo *drive0 = drive_get(IF_MTD, 0, 0);
209
+ AspeedSoCState *soc;
28
-
210
+
29
object_initialize_child(OBJECT(s), "bmc", &s->bmc, "ast2600-a3");
211
object_initialize_child(OBJECT(s), "bmc", &s->bmc, "ast2600-a3");
212
+ soc = ASPEED_SOC(&s->bmc);
30
213
31
memory_region_init(&s->bmc_memory, OBJECT(&s->bmc), "bmc-memory",
214
memory_region_init(&s->bmc_memory, OBJECT(&s->bmc), "bmc-memory",
215
UINT64_MAX);
32
@@ -XXX,XX +XXX,XX @@ static void fby35_bmc_init(Fby35State *s)
216
@@ -XXX,XX +XXX,XX @@ static void fby35_bmc_init(Fby35State *s)
33
aspeed_board_init_flashes(&s->bmc.fmc, "n25q00", 2, 0);
217
&error_abort);
218
object_property_set_int(OBJECT(&s->bmc), "hw-strap2", 0x00000003,
219
&error_abort);
220
- aspeed_soc_uart_set_chr(&s->bmc, ASPEED_DEV_UART5, serial_hd(0));
221
+ aspeed_soc_uart_set_chr(soc, ASPEED_DEV_UART5, serial_hd(0));
222
qdev_realize(DEVICE(&s->bmc), NULL, &error_abort);
223
224
- aspeed_board_init_flashes(&s->bmc.fmc, "n25q00", 2, 0);
225
+ aspeed_board_init_flashes(&soc->fmc, "n25q00", 2, 0);
34
226
35
/* Install first FMC flash content as a boot rom. */
227
/* Install first FMC flash content as a boot rom. */
36
- if (drive0) {
228
if (!s->mmio_exec) {
37
- AspeedSMCFlash *fl = &s->bmc.fmc.flashes[0];
229
DriveInfo *mtd0 = drive_get(IF_MTD, 0, 0);
38
- MemoryRegion *boot_rom = g_new(MemoryRegion, 1);
230
39
- uint64_t size = memory_region_size(&fl->mmio);
231
if (mtd0) {
40
-
232
- AspeedSoCState *bmc = &s->bmc;
41
- if (!s->mmio_exec) {
233
- uint64_t rom_size = memory_region_size(&bmc->spi_boot);
42
- memory_region_init_rom(boot_rom, NULL, "aspeed.boot_rom",
234
+ uint64_t rom_size = memory_region_size(&soc->spi_boot);
43
- size, &error_abort);
235
44
- memory_region_add_subregion(&s->bmc_memory, FBY35_BMC_FIRMWARE_ADDR,
236
memory_region_init_rom(&s->bmc_boot_rom, NULL, "aspeed.boot_rom",
45
- boot_rom);
237
rom_size, &error_abort);
46
- fby35_bmc_write_boot_rom(drive0, boot_rom, FBY35_BMC_FIRMWARE_ADDR,
238
- memory_region_add_subregion_overlap(&bmc->spi_boot_container, 0,
47
- size, &error_abort);
239
+ memory_region_add_subregion_overlap(&soc->spi_boot_container, 0,
48
+ if (!s->mmio_exec) {
240
&s->bmc_boot_rom, 1);
49
+ DriveInfo *mtd0 = drive_get(IF_MTD, 0, 0);
241
50
+
242
fby35_bmc_write_boot_rom(mtd0, &s->bmc_boot_rom,
51
+ if (mtd0) {
52
+ AspeedSoCState *bmc = &s->bmc;
53
+ uint64_t rom_size = memory_region_size(&bmc->spi_boot);
54
+
55
+ memory_region_init_rom(&s->bmc_boot_rom, NULL, "aspeed.boot_rom",
56
+ rom_size, &error_abort);
57
+ memory_region_add_subregion_overlap(&bmc->spi_boot_container, 0,
58
+ &s->bmc_boot_rom, 1);
59
+
60
+ fby35_bmc_write_boot_rom(mtd0, &s->bmc_boot_rom,
61
+ FBY35_BMC_FIRMWARE_ADDR,
62
+ rom_size, &error_abort);
63
}
64
}
65
}
66
--
243
--
67
2.40.1
244
2.41.0
68
245
69
246
diff view generated by jsdifflib
1
Cortex A7 CPUs with an FPU implementing VFPv4 without NEON support
1
From: Philippe Mathieu-Daudé <philmd@linaro.org>
2
have 16 64-bit FPU registers and not 32 registers. Let users set the
3
number of VFP registers with a CPU property.
4
2
5
The primary use case of this property is for the Cortex A7 of the
3
The ARM array and VIC peripheral are only used by the
6
Aspeed AST2600 SoC.
4
2400 series, remove them from the common AspeedSoCState.
7
5
8
Signed-off-by: Cédric Le Goater <clg@kaod.org>
6
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
9
Reviewed-by: Joel Stanley <joel@jms.id.au>
7
Reviewed-by: Cédric Le Goater <clg@kaod.org>
10
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
11
Signed-off-by: Cédric Le Goater <clg@kaod.org>
8
Signed-off-by: Cédric Le Goater <clg@kaod.org>
12
---
9
---
13
target/arm/cpu.h | 2 ++
10
include/hw/arm/aspeed_soc.h | 5 +++--
14
hw/arm/aspeed_ast2600.c | 2 ++
11
hw/arm/{aspeed_soc.c => aspeed_ast2400.c} | 27 +++++++++++++----------
15
target/arm/cpu.c | 32 ++++++++++++++++++++++++++++++++
12
hw/arm/meson.build | 2 +-
16
3 files changed, 36 insertions(+)
13
3 files changed, 19 insertions(+), 15 deletions(-)
14
rename hw/arm/{aspeed_soc.c => aspeed_ast2400.c} (95%)
17
15
18
diff --git a/target/arm/cpu.h b/target/arm/cpu.h
16
diff --git a/include/hw/arm/aspeed_soc.h b/include/hw/arm/aspeed_soc.h
19
index XXXXXXX..XXXXXXX 100644
17
index XXXXXXX..XXXXXXX 100644
20
--- a/target/arm/cpu.h
18
--- a/include/hw/arm/aspeed_soc.h
21
+++ b/target/arm/cpu.h
19
+++ b/include/hw/arm/aspeed_soc.h
22
@@ -XXX,XX +XXX,XX @@ struct ArchCPU {
20
@@ -XXX,XX +XXX,XX @@
23
bool has_pmu;
21
struct AspeedSoCState {
24
/* CPU has VFP */
22
DeviceState parent;
25
bool has_vfp;
23
26
+ /* CPU has 32 VFP registers */
24
- ARMCPU cpu[ASPEED_CPUS_NUM];
27
+ bool has_vfp_d32;
25
MemoryRegion *memory;
28
/* CPU has Neon */
26
MemoryRegion *dram_mr;
29
bool has_neon;
27
MemoryRegion dram_container;
30
/* CPU has M-profile DSP extension */
28
MemoryRegion sram;
31
diff --git a/hw/arm/aspeed_ast2600.c b/hw/arm/aspeed_ast2600.c
29
MemoryRegion spi_boot_container;
30
MemoryRegion spi_boot;
31
- AspeedVICState vic;
32
AspeedRtcState rtc;
33
AspeedTimerCtrlState timerctrl;
34
AspeedI2CState i2c;
35
@@ -XXX,XX +XXX,XX @@ OBJECT_DECLARE_TYPE(AspeedSoCState, AspeedSoCClass, ASPEED_SOC)
36
37
struct Aspeed2400SoCState {
38
AspeedSoCState parent;
39
+
40
+ ARMCPU cpu[ASPEED_CPUS_NUM];
41
+ AspeedVICState vic;
42
};
43
44
#define TYPE_ASPEED2400_SOC "aspeed2400-soc"
45
diff --git a/hw/arm/aspeed_soc.c b/hw/arm/aspeed_ast2400.c
46
similarity index 95%
47
rename from hw/arm/aspeed_soc.c
48
rename to hw/arm/aspeed_ast2400.c
32
index XXXXXXX..XXXXXXX 100644
49
index XXXXXXX..XXXXXXX 100644
33
--- a/hw/arm/aspeed_ast2600.c
50
--- a/hw/arm/aspeed_soc.c
34
+++ b/hw/arm/aspeed_ast2600.c
51
+++ b/hw/arm/aspeed_ast2400.c
35
@@ -XXX,XX +XXX,XX @@ static void aspeed_soc_ast2600_realize(DeviceState *dev, Error **errp)
52
@@ -XXX,XX +XXX,XX @@ static const int aspeed_soc_ast2400_irqmap[] = {
36
&error_abort);
53
37
object_property_set_bool(OBJECT(&s->cpu[i]), "neon", false,
54
static qemu_irq aspeed_soc_ast2400_get_irq(AspeedSoCState *s, int dev)
38
&error_abort);
55
{
39
+ object_property_set_bool(OBJECT(&s->cpu[i]), "vfp-d32", false,
56
+ Aspeed2400SoCState *a = ASPEED2400_SOC(s);
40
+ &error_abort);
57
AspeedSoCClass *sc = ASPEED_SOC_GET_CLASS(s);
41
object_property_set_link(OBJECT(&s->cpu[i]), "memory",
58
59
- return qdev_get_gpio_in(DEVICE(&s->vic), sc->irqmap[dev]);
60
+ return qdev_get_gpio_in(DEVICE(&a->vic), sc->irqmap[dev]);
61
}
62
63
static void aspeed_ast2400_soc_init(Object *obj)
64
{
65
+ Aspeed2400SoCState *a = ASPEED2400_SOC(obj);
66
AspeedSoCState *s = ASPEED_SOC(obj);
67
AspeedSoCClass *sc = ASPEED_SOC_GET_CLASS(s);
68
int i;
69
@@ -XXX,XX +XXX,XX @@ static void aspeed_ast2400_soc_init(Object *obj)
70
}
71
72
for (i = 0; i < sc->num_cpus; i++) {
73
- object_initialize_child(obj, "cpu[*]", &s->cpu[i], sc->cpu_type);
74
+ object_initialize_child(obj, "cpu[*]", &a->cpu[i], sc->cpu_type);
75
}
76
77
snprintf(typename, sizeof(typename), "aspeed.scu-%s", socname);
78
@@ -XXX,XX +XXX,XX @@ static void aspeed_ast2400_soc_init(Object *obj)
79
object_property_add_alias(obj, "hw-prot-key", OBJECT(&s->scu),
80
"hw-prot-key");
81
82
- object_initialize_child(obj, "vic", &s->vic, TYPE_ASPEED_VIC);
83
+ object_initialize_child(obj, "vic", &a->vic, TYPE_ASPEED_VIC);
84
85
object_initialize_child(obj, "rtc", &s->rtc, TYPE_ASPEED_RTC);
86
87
@@ -XXX,XX +XXX,XX @@ static void aspeed_ast2400_soc_init(Object *obj)
88
static void aspeed_ast2400_soc_realize(DeviceState *dev, Error **errp)
89
{
90
int i;
91
+ Aspeed2400SoCState *a = ASPEED2400_SOC(dev);
92
AspeedSoCState *s = ASPEED_SOC(dev);
93
AspeedSoCClass *sc = ASPEED_SOC_GET_CLASS(s);
94
Error *err = NULL;
95
@@ -XXX,XX +XXX,XX @@ static void aspeed_ast2400_soc_realize(DeviceState *dev, Error **errp)
96
97
/* CPU */
98
for (i = 0; i < sc->num_cpus; i++) {
99
- object_property_set_link(OBJECT(&s->cpu[i]), "memory",
100
+ object_property_set_link(OBJECT(&a->cpu[i]), "memory",
42
OBJECT(s->memory), &error_abort);
101
OBJECT(s->memory), &error_abort);
43
102
- if (!qdev_realize(DEVICE(&s->cpu[i]), NULL, errp)) {
44
diff --git a/target/arm/cpu.c b/target/arm/cpu.c
103
+ if (!qdev_realize(DEVICE(&a->cpu[i]), NULL, errp)) {
45
index XXXXXXX..XXXXXXX 100644
104
return;
46
--- a/target/arm/cpu.c
47
+++ b/target/arm/cpu.c
48
@@ -XXX,XX +XXX,XX @@ static Property arm_cpu_cfgend_property =
49
static Property arm_cpu_has_vfp_property =
50
DEFINE_PROP_BOOL("vfp", ARMCPU, has_vfp, true);
51
52
+static Property arm_cpu_has_vfp_d32_property =
53
+ DEFINE_PROP_BOOL("vfp-d32", ARMCPU, has_vfp_d32, true);
54
+
55
static Property arm_cpu_has_neon_property =
56
DEFINE_PROP_BOOL("neon", ARMCPU, has_neon, true);
57
58
@@ -XXX,XX +XXX,XX @@ void arm_cpu_post_init(Object *obj)
59
}
105
}
60
}
106
}
61
107
62
+ if (cpu->has_vfp && cpu_isar_feature(aa32_simd_r32, cpu)) {
108
/* SRAM */
63
+ cpu->has_vfp_d32 = true;
109
- sram_name = g_strdup_printf("aspeed.sram.%d", CPU(&s->cpu[0])->cpu_index);
64
+ if (!kvm_enabled()) {
110
+ sram_name = g_strdup_printf("aspeed.sram.%d", CPU(&a->cpu[0])->cpu_index);
65
+ /*
111
memory_region_init_ram(&s->sram, OBJECT(s), sram_name, sc->sram_size, &err);
66
+ * The permitted values of the SIMDReg bits [3:0] on
112
if (err) {
67
+ * Armv8-A are either 0b0000 and 0b0010. On such CPUs,
113
error_propagate(errp, err);
68
+ * make sure that has_vfp_d32 can not be set to false.
114
@@ -XXX,XX +XXX,XX @@ static void aspeed_ast2400_soc_realize(DeviceState *dev, Error **errp)
69
+ */
115
aspeed_mmio_map(s, SYS_BUS_DEVICE(&s->scu), 0, sc->memmap[ASPEED_DEV_SCU]);
70
+ if (!(arm_feature(&cpu->env, ARM_FEATURE_V8) &&
116
71
+ !arm_feature(&cpu->env, ARM_FEATURE_M))) {
117
/* VIC */
72
+ qdev_property_add_static(DEVICE(obj),
118
- if (!sysbus_realize(SYS_BUS_DEVICE(&s->vic), errp)) {
73
+ &arm_cpu_has_vfp_d32_property);
119
+ if (!sysbus_realize(SYS_BUS_DEVICE(&a->vic), errp)) {
74
+ }
75
+ }
76
+ }
77
+
78
if (arm_feature(&cpu->env, ARM_FEATURE_NEON)) {
79
cpu->has_neon = true;
80
if (!kvm_enabled()) {
81
@@ -XXX,XX +XXX,XX @@ static void arm_cpu_realizefn(DeviceState *dev, Error **errp)
82
return;
120
return;
83
}
121
}
84
122
- aspeed_mmio_map(s, SYS_BUS_DEVICE(&s->vic), 0, sc->memmap[ASPEED_DEV_VIC]);
85
+ if (cpu->has_vfp_d32 != cpu->has_neon) {
123
- sysbus_connect_irq(SYS_BUS_DEVICE(&s->vic), 0,
86
+ error_setg(errp, "ARM CPUs must have both VFP-D32 and Neon or neither");
124
- qdev_get_gpio_in(DEVICE(&s->cpu), ARM_CPU_IRQ));
87
+ return;
125
- sysbus_connect_irq(SYS_BUS_DEVICE(&s->vic), 1,
88
+ }
126
- qdev_get_gpio_in(DEVICE(&s->cpu), ARM_CPU_FIQ));
89
+
127
+ aspeed_mmio_map(s, SYS_BUS_DEVICE(&a->vic), 0, sc->memmap[ASPEED_DEV_VIC]);
90
+ if (!cpu->has_vfp_d32) {
128
+ sysbus_connect_irq(SYS_BUS_DEVICE(&a->vic), 0,
91
+ uint32_t u;
129
+ qdev_get_gpio_in(DEVICE(&a->cpu), ARM_CPU_IRQ));
92
+
130
+ sysbus_connect_irq(SYS_BUS_DEVICE(&a->vic), 1,
93
+ u = cpu->isar.mvfr0;
131
+ qdev_get_gpio_in(DEVICE(&a->cpu), ARM_CPU_FIQ));
94
+ u = FIELD_DP32(u, MVFR0, SIMDREG, 1); /* 16 registers */
132
95
+ cpu->isar.mvfr0 = u;
133
/* RTC */
96
+ }
134
if (!sysbus_realize(SYS_BUS_DEVICE(&s->rtc), errp)) {
97
+
135
diff --git a/hw/arm/meson.build b/hw/arm/meson.build
98
if (!cpu->has_vfp) {
136
index XXXXXXX..XXXXXXX 100644
99
uint64_t t;
137
--- a/hw/arm/meson.build
100
uint32_t u;
138
+++ b/hw/arm/meson.build
139
@@ -XXX,XX +XXX,XX @@ arm_ss.add(when: 'CONFIG_FSL_IMX25', if_true: files('fsl-imx25.c', 'imx25_pdk.c'
140
arm_ss.add(when: 'CONFIG_FSL_IMX31', if_true: files('fsl-imx31.c', 'kzm.c'))
141
arm_ss.add(when: 'CONFIG_FSL_IMX6', if_true: files('fsl-imx6.c'))
142
arm_ss.add(when: 'CONFIG_ASPEED_SOC', if_true: files(
143
- 'aspeed_soc.c',
144
'aspeed.c',
145
'aspeed_soc_common.c',
146
+ 'aspeed_ast2400.c',
147
'aspeed_ast2600.c',
148
'aspeed_ast10x0.c',
149
'aspeed_eeprom.c',
101
--
150
--
102
2.40.1
151
2.41.0
103
152
104
153
diff view generated by jsdifflib