Lines Matching refs:pi_msix

304 		pi->pi_msix.pba_bar =  in cfginitmsi()
306 pi->pi_msix.pba_offset = in cfginitmsi()
308 pi->pi_msix.table_bar = in cfginitmsi()
310 pi->pi_msix.table_offset = in cfginitmsi()
312 pi->pi_msix.table_count = MSIX_TABLE_COUNT(msixcap.msgctrl); in cfginitmsi()
313 pi->pi_msix.pba_size = PBA_SIZE(pi->pi_msix.table_count); in cfginitmsi()
316 table_size = pi->pi_msix.table_count * MSIX_TABLE_ENTRY_SIZE; in cfginitmsi()
317 pi->pi_msix.table = calloc(1, table_size); in cfginitmsi()
320 for (i = 0; i < pi->pi_msix.table_count; i++) { in cfginitmsi()
321 pi->pi_msix.table[i].vector_control |= in cfginitmsi()
366 table_offset = pi->pi_msix.table_offset; in msix_table_read()
367 table_count = pi->pi_msix.table_count; in msix_table_read()
372 src8 = (uint8_t *)(pi->pi_msix.mapped_addr + offset); in msix_table_read()
376 src16 = (uint16_t *)(pi->pi_msix.mapped_addr + offset); in msix_table_read()
380 src32 = (uint32_t *)(pi->pi_msix.mapped_addr + offset); in msix_table_read()
384 src64 = (uint64_t *)(pi->pi_msix.mapped_addr + offset); in msix_table_read()
397 entry = &pi->pi_msix.table[index]; in msix_table_read()
440 table_offset = pi->pi_msix.table_offset; in msix_table_write()
441 table_count = pi->pi_msix.table_count; in msix_table_write()
446 dest8 = (uint8_t *)(pi->pi_msix.mapped_addr + offset); in msix_table_write()
450 dest16 = (uint16_t *)(pi->pi_msix.mapped_addr + offset); in msix_table_write()
454 dest32 = (uint32_t *)(pi->pi_msix.mapped_addr + offset); in msix_table_write()
458 dest64 = (uint64_t *)(pi->pi_msix.mapped_addr + offset); in msix_table_write()
469 entry = &pi->pi_msix.table[index]; in msix_table_write()
480 if (pi->pi_msix.enabled) { in msix_table_write()
521 pi->pi_msix.mapped_size = sc->psc_bar[i].size; in init_msix_table()
522 pi->pi_msix.mapped_addr = (uint8_t *)mmap(NULL, pi->pi_msix.mapped_size, in init_msix_table()
524 if (pi->pi_msix.mapped_addr == MAP_FAILED) { in init_msix_table()
529 table_offset = rounddown2(pi->pi_msix.table_offset, 4096); in init_msix_table()
531 table_size = pi->pi_msix.table_offset - table_offset; in init_msix_table()
532 table_size += pi->pi_msix.table_count * MSIX_TABLE_ENTRY_SIZE; in init_msix_table()
541 if (mprotect((caddr_t)pi->pi_msix.mapped_addr, table_offset, in init_msix_table()
544 if (table_offset + table_size != pi->pi_msix.mapped_size) in init_msix_table()
546 pi->pi_msix.mapped_addr + table_offset + table_size, in init_msix_table()
547 pi->pi_msix.mapped_size - (table_offset + table_size), in init_msix_table()
947 if (pi->pi_msix.enabled) { in passthru_cfgwrite_default()
948 msix_table_entries = pi->pi_msix.table_count; in passthru_cfgwrite_default()
952 pi->pi_msix.table[i].addr, in passthru_cfgwrite_default()
953 pi->pi_msix.table[i].msg_data, in passthru_cfgwrite_default()
954 pi->pi_msix.table[i].vector_control); in passthru_cfgwrite_default()
1068 table_offset = rounddown2(pi->pi_msix.table_offset, 4096); in passthru_msix_addr()
1080 table_size = pi->pi_msix.table_offset - table_offset; in passthru_msix_addr()
1081 table_size += pi->pi_msix.table_count * MSIX_TABLE_ENTRY_SIZE; in passthru_msix_addr()