diff options
author | Namyoon Woo <namyoon@chromium.org> | 2020-04-06 18:05:24 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-04-07 06:20:00 +0000 |
commit | 1628ef85c9403ff694b52170ca20dc3cade6e4ef (patch) | |
tree | 6fc866a164b6d76c1cab345233ecbf84398d48ec | |
parent | 259a4f159fe904ae333c4ca8a2b0789b27f4febb (diff) | |
download | chrome-ec-1628ef85c9403ff694b52170ca20dc3cade6e4ef.tar.gz |
prevent reading ECRW hash from TPM nvmem on non-EFS2 boards
This patch make sure that cr50 attempts to read ECRW hash from
TPM nvmem only if the board supports EC-EFS2. Though this attempt
is not critical, it prints an read error message in console, which
could mislead the reader.
BUG=none
TEST=none
Signed-off-by: Namyoon Woo <namyoon@chromium.org>
Change-Id: I95e8407b19259fd62e0d1858efdd2696042dcd95
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2138601
Reviewed-by: Mary Ruthven <mruthven@chromium.org>
-rw-r--r-- | common/ec_efs.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/common/ec_efs.c b/common/ec_efs.c index d7bc881872..a0b912b9a4 100644 --- a/common/ec_efs.c +++ b/common/ec_efs.c @@ -268,6 +268,9 @@ void ec_efs_refresh(void) { int rv; + if (!board_has_ec_cr50_comm_support()) + return; + rv = load_ec_hash_(ec_efs_ctx.hash); if (rv == EC_SUCCESS) { ec_efs_ctx.hash_is_loaded = 1; |