Re: [PATCH v2 12/13] hw/riscv/device-common, virt.c: add gpex_pcie_init()

Philippe Mathieu-Daudé <[email protected]>
Newsgroups org.nongnu.qemu-riscv,org.nongnu.qemu-devel
Message-ID <[email protected]>
On 26/8/26 18:48, Daniel Henrique Barboza wrote:
> The GPEX_HOST initialization in 'virt' can be moved to device-common.c
> and be re-used later for other boards, namely the future
> 'riscv-server-ref' emulation.
> 
> Signed-off-by: Daniel Henrique Barboza <[email protected]>
> ---
>   hw/riscv/device-common.c         | 76 +++++++++++++++++++++++++++++++
>   hw/riscv/virt.c                  | 77 ++------------------------------
>   include/hw/riscv/device-common.h |  7 +++
>   3 files changed, 87 insertions(+), 73 deletions(-)


> diff --git a/include/hw/riscv/device-common.h b/include/hw/riscv/device-common.h
> index 1cdb8ab5cc..77760e082c 100644
> --- a/include/hw/riscv/device-common.h
> +++ b/include/hw/riscv/device-common.h
> @@ -22,4 +22,11 @@ PFlashCFI01 *riscv_flash_create(Object *parent, const char *name,
>                                   int flash_sector_size);
>   void riscv_init_flash_map(PFlashCFI01 *flash, hwaddr base, hwaddr size,
>                             MemoryRegion *sysmem, int flash_sector_size);
> +DeviceState *gpex_pcie_init(MemoryRegion *sys_mem,

'riscv_' prefix please.

> +                            DeviceState *irqchip,
> +                            const MemMapEntry *pcie_ecam_mem,
> +                            const MemMapEntry *pcie_mmio_mem,
> +                            const MemMapEntry *high_pcie_mmio_mem,
> +                            const MemMapEntry *pcie_pio_mem,
> +                            int pcie_irq);
>   #endif
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.