Lines Matching refs:ivhd
198 ivhd_dev_parse(ACPI_IVRS_HARDWARE1 *ivhd, struct amdvi_softc *softc)
210 switch (ivhd->Header.Type) {
212 p = (uint8_t *)ivhd + sizeof(ACPI_IVRS_HARDWARE1);
217 p = (uint8_t *)ivhd + sizeof(ACPI_IVRS_HARDWARE2);
222 "unknown type: 0x%x\n", ivhd->Header.Type);
226 end = (uint8_t *)ivhd + ivhd->Header.Length;
330 ACPI_IVRS_HARDWARE1 *ivhd;
335 if (acpi_disabled("ivhd"))
358 ivhd = ivhd_find_by_index(i);
359 KASSERT(ivhd, ("ivhd%d is NULL\n", i));
360 ivhd_hdrs[i] = ivhd;
378 ivhd = ivhd_hdrs[i];
379 KASSERT(ivhd, ("ivhd%d is NULL\n", i));
386 ACPI_DEV_BASE_ORDER + 10 * 10, "ivhd", i);
393 ivhd_devs[i] = device_find_child(parent, "ivhd", i);
395 printf("AMD-Vi: cant find ivhd%d\n", i);
411 ACPI_IVRS_HARDWARE1 *ivhd;
419 ("ivhd unit %d > count %d", unit, ivhd_count));
420 ivhd = ivhd_hdrs[unit];
421 KASSERT(ivhd, ("ivhd is NULL"));
423 switch (ivhd->Header.Type) {
425 device_set_desc(dev, "AMD-Vi/IOMMU ivhd with EFR");
429 device_set_desc(dev, "AMD-Vi/IOMMU ivhd in mixed format");
434 device_set_desc(dev, "AMD-Vi/IOMMU ivhd");
475 device_printf(dev, "Can't decode flag of ivhd type :0x%x\n",
521 default: /* Other ivhd type features are not decoded. */
522 device_printf(dev, "Can't decode ivhd type :0x%x\n", ivhd_type);
585 ivhd_print_cap(struct amdvi_softc *softc, ACPI_IVRS_HARDWARE1 * ivhd)
615 ACPI_IVRS_HARDWARE1 *ivhd;
622 ("ivhd unit %d > count %d", unit, ivhd_count));
629 ivhd = ivhd_hdrs[unit];
630 KASSERT(ivhd, ("ivhd is NULL"));
632 softc->ivhd_type = ivhd->Header.Type;
633 softc->pci_seg = ivhd->PciSegmentGroup;
634 softc->pci_rid = ivhd->Header.DeviceId;
635 softc->ivhd_flag = ivhd->Header.Flags;
640 softc->ivhd_feature = ivhd->FeatureReporting;
644 softc->cap_off = ivhd->CapabilityOffset;
648 softc->event_msix = ivhd->Info & 0x1F;
650 switch (ivhd->Header.Type) {
653 ivhd_efr = (ACPI_IVRS_HARDWARE2 *)ivhd;
658 softc->ctrl = (struct amdvi_ctrl *) PHYS_TO_DMAP(ivhd->BaseAddress);
659 status = ivhd_dev_parse(ivhd, softc);
665 status = ivhd_print_cap(softc, ivhd);
721 "ivhd",
731 DRIVER_MODULE_ORDERED(ivhd, acpi, ivhd_driver, ivhd_devclass, 0, 0,
733 MODULE_DEPEND(ivhd, acpi, 1, 1, 1);
734 MODULE_DEPEND(ivhd, pci, 1, 1, 1);