You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
qemu/include/hw/pci-host
Jamin Lin ba6fb09048 hw/pci-host/aspeed: Add AST2700 PCIe config with dedicated H2X blocks
Introduce PCIe config (H2X) support for the AST2700 SoC.

Unlike the AST2600, the AST2700 provides three independent Root Complexes,
each with its own H2X (AHB to PCIe bridge) register block of size 0x100.
All RCs use the same MSI address (0x000000F0). The H2X block includes
two different access paths:

1. CFGI (internal bridge): used to access the host bridge itself, always
   with BDF=0. The AST2700 controller simplifies the design by exposing
   only one register (H2X_CFGI_TLP) with fields for ADDR[15:0], BEN[19:16],
   and WR[20]. This is not a full TLP descriptor as in the external case.
   For QEMU readability and code reuse, the model converts H2X_CFGI_TLP
   into a standard TLP TX descriptor with BDF forced to 0 and then calls
   the existing helpers aspeed_pcie_cfg_readwrite() and
   aspeed_pcie_cfg_translate_write().

2. CFGE (external EP access): used to access external endpoints. The
   AST2700 design provides H2X_CFGE_TLP1 and a small FIFO at H2X_CFGE_TLPN.
   For reads, TX DESC0 is stored in TLP1 and DESC1/DESC2 in TLPN FIFO
   slots. For writes, TX DESC0 is stored in TLP1, DESC1/DESC2 in TLPN
   FIFO[0..1], and TX write data in TLPN FIFO[2].

The implementation extends AspeedPCIECfgState with a small FIFO and index,
wires up new register definitions for AST2700, and adds a specific ops
table and class (TYPE_ASPEED_2700_PCIE_CFG). The reset handler clears the
FIFO state. Interrupt and MSI status registers are also supported.

This provides enough modeling for firmware and drivers to use any of the
three PCIe RCs on AST2700 with their own dedicated H2X config window,
while reusing existing TLP decode helpers in QEMU.

Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20250919093017.338309-11-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
4 days ago
..
articia.h hw/pci-host: Add emulation of Mai Logic Articia S 2 years ago
aspeed_pcie.h hw/pci-host/aspeed: Add AST2700 PCIe config with dedicated H2X blocks 4 days ago
astro.h hw/pci-host/astro: Add LMMIO range support 8 months ago
bonito.h hw/pci-host/bonito: Declare TYPE_BONITO_PCI_HOST_BRIDGE in header 3 years ago
designware.h hw/pci-host/designware: Prevent device attachment on internal PCIe root bus 7 months ago
dino.h hw/pci-host: Remove unused pci_host_data_be_ops 5 months ago
fsl_imx8m_phy.h include/system: Move exec/memory.h to system/memory.h 5 months ago
gpex.h hw/pci-host/gpex-acpi: Use GED acpi pcihp property 3 months ago
grackle.h hw/ppc/mac.h: Move grackle-pcihost type declaration out to a header 3 years ago
i440fx.h hw/pci-host/i440fx: Resolve i440fx_init() 2 years ago
ls7a.h hw/loongarch: DINTC add a MemoryRegion 5 days ago
mv64361.h
pam.h include/system: Move exec/memory.h to system/memory.h 5 months ago
pnv_phb3.h hw/ppc: Avoid using Monitor in pnv_phb3_msi_pic_print_info() 1 year ago
pnv_phb3_regs.h ppc: Define SETFIELD for the ppc target 3 years ago
pnv_phb4.h ppc/pnv/phb4: Add pervasive chiplet support to PHB4/5 7 months ago
pnv_phb4_regs.h hw/pci-host: Update PHB5 XSCOM registers 2 years ago
ppc4xx.h hw/ppc/ppc4xx_pci: Extract PCI host definitions to hw/pci-host/ppc4xx.h 2 years ago
ppce500.h
q35.h q35: Remove unused mch_mcfg_base 1 year ago
remote.h include/system: Move exec/memory.h to system/memory.h 5 months ago
sabre.h include/hw/pci: Split pci_device.h off pci.h 3 years ago
spapr.h ppc/spapr: remove deprecated machine pseries-2.7 11 months ago
uninorth.h
xilinx-pcie.h include/hw/pci: Break inclusion loop pci_bridge.h and cxl.h 3 years ago