[coreboot-gerrit] Change in coreboot[master]: mainboard/opencellular/rotundu: Fix TPM and VBoot 2 support

Philipp Deppenwiese (Code Review) gerrit at coreboot.org
Fri Mar 9 17:28:07 CET 2018


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 at 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 at 0x0 0x300000 {
+		SI_DESC at 0x0 0x1000
+		SI_ME at 0x1000 0x2ff000
+	}
+	SI_BIOS at 0x300000 0xd00000 {
+		RW_SECTION_A at 0x0 0x410040 {
+			VBLOCK_A at 0x0 0x10000
+			FW_MAIN_A(CBFS)@0x10000 0x400000
+			RW_FWID_A at 0x410000 0x40
+		}
+		RW_SECTION_B at 0x410040 0x410040 {
+			VBLOCK_B at 0x0 0x10000
+			FW_MAIN_B(CBFS)@0x10000 0x400000
+			RW_FWID_B at 0x410000 0x40
+		}
+		RW_MRC_CACHE at 0x820080 0x10000
+		RW_ELOG at 0x830080 0x4000
+		RW_SHARED at 0x834080 0x4000 {
+			SHARED_DATA at 0x0 0x2000
+			VBLOCK_DEV at 0x2000 0x2000
+		}
+		RW_VPD at 0x838080 0x2000
+		UNUSED_HOLE at 0x83A080 0x2C5F80
+		WP_RO at 0xB00000 0x500000 {
+			RO_VPD at 0x0 0x4000
+			RO_UNUSED at 0x4000 0xc000
+			RO_SECTION at 0x10000 0x2f0000 {
+				FMAP at 0x0 0x800
+				RO_FRID at 0x800 0x40
+				RO_FRID_PAD at 0x840 0x7c0
+				GBB at 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 at 0x0 0x300000 {
+		SI_DESC at 0x0 0x1000
+		SI_ME at 0x1000 0x2ff000
+	}
+	SI_BIOS at 0x300000 0x500000 {
+		RW_SECTION_A at 0x0 0x1e6000 {
+			VBLOCK_A at 0x0 0x10000
+			FW_MAIN_A(CBFS)@0x10000 0x1d5fc0
+			RW_FWID_A at 0x1e5fc0 0x40
+		}
+		RW_MRC_CACHE at 0x1e6000 0x10000
+		RW_ELOG at 0x1f6000 0x4000
+		RW_SHARED at 0x1fa000 0x4000 {
+			SHARED_DATA at 0x0 0x2000
+			VBLOCK_DEV at 0x2000 0x2000
+		}
+		RW_VPD at 0x1fe000 0x2000
+		WP_RO at 0x200000 0x300000 {
+			RO_VPD at 0x0 0x4000
+			RO_UNUSED at 0x4000 0xc000
+			RO_SECTION at 0x10000 0x2f0000 {
+				FMAP at 0x0 0x800
+				RO_FRID at 0x800 0x40
+				RO_FRID_PAD at 0x840 0x7c0
+				GBB at 0x1000 0xef000
+				COREBOOT(CBFS)@0xf0000 0x200000
+			}
+		}
+	}
+}

-- 
To view, visit https://review.coreboot.org/25084
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I49d97a9d324207e45520d43b814b03a20005122a
Gerrit-Change-Number: 25084
Gerrit-PatchSet: 1
Gerrit-Owner: Philipp Deppenwiese <zaolin.daisuki at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180309/5060d8db/attachment.html>


More information about the coreboot-gerrit mailing list