mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
pcie: helper functions for pcie capability and extended capability
This patch implements helper functions for pci express capability and pci express extended capability allocation. NOTE: presence detection depends on pci_qdev_init() change. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
08f3dcf13f
commit
0428527c62
5 changed files with 654 additions and 0 deletions
5
hw/pci.h
5
hw/pci.h
|
@ -9,6 +9,8 @@
|
|||
/* PCI includes legacy ISA access. */
|
||||
#include "isa.h"
|
||||
|
||||
#include "pcie.h"
|
||||
|
||||
/* PCI bus */
|
||||
|
||||
#define PCI_DEVFN(slot, func) ((((slot) & 0x1f) << 3) | ((func) & 0x07))
|
||||
|
@ -175,6 +177,9 @@ struct PCIDevice {
|
|||
/* Offset of MSI capability in config space */
|
||||
uint8_t msi_cap;
|
||||
|
||||
/* PCI Express */
|
||||
PCIExpressDevice exp;
|
||||
|
||||
/* Location of option rom */
|
||||
char *romfile;
|
||||
ram_addr_t rom_offset;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue