diff options
author | zengqinghong <zengqinghong@huaqin.corp-partner.google.com> | 2024-01-24 21:00:14 +0800 |
---|---|---|
committer | Subrata Banik <subratabanik@google.com> | 2024-01-31 06:03:27 +0000 |
commit | f4c496d3e3e779b3d870d13e1e359a3b5f7087cb (patch) | |
tree | d4671bddd6500a26ab4efe587b49680e30da92b4 /src | |
parent | 269b23280f928510bcadd23182294e5b9dad11ec (diff) |
mb/google/brya: Correct Ti50 EC-is-trusted logic
With Cr50, the GPIO EC_IN_RW is used to determine whether EC is trusted. However, With the switch to Ti50, it is determined by Ti50's boot mode. If the boot mode is TRUSTED_RO, the VB2_CONTEXT_EC_TRUSTED flag will be set in check_boot_mode(). Therefore in the Ti50 case get_ec_is_trusted() can just return 0.
The current code of get_ec_is_trusted() only checks the GPIO, which
causes the EC to be always considered "trusted". Therefore, correct the return value to 0 for TPM_GOOGLE_TI50.
BUG=b:321172119
TEST=emerge-nissa coreboot chromeos-bootimage
TEST=firmware_DevMode passed in FAFT test
Change-Id: I308f8b36411030911c4421d80827fc49ff325a1b
Signed-off-by: Qinghong Zeng <zengqinghong@huaqin.corp- partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80158
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-by: Tyler Wang <tyler.wang@quanta.corp-partner.google.com>
Reviewed-by: Ian Feng <ian_feng@compal.corp-partner.google.com>
Reviewed-by: Weimin Wu <wuweimin@huaqin.corp-partner.google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/mainboard/google/brya/chromeos.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mainboard/google/brya/chromeos.c b/src/mainboard/google/brya/chromeos.c index 5c99371eb1..73b7237b24 100644 --- a/src/mainboard/google/brya/chromeos.c +++ b/src/mainboard/google/brya/chromeos.c @@ -24,6 +24,10 @@ int get_write_protect_state(void) int get_ec_is_trusted(void) { + /* With Ti50, VB2_CONTEXT_EC_TRUSTED should be set according to the boot mode. */ + if (CONFIG(TPM_GOOGLE_TI50)) + return 0; + /* EC is trusted if not in RW. */ return !gpio_get(GPIO_EC_IN_RW); } |