/* Assume systems with more busses have correct MCFG */ #define mmcfg_virt_addr ((void __iomem *) fix_to_virt(FIX_PCIE_MCFG))
/* The base address of the last MMCONFIG device accessed */ static u32 mmcfg_last_accessed_device; staticint mmcfg_last_accessed_cpu;
/* * Functions for accessing PCI configuration space with MMCONFIG accesses
*/ static u32 get_base_addr(unsignedint seg, int bus, unsigned devfn)
{ struct pci_mmcfg_region *cfg = pci_mmconfig_lookup(seg, bus);
if (cfg) return cfg->address; return 0;
}
/* * This is always called under pci_config_lock
*/ staticvoid pci_exp_set_dev_base(unsignedint base, int bus, int devfn)
{
u32 dev_base = base | PCI_MMCFG_BUS_OFFSET(bus) | (devfn << 12); int cpu = smp_processor_id(); if (dev_base != mmcfg_last_accessed_device ||
cpu != mmcfg_last_accessed_cpu) {
mmcfg_last_accessed_device = dev_base;
mmcfg_last_accessed_cpu = cpu;
set_fixmap_nocache(FIX_PCIE_MCFG, dev_base);
}
}
staticint pci_mmcfg_read(unsignedint seg, unsignedint bus, unsignedint devfn, int reg, int len, u32 *value)
{ unsignedlong flags;
u32 base;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.