Lines Matching +full:bus +full:- +full:id

1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
34 #include <sys/bus.h>
63 legacy_pcib_read_config(device_t dev, u_int bus, u_int slot, u_int func, in legacy_pcib_read_config() argument
66 return(pci_cfgregread(0, bus, slot, func, reg, bytes)); in legacy_pcib_read_config()
72 legacy_pcib_write_config(device_t dev, u_int bus, u_int slot, u_int func, in legacy_pcib_write_config() argument
75 pci_cfgregwrite(0, bus, slot, func, reg, data, bytes); in legacy_pcib_write_config()
99 device_t bus; in legacy_pcib_alloc_msi() local
101 bus = device_get_parent(pcib); in legacy_pcib_alloc_msi()
102 return (PCIB_ALLOC_MSI(device_get_parent(bus), dev, count, maxcount, in legacy_pcib_alloc_msi()
109 device_t bus; in legacy_pcib_alloc_msix() local
111 bus = device_get_parent(pcib); in legacy_pcib_alloc_msix()
112 return (PCIB_ALLOC_MSIX(device_get_parent(bus), dev, irq)); in legacy_pcib_alloc_msix()
119 device_t bus, hostb; in legacy_pcib_map_msi() local
122 bus = device_get_parent(pcib); in legacy_pcib_map_msi()
123 error = PCIB_MAP_MSI(device_get_parent(bus), dev, irq, addr, data); in legacy_pcib_map_msi()
129 if (slot == -1 || func == -1) in legacy_pcib_map_msi()
139 legacy_pcib_is_host_bridge(int bus, int slot, int func, in legacy_pcib_is_host_bridge() argument
140 uint32_t id, uint8_t class, uint8_t subclass, in legacy_pcib_is_host_bridge() argument
149 switch (id) { in legacy_pcib_is_host_bridge()
153 /* *busnum = legacy_pcib_read_config(0, bus, slot, func, 0x41, 1); */ in legacy_pcib_is_host_bridge()
154 *busnum = bus; in legacy_pcib_is_host_bridge()
160 s = "Intel 82810-DC100 (i810-DC100 GMCH) Host To Hub bridge"; in legacy_pcib_is_host_bridge()
191 *busnum = legacy_pcib_read_config(0, bus, slot, func, 0x4a, 1); in legacy_pcib_is_host_bridge()
200 * bus numbers for the PXB channels. in legacy_pcib_is_host_bridge()
202 * Since the MIOC doesn't have a pci bus attached, we in legacy_pcib_is_host_bridge()
205 pxb[0] = legacy_pcib_read_config(0, bus, slot, func, in legacy_pcib_is_host_bridge()
207 pxb[1] = legacy_pcib_read_config(0, bus, slot, func, in legacy_pcib_is_host_bridge()
209 pxb[2] = legacy_pcib_read_config(0, bus, slot, func, in legacy_pcib_is_host_bridge()
211 pxb[3] = legacy_pcib_read_config(0, bus, slot, func, in legacy_pcib_is_host_bridge()
217 s = "Intel 82454NX PXB#0, Bus#A"; in legacy_pcib_is_host_bridge()
221 s = "Intel 82454NX PXB#0, Bus#B"; in legacy_pcib_is_host_bridge()
225 s = "Intel 82454NX PXB#1, Bus#A"; in legacy_pcib_is_host_bridge()
229 s = "Intel 82454NX PXB#1, Bus#B"; in legacy_pcib_is_host_bridge()
238 /* AMD -- vendor 0x1022 */ in legacy_pcib_is_host_bridge()
245 "*** WARNING: missing CPU_ELAN -- timekeeping may be wrong\n"); in legacy_pcib_is_host_bridge()
249 s = "AMD-751 host to PCI bridge"; in legacy_pcib_is_host_bridge()
252 s = "AMD-761 host to PCI bridge"; in legacy_pcib_is_host_bridge()
255 /* SiS -- vendor 0x1039 */ in legacy_pcib_is_host_bridge()
272 /* VLSI -- vendor 0x1004 */ in legacy_pcib_is_host_bridge()
278 /* totally. Please let me know if anything wrong. -F */ in legacy_pcib_is_host_bridge()
279 /* XXX need info on the MVP3 -- any takers? */ in legacy_pcib_is_host_bridge()
284 /* AcerLabs -- vendor 0x10b9 */ in legacy_pcib_is_host_bridge()
285 /* Funny : The datasheet told me vendor id is "10b8",sub-vendor */ in legacy_pcib_is_host_bridge()
286 /* id is '10b9" but the register always shows "10b9". -Foxfair */ in legacy_pcib_is_host_bridge()
288 s = "AcerLabs M1541 (Aladdin-V) PCI host bridge"; in legacy_pcib_is_host_bridge()
291 /* OPTi -- vendor 0x1045 */ in legacy_pcib_is_host_bridge()
299 /* ServerWorks -- vendor 0x1166 */ in legacy_pcib_is_host_bridge()
302 *busnum = legacy_pcib_read_config(0, bus, slot, func, 0x44, 1); in legacy_pcib_is_host_bridge()
311 case 0x010f1014: /* IBM re-badged ServerWorks chipset */ in legacy_pcib_is_host_bridge()
313 *busnum = legacy_pcib_read_config(0, bus, slot, func, 0x44, 1); in legacy_pcib_is_host_bridge()
318 *busnum = legacy_pcib_read_config(0, bus, slot, func, 0x44, 1); in legacy_pcib_is_host_bridge()
323 *busnum = legacy_pcib_read_config(0, bus, slot, func, 0x44, 1); in legacy_pcib_is_host_bridge()
328 case 0x03021014: /* IBM re-badged ServerWorks chipset */ in legacy_pcib_is_host_bridge()
329 s = "ServerWorks CMIC-HE host to PCI-X bridge"; in legacy_pcib_is_host_bridge()
330 *busnum = legacy_pcib_read_config(0, bus, slot, func, 0x44, 1); in legacy_pcib_is_host_bridge()
340 *busnum = legacy_pcib_read_config(0, bus, slot, func, 0x44, 1); in legacy_pcib_is_host_bridge()
343 /* Compaq/HP -- vendor 0x0e11 */ in legacy_pcib_is_host_bridge()
346 *busnum = legacy_pcib_read_config(0, bus, slot, func, 0xc8, 1); in legacy_pcib_is_host_bridge()
349 /* Integrated Micro Solutions -- vendor 0x10e0 */ in legacy_pcib_is_host_bridge()
372 * Scan the first pci bus for host-pci bridges and add pcib instances
378 int bus, slot, func; in legacy_pcib_identify() local
390 * Check to see if we haven't already had a PCI bus added in legacy_pcib_identify()
398 bus = 0; in legacy_pcib_identify()
402 hdrtype = legacy_pcib_read_config(0, bus, slot, func, in legacy_pcib_identify()
405 * When enumerating bus devices, the standard says that in legacy_pcib_identify()
421 uint32_t id; in legacy_pcib_identify() local
427 id = legacy_pcib_read_config(0, bus, slot, func, in legacy_pcib_identify()
429 if (id == -1) in legacy_pcib_identify()
431 class = legacy_pcib_read_config(0, bus, slot, func, in legacy_pcib_identify()
433 subclass = legacy_pcib_read_config(0, bus, slot, func, in legacy_pcib_identify()
436 s = legacy_pcib_is_host_bridge(bus, slot, func, in legacy_pcib_identify()
437 id, class, subclass, in legacy_pcib_identify()
443 * Check to see if the physical bus has already in legacy_pcib_identify()
445 * bridges to the same logical bus. in legacy_pcib_identify()
472 if (id == 0x12258086) in legacy_pcib_identify()
474 if (id == 0x84c48086) in legacy_pcib_identify()
478 if (found824xx && bus == 0) { in legacy_pcib_identify()
479 bus++; in legacy_pcib_identify()
485 * hardware doesn't actually have a host-pci bridge device. in legacy_pcib_identify()
505 return -100; in legacy_pcib_probe()
513 int bus; in legacy_pcib_attach() local
515 bus = pcib_get_bus(dev); in legacy_pcib_attach()
520 if (pci_pir_probe(bus, 0)) { in legacy_pcib_attach()
563 * Helper routine for x86 Host-PCI bridge driver resource allocation.
585 if (start + count - 1 != end) { in hostb_alloc_start()
652 /* Bus interface */
683 * PCI bus interface. This could be used to extract the
685 * ID is available and the PCI BIOS isn't, but for now we just
686 * eat the PnP ID and do nothing else.
691 { 0x030ad041 /* PNP0A03 */, "PCI Bus" },
692 { 0x080ad041 /* PNP0A08 */, "PCIe Bus" },
724 * Provide a PCI-PCI bridge driver for PCI buses behind PCI-PCI bridges
728 static int pcibios_pcib_probe(device_t bus);
747 int bus; in pcibios_pcib_probe() local
752 bus = pci_read_config(dev, PCIR_SECBUS_1, 1); in pcibios_pcib_probe()
753 if (bus == 0) in pcibios_pcib_probe()
755 if (!pci_pir_probe(bus, 1)) in pcibios_pcib_probe()
757 device_set_desc(dev, "PCIBIOS PCI-PCI bridge"); in pcibios_pcib_probe()
758 return (-2000); in pcibios_pcib_probe()