summaryrefslogtreecommitdiff
path: root/builtin/stdbool.h
diff options
context:
space:
mode:
authorVadim Bendebury <vbendeb@chromium.org>2017-01-25 10:28:48 -0800
committerchrome-bot <chrome-bot@chromium.org>2017-01-28 01:52:09 -0800
commit79a1e2072d512d943cbac4a96497ff07fc42e834 (patch)
treea79cebf0e9cd18f66c936ff3d78f34f1608bf3fb /builtin/stdbool.h
parent1f52e64ae6b3876746bbd6339a6282f5f3ab5818 (diff)
downloadchrome-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 'builtin/stdbool.h')
0 files changed, 0 insertions, 0 deletions