diff options
Diffstat (limited to 'src/include/device/pci_type.h')
-rw-r--r-- | src/include/device/pci_type.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/include/device/pci_type.h b/src/include/device/pci_type.h index 3f72c5f16755..27d35589cca5 100644 --- a/src/include/device/pci_type.h +++ b/src/include/device/pci_type.h @@ -25,4 +25,15 @@ typedef u32 pci_devfn_t; #define PCI_DEV_INVALID (0xffffffffU) +#if 1 +/* FIXME: For most of the time in ramstage, we get valid device pointer + * from calling the driver entry points. The assert should only be used + * with searches like pcidev_behind(), and only if caller does not make + * the check themselves. + */ +#define PCI_BDF(dev) pcidev_assert((dev)) +#else +#define PCI_BDF(dev) pcidev_bdf((dev)) +#endif + #endif /* DEVICE_PCI_TYPE_H */ |