Lines Matching refs:pi_bar

523 		if (pdi->pi_bar[i].type == PCIBAR_IO &&  in pci_emul_io_handler()
524 (uint64_t)port >= pdi->pi_bar[i].addr && in pci_emul_io_handler()
526 pdi->pi_bar[i].addr + pdi->pi_bar[i].size) { in pci_emul_io_handler()
527 offset = port - pdi->pi_bar[i].addr; in pci_emul_io_handler()
550 assert(pdi->pi_bar[bidx].type == PCIBAR_MEM32 || in pci_emul_mem_handler()
551 pdi->pi_bar[bidx].type == PCIBAR_MEM64); in pci_emul_mem_handler()
552 assert(addr >= pdi->pi_bar[bidx].addr && in pci_emul_mem_handler()
553 addr + size <= pdi->pi_bar[bidx].addr + pdi->pi_bar[bidx].size); in pci_emul_mem_handler()
555 offset = addr - pdi->pi_bar[bidx].addr; in pci_emul_mem_handler()
614 switch (pi->pi_bar[idx].type) { in modify_bar_registration()
618 iop.port = pi->pi_bar[idx].addr; in modify_bar_registration()
619 iop.size = pi->pi_bar[idx].size; in modify_bar_registration()
632 mr.base = pi->pi_bar[idx].addr; in modify_bar_registration()
633 mr.size = pi->pi_bar[idx].size; in modify_bar_registration()
653 (*pe->pe_baraddr)(pi, idx, registration, pi->pi_bar[idx].addr); in modify_bar_registration()
674 return (pi->pi_bar[PCI_ROM_IDX].lobits & PCIM_BIOS_ENABLE) == in romen()
711 if (pi->pi_bar[idx].type == PCIBAR_IO) in update_bar_address()
722 pi->pi_bar[idx].addr = addr; in update_bar_address()
725 pi->pi_bar[idx].addr &= ~0xffffffffUL; in update_bar_address()
726 pi->pi_bar[idx].addr |= addr; in update_bar_address()
729 pi->pi_bar[idx].addr &= 0xffffffff; in update_bar_address()
730 pi->pi_bar[idx].addr |= addr; in update_bar_address()
914 pdi->pi_bar[idx].type = type; in pci_emul_assign_bar()
915 pdi->pi_bar[idx].addr = addr; in pci_emul_assign_bar()
916 pdi->pi_bar[idx].size = size; in pci_emul_assign_bar()
921 if (pdi->pi_bar[idx].lobits != 0) { in pci_emul_assign_bar()
922 lobits = pdi->pi_bar[idx].lobits; in pci_emul_assign_bar()
924 pdi->pi_bar[idx].lobits = lobits; in pci_emul_assign_bar()
933 pdi->pi_bar[idx + 1].type = PCIBAR_MEMHI64; in pci_emul_assign_bar()
2158 switch (pi->pi_bar[i].type) { in pci_emul_cmd_changed()
2315 mask = ~(pi->pi_bar[idx].size - 1); in pci_cfgrw()
2316 switch (pi->pi_bar[idx].type) { in pci_cfgrw()
2318 pi->pi_bar[idx].addr = bar = 0; in pci_cfgrw()
2323 bar = addr | pi->pi_bar[idx].lobits; in pci_cfgrw()
2327 if (addr != pi->pi_bar[idx].addr) { in pci_cfgrw()
2334 bar |= pi->pi_bar[idx].lobits; in pci_cfgrw()
2335 if (addr != pi->pi_bar[idx].addr) { in pci_cfgrw()
2342 bar |= pi->pi_bar[idx].lobits; in pci_cfgrw()
2343 if (addr != (uint32_t)pi->pi_bar[idx].addr) { in pci_cfgrw()
2349 mask = ~(pi->pi_bar[idx - 1].size - 1); in pci_cfgrw()
2352 if (bar != pi->pi_bar[idx - 1].addr >> 32) { in pci_cfgrw()
2362 pi->pi_bar[idx].addr = addr; in pci_cfgrw()
2363 pi->pi_bar[idx].lobits = *valp & in pci_cfgrw()
2369 bar |= pi->pi_bar[idx].lobits; in pci_cfgrw()