/titanic_44/usr/src/uts/sun4u/io/pci/ |
H A D | pcipsy.c | 62 static uint32_t pci_identity_init(pci_t *pci_p); 63 static int pci_intr_setup(pci_t *pci_p); 64 static void pci_pbm_errstate_get(pci_t *pci_p, pbm_errstate_t *pbm_err_p); 71 pci_obj_setup(pci_t *pci_p) in pci_obj_setup() argument 77 cmn_p = get_pci_common_soft_state(pci_p->pci_id); in pci_obj_setup() 79 uint_t id = pci_p->pci_id; in pci_obj_setup() 88 ASSERT((pci_p->pci_side == 0) || (pci_p->pci_side == 1)); in pci_obj_setup() 89 if (cmn_p->pci_p[pci_p->pci_side]) { in pci_obj_setup() 91 pci_p->pci_side = PCI_OTHER_SIDE(pci_p->pci_side); in pci_obj_setup() 92 ASSERT(cmn_p->pci_p[pci_p->pci_side] == NULL); in pci_obj_setup() [all …]
|
H A D | pci_pbm.c | 56 pbm_create(pci_t *pci_p) in pbm_create() argument 60 int nrange = pci_p->pci_ranges_length / sizeof (pci_ranges_t); in pbm_create() 61 dev_info_t *dip = pci_p->pci_dip; in pbm_create() 62 pci_ranges_t *rangep = pci_p->pci_ranges; in pbm_create() 74 pci_p->pci_pbm_p = pbm_p; in pbm_create() 75 pbm_p->pbm_pci_p = pci_p; in pbm_create() 150 pci_t *pci_p = pbm_p->pbm_pci_p; in pbm_register_intr() local 154 ib_nintr_clear(pci_p->pci_ib_p, pci_p->pci_inos[CBNINTR_PBM]); in pbm_register_intr() 159 mondo = IB_INO_TO_MONDO(pci_p->pci_ib_p, pci_p->pci_inos[CBNINTR_PBM]); in pbm_register_intr() 160 mondo = CB_MONDO_TO_XMONDO(pci_p->pci_cb_p, mondo); in pbm_register_intr() [all …]
|
H A D | pcisch.c | 71 static uint32_t pci_identity_init(pci_t *pci_p); 72 static int pci_intr_setup(pci_t *pci_p); 78 static void pci_pbm_errstate_get(pci_t *pci_p, pbm_errstate_t *pbm_err_p); 91 pci_obj_setup(pci_t *pci_p) in pci_obj_setup() argument 94 uint32_t chip_id = pci_identity_init(pci_p); in pci_obj_setup() 95 uint32_t cmn_id = PCI_CMN_ID(ID_CHIP_TYPE(chip_id), pci_p->pci_id); in pci_obj_setup() 99 if (pci_alloc_tsb(pci_p) != DDI_SUCCESS) in pci_obj_setup() 107 pci_free_tsb(pci_p); in pci_obj_setup() 115 ASSERT((pci_p->pci_side == 0) || (pci_p->pci_side == 1)); in pci_obj_setup() 116 if (cmn_p->pci_p[pci_p->pci_side]) { in pci_obj_setup() [all …]
|
H A D | pci_fm.c | 139 pci_t *pci_p = get_pci_soft_state(ddi_get_instance(dip)); in pci_fm_init_child() local 142 *ibc = pci_p->pci_fm_ibc; in pci_fm_init_child() 144 return (pci_p->pci_fm_cap); in pci_fm_init_child() 153 pci_t *pci_p = get_pci_soft_state(ddi_get_instance(dip)); in pci_bus_enter() local 154 pbm_t *pbm_p = pci_p->pci_pbm_p; in pci_bus_enter() 169 pci_t *pci_p = get_pci_soft_state(ddi_get_instance(dip)); in pci_bus_exit() local 170 pbm_t *pbm_p = pci_p->pci_pbm_p; in pci_bus_exit() 177 mutex_enter(&pci_p->pci_common_p->pci_fm_mutex); in pci_bus_exit() 181 if (pci_check_error(pci_p) != 0) { in pci_bus_exit() 182 (void) pci_pbm_err_handler(pci_p->pci_dip, &derr, in pci_bus_exit() [all …]
|
H A D | pci_devctl.c | 84 pci_t *pci_p; in pci_open() local 97 pci_p = DEV_TO_SOFTSTATE(*devp); in pci_open() 98 if (pci_p == NULL) in pci_open() 104 DEBUG2(DBG_OPEN, pci_p->pci_dip, "devp=%x: flags=%x\n", devp, flags); in pci_open() 105 mutex_enter(&pci_p->pci_mutex); in pci_open() 106 orig_pci_soft_state = pci_p->pci_soft_state; in pci_open() 108 if (pci_p->pci_soft_state != PCI_SOFT_STATE_CLOSED) { in pci_open() 109 mutex_exit(&pci_p->pci_mutex); in pci_open() 110 DEBUG0(DBG_OPEN, pci_p->pci_dip, "busy\n"); in pci_open() 113 pci_p->pci_soft_state = PCI_SOFT_STATE_OPEN_EXCL; in pci_open() [all …]
|
H A D | pci.c | 62 static int pci_ctlops_poke(pci_t *pci_p, peekpoke_ctlops_t *in_args); 63 static int pci_ctlops_peek(pci_t *pci_p, peekpoke_ctlops_t *in_args, 248 pci_t *pci_p = get_pci_soft_state(instance); in pci_info() local 251 if (pci_p && (pci_p->hotplug_capable == B_TRUE)) in pci_info() 261 if (pci_p == NULL) in pci_info() 263 *result = (void *)pci_p->pci_dip; in pci_info() 279 pci_t *pci_p; /* per bus state pointer */ in pci_attach() local 294 pci_p = get_pci_soft_state(instance); in pci_attach() 295 pci_p->pci_dip = dip; in pci_attach() 296 mutex_init(&pci_p->pci_mutex, NULL, MUTEX_DRIVER, NULL); in pci_attach() [all …]
|
H A D | pci_ecc.c | 61 ecc_create(pci_t *pci_p) in ecc_create() argument 64 dev_info_t *dip = pci_p->pci_dip; in ecc_create() 66 uint64_t cb_base_pa = pci_p->pci_cb_p->cb_base_pa; in ecc_create() 70 ecc_p->ecc_pci_cmn_p = pci_p->pci_common_p; in ecc_create() 71 pci_p->pci_ecc_p = ecc_p; in ecc_create() 96 ecc_configure(pci_p); in ecc_create() 105 ecc_register_intr(pci_t *pci_p) in ecc_register_intr() argument 107 ecc_t *ecc_p = pci_p->pci_ecc_p; in ecc_register_intr() 113 if ((ret = pci_ecc_add_intr(pci_p, CBNINTR_UE, &ecc_p->ecc_ue)) != in ecc_register_intr() 116 if ((ret = pci_ecc_add_intr(pci_p, CBNINTR_CE, &ecc_p->ecc_ce)) != in ecc_register_intr() [all …]
|
H A D | pci_util.c | 61 get_pci_properties(pci_t *pci_p, dev_info_t *dip) in get_pci_properties() argument 68 if ((pci_p->pci_id = (uint32_t)pci_get_portid(dip)) == -1u) { in get_pci_properties() 77 i = sizeof (pci_p->pci_bus_range); in get_pci_properties() 79 "bus-range", (caddr_t)&pci_p->pci_bus_range, &i) != DDI_SUCCESS) { in get_pci_properties() 85 pci_p->pci_bus_range.lo, pci_p->pci_bus_range.hi); in get_pci_properties() 101 (caddr_t)&pci_p->pci_ranges, &pci_p->pci_ranges_length) != in get_pci_properties() 108 pci_fix_ranges(pci_p->pci_ranges, in get_pci_properties() 109 pci_p->pci_ranges_length / sizeof (pci_ranges_t)); in get_pci_properties() 114 pci_p->pci_numproxy = pci_get_numproxy(pci_p->pci_dip); in get_pci_properties() 116 pci_p->pci_numproxy); in get_pci_properties() [all …]
|
H A D | pci_tools.c | 101 static int pcitool_phys_peek(pci_t *pci_p, boolean_t type, size_t size, 103 static int pcitool_phys_poke(pci_t *pci_p, boolean_t type, size_t size, 105 static int pcitool_access(pci_t *pci_p, uint64_t phys_addr, uint64_t max_addr, 109 static int pcitool_get_bar(pci_t *pci_p, pcitool_reg_t *prg, 112 static int pcitool_config_request(pci_t *pci_p, pcitool_reg_t *prg, 115 static int pcitool_get_intr(dev_info_t *dip, void *arg, int mode, pci_t *pci_p); 116 static int pcitool_set_intr(dev_info_t *dip, void *arg, int mode, pci_t *pci_p); 130 pcitool_phys_peek(pci_t *pci_p, boolean_t type, size_t size, in pcitool_phys_peek() argument 137 pbm_t *pbm_p = pci_p->pci_pbm_p; in pcitool_phys_peek() 192 pcitool_phys_poke(pci_t *pci_p, boolean_t type, size_t size, in pcitool_phys_poke() argument [all …]
|
H A D | pci_fdvma.c | 54 pci_t *pci_p = (pci_t *)fdvma_p->softsp; in pci_fdvma_load() local 55 iommu_t *iommu_p = pci_p->pci_iommu_p; in pci_fdvma_load() 56 dev_info_t *dip = pci_p->pci_dip; in pci_fdvma_load() 132 pci_t *pci_p = (pci_t *)fdvma_p->softsp; in pci_fdvma_unload() local 137 DEBUG5(DBG_FAST_DVMA, pci_p->pci_dip, in pci_fdvma_unload() 143 pci_fdvma_unregister_callbacks(pci_p, fdvma_p, mp, in pci_fdvma_unload() 146 iommu_unmap_pages(pci_p->pci_iommu_p, dvma_pg, npg); in pci_fdvma_unload() 149 pci_dma_sync(pci_p->pci_dip, mp->dmai_rdip, h, in pci_fdvma_unload() 153 pci_fdvma_unregister_callbacks(pci_p, fdvma_p, mp, in pci_fdvma_unload() 156 iommu_unmap_pages(pci_p->pci_iommu_p, dvma_pg, npg); in pci_fdvma_unload() [all …]
|
H A D | pci_counters.c | 44 pci_kstat_create(pci_t *pci_p) in pci_kstat_create() argument 46 pci_common_t *cmn_p = pci_p->pci_common_p; in pci_kstat_create() 49 pci_add_upstream_kstat(pci_p); in pci_kstat_create() 51 pci_add_pci_kstat(pci_p); in pci_kstat_create() 55 pci_kstat_destroy(pci_t *pci_p) in pci_kstat_destroy() argument 57 pci_common_t *cmn_p = pci_p->pci_common_p; in pci_kstat_destroy() 59 pci_rem_pci_kstat(pci_p); in pci_kstat_destroy() 62 pci_rem_upstream_kstat(pci_p); in pci_kstat_destroy() 157 kstat_t *pci_create_cntr_kstat(pci_t *pci_p, char *name, in pci_create_cntr_kstat() argument 163 dev_info_t *dip = pci_p->pci_dip; in pci_create_cntr_kstat() [all …]
|
H A D | pci_ib.c | 52 ib_create(pci_t *pci_p) in ib_create() argument 54 dev_info_t *dip = pci_p->pci_dip; in ib_create() 64 pci_p->pci_ib_p = ib_p; in ib_create() 65 ib_p->ib_pci_p = pci_p; in ib_create() 82 if (CHIP_TYPE(pci_p) != PCI_CHIP_XMITS) { in ib_create() 106 pci_p->pci_numproxy); in ib_create() 107 for (i = 1; i <= pci_p->pci_numproxy; i++) { in ib_create() 108 set_intr_mapping_reg(pci_p->pci_id, in ib_create() 117 ib_destroy(pci_t *pci_p) in ib_destroy() argument 119 ib_t *ib_p = pci_p->pci_ib_p; in ib_destroy() [all …]
|
H A D | pci_intr.c | 148 pci_t *pci_p = get_pci_soft_state(ddi_get_instance(dip)); in map_pcidev_cfg_reg() local 156 DEBUG4(DBG_A_INTX, pci_p->pci_dip, in map_pcidev_cfg_reg() 179 DEBUG0(DBG_A_INTX, pci_p->pci_dip, in map_pcidev_cfg_reg() 195 DEBUG0(DBG_A_INTX, pci_p->pci_dip, in map_pcidev_cfg_reg() 204 if (!simba_found && (CHIP_TYPE(pci_p) < PCI_CHIP_SCHIZO)) in map_pcidev_cfg_reg() 224 pci_t *pci_p = ino_p->ino_ib_p->ib_pci_p; in pci_spurintr() local 257 cmn_err(CE_WARN, err_fmt_str, NAMEINST(pci_p->pci_dip), ino_p->ino_ino); in pci_spurintr() 295 pci_t *pci_p = ino_p->ino_ib_p->ib_pci_p; in pci_intr_wrapper() local 296 pbm_t *pbm_p = pci_p->pci_pbm_p; in pci_intr_wrapper() 313 DEBUG3(DBG_INTR, pci_p->pci_dip, in pci_intr_wrapper() [all …]
|
H A D | pci_sc.c | 46 sc_create(pci_t *pci_p) in sc_create() argument 48 dev_info_t *dip = pci_p->pci_dip; in sc_create() 64 pci_p->pci_sc_p = sc_p; in sc_create() 65 sc_p->sc_pci_p = pci_p; in sc_create() 112 sc_destroy(pci_t *pci_p) in sc_destroy() argument 119 sc_p = pci_p->pci_sc_p; in sc_destroy() 121 DEBUG0(DBG_DETACH, pci_p->pci_dip, "sc_destroy:\n"); in sc_destroy() 130 pci_p->pci_sc_p = NULL; in sc_destroy()
|
H A D | pci_cb.c | 48 cb_create(pci_t *pci_p) in cb_create() argument 53 pci_p->pci_cb_p = cb_p; in cb_create() 54 cb_p->cb_pci_cmn_p = pci_p->pci_common_p; in cb_create() 56 pci_cb_setup(pci_p); in cb_create() 60 cb_destroy(pci_t *pci_p) in cb_destroy() argument 62 cb_t *cb_p = pci_p->pci_cb_p; in cb_destroy() 65 pci_cb_teardown(pci_p); in cb_destroy() 66 pci_p->pci_cb_p = NULL; in cb_destroy() 90 cb_enable_nintr(pci_t *pci_p, enum cb_nintr_index idx) in cb_enable_nintr() argument 92 cb_t *cb_p = pci_p->pci_cb_p; in cb_enable_nintr() [all …]
|
H A D | pci_iommu.c | 50 iommu_create(pci_t *pci_p) in iommu_create() argument 52 dev_info_t *dip = pci_p->pci_dip; in iommu_create() 68 pci_p->pci_iommu_p = iommu_p; in iommu_create() 69 iommu_p->iommu_pci_p = pci_p; in iommu_create() 93 iommu_tsb_cookie_to_va(pci_p->pci_tsb_cookie); in iommu_create() 126 iommu_tsb_cookie_to_size(pci_p->pci_tsb_cookie)); in iommu_create() 172 iommu_destroy(pci_t *pci_p) in iommu_destroy() argument 175 dev_info_t *dip = pci_p->pci_dip; in iommu_destroy() 177 iommu_t *iommu_p = pci_p->pci_iommu_p; in iommu_destroy() 194 iommu_tsb_free(pci_p->pci_tsb_cookie); in iommu_destroy() [all …]
|
H A D | pci_dma.c | 153 pci_t *pci_p = get_pci_soft_state(ret); in pci_dma_sync() local 154 pbm_t *pbm_p = pci_p->pci_pbm_p; in pci_dma_sync() 192 sc_p = pci_p->pci_sc_p; in pci_dma_sync() 425 pci_dma_attr2hdl(pci_t *pci_p, ddi_dma_impl_t *mp) in pci_dma_attr2hdl() argument 427 iommu_t *iommu_p = pci_p->pci_iommu_p; in pci_dma_attr2hdl() 436 DEBUG3(DBG_DMA_ALLOCH, pci_p->pci_dip, "attrp=%p cntr_max=%x.%08x\n", in pci_dma_attr2hdl() 438 DEBUG4(DBG_DMA_ALLOCH, pci_p->pci_dip, "hi=%x.%08x lo=%x.%08x\n", in pci_dma_attr2hdl() 440 DEBUG4(DBG_DMA_ALLOCH, pci_p->pci_dip, "seg=%x.%08x align=%x.%08x\n", in pci_dma_attr2hdl() 447 DEBUG0(DBG_DMA_ALLOCH, pci_p->pci_dip, "bypass mode\n"); in pci_dma_attr2hdl() 483 DEBUG4(DBG_DMA_ALLOCH, pci_p->pci_dip, "hi=%x.%08x, lo=%x.%08x\n", in pci_dma_attr2hdl() [all …]
|
H A D | pci_reloc.c | 66 pci_dvma_unregister_callbacks(pci_t *pci_p, ddi_dma_impl_t *mp) in pci_dvma_unregister_callbacks() argument 193 pci_t *pci_p = get_pci_soft_state(ddi_get_instance(dip)); in pci_dvma_remap() local 194 iommu_t *iommu_p = pci_p->pci_iommu_p; in pci_dvma_remap() 208 ASSERT(pci_p->pci_pbm_p->pbm_quiesce_count > 0); in pci_dvma_remap() 219 pci_t *pci_p = (pci_t *)fdvma_p->softsp; in pci_fdvma_remap() local 220 iommu_t *iommu_p = pci_p->pci_iommu_p; in pci_fdvma_remap() 221 dev_info_t *dip = pci_p->pci_dip; in pci_fdvma_remap() 346 pci_fdvma_unregister_callbacks(pci_t *pci_p, fdvma_t *fdvma_p, in pci_fdvma_unregister_callbacks() argument
|
/titanic_44/usr/src/uts/sun4u/sys/pci/ |
H A D | pci_chip.h | 35 extern void pci_post_init_child(pci_t *pci_p, dev_info_t *child); 36 extern void pci_post_uninit_child(pci_t *pci_p); 38 extern int pci_obj_setup(pci_t *pci_p); 39 extern void pci_obj_destroy(pci_t *pci_p); 40 extern void pci_obj_resume(pci_t *pci_p); 41 extern void pci_obj_suspend(pci_t *pci_p); 46 extern void pci_add_pci_kstat(pci_t *pci_p); 47 extern void pci_rem_pci_kstat(pci_t *pci_p); 49 extern void pci_add_upstream_kstat(pci_t *pci_p); 52 extern int map_pci_registers(pci_t *pci_p, dev_info_t *dip); [all …]
|
H A D | pci_util.h | 36 extern int init_child(pci_t *pci_p, dev_info_t *child); 37 extern int uninit_child(pci_t *pci_p, dev_info_t *child); 39 extern int get_pci_properties(pci_t *pci_p, dev_info_t *dip); 40 extern void free_pci_properties(pci_t *pci_p); 41 extern void unmap_pci_registers(pci_t *pci_p); 42 extern void fault_init(pci_t *pci_p); 43 extern void fault_fini(pci_t *pci_p); 48 extern int pci_reloc_reg(dev_info_t *dip, dev_info_t *rdip, pci_t *pci_p, 50 extern int pci_xlate_reg(pci_t *pci_p, pci_regspec_t *pci_rp, 56 extern uint64_t pci_get_cfg_pabase(pci_t *pci_p);
|
H A D | pci_ecc.h | 74 extern void ecc_create(pci_t *pci_p); 75 extern int ecc_register_intr(pci_t *pci_p); 76 extern void ecc_destroy(pci_t *pci_p); 77 extern void ecc_configure(pci_t *pci_p); 78 extern void ecc_enable_intr(pci_t *pci_p);
|
H A D | pci_var.h | 75 #define PCI_CHIP_ID(pci_p) ((pci_p)->pci_common_p->pci_chip_id) argument 76 #define CHIP_TYPE(pci_p) ID_CHIP_TYPE(PCI_CHIP_ID(pci_p)) argument 77 #define CHIP_REV(pci_p) (PCI_CHIP_ID(pci_p) & 0xFF) argument 78 #define CHIP_VER(pci_p) ((PCI_CHIP_ID(pci_p) >> 8) & 0xFF) argument 98 pci_t *pci_p[2]; /* pci soft states of both sides */ member
|
H A D | pci_ib.h | 195 extern void ib_create(pci_t *pci_p); 196 extern void ib_destroy(pci_t *pci_p); 199 extern void ib_intr_enable(pci_t *pci_p, ib_ino_t ino); 211 extern void ib_ino_add_intr(pci_t *pci_p, ib_ino_pil_t *ipil_p, ih_t *ih_p); 212 extern void ib_ino_rem_intr(pci_t *pci_p, ib_ino_pil_t *ipil_p, ih_t *ih_p); 230 extern int ib_update_intr_state(pci_t *pci_p, dev_info_t *rdip, 232 extern int ib_get_intr_target(pci_t *pci_p, ib_ino_t ino, int *cpu_id_p); 233 extern int ib_set_intr_target(pci_t *pci_p, ib_ino_t ino, int cpu_id);
|
H A D | pci_cb.h | 91 extern void cb_create(pci_t *pci_p); 92 extern void cb_destroy(pci_t *pci_p); 95 extern void cb_enable_nintr(pci_t *pci_p, enum cb_nintr_index idx);
|
/titanic_44/usr/src/uts/i86pc/io/pciex/ |
H A D | npe.c | 711 pci_state_t *pci_p = ddi_get_soft_state(npe_statep, in npe_ctlops() local 799 pf_init(rdip, (void *)pci_p->pci_fm_ibc, asp->cmd); in npe_ctlops() 997 pci_state_t *pci_p = ddi_get_soft_state(npe_statep, instance); in npe_open() local 1006 if (pci_p == NULL) in npe_open() 1009 mutex_enter(&pci_p->pci_mutex); in npe_open() 1016 rv = pcie_open(pci_p->pci_dip, devp, flags, otyp, credp); in npe_open() 1017 mutex_exit(&pci_p->pci_mutex); in npe_open() 1023 if (pci_p->pci_soft_state != PCI_SOFT_STATE_CLOSED) { in npe_open() 1024 mutex_exit(&pci_p->pci_mutex); in npe_open() 1028 pci_p->pci_soft_state = PCI_SOFT_STATE_OPEN_EXCL; in npe_open() [all …]
|