Attention is currently required from: Tarun Tuli, Michał Żygowski, Maciej Pijanowski, Jason Nien, Subrata Banik, Christian Walter, Kapil Porwal, Tim Wawrzynczak, Nick Vaccaro, Martin Roth, Krystian Hebel.
Hello Michał Żygowski, Maciej Pijanowski, Krystian Hebel,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/68746
to review the following change.
Change subject: [WIP] security/tpm: make log format configurable via Kconfig ......................................................................
[WIP] security/tpm: make log format configurable via Kconfig
This commit doesn't add any new format options, just makes selecting existing format explicit. It also adds an indirection through NEED_VBOOT_COMPATIBILITY option to be able to add more similar changes in the future without touching the boards.
Modifying Google boards that have TPM to select coreboot-specific format as they are likely to depend on it.
Ticket: https://ticket.coreboot.org/issues/422 Change-Id: I3903aff54e01093bc9ea75862bbf5989cc6e6c55 Signed-off-by: Sergii Dmytruk sergii.dmytruk@3mdeb.com --- M src/mainboard/google/asurada/Kconfig M src/mainboard/google/auron/Kconfig M src/mainboard/google/beltino/Kconfig M src/mainboard/google/brya/Kconfig M src/mainboard/google/butterfly/Kconfig M src/mainboard/google/cherry/Kconfig M src/mainboard/google/corsola/Kconfig M src/mainboard/google/cyan/Kconfig M src/mainboard/google/daisy/Kconfig M src/mainboard/google/dedede/Kconfig M src/mainboard/google/drallion/Kconfig M src/mainboard/google/eve/Kconfig M src/mainboard/google/fizz/Kconfig M src/mainboard/google/foster/Kconfig M src/mainboard/google/gale/Kconfig M src/mainboard/google/geralt/Kconfig M src/mainboard/google/glados/Kconfig M src/mainboard/google/gru/Kconfig M src/mainboard/google/guybrush/Kconfig M src/mainboard/google/hatch/Kconfig M src/mainboard/google/herobrine/Kconfig M src/mainboard/google/jecht/Kconfig M src/mainboard/google/kahlee/Kconfig M src/mainboard/google/kukui/Kconfig M src/mainboard/google/link/Kconfig M src/mainboard/google/nyan_big/Kconfig M src/mainboard/google/nyan_blaze/Kconfig M src/mainboard/google/oak/Kconfig M src/mainboard/google/octopus/Kconfig M src/mainboard/google/parrot/Kconfig M src/mainboard/google/peach_pit/Kconfig M src/mainboard/google/poppy/Kconfig M src/mainboard/google/puff/Kconfig M src/mainboard/google/rambi/Kconfig M src/mainboard/google/reef/Kconfig M src/mainboard/google/rex/Kconfig M src/mainboard/google/sarien/Kconfig M src/mainboard/google/skyrim/Kconfig M src/mainboard/google/slippy/Kconfig M src/mainboard/google/smaug/Kconfig M src/mainboard/google/storm/Kconfig M src/mainboard/google/stout/Kconfig M src/mainboard/google/trogdor/Kconfig M src/mainboard/google/veyron/Kconfig M src/mainboard/google/veyron_mickey/Kconfig M src/mainboard/google/veyron_rialto/Kconfig M src/mainboard/google/volteer/Kconfig M src/mainboard/google/zork/Kconfig M src/security/tpm/Kconfig M src/security/tpm/Makefile.inc M src/security/tpm/tspi.h M src/security/tpm/tspi/crtm.h 52 files changed, 106 insertions(+), 7 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/46/68746/1
diff --git a/src/mainboard/google/asurada/Kconfig b/src/mainboard/google/asurada/Kconfig index 46a0327..db9aa72 100644 --- a/src/mainboard/google/asurada/Kconfig +++ b/src/mainboard/google/asurada/Kconfig @@ -26,6 +26,7 @@ select SPI_TPM if VBOOT select TPM_GOOGLE_CR50 if VBOOT select MAINBOARD_HAS_TPM2 if VBOOT + select NEED_VBOOT_COMPATIBILITY select MAINBOARD_HAS_NATIVE_VGA_INIT select MAINBOARD_FORCE_NATIVE_VGA_INIT select HAVE_LINEAR_FRAMEBUFFER diff --git a/src/mainboard/google/auron/Kconfig b/src/mainboard/google/auron/Kconfig index f503d46..434e66d 100644 --- a/src/mainboard/google/auron/Kconfig +++ b/src/mainboard/google/auron/Kconfig @@ -13,6 +13,7 @@ select MAINBOARD_HAS_LIBGFXINIT select MEMORY_MAPPED_TPM select MAINBOARD_HAS_TPM1 + select NEED_VBOOT_COMPATIBILITY select SOC_INTEL_BROADWELL
config BOARD_GOOGLE_AURON_PAINE diff --git a/src/mainboard/google/beltino/Kconfig b/src/mainboard/google/beltino/Kconfig index a2c435b..901a133 100644 --- a/src/mainboard/google/beltino/Kconfig +++ b/src/mainboard/google/beltino/Kconfig @@ -10,6 +10,7 @@ select MAINBOARD_HAS_LIBGFXINIT select MEMORY_MAPPED_TPM select MAINBOARD_HAS_TPM1 + select NEED_VBOOT_COMPATIBILITY select NORTHBRIDGE_INTEL_HASWELL select SOUTHBRIDGE_INTEL_LYNXPOINT select SUPERIO_ITE_IT8772F diff --git a/src/mainboard/google/brya/Kconfig b/src/mainboard/google/brya/Kconfig index f342432..f258238 100644 --- a/src/mainboard/google/brya/Kconfig +++ b/src/mainboard/google/brya/Kconfig @@ -31,6 +31,7 @@ select INTEL_LPSS_UART_FOR_CONSOLE select MAINBOARD_HAS_CHROMEOS select MAINBOARD_HAS_TPM2 + select NEED_VBOOT_COMPATIBILITY select PMC_IPC_ACPI_INTERFACE select SOC_INTEL_COMMON_BLOCK_PCIE_RTD3 select SOC_INTEL_CSE_LITE_SKU diff --git a/src/mainboard/google/butterfly/Kconfig b/src/mainboard/google/butterfly/Kconfig index 49ac7d2..115a942 100644 --- a/src/mainboard/google/butterfly/Kconfig +++ b/src/mainboard/google/butterfly/Kconfig @@ -16,6 +16,7 @@ select MAINBOARD_HAS_LIBGFXINIT select MEMORY_MAPPED_TPM select MAINBOARD_HAS_TPM1 + select NEED_VBOOT_COMPATIBILITY select NORTHBRIDGE_INTEL_SANDYBRIDGE select SANDYBRIDGE_VBOOT_IN_ROMSTAGE select SERIRQ_CONTINUOUS_MODE # Workaround for EC/KBC IRQ1. diff --git a/src/mainboard/google/cherry/Kconfig b/src/mainboard/google/cherry/Kconfig index 2816f9b..c236a47 100644 --- a/src/mainboard/google/cherry/Kconfig +++ b/src/mainboard/google/cherry/Kconfig @@ -27,6 +27,7 @@ select I2C_TPM if VBOOT select TPM_GOOGLE_CR50 if VBOOT select MAINBOARD_HAS_TPM2 if VBOOT + select NEED_VBOOT_COMPATIBILITY select MAINBOARD_HAS_NATIVE_VGA_INIT select HAVE_LINEAR_FRAMEBUFFER select COMMONLIB_STORAGE diff --git a/src/mainboard/google/corsola/Kconfig b/src/mainboard/google/corsola/Kconfig index 65d26ef..b48efb8 100644 --- a/src/mainboard/google/corsola/Kconfig +++ b/src/mainboard/google/corsola/Kconfig @@ -36,6 +36,7 @@ select SPI_TPM if VBOOT select TPM_GOOGLE_TI50 if VBOOT select MAINBOARD_HAS_TPM2 if VBOOT + select NEED_VBOOT_COMPATIBILITY select MAINBOARD_HAS_NATIVE_VGA_INIT select HAVE_LINEAR_FRAMEBUFFER select DRIVER_ANALOGIX_ANX7625 diff --git a/src/mainboard/google/cyan/Kconfig b/src/mainboard/google/cyan/Kconfig index ac679c7..512d89e 100644 --- a/src/mainboard/google/cyan/Kconfig +++ b/src/mainboard/google/cyan/Kconfig @@ -14,6 +14,7 @@ select MAINBOARD_HAS_CHROMEOS select MEMORY_MAPPED_TPM select MAINBOARD_HAS_TPM1 + select NEED_VBOOT_COMPATIBILITY select PCIEXP_L1_SUB_STATE if !BOARD_GOOGLE_CYAN select SOC_INTEL_BRASWELL select SYSTEM_TYPE_LAPTOP diff --git a/src/mainboard/google/daisy/Kconfig b/src/mainboard/google/daisy/Kconfig index 1ccc61f..04a0f79 100644 --- a/src/mainboard/google/daisy/Kconfig +++ b/src/mainboard/google/daisy/Kconfig @@ -16,6 +16,7 @@ select HAVE_LINEAR_FRAMEBUFFER select I2C_TPM select MAINBOARD_HAS_TPM1 + select NEED_VBOOT_COMPATIBILITY
config MAINBOARD_DIR default "google/daisy" diff --git a/src/mainboard/google/dedede/Kconfig b/src/mainboard/google/dedede/Kconfig index 84626ef..c346ace 100644 --- a/src/mainboard/google/dedede/Kconfig +++ b/src/mainboard/google/dedede/Kconfig @@ -24,6 +24,7 @@ select INTEL_LPSS_UART_FOR_CONSOLE select MAINBOARD_HAS_CHROMEOS select MAINBOARD_HAS_TPM2 + select NEED_VBOOT_COMPATIBILITY select SOC_INTEL_JASPERLAKE select SOC_INTEL_COMMON_BLOCK_DTT select SOC_INTEL_CSE_LITE_SKU diff --git a/src/mainboard/google/drallion/Kconfig b/src/mainboard/google/drallion/Kconfig index 916a235..0ed4b19 100644 --- a/src/mainboard/google/drallion/Kconfig +++ b/src/mainboard/google/drallion/Kconfig @@ -16,6 +16,7 @@ select INTEL_LPSS_UART_FOR_CONSOLE select MAINBOARD_HAS_CHROMEOS select MAINBOARD_HAS_TPM2 + select NEED_VBOOT_COMPATIBILITY select MAINBOARD_USES_IFD_EC_REGION select SMBIOS_SERIAL_FROM_VPD if VPD select SOC_INTEL_COMETLAKE_1 diff --git a/src/mainboard/google/eve/Kconfig b/src/mainboard/google/eve/Kconfig index 0579c0d..39b9f8b 100644 --- a/src/mainboard/google/eve/Kconfig +++ b/src/mainboard/google/eve/Kconfig @@ -20,6 +20,7 @@ select MAINBOARD_HAS_CHROMEOS select MAINBOARD_HAS_LIBGFXINIT select MAINBOARD_HAS_TPM2 + select NEED_VBOOT_COMPATIBILITY select SOC_INTEL_KABYLAKE select SYSTEM_TYPE_CONVERTIBLE select TPM_GOOGLE_CR50 diff --git a/src/mainboard/google/fizz/Kconfig b/src/mainboard/google/fizz/Kconfig index 8b7811c..d7352b4 100644 --- a/src/mainboard/google/fizz/Kconfig +++ b/src/mainboard/google/fizz/Kconfig @@ -15,6 +15,7 @@ select MAINBOARD_HAS_CHROMEOS select MAINBOARD_HAS_LIBGFXINIT select MAINBOARD_HAS_TPM2 + select NEED_VBOOT_COMPATIBILITY select NO_FADT_8042 select SOC_INTEL_KABYLAKE select SPD_READ_BY_WORD diff --git a/src/mainboard/google/foster/Kconfig b/src/mainboard/google/foster/Kconfig index 6a2d28e..77a1c4f 100644 --- a/src/mainboard/google/foster/Kconfig +++ b/src/mainboard/google/foster/Kconfig @@ -13,6 +13,7 @@ select SPI_FLASH_WINBOND select I2C_TPM select MAINBOARD_HAS_TPM1 + select NEED_VBOOT_COMPATIBILITY
config VBOOT select VBOOT_VBNV_FLASH diff --git a/src/mainboard/google/gale/Kconfig b/src/mainboard/google/gale/Kconfig index 76ecb65..adab31c 100644 --- a/src/mainboard/google/gale/Kconfig +++ b/src/mainboard/google/gale/Kconfig @@ -17,6 +17,7 @@ select DRIVERS_UART select I2C_TPM select MAINBOARD_HAS_TPM1 + select NEED_VBOOT_COMPATIBILITY
config VBOOT select VBOOT_DISABLE_DEV_ON_RECOVERY diff --git a/src/mainboard/google/geralt/Kconfig b/src/mainboard/google/geralt/Kconfig index 11a2d7b..3783af9 100644 --- a/src/mainboard/google/geralt/Kconfig +++ b/src/mainboard/google/geralt/Kconfig @@ -28,6 +28,7 @@ select I2C_TPM if VBOOT select MAINBOARD_HAS_TPM2 if VBOOT select TPM_GOOGLE_TI50 if VBOOT + select NEED_VBOOT_COMPATIBILITY
config MAINBOARD_DIR string diff --git a/src/mainboard/google/glados/Kconfig b/src/mainboard/google/glados/Kconfig index ff6b1ea..a31683f 100644 --- a/src/mainboard/google/glados/Kconfig +++ b/src/mainboard/google/glados/Kconfig @@ -18,6 +18,7 @@ select MAINBOARD_HAS_LIBGFXINIT select MEMORY_MAPPED_TPM select MAINBOARD_HAS_TPM1 + select NEED_VBOOT_COMPATIBILITY select SOC_INTEL_SKYLAKE select SYSTEM_TYPE_LAPTOP
diff --git a/src/mainboard/google/gru/Kconfig b/src/mainboard/google/gru/Kconfig index 23926b6..e67169c 100644 --- a/src/mainboard/google/gru/Kconfig +++ b/src/mainboard/google/gru/Kconfig @@ -48,6 +48,7 @@ select SPI_TPM if GRU_HAS_TPM2 select MAINBOARD_HAS_TPM1 if !GRU_HAS_TPM2 select MAINBOARD_HAS_TPM2 if GRU_HAS_TPM2 + select NEED_VBOOT_COMPATIBILITY
config VBOOT select EC_GOOGLE_CHROMEEC_SWITCHES diff --git a/src/mainboard/google/guybrush/Kconfig b/src/mainboard/google/guybrush/Kconfig index 50bcfa9..252bbb7 100644 --- a/src/mainboard/google/guybrush/Kconfig +++ b/src/mainboard/google/guybrush/Kconfig @@ -36,6 +36,7 @@ select I2C_TPM select MAINBOARD_HAS_CHROMEOS select MAINBOARD_HAS_TPM2 + select NEED_VBOOT_COMPATIBILITY select PCIEXP_ASPM select PCIEXP_CLK_PM select PCIEXP_COMMON_CLOCK diff --git a/src/mainboard/google/hatch/Kconfig b/src/mainboard/google/hatch/Kconfig index 3522787..05e6226 100644 --- a/src/mainboard/google/hatch/Kconfig +++ b/src/mainboard/google/hatch/Kconfig @@ -21,6 +21,7 @@ select INTEL_LPSS_UART_FOR_CONSOLE select MAINBOARD_HAS_CHROMEOS select MAINBOARD_HAS_TPM2 + select NEED_VBOOT_COMPATIBILITY select MB_HAS_ACTIVE_HIGH_SD_PWR_ENABLE select SOC_INTEL_COMETLAKE_1 select SOC_INTEL_COMMON_BLOCK_DTT diff --git a/src/mainboard/google/herobrine/Kconfig b/src/mainboard/google/herobrine/Kconfig index a95ac06..d9dd9a3 100644 --- a/src/mainboard/google/herobrine/Kconfig +++ b/src/mainboard/google/herobrine/Kconfig @@ -30,6 +30,7 @@ select I2C_TPM if !BOARD_GOOGLE_PIGLIN && !BOARD_GOOGLE_SENOR select MAINBOARD_HAS_CHROMEOS select MAINBOARD_HAS_TPM2 if !BOARD_GOOGLE_SENOR + select NEED_VBOOT_COMPATIBILITY
config VBOOT select EC_GOOGLE_CHROMEEC_SWITCHES if !BOARD_GOOGLE_SENOR diff --git a/src/mainboard/google/jecht/Kconfig b/src/mainboard/google/jecht/Kconfig index 4cbad81..554f133 100644 --- a/src/mainboard/google/jecht/Kconfig +++ b/src/mainboard/google/jecht/Kconfig @@ -9,6 +9,7 @@ select MAINBOARD_HAS_LIBGFXINIT select MEMORY_MAPPED_TPM select MAINBOARD_HAS_TPM1 + select NEED_VBOOT_COMPATIBILITY select SOC_INTEL_BROADWELL select SUPERIO_ITE_IT8772F
diff --git a/src/mainboard/google/kahlee/Kconfig b/src/mainboard/google/kahlee/Kconfig index 10524fe..aa891b1 100644 --- a/src/mainboard/google/kahlee/Kconfig +++ b/src/mainboard/google/kahlee/Kconfig @@ -25,6 +25,7 @@ select HAVE_ACPI_RESUME select DRIVERS_GENERIC_BH720 select MAINBOARD_HAS_TPM2 + select NEED_VBOOT_COMPATIBILITY select DRIVERS_GENERIC_ADAU7002 select DRIVERS_GENERIC_MAX98357A select DRIVERS_I2C_DA7219 diff --git a/src/mainboard/google/kukui/Kconfig b/src/mainboard/google/kukui/Kconfig index 86dd8f9..e306e68 100644 --- a/src/mainboard/google/kukui/Kconfig +++ b/src/mainboard/google/kukui/Kconfig @@ -34,6 +34,7 @@ select SPI_TPM if VBOOT select TPM_GOOGLE_CR50 if VBOOT select MAINBOARD_HAS_TPM2 if VBOOT + select NEED_VBOOT_COMPATIBILITY select MAINBOARD_HAS_NATIVE_VGA_INIT select MAINBOARD_FORCE_NATIVE_VGA_INIT select HAVE_LINEAR_FRAMEBUFFER diff --git a/src/mainboard/google/link/Kconfig b/src/mainboard/google/link/Kconfig index e6e4b0b..0877b6d 100644 --- a/src/mainboard/google/link/Kconfig +++ b/src/mainboard/google/link/Kconfig @@ -15,6 +15,7 @@ select MAINBOARD_HAS_LIBGFXINIT select MEMORY_MAPPED_TPM select MAINBOARD_HAS_TPM1 + select NEED_VBOOT_COMPATIBILITY select NORTHBRIDGE_INTEL_SANDYBRIDGE select SERIRQ_CONTINUOUS_MODE select SOUTHBRIDGE_INTEL_C216 diff --git a/src/mainboard/google/nyan_big/Kconfig b/src/mainboard/google/nyan_big/Kconfig index 04acaed..eb6bbe7 100644 --- a/src/mainboard/google/nyan_big/Kconfig +++ b/src/mainboard/google/nyan_big/Kconfig @@ -16,6 +16,7 @@ select SPI_FLASH_WINBOND select I2C_TPM select MAINBOARD_HAS_TPM1 + select NEED_VBOOT_COMPATIBILITY select DRIVERS_AS3722_RTC
config VBOOT diff --git a/src/mainboard/google/nyan_blaze/Kconfig b/src/mainboard/google/nyan_blaze/Kconfig index 9f4edac..bc6bc21 100644 --- a/src/mainboard/google/nyan_blaze/Kconfig +++ b/src/mainboard/google/nyan_blaze/Kconfig @@ -16,6 +16,7 @@ select SPI_FLASH_WINBOND select I2C_TPM select MAINBOARD_HAS_TPM1 + select NEED_VBOOT_COMPATIBILITY select DRIVERS_AS3722_RTC
config VBOOT diff --git a/src/mainboard/google/oak/Kconfig b/src/mainboard/google/oak/Kconfig index 03535e9..d421612 100644 --- a/src/mainboard/google/oak/Kconfig +++ b/src/mainboard/google/oak/Kconfig @@ -15,6 +15,7 @@ select EC_GOOGLE_CHROMEEC_SPI select I2C_TPM select MAINBOARD_HAS_TPM1 + select NEED_VBOOT_COMPATIBILITY select MAINBOARD_HAS_NATIVE_VGA_INIT select MAINBOARD_FORCE_NATIVE_VGA_INIT select HAVE_LINEAR_FRAMEBUFFER diff --git a/src/mainboard/google/octopus/Kconfig b/src/mainboard/google/octopus/Kconfig index 88e37ba..e1eb5ef 100644 --- a/src/mainboard/google/octopus/Kconfig +++ b/src/mainboard/google/octopus/Kconfig @@ -20,6 +20,7 @@ select INTEL_LPSS_UART_FOR_CONSOLE select MAINBOARD_HAS_CHROMEOS select MAINBOARD_HAS_TPM2 + select NEED_VBOOT_COMPATIBILITY select NO_BOOTBLOCK_CONSOLE select SOC_ESPI select SOC_INTEL_GEMINILAKE diff --git a/src/mainboard/google/parrot/Kconfig b/src/mainboard/google/parrot/Kconfig index dd6df3e..94f33d9 100644 --- a/src/mainboard/google/parrot/Kconfig +++ b/src/mainboard/google/parrot/Kconfig @@ -16,6 +16,7 @@ select MAINBOARD_HAS_LIBGFXINIT select MEMORY_MAPPED_TPM select MAINBOARD_HAS_TPM1 + select NEED_VBOOT_COMPATIBILITY select NORTHBRIDGE_INTEL_SANDYBRIDGE select SANDYBRIDGE_VBOOT_IN_ROMSTAGE # Workaround for EC/KBC IRQ1. diff --git a/src/mainboard/google/peach_pit/Kconfig b/src/mainboard/google/peach_pit/Kconfig index 64abb7c..c389e4a 100644 --- a/src/mainboard/google/peach_pit/Kconfig +++ b/src/mainboard/google/peach_pit/Kconfig @@ -15,6 +15,7 @@ select DRIVER_PARADE_PS8625 select I2C_TPM select MAINBOARD_HAS_TPM1 + select NEED_VBOOT_COMPATIBILITY select MISSING_BOARD_RESET
config MAINBOARD_DIR diff --git a/src/mainboard/google/poppy/Kconfig b/src/mainboard/google/poppy/Kconfig index 3007bcb..3aee07e 100644 --- a/src/mainboard/google/poppy/Kconfig +++ b/src/mainboard/google/poppy/Kconfig @@ -13,6 +13,7 @@ select INTEL_LPSS_UART_FOR_CONSOLE select MAINBOARD_HAS_CHROMEOS select MAINBOARD_HAS_TPM2 + select NEED_VBOOT_COMPATIBILITY select SOC_INTEL_KABYLAKE select TPM_GOOGLE_CR50
diff --git a/src/mainboard/google/puff/Kconfig b/src/mainboard/google/puff/Kconfig index 1fe0de5..7a22009 100644 --- a/src/mainboard/google/puff/Kconfig +++ b/src/mainboard/google/puff/Kconfig @@ -23,6 +23,7 @@ select INTEL_LPSS_UART_FOR_CONSOLE select MAINBOARD_HAS_CHROMEOS select MAINBOARD_HAS_TPM2 + select NEED_VBOOT_COMPATIBILITY select MB_HAS_ACTIVE_HIGH_SD_PWR_ENABLE select RT8168_GEN_ACPI_POWER_RESOURCE select RT8168_GET_MAC_FROM_VPD diff --git a/src/mainboard/google/rambi/Kconfig b/src/mainboard/google/rambi/Kconfig index f8af00f..a9febe3 100644 --- a/src/mainboard/google/rambi/Kconfig +++ b/src/mainboard/google/rambi/Kconfig @@ -11,6 +11,7 @@ select MAINBOARD_HAS_CHROMEOS select MEMORY_MAPPED_TPM select MAINBOARD_HAS_TPM1 + select NEED_VBOOT_COMPATIBILITY select SOC_INTEL_BAYTRAIL
config BOARD_GOOGLE_BANJO diff --git a/src/mainboard/google/reef/Kconfig b/src/mainboard/google/reef/Kconfig index 47d1114..3994894 100644 --- a/src/mainboard/google/reef/Kconfig +++ b/src/mainboard/google/reef/Kconfig @@ -17,6 +17,7 @@ select INTEL_LPSS_UART_FOR_CONSOLE select MAINBOARD_HAS_CHROMEOS select MAINBOARD_HAS_TPM2 + select NEED_VBOOT_COMPATIBILITY select SAR_ENABLE select SOC_INTEL_APOLLOLAKE select SYSTEM_TYPE_LAPTOP diff --git a/src/mainboard/google/rex/Kconfig b/src/mainboard/google/rex/Kconfig index b56fd58..6395f19 100644 --- a/src/mainboard/google/rex/Kconfig +++ b/src/mainboard/google/rex/Kconfig @@ -18,6 +18,7 @@ select I2C_TPM select INTEL_LPSS_UART_FOR_CONSOLE select MAINBOARD_HAS_TPM2 + select NEED_VBOOT_COMPATIBILITY select SOC_INTEL_CSE_LITE_SKU
config BOARD_GOOGLE_BASEBOARD_REX diff --git a/src/mainboard/google/sarien/Kconfig b/src/mainboard/google/sarien/Kconfig index 37c72ad..b6832c3 100644 --- a/src/mainboard/google/sarien/Kconfig +++ b/src/mainboard/google/sarien/Kconfig @@ -15,6 +15,7 @@ select INTEL_LPSS_UART_FOR_CONSOLE select MAINBOARD_HAS_CHROMEOS select MAINBOARD_HAS_TPM2 + select NEED_VBOOT_COMPATIBILITY select MAINBOARD_USES_IFD_EC_REGION select SAR_ENABLE select SMBIOS_SERIAL_FROM_VPD if VPD diff --git a/src/mainboard/google/skyrim/Kconfig b/src/mainboard/google/skyrim/Kconfig index cb1932f..fdf3419 100644 --- a/src/mainboard/google/skyrim/Kconfig +++ b/src/mainboard/google/skyrim/Kconfig @@ -35,6 +35,7 @@ select I2C_TPM select MAINBOARD_HAS_CHROMEOS select MAINBOARD_HAS_TPM2 + select NEED_VBOOT_COMPATIBILITY select SOC_AMD_MENDOCINO select SOC_AMD_COMMON_BLOCK_ACPI_DPTC if !BOARD_GOOGLE_WINTERHOLD && !BOARD_GOOGLE_MORTHAL select SOC_AMD_COMMON_BLOCK_USE_ESPI diff --git a/src/mainboard/google/slippy/Kconfig b/src/mainboard/google/slippy/Kconfig index 437797c..d9a89ca 100644 --- a/src/mainboard/google/slippy/Kconfig +++ b/src/mainboard/google/slippy/Kconfig @@ -14,6 +14,7 @@ select MAINBOARD_HAS_LIBGFXINIT select MEMORY_MAPPED_TPM select MAINBOARD_HAS_TPM1 + select NEED_VBOOT_COMPATIBILITY select NORTHBRIDGE_INTEL_HASWELL select SOUTHBRIDGE_INTEL_LYNXPOINT select SYSTEM_TYPE_LAPTOP diff --git a/src/mainboard/google/smaug/Kconfig b/src/mainboard/google/smaug/Kconfig index e57da4a..4724ab6 100644 --- a/src/mainboard/google/smaug/Kconfig +++ b/src/mainboard/google/smaug/Kconfig @@ -18,6 +18,7 @@ select MAINBOARD_DO_DSI_INIT select MAINBOARD_HAS_CHROMEOS select MAINBOARD_HAS_TPM1 + select NEED_VBOOT_COMPATIBILITY select DRIVERS_TI_TPS65913_RTC
config VBOOT diff --git a/src/mainboard/google/storm/Kconfig b/src/mainboard/google/storm/Kconfig index c5ce74b..d329dc0 100644 --- a/src/mainboard/google/storm/Kconfig +++ b/src/mainboard/google/storm/Kconfig @@ -15,6 +15,7 @@ select DRIVERS_UART select I2C_TPM select MAINBOARD_HAS_TPM1 + select NEED_VBOOT_COMPATIBILITY
config VBOOT select VBOOT_DISABLE_DEV_ON_RECOVERY diff --git a/src/mainboard/google/stout/Kconfig b/src/mainboard/google/stout/Kconfig index 152c57f..4766a79 100644 --- a/src/mainboard/google/stout/Kconfig +++ b/src/mainboard/google/stout/Kconfig @@ -16,6 +16,7 @@ select MAINBOARD_HAS_LIBGFXINIT select MEMORY_MAPPED_TPM select MAINBOARD_HAS_TPM1 + select NEED_VBOOT_COMPATIBILITY select NORTHBRIDGE_INTEL_SANDYBRIDGE select SANDYBRIDGE_VBOOT_IN_ROMSTAGE select SOUTHBRIDGE_INTEL_C216 diff --git a/src/mainboard/google/trogdor/Kconfig b/src/mainboard/google/trogdor/Kconfig index e409aee..206a512 100644 --- a/src/mainboard/google/trogdor/Kconfig +++ b/src/mainboard/google/trogdor/Kconfig @@ -45,6 +45,7 @@ select SPI_FLASH_WINBOND select MAINBOARD_HAS_CHROMEOS select MAINBOARD_HAS_TPM2 if !BOARD_GOOGLE_BUBS + select NEED_VBOOT_COMPATIBILITY select SPI_TPM if !BOARD_GOOGLE_BUBS select TPM_GOOGLE_CR50 if !BOARD_GOOGLE_BUBS
diff --git a/src/mainboard/google/veyron/Kconfig b/src/mainboard/google/veyron/Kconfig index dbd2b87..63ff70d 100644 --- a/src/mainboard/google/veyron/Kconfig +++ b/src/mainboard/google/veyron/Kconfig @@ -28,6 +28,7 @@ select SPI_FLASH_WINBOND select I2C_TPM select MAINBOARD_HAS_TPM1 + select NEED_VBOOT_COMPATIBILITY
config VBOOT select VBOOT_VBNV_FLASH diff --git a/src/mainboard/google/veyron_mickey/Kconfig b/src/mainboard/google/veyron_mickey/Kconfig index 2c46965..a950fce 100644 --- a/src/mainboard/google/veyron_mickey/Kconfig +++ b/src/mainboard/google/veyron_mickey/Kconfig @@ -13,6 +13,7 @@ select SPI_FLASH_WINBOND select I2C_TPM select MAINBOARD_HAS_TPM1 + select NEED_VBOOT_COMPATIBILITY
config VBOOT select VBOOT_VBNV_FLASH diff --git a/src/mainboard/google/veyron_rialto/Kconfig b/src/mainboard/google/veyron_rialto/Kconfig index 916d8a6..d1a6b5a 100644 --- a/src/mainboard/google/veyron_rialto/Kconfig +++ b/src/mainboard/google/veyron_rialto/Kconfig @@ -13,6 +13,7 @@ select SPI_FLASH_WINBOND select I2C_TPM select MAINBOARD_HAS_TPM1 + select NEED_VBOOT_COMPATIBILITY
config VBOOT select VBOOT_VBNV_FLASH diff --git a/src/mainboard/google/volteer/Kconfig b/src/mainboard/google/volteer/Kconfig index 926a0ca..b93649bf 100644 --- a/src/mainboard/google/volteer/Kconfig +++ b/src/mainboard/google/volteer/Kconfig @@ -32,6 +32,7 @@ select I2C_TPM if BOARD_GOOGLE_VOLTEER2_TI50 select SPI_TPM if !BOARD_GOOGLE_VOLTEER2_TI50 select MAINBOARD_HAS_TPM2 + select NEED_VBOOT_COMPATIBILITY select SOC_INTEL_COMMON_BLOCK_TCSS select SOC_INTEL_CSE_LITE_SKU select SOC_INTEL_TIGERLAKE diff --git a/src/mainboard/google/zork/Kconfig b/src/mainboard/google/zork/Kconfig index 25d4ca4..a7f3637 100644 --- a/src/mainboard/google/zork/Kconfig +++ b/src/mainboard/google/zork/Kconfig @@ -41,6 +41,7 @@ select I2C_TPM select TPM_GOOGLE_CR50 select MAINBOARD_HAS_TPM2 + select NEED_VBOOT_COMPATIBILITY select PCIEXP_ASPM select PCIEXP_CLK_PM select PCIEXP_COMMON_CLOCK diff --git a/src/security/tpm/Kconfig b/src/security/tpm/Kconfig index fc339a2..bc52d1a 100644 --- a/src/security/tpm/Kconfig +++ b/src/security/tpm/Kconfig @@ -94,6 +94,27 @@ help Enables measured boot (experimental)
+# Enable this option to preserve vboot-specific behaviour +config NEED_VBOOT_COMPATIBILITY + bool + default n + +config USE_TPM_LOG_CB + bool + default NEED_VBOOT_COMPATIBILITY + +choice + prompt "TPM event log format" + depends on TPM_MEASURED_BOOT + default TPM_LOG_CB if USE_TPM_LOG_CB + +config TPM_LOG_CB + bool "coreboot's custom format" + help + Custom coreboot-specific format of the log derived from TPM1 log format. + +endchoice + config TPM_MEASURED_BOOT_INIT_BOOTBLOCK bool depends on TPM_MEASURED_BOOT && !VBOOT diff --git a/src/security/tpm/Makefile.inc b/src/security/tpm/Makefile.inc index 8f633a8..7083c00 100644 --- a/src/security/tpm/Makefile.inc +++ b/src/security/tpm/Makefile.inc @@ -55,10 +55,10 @@ ramstage-y += tspi/crtm.c postcar-y += tspi/crtm.c
-ramstage-y += tspi/log.c -romstage-y += tspi/log.c -verstage-y += tspi/log.c -postcar-y += tspi/log.c -bootblock-y += tspi/log.c +ramstage-$(CONFIG_TPM_LOG_CB) += tspi/log.c +romstage-$(CONFIG_TPM_LOG_CB) += tspi/log.c +verstage-$(CONFIG_TPM_LOG_CB) += tspi/log.c +postcar-$(CONFIG_TPM_LOG_CB) += tspi/log.c +bootblock-$(CONFIG_TPM_LOG_CB) += tspi/log.c
endif # CONFIG_TPM_MEASURED_BOOT diff --git a/src/security/tpm/tspi.h b/src/security/tpm/tspi.h index 7157b4d..aae7cb4 100644 --- a/src/security/tpm/tspi.h +++ b/src/security/tpm/tspi.h @@ -4,10 +4,13 @@ #define TSPI_H_
#include <security/tpm/tss.h> -#include <commonlib/tcpa_log_serialized.h> #include <commonlib/region.h> #include <vb2_api.h>
+#if CONFIG(TPM_LOG_CB) +#include <commonlib/tcpa_log_serialized.h> +#endif + #define TPM_PCR_MAX_LEN 64 #define HASH_DATA_CHUNK_SIZE 1024
diff --git a/src/security/tpm/tspi/crtm.h b/src/security/tpm/tspi/crtm.h index bd5bc57..5615d64 100644 --- a/src/security/tpm/tspi/crtm.h +++ b/src/security/tpm/tspi/crtm.h @@ -16,7 +16,15 @@ */ #define TPM_RUNTIME_DATA_PCR 3
-#define TPM_MEASURE_ALGO (CONFIG(TPM1) ? VB2_HASH_SHA1 : VB2_HASH_SHA256) +#if CONFIG(TPM_LOG_CB) && CONFIG(TPM1) +# define TPM_MEASURE_ALGO VB2_HASH_SHA1 +#elif CONFIG(TPM_LOG_CB) && CONFIG(TPM2) +# define TPM_MEASURE_ALGO VB2_HASH_SHA256 +#endif + +#ifndef TPM_MEASURE_ALGO +# error "Misconfiguration: failed to determine TPM hashing algorithm" +#endif
/** * Measure digests cached in TCPA log entries into PCRs