Lines Matching full:devid

140 amdvi_find_ats_qlen(uint16_t devid)  in amdvi_find_ats_qlen()  argument
146 dev = pci_find_bsf(PCI_RID2BUS(devid), PCI_RID2SLOT(devid), in amdvi_find_ats_qlen()
147 PCI_RID2FUNC(devid)); in amdvi_find_ats_qlen()
159 RID2PCI_STR(devid), in amdvi_find_ats_qlen()
172 amdvi_dev_support_iotlb(struct amdvi_softc *softc, uint16_t devid) in amdvi_dev_support_iotlb() argument
178 qlen = amdvi_find_ats_qlen(devid); in amdvi_dev_support_iotlb()
187 if ((cfg->start_id <= devid) && (cfg->end_id >= devid)) { in amdvi_dev_support_iotlb()
198 "ATS inv qlen = %d\n", RID2PCI_STR(devid), qlen); in amdvi_dev_support_iotlb()
332 amdvi_cmd_inv_dte(struct amdvi_softc *softc, uint16_t devid) in amdvi_cmd_inv_dte() argument
339 cmd->word0 = devid; in amdvi_cmd_inv_dte()
342 device_printf(softc->dev, "Invalidated DTE:0x%x\n", devid); in amdvi_cmd_inv_dte()
372 amdvi_cmd_inv_iotlb(struct amdvi_softc *softc, uint16_t devid) in amdvi_cmd_inv_iotlb() argument
380 qlen = amdvi_find_ats_qlen(devid); in amdvi_cmd_inv_iotlb()
383 qlen, RID2PCI_STR(devid)); in amdvi_cmd_inv_iotlb()
389 device_printf(softc->dev, "Invalidate IOTLB devID 0x%x" in amdvi_cmd_inv_iotlb()
390 " Qlen:%d\n", devid, qlen); in amdvi_cmd_inv_iotlb()
393 cmd->word0 = devid; in amdvi_cmd_inv_iotlb()
404 uint16_t devid) in amdvi_cmd_inv_intr_map() argument
411 cmd->word0 = devid; in amdvi_cmd_inv_intr_map()
414 device_printf(softc->dev, "Invalidate INTR map of devID 0x%x\n", devid); in amdvi_cmd_inv_intr_map()
586 amdvi_decode_inv_dte_evt(uint16_t devid, uint16_t domid, uint64_t addr, in amdvi_decode_inv_dte_evt() argument
590 printf("\t[IO_PAGE_FAULT EVT: devId:0x%x DomId:0x%x" in amdvi_decode_inv_dte_evt()
592 devid, domid, addr); in amdvi_decode_inv_dte_evt()
597 amdvi_decode_pf_evt(uint16_t devid, uint16_t domid, uint64_t addr, in amdvi_decode_pf_evt() argument
601 printf("\t[IO_PAGE_FAULT EVT: devId:0x%x DomId:0x%x" in amdvi_decode_pf_evt()
603 devid, domid, addr); in amdvi_decode_pf_evt()
608 amdvi_decode_dte_hwerr_evt(uint16_t devid, uint16_t domid, in amdvi_decode_dte_hwerr_evt() argument
612 printf("\t[DEV_TAB_HW_ERR EVT: devId:0x%x DomId:0x%x" in amdvi_decode_dte_hwerr_evt()
613 " Addr:0x%lx", devid, domid, addr); in amdvi_decode_dte_hwerr_evt()
619 amdvi_decode_page_hwerr_evt(uint16_t devid, uint16_t domid, uint64_t addr, in amdvi_decode_page_hwerr_evt() argument
623 printf("\t[PAGE_TAB_HW_ERR EVT: devId:0x%x DomId:0x%x" in amdvi_decode_page_hwerr_evt()
624 " Addr:0x%lx", devid, domid, addr); in amdvi_decode_page_hwerr_evt()
636 amdvi_decode_inv_dte_evt(evt->devid, evt->pasid_domid, in amdvi_decode_evt()
641 amdvi_decode_pf_evt(evt->devid, evt->pasid_domid, in amdvi_decode_evt()
646 amdvi_decode_dte_hwerr_evt(evt->devid, evt->pasid_domid, in amdvi_decode_evt()
651 amdvi_decode_page_hwerr_evt(evt->devid, evt->pasid_domid, in amdvi_decode_evt()
666 printf("\t[IOTLB_INV_TIMEOUT devid:0x%x addr:0x%lx]\n", in amdvi_decode_evt()
667 evt->devid, evt->addr); in amdvi_decode_evt()
671 printf("\t[INV_DTE devid:0x%x addr:0x%lx type:0x%x tr:%d]\n", in amdvi_decode_evt()
672 evt->devid, evt->addr, evt->flag >> 9, in amdvi_decode_evt()
1198 amdvi_find_iommu(uint16_t devid) in amdvi_find_iommu() argument
1206 if ((devid >= softc->dev_cfg[j].start_id) && in amdvi_find_iommu()
1207 (devid <= softc->dev_cfg[j].end_id)) in amdvi_find_iommu()
1221 uint16_t devid, bool enable) in amdvi_set_dte() argument
1225 KASSERT(domain, ("domain is NULL for pci_rid:0x%x\n", devid)); in amdvi_set_dte()
1226 KASSERT(softc, ("softc is NULL for pci_rid:0x%x\n", devid)); in amdvi_set_dte()
1228 temp = &amdvi_dte[devid]; in amdvi_set_dte()
1232 if (amdvi_dev_support_iotlb(softc, devid) && softc->iotlb) in amdvi_set_dte()
1259 amdvi_inv_device(struct amdvi_softc *softc, uint16_t devid) in amdvi_inv_device() argument
1263 amdvi_cmd_inv_dte(softc, devid); in amdvi_inv_device()
1265 if (amdvi_dev_support_iotlb(softc, devid)) in amdvi_inv_device()
1266 amdvi_cmd_inv_iotlb(softc, devid); in amdvi_inv_device()
1272 amdvi_add_device(void *arg, uint16_t devid) in amdvi_add_device() argument
1281 RID2PCI_STR(devid), domain->id); in amdvi_add_device()
1283 softc = amdvi_find_iommu(devid); in amdvi_add_device()
1286 amdvi_set_dte(domain, softc, devid, true); in amdvi_add_device()
1287 amdvi_inv_device(softc, devid); in amdvi_add_device()
1291 amdvi_remove_device(void *arg, uint16_t devid) in amdvi_remove_device() argument
1299 devid, domain->id); in amdvi_remove_device()
1301 softc = amdvi_find_iommu(devid); in amdvi_remove_device()
1304 amdvi_set_dte(domain, softc, devid, false); in amdvi_remove_device()
1305 amdvi_inv_device(softc, devid); in amdvi_remove_device()