Lines Matching refs:bar

23     pci_config_read8(pci, cap_field(offset, bar), &cap.bar);  in ReadVirtioCap()
181 zx_status_t PciModernBackend::MapBar(uint8_t bar) { in MapBar() argument
182 if (bar >= fbl::count_of(bar_)) { in MapBar()
186 if (bar_[bar]) { in MapBar()
191 zx_status_t s = pci_map_bar_buffer(&pci_, bar, ZX_CACHE_POLICY_UNCACHED_DEVICE, &mmio); in MapBar()
193 zxlogf(ERROR, "%s: Failed to map bar %u: %d\n", tag(), bar, s); in MapBar()
197 bar_[bar] = ddk::MmioBuffer(mmio); in MapBar()
198 zxlogf(TRACE, "%s: bar %u mapped to %p\n", tag(), bar, bar_[bar]->get()); in MapBar()
203 zxlogf(TRACE, "%s: common cfg found in bar %u offset %#x\n", tag(), cap.bar, cap.offset); in CommonCfgCallbackLocked()
204 if (MapBar(cap.bar) != ZX_OK) { in CommonCfgCallbackLocked()
210 auto addr = reinterpret_cast<uintptr_t>(bar_[cap.bar]->get()) + cap.offset; in CommonCfgCallbackLocked()
217 zxlogf(TRACE, "%s: notify cfg found in bar %u offset %#x\n", tag(), cap.bar, cap.offset); in NotifyCfgCallbackLocked()
218 if (MapBar(cap.bar) != ZX_OK) { in NotifyCfgCallbackLocked()
222 notify_base_ = reinterpret_cast<uintptr_t>(bar_[cap.bar]->get()) + cap.offset; in NotifyCfgCallbackLocked()
226 zxlogf(TRACE, "%s: isr cfg found in bar %u offset %#x\n", tag(), cap.bar, cap.offset); in IsrCfgCallbackLocked()
227 if (MapBar(cap.bar) != ZX_OK) { in IsrCfgCallbackLocked()
233 reinterpret_cast<uintptr_t>(bar_[cap.bar]->get()) + cap.offset); in IsrCfgCallbackLocked()
237 zxlogf(TRACE, "%s: device cfg found in bar %u offset %#x\n", tag(), cap.bar, cap.offset); in DeviceCfgCallbackLocked()
238 if (MapBar(cap.bar) != ZX_OK) { in DeviceCfgCallbackLocked()
242 device_cfg_ = reinterpret_cast<uintptr_t>(bar_[cap.bar]->get()) + cap.offset; in DeviceCfgCallbackLocked()