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>
This commit is contained in:
Felix Held 2024-01-12 20:56:48 +01:00
parent 1c626b01c2
commit 20c9c557f9

View file

@ -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