Lines Matching refs:softc
180 ivhd_dev_add_entry(struct amdvi_softc *softc, uint32_t start_id, in ivhd_dev_add_entry() argument
185 KASSERT(softc->dev_cfg_cap >= softc->dev_cfg_cnt, in ivhd_dev_add_entry()
187 if (softc->dev_cfg_cap == softc->dev_cfg_cnt) { in ivhd_dev_add_entry()
188 if (softc->dev_cfg_cap == 0) in ivhd_dev_add_entry()
189 softc->dev_cfg_cap = 1; in ivhd_dev_add_entry()
191 softc->dev_cfg_cap <<= 2; in ivhd_dev_add_entry()
192 softc->dev_cfg = realloc(softc->dev_cfg, in ivhd_dev_add_entry()
193 sizeof(*softc->dev_cfg) * softc->dev_cfg_cap, M_DEVBUF, in ivhd_dev_add_entry()
197 dev_cfg = &softc->dev_cfg[softc->dev_cfg_cnt++]; in ivhd_dev_add_entry()
208 ivhd_dev_parse(ACPI_IVRS_HARDWARE1 *ivhd, struct amdvi_softc *softc) in ivhd_dev_parse() argument
228 device_printf(softc->dev, in ivhd_dev_parse()
240 for (i = 0; i < softc->dev_cfg_cnt; i++) in ivhd_dev_parse()
241 softc->dev_cfg[i].data |= all_data; in ivhd_dev_parse()
254 ivhd_dev_add_entry(softc, de->Id, de->Id, in ivhd_dev_parse()
262 device_printf(softc->dev, in ivhd_dev_parse()
278 device_printf(softc->dev, in ivhd_dev_parse()
284 device_printf(softc->dev, in ivhd_dev_parse()
288 ivhd_dev_add_entry(softc, range_start_id, range_end_id, in ivhd_dev_parse()
304 device_printf(softc->dev, in ivhd_dev_parse()
609 ivhd_print_cap(struct amdvi_softc *softc, ACPI_IVRS_HARDWARE1 * ivhd) in ivhd_print_cap() argument
614 dev = softc->dev; in ivhd_print_cap()
616 ivhd_print_flag(dev, softc->ivhd_type, softc->ivhd_flag); in ivhd_print_cap()
617 ivhd_print_feature(dev, softc->ivhd_type, softc->ivhd_feature); in ivhd_print_cap()
618 ivhd_print_ext_feature(dev, softc->ext_feature); in ivhd_print_cap()
626 device_printf(softc->dev, "supported paging level:%d, will use only: %d\n", in ivhd_print_cap()
638 struct amdvi_softc *softc; in ivhd_attach() local
648 softc = device_get_softc(dev); in ivhd_attach()
649 softc->dev = dev; in ivhd_attach()
652 softc->pci_dev = pci_find_dbsf(ivhd->PciSegmentGroup, in ivhd_attach()
657 softc->ivhd_type = ivhd->Header.Type; in ivhd_attach()
658 softc->pci_seg = ivhd->PciSegmentGroup; in ivhd_attach()
659 softc->pci_rid = ivhd->Header.DeviceId; in ivhd_attach()
660 softc->ivhd_flag = ivhd->Header.Flags; in ivhd_attach()
665 softc->ivhd_feature = ivhd->FeatureReporting; in ivhd_attach()
669 softc->cap_off = ivhd->CapabilityOffset; in ivhd_attach()
673 softc->event_msix = ivhd->Info & 0x1F; in ivhd_attach()
679 softc->ext_feature = ivhd_efr->EfrRegisterImage; in ivhd_attach()
683 softc->ctrl = (struct amdvi_ctrl *) PHYS_TO_DMAP(ivhd->BaseAddress); in ivhd_attach()
684 status = ivhd_dev_parse(ivhd, softc); in ivhd_attach()
691 status = ivhd_print_cap(softc, ivhd); in ivhd_attach()
695 status = amdvi_setup_hw(softc); in ivhd_attach()
705 free(softc->dev_cfg, M_DEVBUF); in ivhd_attach()
712 struct amdvi_softc *softc; in ivhd_detach() local
714 softc = device_get_softc(dev); in ivhd_detach()
716 amdvi_teardown_hw(softc); in ivhd_detach()
717 free(softc->dev_cfg, M_DEVBUF); in ivhd_detach()