[coreboot-gerrit] New patch to review for coreboot: Kconfig: introduce writable boot device notion

Aaron Durbin (adurbin@chromium.org) gerrit at coreboot.org
Fri Aug 12 23:28:51 CEST 2016


Aaron Durbin (adurbin at chromium.org) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/16211

-gerrit

commit ea9b90bfde5178658e6707546b845e3d25595ae8
Author: Aaron Durbin <adurbin at chromium.org>
Date:   Fri Aug 12 15:00:10 2016 -0500

    Kconfig: introduce writable boot device notion
    
    Indicate to the build system that a platform provides support
    for a writable boot device. The following will provide the
    necessary support:
    
    COMMON_CBFS_SPI_WRAPPER users
    soc/intel/apollolake
    soc/intel/baytrail
    soc/intel/braswell
    soc/intel/broadwell
    soc/intel/skylake
    
    The SPI_FLASH option is auto-selected if the platform provides
    write supoprt for the boot device and SPI flash is the boot
    device.
    
    Other platforms may provide similar suport, but they do that
    in a device specific manner such as selecting SPI_FLASH
    explicitly. This provides clearance against build failures
    where chipsets don't provide SPI API implementations even
    though the platform may use a SPI flash to boot.
    
    BUG=chrome-os-partner:56151
    
    Change-Id: If78160f231c8312a313f9b9753607d044345d274
    Signed-off-by: Aaron Durbin <adurbin at chromium.org>
---
 src/Kconfig                      | 8 ++++++++
 src/drivers/spi/Kconfig          | 2 +-
 src/soc/intel/apollolake/Kconfig | 1 +
 src/soc/intel/baytrail/Kconfig   | 1 +
 src/soc/intel/braswell/Kconfig   | 1 +
 src/soc/intel/broadwell/Kconfig  | 1 +
 src/soc/intel/skylake/Kconfig    | 1 +
 7 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/src/Kconfig b/src/Kconfig
index f7a924f..5b8da94 100644
--- a/src/Kconfig
+++ b/src/Kconfig
@@ -40,6 +40,7 @@ config COMMON_CBFS_SPI_WRAPPER
 	default n
 	depends on SPI_FLASH
 	depends on !ARCH_X86
+	select BOOT_DEVICE_SUPPORTS_WRITES
 	help
 	 Use common wrapper to interface CBFS to SPI bootrom.
 
@@ -490,6 +491,13 @@ config BOOT_DEVICE_MEMORY_MAPPED
 	help
 	  Inform system if SPI is memory-mapped or not.
 
+config BOOT_DEVICE_SUPPORTS_WRITES
+	bool
+	default n
+	help
+	  Indicate that the platform has writable boot device
+	  support.
+
 config RTC
 	bool
 	default n
diff --git a/src/drivers/spi/Kconfig b/src/drivers/spi/Kconfig
index b0187fd..af0026d 100644
--- a/src/drivers/spi/Kconfig
+++ b/src/drivers/spi/Kconfig
@@ -15,7 +15,7 @@
 
 config SPI_FLASH
 	bool
-	default y if BOOT_DEVICE_SPI_FLASH
+	default y if BOOT_DEVICE_SPI_FLASH && BOOT_DEVICE_SUPPORTS_WRITES
 	default n
 	help
 	  Select this option if your chipset driver needs to store certain
diff --git a/src/soc/intel/apollolake/Kconfig b/src/soc/intel/apollolake/Kconfig
index dfc2d4a..0c7f27a 100644
--- a/src/soc/intel/apollolake/Kconfig
+++ b/src/soc/intel/apollolake/Kconfig
@@ -12,6 +12,7 @@ config CPU_SPECIFIC_OPTIONS
 	select ARCH_RAMSTAGE_X86_32
 	select ARCH_ROMSTAGE_X86_32
 	select ARCH_VERSTAGE_X86_32
+	select BOOT_DEVICE_SUPPORTS_WRITES
 	# CPU specific options
 	select CPU_INTEL_FIRMWARE_INTERFACE_TABLE
 	select IOAPIC
diff --git a/src/soc/intel/baytrail/Kconfig b/src/soc/intel/baytrail/Kconfig
index b790008..4009785 100644
--- a/src/soc/intel/baytrail/Kconfig
+++ b/src/soc/intel/baytrail/Kconfig
@@ -12,6 +12,7 @@ config CPU_SPECIFIC_OPTIONS
 	select ARCH_VERSTAGE_X86_32
 	select ARCH_ROMSTAGE_X86_32
 	select ARCH_RAMSTAGE_X86_32
+	select BOOT_DEVICE_SUPPORTS_WRITES
 	select CACHE_MRC_SETTINGS
 	select CPU_INTEL_TURBO_NOT_PACKAGE_SCOPED
 	select SUPPORT_CPU_UCODE_IN_CBFS
diff --git a/src/soc/intel/braswell/Kconfig b/src/soc/intel/braswell/Kconfig
index c652d96..b587988 100644
--- a/src/soc/intel/braswell/Kconfig
+++ b/src/soc/intel/braswell/Kconfig
@@ -12,6 +12,7 @@ config CPU_SPECIFIC_OPTIONS
 	select ARCH_RAMSTAGE_X86_32
 	select ARCH_ROMSTAGE_X86_32
 	select ARCH_VERSTAGE_X86_32
+	select BOOT_DEVICE_SUPPORTS_WRITES
 	select CACHE_MRC_SETTINGS
 	select CACHE_RELOCATED_RAMSTAGE_OUTSIDE_CBMEM if RELOCATABLE_RAMSTAGE
 	select COLLECT_TIMESTAMPS
diff --git a/src/soc/intel/broadwell/Kconfig b/src/soc/intel/broadwell/Kconfig
index f8ec500..03934d2 100644
--- a/src/soc/intel/broadwell/Kconfig
+++ b/src/soc/intel/broadwell/Kconfig
@@ -12,6 +12,7 @@ config CPU_SPECIFIC_OPTIONS
 	select ARCH_VERSTAGE_X86_32
 	select ARCH_ROMSTAGE_X86_32
 	select ARCH_RAMSTAGE_X86_32
+	select BOOT_DEVICE_SUPPORTS_WRITES
 	select CACHE_MRC_SETTINGS
 	select MRC_SETTINGS_PROTECT
 	select CACHE_RELOCATED_RAMSTAGE_OUTSIDE_CBMEM if RELOCATABLE_RAMSTAGE
diff --git a/src/soc/intel/skylake/Kconfig b/src/soc/intel/skylake/Kconfig
index 8c8b1b7..909dcec 100644
--- a/src/soc/intel/skylake/Kconfig
+++ b/src/soc/intel/skylake/Kconfig
@@ -13,6 +13,7 @@ config CPU_SPECIFIC_OPTIONS
 	select ARCH_ROMSTAGE_X86_32
 	select ARCH_VERSTAGE_X86_32
 	select ACPI_NHLT
+	select BOOT_DEVICE_SUPPORTS_WRITES
 	select CACHE_MRC_SETTINGS
 	select CACHE_RELOCATED_RAMSTAGE_OUTSIDE_CBMEM if RELOCATABLE_RAMSTAGE
 	select C_ENVIRONMENT_BOOTBLOCK



More information about the coreboot-gerrit mailing list