diff options
author | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2016-12-01 22:08:18 +0200 |
---|---|---|
committer | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2016-12-07 12:59:28 +0100 |
commit | 6f66f414a0907f79abf492cd9eca839c0849c7f6 (patch) | |
tree | 3e74145128261014798af58111db31d616fd43dd /src/arch/x86 | |
parent | 891b6c4d199418a08ba88e42d6c8945ce05205f1 (diff) |
PCI ops: MMCONF_SUPPORT_DEFAULT is required
Doing PCI config operations via MMIO window by default is a
requirement, if supported by the platform. This means chipset
or CPU code must enable MMCONF operations early in bootblock
already, or before platform-specific romstage entry.
Platforms are allowed to have NO_MMCONF_SUPPORT only in the
case it is actually not implemented in the silicon.
Change-Id: Id4d9029dec2fe195f09373320de800fcdf88c15d
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/17693
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/arch/x86')
-rw-r--r-- | src/arch/x86/include/arch/io.h | 12 | ||||
-rw-r--r-- | src/arch/x86/include/arch/pci_ops.h | 3 |
2 files changed, 6 insertions, 9 deletions
diff --git a/src/arch/x86/include/arch/io.h b/src/arch/x86/include/arch/io.h index 1ab69966a8..53c49a1c6d 100644 --- a/src/arch/x86/include/arch/io.h +++ b/src/arch/x86/include/arch/io.h @@ -249,7 +249,7 @@ typedef u32 device_t; static inline __attribute__((always_inline)) uint8_t pci_read_config8(pci_devfn_t dev, unsigned int where) { - if (IS_ENABLED(CONFIG_MMCONF_SUPPORT_DEFAULT)) + if (IS_ENABLED(CONFIG_MMCONF_SUPPORT)) return pci_mmio_read_config8(dev, where); else return pci_io_read_config8(dev, where); @@ -258,7 +258,7 @@ uint8_t pci_read_config8(pci_devfn_t dev, unsigned int where) static inline __attribute__((always_inline)) uint16_t pci_read_config16(pci_devfn_t dev, unsigned int where) { - if (IS_ENABLED(CONFIG_MMCONF_SUPPORT_DEFAULT)) + if (IS_ENABLED(CONFIG_MMCONF_SUPPORT)) return pci_mmio_read_config16(dev, where); else return pci_io_read_config16(dev, where); @@ -267,7 +267,7 @@ uint16_t pci_read_config16(pci_devfn_t dev, unsigned int where) static inline __attribute__((always_inline)) uint32_t pci_read_config32(pci_devfn_t dev, unsigned int where) { - if (IS_ENABLED(CONFIG_MMCONF_SUPPORT_DEFAULT)) + if (IS_ENABLED(CONFIG_MMCONF_SUPPORT)) return pci_mmio_read_config32(dev, where); else return pci_io_read_config32(dev, where); @@ -276,7 +276,7 @@ uint32_t pci_read_config32(pci_devfn_t dev, unsigned int where) static inline __attribute__((always_inline)) void pci_write_config8(pci_devfn_t dev, unsigned int where, uint8_t value) { - if (IS_ENABLED(CONFIG_MMCONF_SUPPORT_DEFAULT)) + if (IS_ENABLED(CONFIG_MMCONF_SUPPORT)) pci_mmio_write_config8(dev, where, value); else pci_io_write_config8(dev, where, value); @@ -285,7 +285,7 @@ void pci_write_config8(pci_devfn_t dev, unsigned int where, uint8_t value) static inline __attribute__((always_inline)) void pci_write_config16(pci_devfn_t dev, unsigned int where, uint16_t value) { - if (IS_ENABLED(CONFIG_MMCONF_SUPPORT_DEFAULT)) + if (IS_ENABLED(CONFIG_MMCONF_SUPPORT)) pci_mmio_write_config16(dev, where, value); else pci_io_write_config16(dev, where, value); @@ -294,7 +294,7 @@ void pci_write_config16(pci_devfn_t dev, unsigned int where, uint16_t value) static inline __attribute__((always_inline)) void pci_write_config32(pci_devfn_t dev, unsigned where, uint32_t value) { - if (IS_ENABLED(CONFIG_MMCONF_SUPPORT_DEFAULT)) + if (IS_ENABLED(CONFIG_MMCONF_SUPPORT)) pci_mmio_write_config32(dev, where, value); else pci_io_write_config32(dev, where, value); diff --git a/src/arch/x86/include/arch/pci_ops.h b/src/arch/x86/include/arch/pci_ops.h index b662170b8f..1b245aa784 100644 --- a/src/arch/x86/include/arch/pci_ops.h +++ b/src/arch/x86/include/arch/pci_ops.h @@ -17,10 +17,7 @@ #ifndef __SIMPLE_DEVICE__ extern const struct pci_bus_operations pci_cf8_conf1; - -#if CONFIG_MMCONF_SUPPORT extern const struct pci_bus_operations pci_ops_mmconf; -#endif const struct pci_bus_operations *pci_bus_default_ops(device_t dev); |