aspeed queue
The following changes since commit fb241d0a1fd36a1b67ecced29d8b533316cf9e2d:
Merge tag 'staging-pull-request' of https://gitlab.com/peterx/qemu into staging (2025-11-23 11:46:53 -0800)
are available in the Git repository at:
https://github.com/legoater/qemu/ tags/pull-aspeed-20251124
for you to fetch changes up to e9a8b04dbb98fba7942b23b3ac5c35f2f0b9c4a0:
hw/pci-host/aspeed_pcie: Update ASPEED PCIe Root Port capabilities and enable MSI to support hotplug (2025-11-24 07:52:42 +0100)
----------------------------------------------------------------
aspeed queue:
* Fixed typo in the AST2700 LTPI device
* Fixed missing wiring of the SPI IRQ in AST10x0, AST2600, AST2700 SoCs
* Updated ASPEED PCIe Root Port capabilities and MSI support
----------------------------------------------------------------
Jamin Lin (2):
hw/arm/aspeed: Fix missing SPI IRQ connection causing DMA interrupt failure hw/pci-host/aspeed_pcie: Update ASPEED PCIe Root Port capabilities and enable MSI to support hotplug
Nabih Estefan (1):
hw/arm/ast27x0: Fix typo in LTPI address
hw/arm/aspeed_ast10x0.c | 2 ++ hw/arm/aspeed_ast2600.c | 2 ++ hw/arm/aspeed_ast27x0.c | 4 +++- hw/pci-host/aspeed_pcie.c | 40 +++++++++++++++++++++++++++++++++++++++- 4 files changed, 46 insertions(+), 2 deletions(-)
[PULL 1/3] hw/arm/ast27x0: Fix typo in LTPI address
From: Nabih Estefan <[email protected]>
The address for LTPI has one more 0 that it should, bug introduced in commit 91064bea6b2d747a981cb3bd2904e56f443e6c67.
--- hw/arm/aspeed_ast27x0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/arm/aspeed_ast27x0.c +1 -1
@@ -87,11 +87,11 @@ static const hwaddr aspeed_soc_ast2700_memmap[] = { [ASPEED_DEV_UART11] = 0x14C33A00, [ASPEED_DEV_UART12] = 0x14C33B00, [ASPEED_DEV_WDT] = 0x14C37000, + [ASPEED_DEV_LTPI] = 0x30000000, [ASPEED_DEV_PCIE_MMIO0] = 0x60000000, [ASPEED_DEV_PCIE_MMIO1] = 0x80000000, [ASPEED_DEV_PCIE_MMIO2] = 0xA0000000, [ASPEED_DEV_SPI_BOOT] = 0x100000000, - [ASPEED_DEV_LTPI] = 0x300000000, [ASPEED_DEV_SDRAM] = 0x400000000, };
Signature · 1 line
2.51.1
[PULL 3/3] hw/pci-host/aspeed_pcie: Update ASPEED PCIe Root Port capabilities and enable MSI to support hotplug
In reply to Cédric Le GoaterFrom: Jamin Lin <[email protected]>
This patch updates the ASPEED PCIe Root Port capability layout and interrupt handling to match the hardware-defined capability structure as documented in the PCI Express Controller (PCIE) chapter of the ASPEED SoC datasheet.
The following capability offsets and fields are now aligned with the actual hardware implementation (validated using EVB config-space dumps via 'lspci -s <bdf> -vvv'):
- Added MSI capability at offset 0x50 and enabled 1-vector MSI support
- Added PCI Express Capability structure at offset 0x80
- Added Secondary Subsystem Vendor ID (SSVID) at offset 0xC0
- Added AER capability at offset 0x100
- Implemented aer_vector() callback and MSI init/uninit hooks
- Updated Root Port SSID to 0x1150 to reflect the platform default
Enabling MSI is required for proper PCIe Hotplug event signaling. This change improves correctness and ensures QEMU Root Port behavior matches the behavior of ASPEED hardware and downstream kernel expectations.
--- hw/pci-host/aspeed_pcie.c | 40 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-)
hw/pci-host/aspeed_pcie.c +39 -1
@@ -68,6 +68,38 @@ static const TypeInfo aspeed_pcie_root_device_info = {* PCIe Root Port */ +#define ASPEED_PCIE_ROOT_PORT_MSI_OFFSET 0x50 +#define ASPEED_PCIE_ROOT_PORT_MSI_NR_VECTOR 1 +#define ASPEED_PCIE_ROOT_PORT_SSVID_OFFSET 0xC0 +#define ASPEED_PCIE_ROOT_PORT_EXP_OFFSET 0x80 +#define ASPEED_PCIE_ROOT_PORT_AER_OFFSET 0x100 + +static uint8_t aspeed_pcie_root_port_aer_vector (const PCIDevice *d) +{ +return 0 ; +} + +static int aspeed_pcie_root_port_interrupts_init (PCIDevice *d,Error **errp) +{ +int rc; + + rc =msi_init (d,ASPEED_PCIE_ROOT_PORT_MSI_OFFSET , +ASPEED_PCIE_ROOT_PORT_MSI_NR_VECTOR , +PCI_MSI_FLAGS_MASKBIT &PCI_MSI_FLAGS_64BIT , +PCI_MSI_FLAGS_MASKBIT &PCI_MSI_FLAGS_MASKBIT , + errp); +if (rc <0 ) { +assert (rc == -ENOTSUP ); + } + +return rc; +} + +static void aspeed_pcie_root_port_interrupts_uninit (PCIDevice *d) +{ +msi_uninit (d); +} +static void aspeed_pcie_root_port_class_init (ObjectClass *klass,const void *data) {
@@ -80,7 +112,13 @@ static void aspeed_pcie_root_port_class_init(ObjectClass *klass, k->device_id =0x1150 ; dc->user_creatable = true; - rpc->aer_offset =0x100 ; + rpc->aer_vector = aspeed_pcie_root_port_aer_vector; + rpc->interrupts_init = aspeed_pcie_root_port_interrupts_init; + rpc->interrupts_uninit = aspeed_pcie_root_port_interrupts_uninit; + rpc->exp_offset =ASPEED_PCIE_ROOT_PORT_EXP_OFFSET ; + rpc->aer_offset =ASPEED_PCIE_ROOT_PORT_AER_OFFSET ; + rpc->ssvid_offset =ASPEED_PCIE_ROOT_PORT_SSVID_OFFSET ; + rpc->ssid =0x1150 ; }static const TypeInfo aspeed_pcie_root_port_info = {
Signature · 1 line
2.51.1
[PULL 2/3] hw/arm/aspeed: Fix missing SPI IRQ connection causing DMA interrupt failure
In reply to Cédric Le GoaterFrom: Jamin Lin <[email protected]>
It did not connect SPI IRQ to the Interrupt Controller, so even the SPI model raised the IRQ, the interrupt was not received. The CPU therefore did not trigger an interrupt via the controller, and the firmware never received the interrupt.
--- hw/arm/aspeed_ast10x0.c | 2 ++ hw/arm/aspeed_ast2600.c | 2 ++ hw/arm/aspeed_ast27x0.c | 2 ++ 3 files changed, 6 insertions(+)
hw/arm/aspeed_ast10x0.c +2 -0
@@ -372,6 +372,8 @@ static void aspeed_soc_ast1030_realize(DeviceState *dev_soc, Error **errp) sc->memmap[ASPEED_DEV_SPI1 + i]);aspeed_mmio_map (s->memory,SYS_BUS_DEVICE (&s->spi[i]),1 ,ASPEED_SMC_GET_CLASS (&s->spi[i])->flash_window_base); +sysbus_connect_irq (SYS_BUS_DEVICE (&s->spi[i]),0 , +aspeed_soc_ast1030_get_irq (s,ASPEED_DEV_SPI1 + i)); }/* Secure Boot Controller */
hw/arm/aspeed_ast2600.c +2 -0
@@ -557,6 +557,8 @@ static void aspeed_soc_ast2600_realize(DeviceState *dev, Error **errp) sc->memmap[ASPEED_DEV_SPI1 + i]);aspeed_mmio_map (s->memory,SYS_BUS_DEVICE (&s->spi[i]),1 ,ASPEED_SMC_GET_CLASS (&s->spi[i])->flash_window_base); +sysbus_connect_irq (SYS_BUS_DEVICE (&s->spi[i]),0 , +aspeed_soc_ast2600_get_irq (s,ASPEED_DEV_SPI1 + i)); }/* EHCI */
hw/arm/aspeed_ast27x0.c +2 -0
@@ -831,6 +831,8 @@ static void aspeed_soc_ast2700_realize(DeviceState *dev, Error **errp) sc->memmap[ASPEED_DEV_SPI0 + i]);aspeed_mmio_map (s->memory,SYS_BUS_DEVICE (&s->spi[i]),1 ,ASPEED_SMC_GET_CLASS (&s->spi[i])->flash_window_base); +sysbus_connect_irq (SYS_BUS_DEVICE (&s->spi[i]),0 , +aspeed_soc_ast2700_get_irq (s,ASPEED_DEV_SPI0 + i)); }/* EHCI */
Signature · 1 line
2.51.1
Richard Henderson
AppliedQuoted 10 lines · Cédric Le Goater
The following changes since commit
fb241d0a1fd36a1b67ecced29d8b533316cf9e2d:Merge tag 'staging-pull-request' ofhttps://gitlab.com/peterx/qemu into staging (2025-11-23 11:46:53 -0800)are available in the Git repository at:
https://github.com/legoater/qemu/ tags/pull-aspeed-20251124for you to fetch changes up to
e9a8b04dbb98fba7942b23b3ac5c35f2f0b9c4a0:
Quoted 8 lines
hw/pci-host/aspeed_pcie: Update ASPEED PCIe Root Port capabilities and enable MSI to support hotplug (2025-11-24 07:52:42 +0100)
----------------------------------------------------------------
aspeed queue:* Fixed typo in the AST2700 LTPI device
* Fixed missing wiring of the SPI IRQ in AST10x0, AST2600, AST2700 SoCs
* Updated ASPEED PCIe Root Port capabilities and MSI support
Applied, thanks. Please update https://wiki.qemu.org/ChangeLog/10.2 as appropriate.
r~
On 11/24/25 10:05, Cédric Le Goater wrote:
..
Quoted 6 lines
aspeed queue:
* Fixed typo in the AST2700 LTPI device
* Fixed missing wiring of the SPI IRQ in AST10x0, AST2600, AST2700 SoCs
* Updated ASPEED PCIe Root Port capabilities and MSI support
Quoted 7 lines
----------------------------------------------------------------
Jamin Lin (2):
hw/arm/aspeed: Fix missing SPI IRQ connection causing DMA interrupt failure hw/pci-host/aspeed_pcie: Update ASPEED PCIe Root Port capabilities and enable MSI to support hotplugNabih Estefan (1):
hw/arm/ast27x0: Fix typo in LTPI address
Are the two patches - "Fix typo in LTPI address" and "Fix missing SPI IRQ connection causing DMA interrupt failure" - worth picking up to stable (first to 10.1.x, second to 10.0.x and 10.1.x)?
Will there be migration issues with these in place?
Thanks,
/mjt
Quoted 13 lines · Michael Tokarev
On 11/24/25 10:05, Cédric Le Goater wrote:
..Quoted 11 lines
aspeed queue:
* Fixed typo in the AST2700 LTPI device
* Fixed missing wiring of the SPI IRQ in AST10x0, AST2600, AST2700 SoCs
* Updated ASPEED PCIe Root Port capabilities and MSI support----------------------------------------------------------------
Jamin Lin (2):
hw/arm/aspeed: Fix missing SPI IRQ connection causing DMA interrupt failure hw/pci-host/aspeed_pcie: Update ASPEED PCIe Root Port capabilities and enable MSI to support hotplug
Quoted 7 lines
Quoted 2 lines
Nabih Estefan (1):
hw/arm/ast27x0: Fix typo in LTPI addressAre the two patches - "Fix typo in LTPI address" and "Fix missing SPI IRQ connection causing DMA interrupt failure" - worth picking up to stable (first to 10.1.x, second to 10.0.x and 10.1.x)?
Yes you can take these.
Quoted 2 lines
Will there be migration issues with these in place?
I doubt it.
The Aspeed machines are not versioned and we never claimed to maintain compatibility. I think there are other issues related to the secure state of the CPU that prevent migration to work anyway.
Thanks,
C.