Karthik Ramasubramanian has uploaded this change for review.

View Change

soc/intel/common/cse_lite: Perform a board specific reset

When ME jumps from RO to RW, global reset is initiated. When AP is reset
as part of global reset, in some boards TPM initialization fails. This
is because AP reset is not detected by TPM hosting an older firmware
version. To signal TPMs running older firmware version about AP reset, a
modified reset sequence needs to be performed. Hence add support to
perform board-specific reset sequence.

BUG=b:162290856, b:162386991
TEST=Ensure that the device boots to OS with the board-specific reset
sequence when ME jumps from RO to RW with an older and newer Cr50
firmware.

Change-Id: I8663e7f25461e58e45766e2ac00d752bfa191d8b
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
---
M src/soc/intel/common/block/cse/cse_lite.c
M src/soc/intel/common/block/include/intelblocks/cse.h
2 files changed, 13 insertions(+), 0 deletions(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/87/44187/1
diff --git a/src/soc/intel/common/block/cse/cse_lite.c b/src/soc/intel/common/block/cse/cse_lite.c
index a12f2d0..7e80e72 100644
--- a/src/soc/intel/common/block/cse/cse_lite.c
+++ b/src/soc/intel/common/block/cse/cse_lite.c
@@ -355,12 +355,21 @@
return true;
}

+__weak void cse_board_reset(void)
+{
+ /* Default weak implementation, does nothing. */
+}
+
/* Set the CSE's next boot partition and issues system reset */
static bool cse_set_and_boot_from_next_bp(enum boot_partition_id bp)
{
if (!cse_set_next_boot_partition(bp))
return false;

+ /* Allow the board to perform a reset for CSE RO<->RW jump */
+ cse_board_reset();
+
+ /* If board does not perform the reset, then perform global_reset */
do_global_reset();

die("cse_lite: Failed to reset the system\n");
diff --git a/src/soc/intel/common/block/include/intelblocks/cse.h b/src/soc/intel/common/block/include/intelblocks/cse.h
index a1dc3d9..5466ba6 100644
--- a/src/soc/intel/common/block/include/intelblocks/cse.h
+++ b/src/soc/intel/common/block/include/intelblocks/cse.h
@@ -219,4 +219,8 @@
* currently selected partition.
*/
void cse_fw_sync(void *unused);
+
+/* Perform a board-specific reset sequence for CSE RO<->RW jump */
+void cse_board_reset(void);
+
#endif // SOC_INTEL_COMMON_CSE_H

To view, visit change 44187. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I8663e7f25461e58e45766e2ac00d752bfa191d8b
Gerrit-Change-Number: 44187
Gerrit-PatchSet: 1
Gerrit-Owner: Karthik Ramasubramanian <kramasub@google.com>
Gerrit-MessageType: newchange