diff options
author | RajithaY <rajithax.yerrumsetty@intel.com> | 2017-04-25 03:31:15 -0700 |
---|---|---|
committer | Rajitha Yerrumchetty <rajithax.yerrumsetty@intel.com> | 2017-05-22 06:48:08 +0000 |
commit | bb756eebdac6fd24e8919e2c43f7d2c8c4091f59 (patch) | |
tree | ca11e03542edf2d8f631efeca5e1626d211107e3 /qemu/roms/openbios/include/arch/amd64/pci.h | |
parent | a14b48d18a9ed03ec191cf16b162206998a895ce (diff) |
Adding qemu as a submodule of KVMFORNFV
This Patch includes the changes to add qemu as a submodule to
kvmfornfv repo and make use of the updated latest qemu for the
execution of all testcase
Change-Id: I1280af507a857675c7f81d30c95255635667bdd7
Signed-off-by:RajithaY<rajithax.yerrumsetty@intel.com>
Diffstat (limited to 'qemu/roms/openbios/include/arch/amd64/pci.h')
-rw-r--r-- | qemu/roms/openbios/include/arch/amd64/pci.h | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/qemu/roms/openbios/include/arch/amd64/pci.h b/qemu/roms/openbios/include/arch/amd64/pci.h deleted file mode 100644 index 3e88e150b..000000000 --- a/qemu/roms/openbios/include/arch/amd64/pci.h +++ /dev/null @@ -1,66 +0,0 @@ -#ifndef AMD64_PCI_H -#define AMD64_PCI_H - -#include "asm/io.h" - -#if !(defined(PCI_CONFIG_1) || defined(PCI_CONFIG_2)) -#define PCI_CONFIG_1 1 /* default */ -#endif - -#ifdef PCI_CONFIG_1 - -/* PCI Configuration Mechanism #1 */ - -/* Have pci_addr in the same format as the values written to 0xcf8 - * so register accesses can be made easy. */ -#define PCI_ADDR(bus, dev, fn) \ - ((pci_addr) (0x80000000u \ - | (uint32_t) (bus) << 16 \ - | (uint32_t) (dev) << 11 \ - | (uint32_t) (fn) << 8)) - -#define PCI_BUS(pcidev) ((uint8_t) ((pcidev) >> 16)) -#define PCI_DEV(pcidev) ((uint8_t) ((pcidev) >> 11) & 0x1f) -#define PCI_FN(pcidev) ((uint8_t) ((pcidev) >> 8) & 7) - -static inline uint8_t pci_config_read8(pci_addr dev, uint8_t reg) -{ - outl(dev | (reg & ~3), 0xcf8); - return inb(0xcfc | (reg & 3)); -} - -static inline uint16_t pci_config_read16(pci_addr dev, uint8_t reg) -{ - outl(dev | (reg & ~3), 0xcf8); - return inw(0xcfc | (reg & 2)); -} - -static inline uint32_t pci_config_read32(pci_addr dev, uint8_t reg) -{ - outl(dev | reg, 0xcf8); - return inl(0xcfc | reg); -} - -static inline void pci_config_write8(pci_addr dev, uint8_t reg, uint8_t val) -{ - outl(dev | (reg & ~3), 0xcf8); - outb(val, 0xcfc | (reg & 3)); -} - -static inline void pci_config_write16(pci_addr dev, uint8_t reg, uint16_t val) -{ - outl(dev | (reg & ~3), 0xcf8); - outw(val, 0xcfc | (reg & 2)); -} - -static inline void pci_config_write32(pci_addr dev, uint8_t reg, uint32_t val) -{ - outl(dev | reg, 0xcf8); - outl(val, 0xcfc); -} - -#else /* !PCI_CONFIG_1 */ -#error PCI Configuration Mechanism is not specified or implemented -#endif - -#endif /* AMD64_PCI_H */ |