diff options
author | Yu-Ping Wu <yupingso@chromium.org> | 2022-06-07 16:10:04 +0800 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2022-06-08 14:58:17 +0000 |
commit | 7f339c6050c5ddd9c7235d491d80b3841a3dbb67 (patch) | |
tree | 37f17b9fb820591e4d72dc3e1bab2079245cc9ad /src/mainboard | |
parent | b95ebf9fcfc37bd5636efb1542315b72cb276fad (diff) |
mb/google/corsola: Correct EC-is-trusted logic
With Cr50, the GPIO EC_IN_RW_ODL is used to determine whether EC is
trusted. However, with Ti50 where corsola has been switched to, 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:235053870
TEST=emerge-corsola coreboot
TEST=firmware-DevMode passed in kingler (with Ti50)
BRANCH=none
Change-Id: I59b16238bfb487832ef618668c0f9addc1ee7937
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/64998
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/mainboard')
-rw-r--r-- | src/mainboard/google/corsola/chromeos.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mainboard/google/corsola/chromeos.c b/src/mainboard/google/corsola/chromeos.c index 56959c3e2e..7d36a170fd 100644 --- a/src/mainboard/google/corsola/chromeos.c +++ b/src/mainboard/google/corsola/chromeos.c @@ -45,6 +45,10 @@ void fill_lb_gpios(struct lb_gpios *gpios) 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. This is active low. */ return !!gpio_get(GPIO_EC_IN_RW_ODL); } |