mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
hw/pci-host/gpex: Allow more than 4 legacy IRQs
Some boards such as vmapple don't do real legacy PCI IRQ swizzling. Instead, they just keep allocating more board IRQ lines for each new legacy IRQ. Let's support that mode by giving instantiators a new "nr_irqs" property they can use to support more than 4 legacy IRQ lines. In this mode, GPEX will export more IRQ lines, one for each device. Signed-off-by: Alexander Graf <graf@amazon.com> Signed-off-by: Phil Dennis-Jordan <phil@philjordan.eu> Reviewed-by: Akihiko Odaki <akihiko.odaki@daynix.com> Tested-by: Akihiko Odaki <akihiko.odaki@daynix.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20241223221645.29911-9-phil@philjordan.eu> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
This commit is contained in:
parent
7c89e226f8
commit
ff871d0462
11 changed files with 61 additions and 37 deletions
|
@ -32,8 +32,6 @@ OBJECT_DECLARE_SIMPLE_TYPE(GPEXHost, GPEX_HOST)
|
|||
#define TYPE_GPEX_ROOT_DEVICE "gpex-root"
|
||||
OBJECT_DECLARE_SIMPLE_TYPE(GPEXRootState, GPEX_ROOT_DEVICE)
|
||||
|
||||
#define GPEX_NUM_IRQS 4
|
||||
|
||||
struct GPEXRootState {
|
||||
/*< private >*/
|
||||
PCIDevice parent_obj;
|
||||
|
@ -49,6 +47,7 @@ struct GPEXConfig {
|
|||
PCIBus *bus;
|
||||
};
|
||||
|
||||
typedef struct GPEXIrq GPEXIrq;
|
||||
struct GPEXHost {
|
||||
/*< private >*/
|
||||
PCIExpressHost parent_obj;
|
||||
|
@ -60,8 +59,8 @@ struct GPEXHost {
|
|||
MemoryRegion io_mmio;
|
||||
MemoryRegion io_ioport_window;
|
||||
MemoryRegion io_mmio_window;
|
||||
qemu_irq irq[GPEX_NUM_IRQS];
|
||||
int irq_num[GPEX_NUM_IRQS];
|
||||
GPEXIrq *irq;
|
||||
uint8_t num_irqs;
|
||||
|
||||
bool allow_unmapped_accesses;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue