Skip to content

Commit f41af4c

Browse files
committed
Merge tag 'pull-target-arm-20250220' of https://git.linaro.org/people/pmaydell/qemu-arm into staging
target-arm queue: * Fix some incorrect syndrome values in various sysreg traps * Clean up sysreg trap code to avoid similar future bugs * Make boards/SoCs using a9mpcore and a15mpcore objects specify number of GIC interrupts explicitly * Kconfig: Extract CONFIG_USB_CHIPIDEA from CONFIG_IMX * target/arm: Use uint32_t in t32_expandimm_imm() * New board model: NPCM845 Evaluation board "npcm845-evb" # -----BEGIN PGP SIGNATURE----- # # iQJNBAABCAA3FiEE4aXFk81BneKOgxXPPCUl7RQ2DN4FAme3Vk8ZHHBldGVyLm1h # eWRlbGxAbGluYXJvLm9yZwAKCRA8JSXtFDYM3t8QD/48yOUtFwUMFrwbbszK5rss # Ghhtk0ylKIxPQirgzjLUNq4hV2MZEtdmyiqaEllvA0aS839oWhFW0hbsGmoL/TVF # tqXVP3Y1dMubmNHCGcgiFqaxaInnNSC9S1ALiEm5a37g519706WLXPVLqJJ9t31b # uWHKT1hqxstzWSExhGrEkSEghcgN3u1KyCz0zyq9bk/F3OFWZfHNH6JqutQX18Ua # 5HtcD1Pum6WjayBc3y4AYVYH4xyQclY7LPR+zKNf2d5GuZ+J6MlXMyfCuE2/J//m # wHAtAoeuFhi/HFHR4vQP4L7HrhFrECbjfWha85F/rmiOAo6LnbICyPt4tAPe5So3 # FCtSHfht9ToulBqULE+F/AWVCdt8UeDRgOANSHFsMkxYiUK8QpMv8A2AtwJUqiMp # WbAzw31f6SgANgFQObhoRNE3QyX8V53ZJAsPhDooTxwMiglqVTM3Xux8W2zz9FdU # BTwCy23efBqKf4RWfeHjAXctGshePI1mTBJmvEKG5G5ligMNeg7ZiQqqfRVBagc/ # gpsQKNjpN9MVVds3thUvMCYO/9NOeeAtcVA2vW7qf7HrYaM72UngCPWjhNfAj/9I # 9hxgqEnKC6qoD/zMyFv+XwqNlL1PuD79rbvN8TWFd/f8iBIYOY6WVEYmsi7WGugI # WzYI93RqFaQhrpyHDcRVGw== # =djUd # -----END PGP SIGNATURE----- # gpg: Signature made Fri 21 Feb 2025 00:20:31 HKT # gpg: using RSA key E1A5C593CD419DE28E8315CF3C2525ED14360CDE # gpg: issuer "[email protected]" # gpg: Good signature from "Peter Maydell <[email protected]>" [full] # gpg: aka "Peter Maydell <[email protected]>" [full] # gpg: aka "Peter Maydell <[email protected]>" [full] # gpg: aka "Peter Maydell <[email protected]>" [unknown] # Primary key fingerprint: E1A5 C593 CD41 9DE2 8E83 15CF 3C25 25ED 1436 0CDE * tag 'pull-target-arm-20250220' of https://git.linaro.org/people/pmaydell/qemu-arm: (41 commits) docs/system/arm: Add Description for NPCM8XX SoC hw/arm: Add NPCM845 Evaluation board hw/arm: Add NPCM8XX SoC hw/net: Add NPCM8XX PCS Module hw/misc: Support NPCM8XX CLK Module Registers hw/misc: Add nr_regs and cold_reset_values to NPCM CLK hw/misc: Move NPCM7XX CLK to NPCM CLK hw/misc: Rename npcm7xx_clk to npcm_clk hw/misc: Support 8-bytes memop in NPCM GCR module hw/misc: Store DRAM size in NPCM8XX GCR Module hw/misc: Add support for NPCM8XX GCR hw/misc: Add nr_regs and cold_reset_values to NPCM GCR hw/misc: Move NPCM7XX GCR to NPCM GCR hw/misc: Rename npcm7xx_gcr to npcm_gcr hw/ssi: Make flash size a property in NPCM7XX FIU pc-bios: Add NPCM8XX vBootrom roms: Update vbootrom to 1287b6e target/arm: Use uint32_t in t32_expandimm_imm() Kconfig: Extract CONFIG_USB_CHIPIDEA from CONFIG_IMX hw/cpu/arm_mpcore: Remove default values for GIC external IRQs ... Signed-off-by: Stefan Hajnoczi <[email protected]>
2 parents 40efe73 + 1c31691 commit f41af4c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+2624
-495
lines changed

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -878,6 +878,7 @@ F: include/hw/*/npcm*
878878
F: tests/qtest/npcm*
879879
F: tests/qtest/adm1266-test.c
880880
F: pc-bios/npcm7xx_bootrom.bin
881+
F: pc-bios/npcm8xx_bootrom.bin
881882
F: roms/vbootrom
882883
F: docs/system/arm/nuvoton.rst
883884
F: tests/functional/test_arm_quanta_gsj.py

configs/devices/aarch64-softmmu/default.mak

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ include ../arm-softmmu/default.mak
88
# CONFIG_XLNX_ZYNQMP_ARM=n
99
# CONFIG_XLNX_VERSAL=n
1010
# CONFIG_SBSA_REF=n
11+
# CONFIG_NPCM8XX=n

docs/system/arm/nuvoton.rst

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
Nuvoton iBMC boards (``kudo-bmc``, ``mori-bmc``, ``npcm750-evb``, ``quanta-gbs-bmc``, ``quanta-gsj``)
2-
=====================================================================================================
1+
Nuvoton iBMC boards (``kudo-bmc``, ``mori-bmc``, ``npcm750-evb``, ``quanta-gbs-bmc``, ``quanta-gsj``, ``npcm845-evb``)
2+
======================================================================================================================
33

4-
The `Nuvoton iBMC`_ chips (NPCM7xx) are a family of ARM-based SoCs that are
4+
The `Nuvoton iBMC`_ chips are a family of Arm-based SoCs that are
55
designed to be used as Baseboard Management Controllers (BMCs) in various
6-
servers. They all feature one or two ARM Cortex-A9 CPU cores, as well as an
7-
assortment of peripherals targeted for either Enterprise or Data Center /
8-
Hyperscale applications. The former is a superset of the latter, so NPCM750 has
9-
all the peripherals of NPCM730 and more.
6+
servers. Currently there are two families: NPCM7XX series and
7+
NPCM8XX series. NPCM7XX series feature one or two Arm Cortex-A9 CPU cores,
8+
while NPCM8XX feature 4 Arm Cortex-A35 CPU cores. Both series contain a
9+
different assortment of peripherals targeted for either Enterprise or Data
10+
Center / Hyperscale applications.
1011

1112
.. _Nuvoton iBMC: https://www.nuvoton.com/products/cloud-computing/ibmc/
1213

@@ -27,6 +28,11 @@ There are also two more SoCs, NPCM710 and NPCM705, which are single-core
2728
variants of NPCM750 and NPCM730, respectively. These are currently not
2829
supported by QEMU.
2930

31+
The NPCM8xx SoC is the successor of the NPCM7xx SoC. It has 4 Cortex-A35 cores.
32+
The following machines are based on this chip :
33+
34+
- ``npcm845-evb`` Nuvoton NPCM845 Evaluation board
35+
3036
Supported devices
3137
-----------------
3238

@@ -62,6 +68,8 @@ Missing devices
6268
* System Wake-up Control (SWC)
6369
* Shared memory (SHM)
6470
* eSPI slave interface
71+
* Block-transfer interface (8XX only)
72+
* Virtual UART (8XX only)
6573

6674
* Ethernet controller (GMAC)
6775
* USB device (USBD)
@@ -76,6 +84,11 @@ Missing devices
7684
* Video capture
7785
* Encoding compression engine
7886
* Security features
87+
* I3C buses (8XX only)
88+
* Temperature sensor interface (8XX only)
89+
* Virtual UART (8XX only)
90+
* Flash monitor (8XX only)
91+
* JTAG master (8XX only)
7992

8093
Boot options
8194
------------

hw/arm/Kconfig

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ config ZYNQ
303303
select PL330
304304
select SDHCI
305305
select SSI_M25P80
306-
select USB_EHCI_SYSBUS
306+
select USB_CHIPIDEA
307307
select XILINX # UART
308308
select XILINX_AXI
309309
select XILINX_SPI
@@ -481,6 +481,19 @@ config NPCM7XX
481481
select PCA954X
482482
select USB_OHCI_SYSBUS
483483

484+
config NPCM8XX
485+
bool
486+
default y
487+
depends on TCG && AARCH64
488+
select ARM_GIC
489+
select SMBUS
490+
select PL310 # cache controller
491+
select NPCM7XX
492+
select SERIAL
493+
select SSI
494+
select UNIMP
495+
496+
484497
config FSL_IMX25
485498
bool
486499
default y
@@ -489,6 +502,7 @@ config FSL_IMX25
489502
select IMX
490503
select IMX_FEC
491504
select IMX_I2C
505+
select USB_CHIPIDEA
492506
select WDT_IMX2
493507
select SDHCI
494508

@@ -516,6 +530,7 @@ config FSL_IMX6
516530
select PL310 # cache controller
517531
select PCI_EXPRESS_DESIGNWARE
518532
select SDHCI
533+
select USB_CHIPIDEA
519534
select OR_IRQ
520535

521536
config ASPEED_SOC
@@ -576,6 +591,7 @@ config FSL_IMX7
576591
select SDHCI
577592
select OR_IRQ
578593
select UNIMP
594+
select USB_CHIPIDEA
579595

580596
config ARM_SMMUV3
581597
bool
@@ -591,6 +607,7 @@ config FSL_IMX6UL
591607
select IMX_I2C
592608
select WDT_IMX2
593609
select SDHCI
610+
select USB_CHIPIDEA
594611
select UNIMP
595612

596613
config MICROBIT

hw/arm/exynos4210.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@
103103
#define EXYNOS4210_PL330_BASE1_ADDR 0x12690000
104104
#define EXYNOS4210_PL330_BASE2_ADDR 0x12850000
105105

106+
#define GIC_EXT_IRQS 64 /* FIXME: verify for this SoC */
107+
106108
enum ExtGicId {
107109
EXT_GIC_ID_MDMA_LCD0 = 66,
108110
EXT_GIC_ID_PDMA0,
@@ -394,7 +396,8 @@ static void exynos4210_init_board_irqs(Exynos4210State *s)
394396
}
395397
if (irq_id) {
396398
qdev_connect_gpio_out(splitter, splitin,
397-
qdev_get_gpio_in(extgicdev, irq_id - 32));
399+
qdev_get_gpio_in(extgicdev,
400+
irq_id - GIC_INTERNAL));
398401
}
399402
}
400403
for (; n < EXYNOS4210_MAX_INT_COMBINER_IN_IRQ; n++) {
@@ -421,7 +424,8 @@ static void exynos4210_init_board_irqs(Exynos4210State *s)
421424
s->irq_table[n] = qdev_get_gpio_in(splitter, 0);
422425
qdev_connect_gpio_out(splitter, 0, qdev_get_gpio_in(intcdev, n));
423426
qdev_connect_gpio_out(splitter, 1,
424-
qdev_get_gpio_in(extgicdev, irq_id - 32));
427+
qdev_get_gpio_in(extgicdev,
428+
irq_id - GIC_INTERNAL));
425429
} else {
426430
s->irq_table[n] = qdev_get_gpio_in(intcdev, n);
427431
}
@@ -586,6 +590,8 @@ static void exynos4210_realize(DeviceState *socdev, Error **errp)
586590

