Home
last modified time | relevance | path

Searched refs:px_p (Results 1 – 25 of 33) sorted by relevance

12

/illumos-gate/usr/src/uts/sun4/io/px/
H A Dpx.c52 static int px_enable_err_intr(px_t *px_p);
53 static void px_disable_err_intr(px_t *px_p);
59 static void px_set_mps(px_t *px_p);
193 px_t *px_p = INST_TO_STATE(instance); in px_info() local
201 if (px_p == NULL) { in px_info()
206 *result = (void *)px_p->px_dip; in px_info()
224 px_t *px_p; /* per bus state pointer */ in px_attach() local
247 px_p = INST_TO_STATE(instance); in px_attach()
248 px_p->px_dip = dip; in px_attach()
249 mutex_init(&px_p->px_mutex, NULL, MUTEX_DRIVER, NULL); in px_attach()
[all …]
H A Dpx_msiq.c43 static int px_msiq_get_props(px_t *px_p);
49 px_msiq_attach(px_t *px_p) in px_msiq_attach() argument
51 px_ib_t *ib_p = px_p->px_ib_p; in px_msiq_attach()
55 DBG(DBG_MSIQ, px_p->px_dip, "px_msiq_attach\n"); in px_msiq_attach()
63 if (px_msiq_get_props(px_p) != DDI_SUCCESS) in px_msiq_attach()
89 (void) px_ib_alloc_ino(ib_p, px_msiqid_to_devino(px_p, in px_msiq_attach()
96 if ((ret = px_lib_msiq_init(px_p->px_dip)) != DDI_SUCCESS) in px_msiq_attach()
97 px_msiq_detach(px_p); in px_msiq_attach()
106 px_msiq_detach(px_t *px_p) in px_msiq_detach() argument
108 px_msiq_state_t *msiq_state_p = &px_p->px_ib_p->ib_msiq_state; in px_msiq_detach()
[all …]
H A Dpx_pec.c51 px_pec_attach(px_t *px_p) in px_pec_attach() argument
55 int nrange = px_p->px_ranges_length / sizeof (pci_ranges_t); in px_pec_attach()
56 dev_info_t *dip = px_p->px_dip; in px_pec_attach()
57 pci_ranges_t *rangep = px_p->px_ranges_p; in px_pec_attach()
64 px_p->px_pec_p = pec_p; in px_pec_attach()
65 pec_p->pec_px_p = px_p; in px_pec_attach()
119 px_pec_detach(px_t *px_p) in px_pec_detach() argument
121 dev_info_t *dip = px_p->px_dip; in px_pec_detach()
122 px_pec_t *pec_p = px_p->px_pec_p; in px_pec_detach()
134 px_p->px_pec_p = NULL; in px_pec_detach()
[all …]
H A Dpx_devctl.c78 px_t *px_p = PX_DEV_TO_SOFTSTATE(*devp); in px_open() local
91 if (px_p == NULL) in px_open()
94 DBG(DBG_OPEN, px_p->px_dip, "devp=%x: flags=%x\n", devp, flags); in px_open()
99 mutex_enter(&px_p->px_mutex); in px_open()
107 if (rval = pcie_open(px_p->px_dip, devp, flags, otyp, credp)) { in px_open()
108 mutex_exit(&px_p->px_mutex); in px_open()
114 if (px_p->px_soft_state != PCI_SOFT_STATE_CLOSED) { in px_open()
115 mutex_exit(&px_p->px_mutex); in px_open()
116 DBG(DBG_OPEN, px_p->px_dip, "busy\n"); in px_open()
119 px_p->px_soft_state = PCI_SOFT_STATE_OPEN_EXCL; in px_open()
[all …]
H A Dpx_fm.c68 px_fm_attach(px_t *px_p) in px_fm_attach() argument
71 dev_info_t *dip = px_p->px_dip; in px_fm_attach()
74 px_p->px_fm_cap = DDI_FM_EREPORT_CAPABLE | DDI_FM_ERRCB_CAPABLE | in px_fm_attach()
80 ddi_fm_init(dip, &px_p->px_fm_cap, &px_p->px_fm_ibc); in px_fm_attach()
85 ASSERT(px_p->px_fm_cap && in px_fm_attach()
91 mutex_init(&px_p->px_fm_mutex, NULL, MUTEX_DRIVER, in px_fm_attach()
92 (void *)px_p->px_fm_ibc); in px_fm_attach()
94 px_p->px_pfd_idx = 0; in px_fm_attach()
96 pcie_rc_init_pfd(dip, &px_p->px_pfd_arr[i]); in px_fm_attach()
97 PCIE_DIP2PFD(dip) = px_p->px_pfd_arr; in px_fm_attach()
[all …]
H A Dpx_msi.c43 static int px_msi_get_props(px_t *px_p);
49 px_msi_attach(px_t *px_p) in px_msi_attach() argument
51 dev_info_t *dip = px_p->px_dip; in px_msi_attach()
52 px_msi_state_t *msi_state_p = &px_p->px_ib_p->ib_msi_state; in px_msi_attach()
66 if (px_msi_get_props(px_p) != DDI_SUCCESS) { in px_msi_attach()
67 px_msi_detach(px_p); in px_msi_attach()
71 px_p->px_supp_intr_types |= (DDI_INTR_TYPE_MSI | DDI_INTR_TYPE_MSIX); in px_msi_attach()
95 px_msi_detach(px_p); in px_msi_attach()
105 px_msi_detach(px_t *px_p) in px_msi_detach() argument
107 dev_info_t *dip = px_p->px_dip; in px_msi_detach()
[all …]
H A Dpx_util.c55 px_get_props(px_t *px_p, dev_info_t *dip) in px_get_props() argument
62 i = sizeof (px_p->px_bus_range); in px_get_props()
64 "bus-range", (caddr_t)&px_p->px_bus_range, &i) != DDI_SUCCESS) { in px_get_props()
70 px_p->px_bus_range.lo, px_p->px_bus_range.hi); in px_get_props()
76 "interrupts", (caddr_t)&px_p->px_inos, in px_get_props()
77 &px_p->px_inos_len) != DDI_SUCCESS) { in px_get_props()
90 no_of_intrs = px_p->px_inos_len / i; in px_get_props()
92 px_p->px_inos[i] = px_p->px_inos[i] & 0x3F; in px_get_props()
98 (caddr_t)&px_p->px_ranges_p, &px_p->px_ranges_length) != in px_get_props()
103 kmem_free(px_p->px_inos, px_p->px_inos_len); in px_get_props()
[all …]
H A Dpx_util.h38 extern int px_init_child(px_t *px_p, dev_info_t *child);
39 extern int px_uninit_child(px_t *px_p, dev_info_t *child);
41 extern int px_get_props(px_t *px_p, dev_info_t *dip);
42 extern void px_free_props(px_t *px_p);
43 extern int px_map_regs(px_t *px_p, dev_info_t *dip);
44 extern void px_unmap_regs(px_t *px_p);
48 extern int px_reloc_reg(dev_info_t *dip, dev_info_t *rdip, px_t *px_p,
50 extern int px_xlate_reg(px_t *px_p, pci_regspec_t *pci_rp,
52 extern int px_search_ranges(px_t *px_p, uint32_t space_type, uint32_t reg_begin,
59 extern uint64_t px_get_cfg_pabase(px_t *px_p);
H A Dpx_ib.c53 px_ib_attach(px_t *px_p) in px_ib_attach() argument
55 dev_info_t *dip = px_p->px_dip; in px_ib_attach()
58 px_fault_t *fault_p = &px_p->px_fault; in px_ib_attach()
62 if (px_lib_intr_devino_to_sysino(px_p->px_dip, in px_ib_attach()
63 px_p->px_inos[PX_INTR_PEC], &sysino) != DDI_SUCCESS) in px_ib_attach()
71 px_p->px_ib_p = ib_p; in px_ib_attach()
72 ib_p->ib_px_p = px_p; in px_ib_attach()
88 fault_p->px_intr_ino = px_p->px_inos[PX_INTR_PEC]; in px_ib_attach()
94 px_ib_detach(px_t *px_p) in px_ib_detach() argument
96 px_ib_t *ib_p = px_p->px_ib_p; in px_ib_detach()
[all …]
H A Dpx_fm.h102 extern int px_fm_attach(px_t *px_p);
103 extern void px_fm_detach(px_t *px_p);
104 extern void px_fm_cb_enable(px_t *px_p);
105 extern void px_fm_cb_disable(px_t *px_p);
117 extern uint_t px_err_fabric_intr(px_t *px_p, msgcode_t msg_code,
123 extern int px_scan_fabric(px_t *px_p, dev_info_t *rdip, ddi_fm_error_t *derr);
124 extern void px_err_safeacc_check(px_t *px_p, ddi_fm_error_t *derr);
128 extern int px_fm_enter(px_t *px_p);
129 extern void px_fm_exit(px_t *px_p);
131 extern pf_data_t *px_rp_en_q(px_t *px_p, pcie_req_id_t fault_bdf,
[all …]
H A Dpx_msiq.h83 extern int px_msiq_attach(px_t *px_p);
84 extern void px_msiq_detach(px_t *px_p);
85 extern void px_msiq_resume(px_t *px_p);
87 extern int px_msiq_alloc(px_t *px_p, msiq_rec_type_t rec_type,
89 extern int px_msiq_alloc_based_on_cpuid(px_t *px_p,
92 extern int px_msiq_free(px_t *px_p, msiqid_t msiq_id);
93 extern void px_msiq_redist(px_t *px_p);
95 extern devino_t px_msiqid_to_devino(px_t *px_p, msiqid_t msiq_id);
96 extern msiqid_t px_devino_to_msiqid(px_t *px_p, devino_t devino);
H A Dpx_intr.c75 px_t *px_p = ino_p->ino_ib_p->ib_px_p; in px_spurintr() local
102 cmn_err(CE_WARN, err_fmt_str, NAMEINST(px_p->px_dip), ino_p->ino_ino); in px_spurintr()
114 if (px_lib_intr_setstate(px_p->px_dip, ino_p->ino_sysino, in px_spurintr()
148 px_t *px_p = ino_p->ino_ib_p->ib_px_p; in px_intx_intr() local
154 DBG(DBG_INTX_INTR, px_p->px_dip, "px_intx_intr:" in px_intx_intr()
166 DBG(DBG_INTX_INTR, px_p->px_dip, in px_intx_intr()
174 DBG(DBG_INTX_INTR, px_p->px_dip, "px_intx_intr:" in px_intx_intr()
219 if (px_lib_intr_setstate(px_p->px_dip, in px_intx_intr()
250 px_t *px_p = ino_p->ino_ib_p->ib_px_p; in px_msiq_intr() local
251 px_msiq_state_t *msiq_state_p = &px_p->px_ib_p->ib_msiq_state; in px_msiq_intr()
[all …]
H A Dpx_tools.c73 px_t *px_p = DIP_TO_STATE(dip); in pxtool_intr_info() local
74 px_msi_state_t *msi_state_p = &px_p->px_ib_p->ib_msi_state; in pxtool_intr_info()
120 px_t *px_p = DIP_TO_STATE(dip); in pxtool_get_intr() local
132 px_msi_state_t *msi_state_p = &px_p->px_ib_p->ib_msi_state; in pxtool_get_intr()
153 iget->ino = px_msiqid_to_devino(px_p, msiq_id); in pxtool_get_intr()
211 iget->num_devs = pxtool_ib_get_ino_devs(px_p, iget->ino, in pxtool_get_intr()
214 if (px_ib_get_intr_target(px_p, iget->ino, in pxtool_get_intr()
254 px_t *px_p = DIP_TO_STATE(dip); in pxtool_set_intr() local
293 px_msi_state_t *msi_state_p = &px_p->px_ib_p->ib_msi_state; in pxtool_set_intr()
313 iset.ino = px_msiqid_to_devino(px_p, msiq_id); in pxtool_set_intr()
[all …]
H A Dpx_ib.h131 extern int px_ib_attach(px_t *px_p);
132 extern void px_ib_detach(px_t *px_p);
133 extern void px_ib_intr_enable(px_t *px_p, cpuid_t cpuid, devino_t ino);
147 extern int px_ib_ino_add_intr(px_t *px_p, px_ino_pil_t *ipil_p, px_ih_t *ih_p);
148 extern int px_ib_ino_rem_intr(px_t *px_p, px_ino_pil_t *ipil_p, px_ih_t *ih_p);
157 extern int px_ib_update_intr_state(px_t *px_p, dev_info_t *rdip, uint_t inum,
160 extern int px_ib_get_intr_target(px_t *px_p, devino_t ino, cpuid_t *cpu_id_p);
161 extern int px_ib_set_intr_target(px_t *px_p, devino_t ino, cpuid_t cpu_id);
162 extern int px_ib_set_msix_target(px_t *px_p, ddi_intr_handle_impl_t *hdlp,
164 extern uint8_t pxtool_ib_get_ino_devs(px_t *px_p, uint32_t ino,
[all …]
H A Dpx_fdvma.c54 px_t *px_p = (px_t *)fdvma_p->softsp; in px_fdvma_load() local
55 px_mmu_t *mmu_p = px_p->px_mmu_p; in px_fdvma_load()
56 dev_info_t *dip = px_p->px_dip; in px_fdvma_load()
104 px_t *px_p = (px_t *)fdvma_p->softsp; in px_fdvma_unload() local
108 DBG(DBG_FAST_DVMA, px_p->px_dip, in px_fdvma_unload()
112 px_mmu_unmap_pages(px_p->px_mmu_p, mp, dvma_pg, npages); in px_fdvma_unload()
122 px_t *px_p = (px_t *)fdvma_p->softsp; in px_fdvma_sync() local
125 DBG(DBG_FAST_DVMA, px_p->px_dip, in px_fdvma_sync()
131 px_fdvma_reserve(dev_info_t *dip, dev_info_t *rdip, px_t *px_p, in px_fdvma_reserve() argument
136 px_mmu_t *mmu_p = px_p->px_mmu_p; in px_fdvma_reserve()
[all …]
H A Dpx_mmu.c41 px_mmu_attach(px_t *px_p) in px_mmu_attach() argument
43 dev_info_t *dip = px_p->px_dip; in px_mmu_attach()
59 px_p->px_mmu_p = mmu_p; in px_mmu_attach()
60 mmu_p->mmu_px_p = px_p; in px_mmu_attach()
74 px_p->px_mmu_p = NULL; in px_mmu_attach()
120 if (px_lib_iommu_getmap(px_p->px_dip, PCI_TSBID(0, tsb_i), in px_mmu_attach()
150 px_mmu_detach(px_t *px_p) in px_mmu_detach() argument
152 px_mmu_t *mmu_p = px_p->px_mmu_p; in px_mmu_detach()
154 (void) px_lib_iommu_detach(px_p); in px_mmu_detach()
173 px_p->px_mmu_p = NULL; in px_mmu_detach()
[all …]
H A Dpx_msi.h91 extern int px_msi_attach(px_t *px_p);
92 extern void px_msi_detach(px_t *px_p);
94 extern int px_msi_alloc(px_t *px_p, dev_info_t *rdip, int type, int inum,
96 extern int px_msi_free(px_t *px_p, dev_info_t *rdip, int inum,
99 extern int px_msi_get_msinum(px_t *px_p, dev_info_t *rdip,
H A Dpx_dma.c235 px_dma_attach(px_t *px_p) in px_dma_attach() argument
239 if (px_lib_iommu_getbypass(px_p->px_dip, 0ull, in px_dma_attach()
243 px_p->px_dev_caps |= PX_BYPASS_DMA_ALLOWED; in px_dma_attach()
245 px_p->px_dma_sync_opt = ddi_prop_get_int(DDI_DEV_T_ANY, in px_dma_attach()
246 px_p->px_dip, DDI_PROP_DONTPASS, "dma-sync-options", 0); in px_dma_attach()
248 if (px_p->px_dma_sync_opt != 0) in px_dma_attach()
249 px_p->px_dev_caps |= PX_DMA_SYNC_REQUIRED; in px_dma_attach()
269 px_dma_attr2hdl(px_t *px_p, ddi_dma_impl_t *mp) in px_dma_attr2hdl() argument
271 px_mmu_t *mmu_p = px_p->px_mmu_p; in px_dma_attr2hdl()
281 DBG(DBG_DMA_ALLOCH, px_p->px_dip, "attrp=%p cntr_max=%x.%08x\n", in px_dma_attr2hdl()
[all …]
H A Dpx_lib.h93 extern int px_lib_iommu_detach(px_t *px_p);
160 extern int px_lib_pmctl(int cmd, px_t *px_p);
167 extern uint64_t px_get_rng_parent_hi_mask(px_t *px_p);
193 extern void px_panic_domain(px_t *px_p, pcie_req_id_t bdf);
206 extern void px_hp_intr_redist(px_t *px_p);
208 extern boolean_t px_lib_is_in_drain_state(px_t *px_p);
209 extern pcie_req_id_t px_lib_get_bdf(px_t *px_p);
211 extern int px_lib_get_root_complex_mps(px_t *px_p, dev_info_t *dip, int *mps);
212 extern int px_lib_set_root_complex_mps(px_t *px_p, dev_info_t *dip, int mps);
H A Dpx_pec.h110 extern int px_pec_attach(px_t *px_p);
111 extern void px_pec_detach(px_t *px_p);
112 extern int px_pec_msg_add_intr(px_t *px_p);
113 extern void px_pec_msg_rem_intr(px_t *px_p);
/illumos-gate/usr/src/uts/sun4u/io/px/
H A Dpx_lib4u.c63 static int px_goto_l23ready(px_t *px_p);
64 static int px_goto_l0(px_t *px_p);
65 static int px_pre_pwron_check(px_t *px_p);
66 static uint32_t px_identity_init(px_t *px_p);
186 px_t *px_p = DIP_TO_STATE(dip); in px_lib_dev_init() local
187 px_chip_type_t chip_type = px_identity_init(px_p); in px_lib_dev_init()
246 px_p->px_plat_p = (void *)pxu_p; in px_lib_dev_init()
285 px_p->px_supp_intr_types |= DDI_INTR_TYPE_FIXED; in px_lib_dev_init()
295 px_t *px_p = DIP_TO_STATE(dip); in px_lib_dev_fini() local
296 pxu_t *pxu_p = (pxu_t *)px_p->px_plat_p; in px_lib_dev_fini()
[all …]
H A Dpx_tools_4u.c94 pxtool_safe_phys_peek(px_t *px_p, boolean_t type, size_t size, uint64_t paddr, in pxtool_safe_phys_peek() argument
97 px_pec_t *pec_p = px_p->px_pec_p; in pxtool_safe_phys_peek()
98 pxu_t *pxu_p = (pxu_t *)px_p->px_plat_p; in pxtool_safe_phys_peek()
168 pxtool_safe_phys_poke(px_t *px_p, boolean_t type, size_t size, uint64_t paddr, in pxtool_safe_phys_poke() argument
172 pxu_t *pxu_p = (pxu_t *)px_p->px_plat_p; in pxtool_safe_phys_poke()
173 px_pec_t *pec_p = px_p->px_pec_p; in pxtool_safe_phys_poke()
214 px_lib_clr_errs(px_p, 0, paddr); in pxtool_safe_phys_poke()
256 pxtool_access(px_t *px_p, pcitool_reg_t *prg_p, uint64_t *data_p, in pxtool_access() argument
259 dev_info_t *dip = px_p->px_dip; in pxtool_access()
278 if (pxtool_safe_phys_poke(px_p, endian, size, phys_addr, in pxtool_access()
[all …]
H A Dpx_err.c633 static void px_err_snapshot(px_t *px_p, px_err_ss_t *ss, int block);
634 static int px_err_erpt_and_clr(px_t *px_p, ddi_fm_error_t *derr,
636 static int px_err_check_severity(px_t *px_p, ddi_fm_error_t *derr,
653 px_t *px_p = DIP_TO_STATE(rpdip); in px_err_cb_intr() local
663 if (px_fm_enter(px_p) != DDI_SUCCESS) in px_err_cb_intr()
666 err = px_err_cmn_intr(px_p, &derr, PX_INTR_CALL, PX_FM_BLOCK_HOST); in px_err_cb_intr()
671 px_fm_exit(px_p); in px_err_cb_intr()
693 px_t *px_p = DIP_TO_STATE(rpdip); in px_err_dmc_pec_intr() local
703 if (px_fm_enter(px_p) != DDI_SUCCESS) in px_err_dmc_pec_intr()
707 rc_err = px_err_cmn_intr(px_p, &derr, PX_INTR_CALL, PX_FM_BLOCK_PCIE); in px_err_dmc_pec_intr()
[all …]
/illumos-gate/usr/src/uts/sun4v/io/px/
H A Dpx_lib4v.c96 px_t *px_p = DIP_TO_STATE(dip); in px_lib_dev_init() local
150 px_p->px_supp_intr_types |= DDI_INTR_TYPE_FIXED; in px_lib_dev_init()
229 px_p->px_plat_p = (void *)(uintptr_t)px_lib_count_waiting_dev(dip); in px_lib_dev_init()
231 (int)(uintptr_t)px_p->px_plat_p, dip); in px_lib_dev_init()
411 px_t *px_p = DIP_TO_STATE(dip); in px_lib_intr_reset() local
412 px_ib_t *ib_p = px_p->px_ib_p; in px_lib_intr_reset()
563 px_lib_iommu_detach(px_t *px_p) in px_lib_iommu_detach() argument
570 px_get_rng_parent_hi_mask(px_t *px_p) in px_get_rng_parent_hi_mask() argument
711 px_t *px_p = DIP_TO_STATE(dip); in px_lib_msiq_init() local
712 px_msiq_state_t *msiq_state_p = &px_p->px_ib_p->ib_msiq_state; in px_lib_msiq_init()
[all …]
H A Dpx_tools_4v.c130 pxtool_phys_access(px_t *px_p, uintptr_t dev_addr, in pxtool_phys_access() argument
138 dev_info_t *dip = px_p->px_dip; in pxtool_phys_access()
220 pxtool_pcicfg_access(px_t *px_p, pcitool_reg_t *prg_p, in pxtool_pcicfg_access() argument
225 dev_info_t *dip = px_p->px_dip; in pxtool_pcicfg_access()
226 px_pec_t *pec_p = px_p->px_pec_p; in pxtool_pcicfg_access()
356 pxtool_pciiomem_access(px_t *px_p, pcitool_reg_t *prg_p, in pxtool_pciiomem_access() argument
361 dev_info_t *dip = px_p->px_dip; in pxtool_pciiomem_access()
362 px_pec_t *pec_p = px_p->px_pec_p; in pxtool_pciiomem_access()
386 rval = hvio_poke(px_p->px_dev_hdl, prg_p->phys_addr, in pxtool_pciiomem_access()
405 rval = hvio_peek(px_p->px_dev_hdl, prg_p->phys_addr, in pxtool_pciiomem_access()
[all …]

12