summaryrefslogtreecommitdiff
path: root/sys/arch/i386/pci/pci_addr_fixup.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/i386/pci/pci_addr_fixup.c')
-rw-r--r--sys/arch/i386/pci/pci_addr_fixup.c38
1 files changed, 1 insertions, 37 deletions
diff --git a/sys/arch/i386/pci/pci_addr_fixup.c b/sys/arch/i386/pci/pci_addr_fixup.c
index 294454e7a1a..e4eb1b4a2de 100644
--- a/sys/arch/i386/pci/pci_addr_fixup.c
+++ b/sys/arch/i386/pci/pci_addr_fixup.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pci_addr_fixup.c,v 1.21 2007/02/20 21:15:01 tom Exp $ */
+/* $OpenBSD: pci_addr_fixup.c,v 1.22 2010/07/02 16:11:19 jsg Exp $ */
/* $NetBSD: pci_addr_fixup.c,v 1.7 2000/08/03 20:10:45 nathanw Exp $ */
/*-
@@ -410,39 +410,3 @@ pciaddr_device_is_agp(pci_chipset_tag_t pc, pcitag_t tag)
}
return (0);
}
-
-
-struct extent *
-pciaddr_search(int mem_port, bus_addr_t *startp, bus_size_t size)
-{
- extern struct cfdriver pcibios_cd;
- struct pcibios_softc *sc;
-
- sc = (struct pcibios_softc *)device_lookup(&pcibios_cd, 0);
- if (sc && !(pcibios_flags & PCIBIOS_ADDR_FIXUP)) {
- struct extent_region *rp;
- struct extent *ex = mem_port? sc->extent_mem : sc->extent_port;
-
- /* Search the PCI I/O memory space extent for free
- * space that will accommodate size. Remember that the
- * extent stores allocated space and we're searching
- * for the gaps.
- *
- * If we're at the end or the gap between this region
- * and the next region big enough, then we're done
- */
- for (rp = LIST_FIRST(&ex->ex_regions);
- rp && *startp + size > rp->er_start;
- rp = LIST_NEXT(rp, er_link)) {
- bus_addr_t new_start;
-
- new_start = (rp->er_end - 1 + size) & ~(size - 1);
- if (new_start > *startp)
- *startp = new_start;
- }
-
- return (ex);
- }
-
- return (NULL);
-}