587591
/* Private memory region and Internal GIC */
588592
qdev_prop_set_uint32(DEVICE(&s->a9mpcore), "num-cpu", EXYNOS4210_NCPUS);
593+
qdev_prop_set_uint32(DEVICE(&s->a9mpcore), "num-irq",
594+
GIC_EXT_IRQS + GIC_INTERNAL);
589595
busdev = SYS_BUS_DEVICE(&s->a9mpcore);
590596
sysbus_realize(busdev, &error_fatal);
591597
sysbus_mmio_map(busdev, 0, EXYNOS4210_SMP_PRIVATE_BASE_ADDR);

hw/arm/highbank.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
#define MVBAR_ADDR 0x200
4646
#define BOARD_SETUP_ADDR (MVBAR_ADDR + 8 * sizeof(uint32_t))
4747

48-
#define NIRQ_GIC 160
48+
#define GIC_EXT_IRQS 128 /* EnergyCore ECX-1000 & ECX-2000 */
4949

5050
/* Board init. */
5151

@@ -180,7 +180,7 @@ static void calxeda_init(MachineState *machine, enum cxmachines machine_id)
180180
{
181181
DeviceState *dev = NULL;
182182
SysBusDevice *busdev;
183-
qemu_irq pic[128];
183+
qemu_irq pic[GIC_EXT_IRQS];
184184
int n;
185185
unsigned int smp_cpus = machine->smp.cpus;
186186
qemu_irq cpu_irq[4];
@@ -260,7 +260,7 @@ static void calxeda_init(MachineState *machine, enum cxmachines machine_id)
260260
break;
261261
}
262262
qdev_prop_set_uint32(dev, "num-cpu", smp_cpus);
263-
qdev_prop_set_uint32(dev, "num-irq", NIRQ_GIC);
263+
qdev_prop_set_uint32(dev, "num-irq", GIC_EXT_IRQS + GIC_INTERNAL);
264264
busdev = SYS_BUS_DEVICE(dev);
265265
sysbus_realize_and_unref(busdev, &error_fatal);
266266
sysbus_mmio_map(busdev, 0, MPCORE_PERIPHBASE);
@@ -271,7 +271,7 @@ static void calxeda_init(MachineState *machine, enum cxmachines machine_id)
271271
sysbus_connect_irq(busdev, n + 3 * smp_cpus, cpu_vfiq[n]);
272272
}
273273

