diff options
author | Angel Pons <th3fanbus@gmail.com> | 2021-01-28 13:04:06 +0100 |
---|---|---|
committer | Angel Pons <th3fanbus@gmail.com> | 2021-01-30 23:10:22 +0000 |
commit | 50632878bf9dbae54fac4b48070482531002a290 (patch) | |
tree | 86946d6b92dfc0e2823a50f755f2e30538da97ef /src/include | |
parent | 67df3ff8003bf3f78e5168245a727e10752e2062 (diff) |
device/Kconfig: Introduce MMCONF_LENGTH
This is necessary because ASL Memory32Fixed values cannot contain
operations, even if they can be evaluated to constants. Add a sanity
check in pci_mmio_cfg.h to ensure consistency with MMCONF_BUS_NUMBER.
Change-Id: I8f0b5edf166580cc12c1363d8d6b6ef0f2854be9
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/50033
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/device/pci_mmio_cfg.h | 4 |
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 234ebb4c2c..8798405776 100644 --- a/src/include/device/pci_mmio_cfg.h +++ b/src/include/device/pci_mmio_cfg.h @@ -101,6 +101,10 @@ uint32_t *pci_mmio_config32_addr(pci_devfn_t dev, uint16_t reg) #error "CONFIG_MMCONF_BASE_ADDRESS undefined!" #endif +#if CONFIG_MMCONF_BUS_NUMBER * MiB != CONFIG_MMCONF_LENGTH +#error "CONFIG_MMCONF_LENGTH does not correspond with CONFIG_MMCONF_BUS_NUMBER!" +#endif + /* Avoid name collisions as different stages have different signature * for these functions. The _s_ stands for simple, fundamental IO or * MMIO variant. |