diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2009-06-02 11:49:34 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2009-06-02 11:49:34 +0100 |
commit | 3b35911d709e100f0855c553adcab5c37b1c02c0 (patch) | |
tree | 2354b25c2c977d1ecb4546cfeb62206309c2a42e /xen/arch/x86/pci.c | |
parent | d2c78b31b503e88c2cde80e7f15ec62061007e71 (diff) | |
download | xen-3b35911d709e100f0855c553adcab5c37b1c02c0.tar.gz xen-3b35911d709e100f0855c553adcab5c37b1c02c0.tar.bz2 xen-3b35911d709e100f0855c553adcab5c37b1c02c0.zip |
Enable pci mmcfg and ATS for x86_64
This patch enables PCI MMCONFIG in xen and turns on hooks for ATS.
Signed-off-by: Allen Kay <allen.m.kay@intel.com>
Diffstat (limited to 'xen/arch/x86/pci.c')
-rw-r--r-- | xen/arch/x86/pci.c | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/xen/arch/x86/pci.c b/xen/arch/x86/pci.c index e7e5f81dd4..ea2cef9832 100644 --- a/xen/arch/x86/pci.c +++ b/xen/arch/x86/pci.c @@ -7,9 +7,6 @@ #include <xen/spinlock.h> #include <asm/io.h> -#define PCI_CONF_ADDRESS(bus, dev, func, reg) \ - (0x80000000 | (bus << 16) | (dev << 11) | (func << 8) | (reg & ~3)) - static DEFINE_SPINLOCK(pci_config_lock); uint32_t pci_conf_read(uint32_t cf8, uint8_t offset, uint8_t bytes) @@ -69,49 +66,3 @@ void pci_conf_write(uint32_t cf8, uint8_t offset, uint8_t bytes, uint32_t data) spin_unlock_irqrestore(&pci_config_lock, flags); } - -uint8_t pci_conf_read8( - unsigned int bus, unsigned int dev, unsigned int func, unsigned int reg) -{ - BUG_ON((bus > 255) || (dev > 31) || (func > 7) || (reg > 255)); - return pci_conf_read(PCI_CONF_ADDRESS(bus, dev, func, reg), reg & 3, 1); -} - -uint16_t pci_conf_read16( - unsigned int bus, unsigned int dev, unsigned int func, unsigned int reg) -{ - BUG_ON((bus > 255) || (dev > 31) || (func > 7) || (reg > 255)); - return pci_conf_read(PCI_CONF_ADDRESS(bus, dev, func, reg), reg & 2, 2); -} - -uint32_t pci_conf_read32( - unsigned int bus, unsigned int dev, unsigned int func, unsigned int reg) -{ - BUG_ON((bus > 255) || (dev > 31) || (func > 7) || (reg > 255)); - return pci_conf_read(PCI_CONF_ADDRESS(bus, dev, func, reg), 0, 4); -} - -void pci_conf_write8( - unsigned int bus, unsigned int dev, unsigned int func, unsigned int reg, - uint8_t data) -{ - BUG_ON((bus > 255) || (dev > 31) || (func > 7) || (reg > 255)); - pci_conf_write(PCI_CONF_ADDRESS(bus, dev, func, reg), reg & 3, 1, data); -} - -void pci_conf_write16( - unsigned int bus, unsigned int dev, unsigned int func, unsigned int reg, - uint16_t data) -{ - BUG_ON((bus > 255) || (dev > 31) || (func > 7) || (reg > 255)); - pci_conf_write(PCI_CONF_ADDRESS(bus, dev, func, reg), reg & 2, 2, data); -} - -void pci_conf_write32( - unsigned int bus, unsigned int dev, unsigned int func, unsigned int reg, - uint32_t data) -{ - BUG_ON((bus > 255) || (dev > 31) || (func > 7) || (reg > 255)); - pci_conf_write(PCI_CONF_ADDRESS(bus, dev, func, reg), 0, 4, data); -} - |