274-
for (n = 0; n < 128; n++) {
274+
for (n = 0; n < GIC_EXT_IRQS; n++) {
275275
pic[n] = qdev_get_gpio_in(dev, n);
276276
}
277277

hw/arm/meson.build

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ arm_ss.add(when: 'CONFIG_MUSICPAL', if_true: files('musicpal.c'))
1212
arm_ss.add(when: 'CONFIG_NETDUINOPLUS2', if_true: files('netduinoplus2.c'))
1313
arm_ss.add(when: 'CONFIG_OLIMEX_STM32_H405', if_true: files('olimex-stm32-h405.c'))
1414
arm_ss.add(when: 'CONFIG_NPCM7XX', if_true: files('npcm7xx.c', 'npcm7xx_boards.c'))
15+
arm_ss.add(when: 'CONFIG_NPCM8XX', if_true: files('npcm8xx.c', 'npcm8xx_boards.c'))
1516
arm_ss.add(when: 'CONFIG_REALVIEW', if_true: files('realview.c'))
1617
arm_ss.add(when: 'CONFIG_SBSA_REF', if_true: files('sbsa-ref.c'))
1718
arm_ss.add(when: 'CONFIG_STELLARIS', if_true: files('stellaris.c'))

hw/arm/npcm7xx.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,17 +292,21 @@ static const struct {
292292
hwaddr regs_addr;
293293
int cs_count;
294294
const hwaddr *flash_addr;
295+
size_t flash_size;
295296
} npcm7xx_fiu[] = {
296297
{
297298
.name = "fiu0",
298299
.regs_addr = 0xfb000000,
299300
.cs_count = ARRAY_SIZE(npcm7xx_fiu0_flash_addr),
300301
.flash_addr = npcm7xx_fiu0_flash_addr,
302+
.flash_size = 128 * MiB,
303+
301304
}, {
302305
.name = "fiu3",
303306
.regs_addr = 0xc0000000,
304307
.cs_count = ARRAY_SIZE(npcm7xx_fiu3_flash_addr),
305308
.flash_addr = npcm7xx_fiu3_flash_addr,
309+
.flash_size = 128 * MiB,
306310
},
307311
};
308312

@@ -735,6 +739,8 @@ static void npcm7xx_realize(DeviceState *dev, Error **errp)
735739

736740
object_property_set_int(OBJECT(sbd), "cs-count",
737741
npcm7xx_fiu[i].cs_count, &error_abort);
742+
object_property_set_int(OBJECT(sbd), "flash-size",
743+
npcm7xx_fiu[i].flash_size, &error_abort);
738744
sysbus_realize(sbd, &error_abort);
739745

740746
sysbus_mmio_map(sbd, 0, npcm7xx_fiu[i].regs_addr);

0 commit comments

Comments
 (0)