diff options
author | Vadim Bendebury <vbendeb@chromium.org> | 2017-01-25 10:28:48 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-01-28 01:52:09 -0800 |
commit | 79a1e2072d512d943cbac4a96497ff07fc42e834 (patch) | |
tree | a79cebf0e9cd18f66c936ff3d78f34f1608bf3fb /test/build.mk | |
parent | 1f52e64ae6b3876746bbd6339a6282f5f3ab5818 (diff) | |
download | chrome-ec-79a1e2072d512d943cbac4a96497ff07fc42e834.tar.gz |
nvmem: do not use malloc for cached buffer
With introduction of encryption it is becoming impossible to read
NVMEM contents directly from flash. Decrypting the contents each time
there is a read request creates a significant performance hit. NVMEM
needs to be rearchitecture such that there is no need to run
decryption each time NVMEM read is performed.
This patch does just that, implementation details are described in the
header comment in common/nvmem.c.
To reduce memory impact the size of NVMEM is being decreased from 16K
to 12K. This is acceptable because eviction objects stored in NVMEM
serialized now, which dramatically reduces NVMEM size requirements.
The TPM2 NVMEM size definition must be kept in sync.
Another optimization this change introduces is bypassing writing into
the flash if NVMEM contents did not change, which is verified by
examining the hash of the cached storage.
A test is added to verify that the new commit scheme works as
expected, and the nvmem test is re-introduced to the list of test ran
on each 'make buildall'.
CQ-DEPEND=CL:433839
BRANCH=none
BUG=chrome-os-partner:62260,chrome-os-partner:62421
BUG=chrome-os-partner:62437
TEST=ran the following tests, all succeeded
make buildall -j
TEST_LIST_HOST=nvmem make runtests
tcg test suite
corp enroll on reef, reboot a few times, verify that enrollment sticks
Change-Id: I177daa3ceb4fd7aac299ca26b4506b863e31b946
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/433184
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'test/build.mk')
-rw-r--r-- | test/build.mk | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/test/build.mk b/test/build.mk index ae1304cf59..bd124dacd1 100644 --- a/test/build.mk +++ b/test/build.mk @@ -58,6 +58,7 @@ test-list-host += lightbar test-list-host += math_util test-list-host += motion_lid test-list-host += mutex +test-list-host += nvmem test-list-host += nvmem_vars test-list-host += pingpong test-list-host += power_button |