Compare commits

...

2 Commits

Author SHA1 Message Date
Tim Crawford
7e5b28bf86 security/tpm/tspi: Do TPM Restart if TPM Resume fails
The Infineon SLB 9672 on newer Clevo machines regularly fails TPM Resume
on S3 with the error `TPM_RC_VALUE`.

Per TPM2 spec, handle the failure by performing a TPM Restart.

> The startup behavior defined by this specification is different than
> TPM 1.2 with respect to Startup(STATE). A TPM 1.2 device will enter
> Failure Mode if no state is available when the TPM receives
> Startup(STATE). This is not the case in this specification. It is up
> to the CRTM to take corrective action if it the TPM returns
> TPM_RC_VALUE in response to Startup(STATE).

Fixes the following error from being repeatedly logged in Linux:

> kernel: tpm tpm0: A TPM error (256) occurred attempting get random

Ref: Trusted Platform Module Library, Part 1: Architecture, rev 1.59
Change-Id: I3388007d4448c93bd0dda591c8ca7d1a8dc5306b
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2024-05-31 12:16:10 -06:00
Kenneth Chan
1f97d801ce mb/google/brya/var/nova: Update USB ports setting
Update used USB port[2][3](type-a) setting for nova.

BUG=b:328711879
TEST=emerge-constitution coreboot chromeos-bootimage

Change-Id: I63cf97b23627feac05743f2a6e514a33fcaf7dff
Signed-off-by: Kenneth Chan <kenneth.chan@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82703
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: David Wu <david_wu@quanta.corp-partner.google.com>
2024-05-31 16:18:12 +00:00
2 changed files with 10 additions and 0 deletions

View File

@@ -6,6 +6,8 @@ chip soc/intel/alderlake
register "sagv" = "SaGv_Enabled"
register "usb2_ports[1]" = "USB2_PORT_EMPTY" # Disable USB2 Port 1
register "usb2_ports[2]" = "USB2_PORT_MID(OC_SKIP)" # Type-A Port A3
register "usb2_ports[3]" = "USB2_PORT_MID(OC_SKIP)" # Type-A Port A2
register "usb2_ports[4]" = "USB2_PORT_EMPTY" # Disable USB2 Port 4
register "usb2_ports[5]" = "USB2_PORT_EMPTY" # Disable USB2 Port 5
register "usb2_ports[6]" = "USB2_PORT_EMPTY" # Disable USB2 Port 6

View File

@@ -73,6 +73,14 @@ static tpm_result_t tpm_setup_s3_helper(void)
default:
printk(BIOS_ERR, "TPM: Resume failed (%#x).\n", rc);
if (CONFIG(TPM2)) {
/*
* TODO: Record EV_SEPARATOR event to indicate to host
* that an error has occurred.
*/
printk(BIOS_WARNING, "TPM: Performing restart\n");
rc = tlcl_startup();
}
break;
}