2 * QEMU Generic PCI Express Bridge Emulation
4 * Copyright (C) 2015 Alexander Graf <agraf@suse.de>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, see <http://www.gnu.org/licenses/>
23 #include "hw/sysbus.h"
24 #include "hw/pci/pci.h"
25 #include "hw/pci/pcie_host.h"
26 #include "qom/object.h"
28 #define TYPE_GPEX_HOST "gpex-pcihost"
29 typedef struct GPEXHost GPEXHost
;
30 DECLARE_INSTANCE_CHECKER(GPEXHost
, GPEX_HOST
,
33 #define TYPE_GPEX_ROOT_DEVICE "gpex-root"
34 typedef struct GPEXRootState GPEXRootState
;
35 DECLARE_INSTANCE_CHECKER(GPEXRootState
, GPEX_ROOT_DEVICE
,
36 TYPE_GPEX_ROOT_DEVICE
)
38 #define GPEX_NUM_IRQS 4
40 struct GPEXRootState
{
48 PCIExpressHost parent_obj
;
51 GPEXRootState gpex_root
;
53 MemoryRegion io_ioport
;
55 qemu_irq irq
[GPEX_NUM_IRQS
];
56 int irq_num
[GPEX_NUM_IRQS
];
59 int gpex_set_irq_num(GPEXHost
*s
, int index
, int gsi
);
61 #endif /* HW_GPEX_H */