summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/device/Kconfig8
-rw-r--r--src/include/device/pci_mmio_cfg.h4
2 files changed, 12 insertions, 0 deletions
diff --git a/src/device/Kconfig b/src/device/Kconfig
index 52102230a3..0e5de456ae 100644
--- a/src/device/Kconfig
+++ b/src/device/Kconfig
@@ -521,6 +521,14 @@ config MMCONF_BUS_NUMBER
int
depends on MMCONF_SUPPORT
+config MMCONF_LENGTH
+ hex
+ depends on MMCONF_SUPPORT
+ default 0x04000000 if MMCONF_BUS_NUMBER = 64
+ default 0x08000000 if MMCONF_BUS_NUMBER = 128
+ default 0x10000000 if MMCONF_BUS_NUMBER = 256
+ default 0x0
+
config PCI_ALLOW_BUS_MASTER
bool "Allow coreboot to set optional PCI bus master bits"
default y
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.