/* pci_io_base -- the base address from which io bars are offsets. *ThisisthelowestI/Obaseaddress(sobarvaluesarealwayspositive), *andit*must*bethestartofISAspaceifanISAbusexistsbecause *ISAdriversusehardcodedoffsets.IfnoISAbusexistsnothing *ismappedonthefirst64KofIOspace
*/ unsignedlong pci_io_base;
EXPORT_SYMBOL(pci_io_base);
/* For now, override phys_mem_access_prot. If we need it,g *later,wemaymovethatinitializationtoeachppc_md
*/
ppc_md.phys_mem_access_prot = pci_phys_mem_access_prot;
/* On ppc64, we always enable PCI domains and we keep domain 0 *backwardcompatiblein/procforvideocards
*/
pci_add_flags(PCI_ENABLE_PROC_DOMAINS | PCI_COMPAT_DOMAIN_0);
/* Scan all of the recorded PCI controllers. */
list_for_each_entry_safe(hose, tmp, &hose_list, list_node)
pcibios_scan_phb(hose);
/* Call common code to handle resource allocation */
pcibios_resource_survey();
int pcibios_unmap_io_space(struct pci_bus *bus)
{ struct pci_controller *hose;
WARN_ON(bus == NULL);
/* If this is not a PHB, we only flush the hash table over *theareamappedbythisbridge.Wedon'tplaywiththePTE *mappingssincewemighthavetodealwithsub-pagealignments *soflushingthehashtableistheonlysanewaytomakesure *thatnohashentriesarecoveringthatremovedbridgearea *whilestillallowingotherbussesoverlappingthosepages * *Note:IfweeversupportP2PhotplugonBook3E,we'llhave *todoanappropriateTLBflushheretoo
*/ if (bus->self) { #ifdef CONFIG_PPC_BOOK3S_64 struct resource *res = bus->resource[0]; #endif
pr_debug("IO unmapping for PCI-PCI bridge %s\n",
pci_name(bus->self));
int pcibios_map_io_space(struct pci_bus *bus)
{
WARN_ON(bus == NULL);
/* If this not a PHB, nothing to do, page tables still exist and *thusHPTEswillbefaultedinwhenneeded
*/ if (bus->self) {
pr_debug("IO mapping for PCI-PCI bridge %s\n",
pci_name(bus->self));
pr_debug(" virt=0x%016llx...0x%016llx\n",
bus->resource[0]->start + _IO_BASE,
bus->resource[0]->end + _IO_BASE); return0;
}
/* Argh ! Please forgive me for that hack, but that's the *simplestwaytogetexistingXFreetonotlockuponsome *G5machines...Sowhensomethingasksforbus0iobase *(bus0isHTroot),wereturntheAGPoneinstead.
*/ if (in_bus == 0 && of_machine_is_compatible("MacRISC4")) { struct device_node *agp;
switch (which) { case IOBASE_BRIDGE_NUMBER: return (long)hose->first_busno; case IOBASE_MEMORY: return (long)hose->mem_offset[0]; case IOBASE_IO: return (long)hose->io_base_phys; case IOBASE_ISA_IO: return (long)isa_io_base; case IOBASE_ISA_MEM: return -EINVAL;
}
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.