summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur Heymans <arthur@aheymans.xyz>2019-10-08 11:29:12 +0200
committerPatrick Georgi <pgeorgi@google.com>2019-11-05 14:58:58 +0000
commit15fcc86907dc6f8f782cfdc98808f508aa66082c (patch)
treea2ca30a55268d0c80deaba228277ccc1dc73e587
parent92a75996160e2da57253b693b4e5c3284f437228 (diff)
pci_mmio_cfg.h: Add a compile time error if MMCONF_BASE_ADDRESS is undefined
if CONFIG_MMCONF_SUPPORT is set, add a compiletime error if CONFIG_MMCONF_BASE_ADDRESS is not defined. Change-Id: I0439e994d170e8ec564ce188e82a850e2a286a66 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/35883 Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
-rw-r--r--src/include/device/pci_mmio_cfg.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/include/device/pci_mmio_cfg.h b/src/include/device/pci_mmio_cfg.h
index 5567ed86ae..e3c5fe4873 100644
--- a/src/include/device/pci_mmio_cfg.h
+++ b/src/include/device/pci_mmio_cfg.h
@@ -90,6 +90,10 @@ void pci_mmio_write_config32(pci_devfn_t dev, uint16_t reg, uint32_t value)
#if CONFIG(MMCONF_SUPPORT)
+#if CONFIG_MMCONF_BASE_ADDRESS == 0
+#error "CONFIG_MMCONF_BASE_ADDRESS undefined!"
+#endif
+
/* Avoid name collisions as different stages have different signature
* for these functions. The _s_ stands for simple, fundamental IO or
* MMIO variant.