Felix Held submitted this change.

View Change

Approvals: build bot (Jenkins): Verified Matt DeVillier: Looks good to me, approved Nico Huber: Looks good to me, but someone else must approve Paul Menzel: Looks good to me, but someone else must approve
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>
---
M src/include/device/pci_mmio_cfg.h
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/include/device/pci_mmio_cfg.h b/src/include/device/pci_mmio_cfg.h
index 89c9906..4164441 100644
--- a/src/include/device/pci_mmio_cfg.h
+++ b/src/include/device/pci_mmio_cfg.h
@@ -31,6 +31,10 @@
#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

To view, visit change 79933. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: Ic102b7dca9ffebb2d384a068a1fb1f4b6fb6c5f8
Gerrit-Change-Number: 79933
Gerrit-PatchSet: 4
Gerrit-Owner: Felix Held <felix-coreboot@felixheld.de>
Gerrit-Reviewer: Felix Held <felix-coreboot@felixheld.de>
Gerrit-Reviewer: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Gerrit-Reviewer: Nico Huber <nico.h@gmx.de>
Gerrit-Reviewer: Paul Menzel <paulepanter@mailbox.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-MessageType: merged