From 20c9c557f9cbf37822c49ff33a106e396349cda1 Mon Sep 17 00:00:00 2001 From: Felix Held Date: Fri, 12 Jan 2024 20:56:48 +0100 Subject: 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 Change-Id: Ic102b7dca9ffebb2d384a068a1fb1f4b6fb6c5f8 Reviewed-on: https://review.coreboot.org/c/coreboot/+/79933 Reviewed-by: Paul Menzel Reviewed-by: Matt DeVillier Tested-by: build bot (Jenkins) Reviewed-by: Nico Huber --- src/include/device/pci_mmio_cfg.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/include/device') diff --git a/src/include/device/pci_mmio_cfg.h b/src/include/device/pci_mmio_cfg.h index 89c99062d2..416444179f 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 -- cgit v1.2.3