summaryrefslogtreecommitdiffstats
path: root/src/include/device
diff options
context:
space:
mode:
authorFelix Held <felix-coreboot@felixheld.de>2024-01-12 20:56:48 +0100
committerFelix Held <felix-coreboot@felixheld.de>2024-01-15 21:15:36 +0000
commit20c9c557f9cbf37822c49ff33a106e396349cda1 (patch)
tree15417f319bd487d6b953dce8db0393645987ab60 /src/include/device
parent1c626b01c23cb3bf573cbc69ed0dba4ca8c65a97 (diff)
downloadcoreboot-20c9c557f9cbf37822c49ff33a106e396349cda1.tar.gz
coreboot-20c9c557f9cbf37822c49ff33a106e396349cda1.tar.bz2
coreboot-20c9c557f9cbf37822c49ff33a106e396349cda1.zip
include/device/pci_mmio_cfg: assert CONFIG_ECAM_MMCONF_BUS_NUMBER != 0
Make sure that CONFIG_ECAM_MMCONF_BUS_NUMBER is non-zero when the ECAM_MMCONF_SUPPORT Kconfig option is selected. Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Change-Id: Ic102b7dca9ffebb2d384a068a1fb1f4b6fb6c5f8 Reviewed-on: https://review.coreboot.org/c/coreboot/+/79933 Reviewed-by: Paul Menzel <paulepanter@mailbox.org> Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'src/include/device')
-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 89c99062d2cd..416444179ff1 100644
--- a/src/include/device/pci_mmio_cfg.h
+++ b/src/include/device/pci_mmio_cfg.h
@@ -31,6 +31,10 @@ union pci_bank {
#error "CONFIG_ECAM_MMCONF_BASE_ADDRESS undefined!"
#endif
+#if CONFIG_ECAM_MMCONF_BUS_NUMBER == 0
+#error "CONFIG_ECAM_MMCONF_BUS_NUMBER is undefined!"
+#endif
+
#if CONFIG_ECAM_MMCONF_BUS_NUMBER * MiB != CONFIG_ECAM_MMCONF_LENGTH
#error "CONFIG_ECAM_MMCONF_LENGTH does not correspond with CONFIG_ECAM_MMCONF_BUS_NUMBER!"
#endif