Lines Matching refs:base

58 	uint16_t base, pcix_cmd, status;  in pci_cap_probe()  local
67 for (i = 0, base = pci_config_get8(h, PCI_CONF_CAP_PTR); in pci_cap_probe()
68 base && i < index; base = pci_config_get8(h, base in pci_cap_probe()
71 if ((id = pci_config_get8(h, base)) == 0xff) in pci_cap_probe()
77 if ((pcix_cmd = pci_config_get16(h, base + in pci_cap_probe()
85 if (base && i == index) { in pci_cap_probe()
86 if ((id = pci_config_get8(h, base)) != 0xff) in pci_cap_probe()
93 for (base = PCIE_EXT_CAP; base && i < index; i++) { in pci_cap_probe()
94 if ((xcaps_hdr = pci_config_get32(h, base)) == PCI_CAP_EINVAL32) in pci_cap_probe()
99 base = (xcaps_hdr >> PCIE_EXT_CAP_NEXT_PTR_SHIFT) in pci_cap_probe()
103 if (!base || i < index) in pci_cap_probe()
106 if ((xcaps_hdr = pci_config_get32(h, base)) == PCI_CAP_EINVAL32) in pci_cap_probe()
113 index, id, base); in pci_cap_probe()
116 *base_p = base; in pci_cap_probe()
128 uint16_t status, base; in pci_lcap_locate() local
138 base = PCI_CONF_CAP_PTR; in pci_lcap_locate()
141 base = PCI_BCNF_CAP_PTR; in pci_lcap_locate()
144 base = PCI_CBUS_CAP_PTR; in pci_lcap_locate()
152 for (base = pci_config_get8(h, base); base; in pci_lcap_locate()
153 base = pci_config_get8(h, base + PCI_CAP_NEXT_PTR)) { in pci_lcap_locate()
154 if (pci_config_get8(h, base) == id) { in pci_lcap_locate()
155 *base_p = base; in pci_lcap_locate()
170 uint16_t status, base; in pci_xcap_locate() local
178 for (base = PCIE_EXT_CAP; base; base = (xcaps_hdr >> in pci_xcap_locate()
181 if ((xcaps_hdr = pci_config_get32(h, base)) == PCI_CAP_EINVAL32) in pci_xcap_locate()
186 *base_p = base; in pci_xcap_locate()
210 uint16_t status, base; in pci_htcap_locate() local
220 base = PCI_CONF_CAP_PTR; in pci_htcap_locate()
223 base = PCI_BCNF_CAP_PTR; in pci_htcap_locate()
231 for (base = pci_config_get8(h, base); base; in pci_htcap_locate()
232 base = pci_config_get8(h, base + PCI_CAP_NEXT_PTR)) { in pci_htcap_locate()
233 if (pci_config_get8(h, base) == PCI_CAP_ID_HT && in pci_htcap_locate()
234 (pci_config_get16(h, base + PCI_CAP_ID_REGS_OFF) & in pci_htcap_locate()
236 *base_p = base; in pci_htcap_locate()
253 uint32_t id, uint16_t base, uint16_t offset) in pci_cap_get() argument
257 if (PCI_CAP_BASE(h, id, &base) != DDI_SUCCESS) in pci_cap_get()
266 offset += base; in pci_cap_get()
294 uint32_t id, uint16_t base, uint16_t offset, in pci_cap_put() argument
301 if (PCI_CAP_BASE(h, id, &base) != DDI_SUCCESS) in pci_cap_put()
304 offset += base; in pci_cap_put()
329 pci_cap_read(ddi_acc_handle_t h, uint32_t id, uint16_t base, in pci_cap_read() argument
338 if (PCI_CAP_BASE(h, id, &base) != DDI_SUCCESS) in pci_cap_read()
341 for (ptr = buf_p, i = 0; i < nwords; i++, base += 4) { in pci_cap_read()
342 if ((*ptr++ = pci_config_get32(h, base)) == PCI_CAP_EINVAL32) in pci_cap_read()