Raul Rangel has submitted this change. ( https://review.coreboot.org/c/coreboot/+/77668?usp=email )
(
24 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
)Change subject: mb/google/skyrim: Enable hibernate on TPM err
......................................................................
mb/google/skyrim: Enable hibernate on TPM err
Enable hibernate on TPM setup error for Skyrim devices.
BUG=b:296439237
TEST=Force the error by hard coding the return code and observe the
device entering hibernate.
BRANCH=None
Change-Id: Ibf96b830f07dac98035d3152c8ec220685a912bc
Signed-off-by: Jon Murphy <jpmurphy(a)google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/77668
Reviewed-by: Tim Van Patten <timvp(a)google.com>
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
---
M src/mainboard/google/skyrim/Kconfig
1 file changed, 5 insertions(+), 0 deletions(-)
Approvals:
build bot (Jenkins): Verified
Tim Van Patten: Looks good to me, approved
diff --git a/src/mainboard/google/skyrim/Kconfig b/src/mainboard/google/skyrim/Kconfig
index 59f6c67..4e9ae98 100644
--- a/src/mainboard/google/skyrim/Kconfig
+++ b/src/mainboard/google/skyrim/Kconfig
@@ -247,4 +247,9 @@
config SPI_FLASH_WINBOND
default y
+# Enable hibernate on TPM setup error as needed
+config TPM_SETUP_HIBERNATE_ON_ERR
+ bool
+ default y
+
endif # BOARD_GOOGLE_BASEBOARD_SKYRIM
--
To view, visit https://review.coreboot.org/c/coreboot/+/77668?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: Ibf96b830f07dac98035d3152c8ec220685a912bc
Gerrit-Change-Number: 77668
Gerrit-PatchSet: 35
Gerrit-Owner: Jon Murphy <jpmurphy(a)google.com>
Gerrit-Reviewer: Eric Lai <eric_lai(a)quanta.corp-partner.google.com>
Gerrit-Reviewer: Jason Nien <jason.nien(a)amd.corp-partner.google.com>
Gerrit-Reviewer: Karthik Ramasubramanian <kramasub(a)google.com>
Gerrit-Reviewer: Martin Roth <martin.roth(a)amd.corp-partner.google.com>
Gerrit-Reviewer: Raul Rangel <rrangel(a)chromium.org>
Gerrit-Reviewer: Tim Van Patten <timvp(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-MessageType: merged
Raul Rangel has submitted this change. ( https://review.coreboot.org/c/coreboot/+/77667?usp=email )
(
26 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
)Change subject: drivers/tpm: Add tpm failure handling
......................................................................
drivers/tpm: Add tpm failure handling
Add additional failure mode logic for the TPM to enable an
automated recovery mode for GSC hangs.
BUG=b:296439237
TEST=Force the error by hard coding the return code and observe the
device entering hibernate.
BRANCH=None
Change-Id: Ieec7e9227d538130354dea8b772d0306cdda1237
Signed-off-by: Jon Murphy <jpmurphy(a)google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/77667
Reviewed-by: Eric Lai <eric_lai(a)quanta.corp-partner.google.com>
Reviewed-by: Julius Werner <jwerner(a)chromium.org>
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
---
M src/security/tpm/Kconfig
M src/security/vboot/vboot_logic.c
2 files changed, 25 insertions(+), 1 deletion(-)
Approvals:
Julius Werner: Looks good to me, approved
build bot (Jenkins): Verified
Eric Lai: Looks good to me, approved
diff --git a/src/security/tpm/Kconfig b/src/security/tpm/Kconfig
index 39134c1..c06150d 100644
--- a/src/security/tpm/Kconfig
+++ b/src/security/tpm/Kconfig
@@ -172,3 +172,12 @@
default 3
endmenu # Trusted Platform Module (tpm)
+
+config TPM_SETUP_HIBERNATE_ON_ERR
+ bool
+ depends on EC_GOOGLE_CHROMEEC
+ help
+ Select this to force a device to hibernate on the next AP shutdown when a TPM
+ setup error occurs. This will cause a cold boot of the system and offer an
+ opportunity to recover the TPM should it be hung. This is only effective if
+ the Z-State brings the power rail down.
diff --git a/src/security/vboot/vboot_logic.c b/src/security/vboot/vboot_logic.c
index ab38085..11983b9 100644
--- a/src/security/vboot/vboot_logic.c
+++ b/src/security/vboot/vboot_logic.c
@@ -4,6 +4,7 @@
#include <assert.h>
#include <console/console.h>
#include <bootmode.h>
+#include <ec/google/chromeec/ec.h>
#include <fmap.h>
#include <security/tpm/tspi/crtm.h>
#include <security/tpm/tss/vendor/cr50/cr50.h>
@@ -271,9 +272,23 @@
* check the return value here because vb2api_fw_phase1 will catch
* invalid secdata and tell us what to do (=reboot). */
timestamp_add_now(TS_TPMINIT_START);
- if (vboot_setup_tpm(ctx) == TPM_SUCCESS) {
+ rv = vboot_setup_tpm(ctx);
+ if (rv == TPM_SUCCESS) {
antirollback_read_space_firmware(ctx);
antirollback_read_space_kernel(ctx);
+ } else {
+ vb2api_fail(ctx, VB2_RECOVERY_RO_TPM_S_ERROR, rv);
+ if (CONFIG(TPM_SETUP_HIBERNATE_ON_ERR) &&
+ rv == TPM_CB_COMMUNICATION_ERROR) {
+ printk(BIOS_ERR, "Failed to communicate with TPM\n"
+ "Next reboot will hibernate to reset TPM");
+ /* Command the EC to hibernate on next AP shutdown */
+ if (google_chromeec_reboot(
+ EC_REBOOT_HIBERNATE,
+ EC_REBOOT_FLAG_ON_AP_SHUTDOWN)) {
+ printk(BIOS_ERR, "Failed to get EC to schedule hibernate");
+ }
+ }
}
timestamp_add_now(TS_TPMINIT_END);
--
To view, visit https://review.coreboot.org/c/coreboot/+/77667?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: Ieec7e9227d538130354dea8b772d0306cdda1237
Gerrit-Change-Number: 77667
Gerrit-PatchSet: 34
Gerrit-Owner: Jon Murphy <jpmurphy(a)google.com>
Gerrit-Reviewer: Christian Walter <christian.walter(a)9elements.com>
Gerrit-Reviewer: Eric Lai <eric_lai(a)quanta.corp-partner.google.com>
Gerrit-Reviewer: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: Karthik Ramasubramanian <kramasub(a)google.com>
Gerrit-Reviewer: Raul Rangel <rrangel(a)chromium.org>
Gerrit-Reviewer: Tim Van Patten <timvp(a)google.com>
Gerrit-Reviewer: Yu-Ping Wu <yupingso(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-MessageType: merged
Attention is currently required from: Andrey Pronin, Christian Walter, Eric Lai, Erik van den Bogaert, Felix Held, Frans Hendriks, Fred Reitberger, Jason Glenesk, Jon Murphy, Julius Werner, Karthik Ramasubramanian, Martin L Roth, Nick Vaccaro, Subrata Banik, Tim Van Patten, Yu-Ping Wu.
Raul Rangel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/77666?usp=email )
Change subject: treewide: convert to tpm_result_t
......................................................................
Patch Set 32: Code-Review+2
--
To view, visit https://review.coreboot.org/c/coreboot/+/77666?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: Ifdf9ff6c2a1f9b938dbb04d245799391115eb6b1
Gerrit-Change-Number: 77666
Gerrit-PatchSet: 32
Gerrit-Owner: Jon Murphy <jpmurphy(a)google.com>
Gerrit-Reviewer: Andrey Pronin <apronin(a)chromium.org>
Gerrit-Reviewer: Christian Walter <christian.walter(a)9elements.com>
Gerrit-Reviewer: Eric Lai <eric_lai(a)quanta.corp-partner.google.com>
Gerrit-Reviewer: Erik van den Bogaert <ebogaert(a)eltan.com>
Gerrit-Reviewer: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Frans Hendriks <fhendriks(a)eltan.com>
Gerrit-Reviewer: Fred Reitberger <reitbergerfred(a)gmail.com>
Gerrit-Reviewer: Jason Glenesk <jason.glenesk(a)gmail.com>
Gerrit-Reviewer: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: Karthik Ramasubramanian <kramasub(a)google.com>
Gerrit-Reviewer: Matt DeVillier <matt.devillier(a)amd.corp-partner.google.com>
Gerrit-Reviewer: Nick Vaccaro <nvaccaro(a)chromium.org>
Gerrit-Reviewer: Raul Rangel <rrangel(a)chromium.org>
Gerrit-Reviewer: Subrata Banik <subratabanik(a)google.com>
Gerrit-Reviewer: Tim Van Patten <timvp(a)google.com>
Gerrit-Reviewer: Yu-Ping Wu <yupingso(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Martin L Roth <gaumless(a)gmail.com>
Gerrit-CC: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Attention: Frans Hendriks <fhendriks(a)eltan.com>
Gerrit-Attention: Nick Vaccaro <nvaccaro(a)chromium.org>
Gerrit-Attention: Julius Werner <jwerner(a)chromium.org>
Gerrit-Attention: Eric Lai <eric_lai(a)quanta.corp-partner.google.com>
Gerrit-Attention: Tim Van Patten <timvp(a)google.com>
Gerrit-Attention: Andrey Pronin <apronin(a)chromium.org>
Gerrit-Attention: Erik van den Bogaert <ebogaert(a)eltan.com>
Gerrit-Attention: Jason Glenesk <jason.glenesk(a)gmail.com>
Gerrit-Attention: Martin L Roth <gaumless(a)gmail.com>
Gerrit-Attention: Subrata Banik <subratabanik(a)google.com>
Gerrit-Attention: Jon Murphy <jpmurphy(a)google.com>
Gerrit-Attention: Christian Walter <christian.walter(a)9elements.com>
Gerrit-Attention: Fred Reitberger <reitbergerfred(a)gmail.com>
Gerrit-Attention: Yu-Ping Wu <yupingso(a)google.com>
Gerrit-Attention: Karthik Ramasubramanian <kramasub(a)google.com>
Gerrit-Attention: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Comment-Date: Thu, 28 Sep 2023 16:53:57 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: Christian Walter, Erik van den Bogaert, Felix Held, Frans Hendriks, Fred Reitberger, Jan Samek, Jason Glenesk, Jon Murphy, Julius Werner, Matt DeVillier, Nick Vaccaro, Subrata Banik, Tim Van Patten, Yu-Ping Wu.
Raul Rangel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/78183?usp=email )
Change subject: treewide: convert to %#x hex prints
......................................................................
Patch Set 4: Code-Review+2
(1 comment)
File src/drivers/i2c/tpm/tis.c:
https://review.coreboot.org/c/coreboot/+/78183/comment/be5126e4_8571f979 :
PS4, Line 65: %zx
> Probably, but lets do another CL to clean up the
Acknowledged
--
To view, visit https://review.coreboot.org/c/coreboot/+/78183?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I0d1ac4b920530635fb758c5165a6a99c11b414c8
Gerrit-Change-Number: 78183
Gerrit-PatchSet: 4
Gerrit-Owner: Jon Murphy <jpmurphy(a)google.com>
Gerrit-Reviewer: Christian Walter <christian.walter(a)9elements.com>
Gerrit-Reviewer: Erik van den Bogaert <ebogaert(a)eltan.com>
Gerrit-Reviewer: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Frans Hendriks <fhendriks(a)eltan.com>
Gerrit-Reviewer: Fred Reitberger <reitbergerfred(a)gmail.com>
Gerrit-Reviewer: Jan Samek <jan.samek(a)siemens.com>
Gerrit-Reviewer: Jason Glenesk <jason.glenesk(a)gmail.com>
Gerrit-Reviewer: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: Karthik Ramasubramanian <kramasub(a)google.com>
Gerrit-Reviewer: Matt DeVillier <matt.devillier(a)amd.corp-partner.google.com>
Gerrit-Reviewer: Nick Vaccaro <nvaccaro(a)chromium.org>
Gerrit-Reviewer: Raul Rangel <rrangel(a)chromium.org>
Gerrit-Reviewer: Subrata Banik <subratabanik(a)google.com>
Gerrit-Reviewer: Tim Van Patten <timvp(a)google.com>
Gerrit-Reviewer: Yu-Ping Wu <yupingso(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Frans Hendriks <fhendriks(a)eltan.com>
Gerrit-Attention: Matt DeVillier <matt.devillier(a)amd.corp-partner.google.com>
Gerrit-Attention: Nick Vaccaro <nvaccaro(a)chromium.org>
Gerrit-Attention: Julius Werner <jwerner(a)chromium.org>
Gerrit-Attention: Tim Van Patten <timvp(a)google.com>
Gerrit-Attention: Jan Samek <jan.samek(a)siemens.com>
Gerrit-Attention: Erik van den Bogaert <ebogaert(a)eltan.com>
Gerrit-Attention: Jason Glenesk <jason.glenesk(a)gmail.com>
Gerrit-Attention: Subrata Banik <subratabanik(a)google.com>
Gerrit-Attention: Jon Murphy <jpmurphy(a)google.com>
Gerrit-Attention: Christian Walter <christian.walter(a)9elements.com>
Gerrit-Attention: Fred Reitberger <reitbergerfred(a)gmail.com>
Gerrit-Attention: Yu-Ping Wu <yupingso(a)google.com>
Gerrit-Attention: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Comment-Date: Thu, 28 Sep 2023 16:52:51 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Raul Rangel <rrangel(a)chromium.org>
Comment-In-Reply-To: Yu-Ping Wu <yupingso(a)google.com>
Gerrit-MessageType: comment
Attention is currently required from: Christian Walter, Erik van den Bogaert, Felix Held, Frans Hendriks, Fred Reitberger, Jan Samek, Jason Glenesk, Jon Murphy, Julius Werner, Matt DeVillier, Nick Vaccaro, Subrata Banik, Tim Van Patten, Yu-Ping Wu.
Raul Rangel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/78183?usp=email )
Change subject: treewide: convert to %#x hex prints
......................................................................
Patch Set 4:
(1 comment)
File src/drivers/i2c/tpm/tis.c:
https://review.coreboot.org/c/coreboot/+/78183/comment/a9d50fed_fdf15e4a :
PS4, Line 65: %zx
> Does `%#zx` work?
Probably, but lets do another CL to clean up the
--
To view, visit https://review.coreboot.org/c/coreboot/+/78183?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I0d1ac4b920530635fb758c5165a6a99c11b414c8
Gerrit-Change-Number: 78183
Gerrit-PatchSet: 4
Gerrit-Owner: Jon Murphy <jpmurphy(a)google.com>
Gerrit-Reviewer: Christian Walter <christian.walter(a)9elements.com>
Gerrit-Reviewer: Erik van den Bogaert <ebogaert(a)eltan.com>
Gerrit-Reviewer: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Frans Hendriks <fhendriks(a)eltan.com>
Gerrit-Reviewer: Fred Reitberger <reitbergerfred(a)gmail.com>
Gerrit-Reviewer: Jan Samek <jan.samek(a)siemens.com>
Gerrit-Reviewer: Jason Glenesk <jason.glenesk(a)gmail.com>
Gerrit-Reviewer: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: Karthik Ramasubramanian <kramasub(a)google.com>
Gerrit-Reviewer: Matt DeVillier <matt.devillier(a)amd.corp-partner.google.com>
Gerrit-Reviewer: Nick Vaccaro <nvaccaro(a)chromium.org>
Gerrit-Reviewer: Raul Rangel <rrangel(a)chromium.org>
Gerrit-Reviewer: Subrata Banik <subratabanik(a)google.com>
Gerrit-Reviewer: Tim Van Patten <timvp(a)google.com>
Gerrit-Reviewer: Yu-Ping Wu <yupingso(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Frans Hendriks <fhendriks(a)eltan.com>
Gerrit-Attention: Matt DeVillier <matt.devillier(a)amd.corp-partner.google.com>
Gerrit-Attention: Nick Vaccaro <nvaccaro(a)chromium.org>
Gerrit-Attention: Julius Werner <jwerner(a)chromium.org>
Gerrit-Attention: Tim Van Patten <timvp(a)google.com>
Gerrit-Attention: Jan Samek <jan.samek(a)siemens.com>
Gerrit-Attention: Erik van den Bogaert <ebogaert(a)eltan.com>
Gerrit-Attention: Jason Glenesk <jason.glenesk(a)gmail.com>
Gerrit-Attention: Subrata Banik <subratabanik(a)google.com>
Gerrit-Attention: Jon Murphy <jpmurphy(a)google.com>
Gerrit-Attention: Christian Walter <christian.walter(a)9elements.com>
Gerrit-Attention: Fred Reitberger <reitbergerfred(a)gmail.com>
Gerrit-Attention: Yu-Ping Wu <yupingso(a)google.com>
Gerrit-Attention: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Comment-Date: Thu, 28 Sep 2023 16:47:06 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Yu-Ping Wu <yupingso(a)google.com>
Gerrit-MessageType: comment
Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/76504?usp=email )
(
11 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
)Change subject: soc/amd/genoa: Enable ECAM MMCONF support
......................................................................
soc/amd/genoa: Enable ECAM MMCONF support
Signed-off-by: Arthur Heymans <arthur(a)aheymans.xyz>
Signed-off-by: Varshit Pandya <pandyavarshit(a)gmail.com>
Change-Id: I70db8bf9f553fa9bfd2a5c20a1393119786047f8
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76504
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier(a)amd.corp-partner.google.com>
---
M src/soc/amd/genoa/Kconfig
1 file changed, 8 insertions(+), 1 deletion(-)
Approvals:
build bot (Jenkins): Verified
Matt DeVillier: Looks good to me, approved
diff --git a/src/soc/amd/genoa/Kconfig b/src/soc/amd/genoa/Kconfig
index b73b53c..c4f8a9d 100644
--- a/src/soc/amd/genoa/Kconfig
+++ b/src/soc/amd/genoa/Kconfig
@@ -7,7 +7,6 @@
def_bool y
select ARCH_X86
select HAVE_EXP_X86_64_SUPPORT
- select NO_ECAM_MMCONF_SUPPORT
select RESET_VECTOR_IN_RAM
select SOC_AMD_COMMON
select SOC_AMD_COMMON_BLOCK_ACPIMMIO
@@ -75,6 +74,14 @@
help
Sets the size of DRAM allocation for romstage in linker script.
+config ECAM_MMCONF_BASE_ADDRESS
+ hex
+ default 0xE0000000
+
+config ECAM_MMCONF_BUS_NUMBER
+ int
+ default 256
+
menu "PSP Configuration Options"
config AMDFW_CONFIG_FILE
--
To view, visit https://review.coreboot.org/c/coreboot/+/76504?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I70db8bf9f553fa9bfd2a5c20a1393119786047f8
Gerrit-Change-Number: 76504
Gerrit-PatchSet: 13
Gerrit-Owner: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Matt DeVillier <matt.devillier(a)amd.corp-partner.google.com>
Gerrit-Reviewer: Matt DeVillier <matt.devillier(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Martin Roth <martin.roth(a)amd.corp-partner.google.com>
Gerrit-CC: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-CC: Varshit Pandya <pandyavarshit(a)gmail.com>
Gerrit-MessageType: merged