diff options
author | Vadim Bendebury <vbendeb@chromium.org> | 2019-04-25 20:10:16 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2019-05-01 11:03:04 -0700 |
commit | f4f26f19d1ce3d3f4904ddf8bb69185665f73c5b (patch) | |
tree | b2d8ae91c15c8735900fc0f14e80976edbdac930 /test | |
parent | d15d77489e3dd10b4b884c555e477f5647d86bb3 (diff) | |
download | chrome-ec-f4f26f19d1ce3d3f4904ddf8bb69185665f73c5b.tar.gz |
nvmem: populate default tpm objects after wipeout
TPM memory wipe code is removing all TPM objects from the flash,
including the reserved objects, which are supposed to be always
present. The assumption was that the Cr50 would be reset after the
wipe out and the initialization code would populated the reserved
objects with default values.
But in fact Cr50 reset is not guaranteed after TPM wipeout, so it is
better to call the init function explicitly to make sure that all
reserved objects are in the flash at all times.
BRANCH=cr50, cr50-mp
BUG=b:69907320
TEST='dump' command ran on the Cr50 console after RMA open shows all
reserved objects present.
Change-Id: Id9e227de0995c6491da9f38fc8ca11df3661c71f
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1584658
Reviewed-by: Andrey Pronin <apronin@chromium.org>
Diffstat (limited to 'test')
-rw-r--r-- | test/nvmem.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/nvmem.c b/test/nvmem.c index 52cf40138a..75bd9f2856 100644 --- a/test/nvmem.c +++ b/test/nvmem.c @@ -627,10 +627,10 @@ static int test_nvmem_erase_tpm_data(void) TEST_ASSERT(iterate_over_flash() == EC_SUCCESS); TEST_ASSERT(test_result.deleted_obj_count == 0); TEST_ASSERT(test_result.var_count == 3); - TEST_ASSERT(test_result.reserved_obj_count == 0); + TEST_ASSERT(test_result.reserved_obj_count == 38); TEST_ASSERT(test_result.evictable_obj_count == 0); TEST_ASSERT(test_result.unexpected_count == 0); - TEST_ASSERT(test_result.valid_data_size == 86); + TEST_ASSERT(test_result.valid_data_size == 1174); TEST_ASSERT(test_result.erased_data_size == 0); return EC_SUCCESS; |