Lines Matching refs:base

59 	uint16_t base, pcix_cmd, status;  in pci_cap_probe()  local
68 for (i = 0, base = pci_config_get8(h, PCI_CONF_CAP_PTR); in pci_cap_probe()
69 base && i < index; base = pci_config_get8(h, base in pci_cap_probe()
72 if ((id = pci_config_get8(h, base)) == 0xff) in pci_cap_probe()
78 if ((pcix_cmd = pci_config_get16(h, base + in pci_cap_probe()
86 if (base && i == index) { in pci_cap_probe()
87 if ((id = pci_config_get8(h, base)) != 0xff) in pci_cap_probe()
94 for (base = PCIE_EXT_CAP; base && i < index; i++) { in pci_cap_probe()
95 if ((xcaps_hdr = pci_config_get32(h, base)) == PCI_CAP_EINVAL32) in pci_cap_probe()
100 base = (xcaps_hdr >> PCIE_EXT_CAP_NEXT_PTR_SHIFT) in pci_cap_probe()
104 if (!base || i < index) in pci_cap_probe()
107 if ((xcaps_hdr = pci_config_get32(h, base)) == PCI_CAP_EINVAL32) in pci_cap_probe()
114 index, id, base); in pci_cap_probe()
117 *base_p = base; in pci_cap_probe()
129 uint16_t status, base, ncaps; in pci_lcap_locate() local
139 base = PCI_CONF_CAP_PTR; in pci_lcap_locate()
142 base = PCI_BCNF_CAP_PTR; in pci_lcap_locate()
145 base = PCI_CBUS_CAP_PTR; in pci_lcap_locate()
154 for (base = pci_config_get8(h, base); base; in pci_lcap_locate()
155 base = pci_config_get8(h, base + PCI_CAP_NEXT_PTR)) { in pci_lcap_locate()
156 if (pci_config_get8(h, base) == id) { in pci_lcap_locate()
157 *base_p = base; in pci_lcap_locate()
176 uint16_t status, base; in pci_xcap_locate() local
185 for (base = PCIE_EXT_CAP; base; base = (xcaps_hdr >> in pci_xcap_locate()
188 if ((xcaps_hdr = pci_config_get32(h, base)) == PCI_CAP_EINVAL32) in pci_xcap_locate()
193 *base_p = base; in pci_xcap_locate()
221 uint16_t status, base; in pci_htcap_locate() local
231 base = PCI_CONF_CAP_PTR; in pci_htcap_locate()
234 base = PCI_BCNF_CAP_PTR; in pci_htcap_locate()
242 for (base = pci_config_get8(h, base); base; in pci_htcap_locate()
243 base = pci_config_get8(h, base + PCI_CAP_NEXT_PTR)) { in pci_htcap_locate()
244 if (pci_config_get8(h, base) == PCI_CAP_ID_HT && in pci_htcap_locate()
245 (pci_config_get16(h, base + PCI_CAP_ID_REGS_OFF) & in pci_htcap_locate()
247 *base_p = base; in pci_htcap_locate()
264 uint16_t base, uint16_t offset) in pci_cap_get() argument
268 if (PCI_CAP_BASE(h, id, &base) != DDI_SUCCESS) in pci_cap_get()
277 offset += base; in pci_cap_get()
305 uint32_t id, uint16_t base, uint16_t offset, uint32_t data) in pci_cap_put() argument
311 if (PCI_CAP_BASE(h, id, &base) != DDI_SUCCESS) in pci_cap_put()
314 offset += base; in pci_cap_put()
339 pci_cap_read(ddi_acc_handle_t h, uint32_t id, uint16_t base, in pci_cap_read() argument
348 if (PCI_CAP_BASE(h, id, &base) != DDI_SUCCESS) in pci_cap_read()
351 for (ptr = buf_p, i = 0; i < nwords; i++, base += 4) { in pci_cap_read()
352 if ((*ptr++ = pci_config_get32(h, base)) == PCI_CAP_EINVAL32) in pci_cap_read()