Philipp Deppenwiese has uploaded this change for review. ( https://review.coreboot.org/25084
Change subject: mainboard/opencellular/rotundu: Fix TPM and VBoot 2 support ......................................................................
mainboard/opencellular/rotundu: Fix TPM and VBoot 2 support
Change-Id: I49d97a9d324207e45520d43b814b03a20005122a Signed-off-by: zaolin zaolin@das-labor.org --- M src/mainboard/opencellular/rotundu/Kconfig M src/mainboard/opencellular/rotundu/mainboard.c A src/mainboard/opencellular/rotundu/vboot-16M.fmd A src/mainboard/opencellular/rotundu/vboot-8M.fmd 4 files changed, 81 insertions(+), 8 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/84/25084/1
diff --git a/src/mainboard/opencellular/rotundu/Kconfig b/src/mainboard/opencellular/rotundu/Kconfig index 761a21d..79b67fb 100644 --- a/src/mainboard/opencellular/rotundu/Kconfig +++ b/src/mainboard/opencellular/rotundu/Kconfig @@ -28,10 +28,16 @@ select USE_BLOBS select HAVE_FSP_BIN if FSP_PACKAGE_DEFAULT select MAINBOARD_HAS_LPC_TPM - select TPM1 + select MAINBOARD_HAS_TPM1
if BOARD_OPENCELLULAR_BASEBOARD_ROTUNDU
+config VBOOT + select MRC_CACHE_FMAP + select GBB_FLAG_DISABLE_LID_SHUTDOWN + select GBB_FLAG_DISABLE_PD_SOFTWARE_SYNC + select GBB_FLAG_DISABLE_EC_SOFTWARE_SYNC + config VARIANT_DIR string default "rotundu" if BOARD_OPENCELLULAR_ROTUNDU @@ -67,6 +73,12 @@ hex default 0xfffb0000
+config FMDFILE + string + depends on VBOOT + default "src/mainboard/$(CONFIG_MAINBOARD_DIR)/vboot-8M.fmd" if BOARD_ROMSIZE_KB_8192 + default "src/mainboard/$(CONFIG_MAINBOARD_DIR)/vboot-16M.fmd" + # FIXME: Slow boot performance when increasing CBFS_SIZE beyond 8MB? config CBFS_SIZE hex diff --git a/src/mainboard/opencellular/rotundu/mainboard.c b/src/mainboard/opencellular/rotundu/mainboard.c index dbcfe2d..cabef0d 100644 --- a/src/mainboard/opencellular/rotundu/mainboard.c +++ b/src/mainboard/opencellular/rotundu/mainboard.c @@ -18,7 +18,6 @@
#include <device/device.h> #include <arch/acpi.h> -#include <security/tpm/tspi.h>
/* * mainboard_enable is executed as first thing after enumerate_buses(). @@ -26,12 +25,6 @@ */ static void mainboard_enable(device_t dev) { - if ((IS_ENABLED(CONFIG_TPM1) || IS_ENABLED(CONFIG_TPM2)) && - !IS_ENABLED(CONFIG_VBOOT)) { - int s3resume = acpi_is_wakeup_s3(); - - tpm_setup(s3resume); - } }
/* diff --git a/src/mainboard/opencellular/rotundu/vboot-16M.fmd b/src/mainboard/opencellular/rotundu/vboot-16M.fmd new file mode 100644 index 0000000..778d537 --- /dev/null +++ b/src/mainboard/opencellular/rotundu/vboot-16M.fmd @@ -0,0 +1,37 @@ +FLASH 16M { + SI_ALL@0x0 0x300000 { + SI_DESC@0x0 0x1000 + SI_ME@0x1000 0x2ff000 + } + SI_BIOS@0x300000 0xd00000 { + RW_SECTION_A@0x0 0x410040 { + VBLOCK_A@0x0 0x10000 + FW_MAIN_A(CBFS)@0x10000 0x400000 + RW_FWID_A@0x410000 0x40 + } + RW_SECTION_B@0x410040 0x410040 { + VBLOCK_B@0x0 0x10000 + FW_MAIN_B(CBFS)@0x10000 0x400000 + RW_FWID_B@0x410000 0x40 + } + RW_MRC_CACHE@0x820080 0x10000 + RW_ELOG@0x830080 0x4000 + RW_SHARED@0x834080 0x4000 { + SHARED_DATA@0x0 0x2000 + VBLOCK_DEV@0x2000 0x2000 + } + RW_VPD@0x838080 0x2000 + UNUSED_HOLE@0x83A080 0x2C5F80 + WP_RO@0xB00000 0x500000 { + RO_VPD@0x0 0x4000 + RO_UNUSED@0x4000 0xc000 + RO_SECTION@0x10000 0x2f0000 { + FMAP@0x0 0x800 + RO_FRID@0x800 0x40 + RO_FRID_PAD@0x840 0x7c0 + GBB@0x1000 0xef000 + COREBOOT(CBFS)@0xf0000 0x400000 + } + } + } +} diff --git a/src/mainboard/opencellular/rotundu/vboot-8M.fmd b/src/mainboard/opencellular/rotundu/vboot-8M.fmd new file mode 100644 index 0000000..ea0c86a --- /dev/null +++ b/src/mainboard/opencellular/rotundu/vboot-8M.fmd @@ -0,0 +1,31 @@ +FLASH 8M { + SI_ALL@0x0 0x300000 { + SI_DESC@0x0 0x1000 + SI_ME@0x1000 0x2ff000 + } + SI_BIOS@0x300000 0x500000 { + RW_SECTION_A@0x0 0x1e6000 { + VBLOCK_A@0x0 0x10000 + FW_MAIN_A(CBFS)@0x10000 0x1d5fc0 + RW_FWID_A@0x1e5fc0 0x40 + } + RW_MRC_CACHE@0x1e6000 0x10000 + RW_ELOG@0x1f6000 0x4000 + RW_SHARED@0x1fa000 0x4000 { + SHARED_DATA@0x0 0x2000 + VBLOCK_DEV@0x2000 0x2000 + } + RW_VPD@0x1fe000 0x2000 + WP_RO@0x200000 0x300000 { + RO_VPD@0x0 0x4000 + RO_UNUSED@0x4000 0xc000 + RO_SECTION@0x10000 0x2f0000 { + FMAP@0x0 0x800 + RO_FRID@0x800 0x40 + RO_FRID_PAD@0x840 0x7c0 + GBB@0x1000 0xef000 + COREBOOT(CBFS)@0xf0000 0x200000 + } + } + } +}