Attention is currently required from: Felix Held, Fred Reitberger, Jason Glenesk, Martin L Roth, Matt DeVillier, Varshit Pandya.
Patrick Rudolph has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/86618?usp=email )
Change subject: soc/amd/common: Always use genoa SPI MMAP driver ......................................................................
soc/amd/common: Always use genoa SPI MMAP driver
Currently the generic x86 SPI flash mmap driver is being when not using DMA and when not on GENOA. It only works for ROM_SIZE of 16 MiB or less and prevent boot when the ROM is bigger.
Use the genoa_poc SPI MMAP driver on all platforms by default as it allows to use a ROM_SIZE greater than 16MiB. The newly introduced Kconfig SOC_AMD_COMMON_BLOCK_SPI_MMAP is used for all platforms when the SPI DMA driver is not in use.
This doesn't allow to access the whole SPI flash using the ROM2 MMIO window, but it no longer prevents boot when the mainboard specifies the correct SPI flash size in Kconfig.
TEST: Booted an AMD/birman+ with 64MiB ROM specified in Kconfig.
Change-Id: I39e33c71d27179212ddb1f5bcca4c5d4a39d47e4 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com --- M src/soc/amd/common/block/spi/Kconfig M src/soc/amd/common/block/spi/Makefile.mk R src/soc/amd/common/block/spi/mmap_boot.c M src/soc/amd/genoa_poc/Kconfig M src/soc/amd/genoa_poc/Makefile.mk 5 files changed, 12 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/18/86618/1
diff --git a/src/soc/amd/common/block/spi/Kconfig b/src/soc/amd/common/block/spi/Kconfig index e5f6857..6f76650 100644 --- a/src/soc/amd/common/block/spi/Kconfig +++ b/src/soc/amd/common/block/spi/Kconfig @@ -16,6 +16,14 @@ help Select this option to keep the 4 DWORD burst support enabled.
+config SOC_AMD_COMMON_BLOCK_SPI_MMAP + dev_bool y + select X86_CUSTOM_BOOTMEDIA + depends on !SOC_AMD_COMMON_BLOCK_LPC_SPI_DMA + help + Select this option to use a SPI flash driver that supports bigger than + 16 MiB ROMs. + config EFS_SPI_READ_MODE int range 0 7 diff --git a/src/soc/amd/common/block/spi/Makefile.mk b/src/soc/amd/common/block/spi/Makefile.mk index 55ca308..faa31bb 100644 --- a/src/soc/amd/common/block/spi/Makefile.mk +++ b/src/soc/amd/common/block/spi/Makefile.mk @@ -1,6 +1,9 @@ ## SPDX-License-Identifier: GPL-2.0-only ifeq ($(CONFIG_SOC_AMD_COMMON_BLOCK_SPI),y)
+all-$(CONFIG_SOC_AMD_COMMON_BLOCK_SPI_MMAP) += mmap_boot.c +smm-$(CONFIG_SOC_AMD_COMMON_BLOCK_SPI_MMAP) += mmap_boot.c + bootblock-y += fch_spi_ctrl.c romstage-y += fch_spi_ctrl.c verstage-y += fch_spi_ctrl.c diff --git a/src/soc/amd/genoa_poc/mmap_boot.c b/src/soc/amd/common/block/spi/mmap_boot.c similarity index 100% rename from src/soc/amd/genoa_poc/mmap_boot.c rename to src/soc/amd/common/block/spi/mmap_boot.c diff --git a/src/soc/amd/genoa_poc/Kconfig b/src/soc/amd/genoa_poc/Kconfig index 25dd914..3e7246b 100644 --- a/src/soc/amd/genoa_poc/Kconfig +++ b/src/soc/amd/genoa_poc/Kconfig @@ -41,6 +41,7 @@ select SOC_AMD_COMMON_BLOCK_SMM select SOC_AMD_COMMON_BLOCK_SMU select SOC_AMD_COMMON_BLOCK_SMU_SX_ENTRY + select SOC_AMD_COMMON_BLOCK_SPI select SOC_AMD_COMMON_BLOCK_SVI3 select SOC_AMD_COMMON_BLOCK_TSC select SOC_AMD_COMMON_BLOCK_UART @@ -49,7 +50,6 @@ select SOC_AMD_OPENSIL select SOC_AMD_OPENSIL_GENOA_POC select OPENSIL_DRIVER - select X86_CUSTOM_BOOTMEDIA
config USE_X86_64_SUPPORT default y diff --git a/src/soc/amd/genoa_poc/Makefile.mk b/src/soc/amd/genoa_poc/Makefile.mk index bde8b18..73f10a8 100644 --- a/src/soc/amd/genoa_poc/Makefile.mk +++ b/src/soc/amd/genoa_poc/Makefile.mk @@ -1,7 +1,6 @@ ## SPDX-License-Identifier: GPL-2.0-only ifeq ($(CONFIG_SOC_AMD_GENOA_POC),y)
-all-y += mmap_boot.c all-y += reset.c all-y += config.c all-y += gpio.c