summaryrefslogtreecommitdiff
path: root/common/nvmem.c
diff options
context:
space:
mode:
authorVadim Bendebury <vbendeb@chromium.org>2018-12-05 13:51:06 -0800
committerchrome-bot <chrome-bot@chromium.org>2018-12-06 22:06:26 -0800
commita45e42da1a5c16a94d4d02531802f87061b8891c (patch)
tree7b7697d05a32e987ef99437a78b26a1aa91df8e0 /common/nvmem.c
parent74a598dd11bdfb03001e8ab8e62757beb8622583 (diff)
downloadchrome-ec-a45e42da1a5c16a94d4d02531802f87061b8891c.tar.gz
cr50: provide DCRYPTO_ladder_is_enabled() for test and fuzz builds
This function is called from common/nvmem.c, it should be available when compiling for tests, the stub could be filled up later when new tests are added. BRANCH=cr50, cr50-mp BUG=b:119221935 TEST=make buildall -j still succeeds. Change-Id: I082292818c7f2b10336c9a7c49e0a9195e25a12b Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1363816 Reviewed-by: Allen Webb <allenwebb@google.com>
Diffstat (limited to 'common/nvmem.c')
-rw-r--r--common/nvmem.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/common/nvmem.c b/common/nvmem.c
index b4c82d0154..1c911ccddf 100644
--- a/common/nvmem.c
+++ b/common/nvmem.c
@@ -5,9 +5,7 @@
#include "common.h"
#include "console.h"
-#ifndef TEST_BUILD
#include "dcrypto.h"
-#endif
#include "flash.h"
#include "nvmem.h"
#include "task.h"
@@ -111,13 +109,12 @@ static int nvmem_save(void)
uint8_t sha_comp[NVMEM_SHA_SIZE];
int rv = EC_SUCCESS;
-#ifndef TEST_BUILD
if (!DCRYPTO_ladder_is_enabled()) {
CPRINTF("%s: Key ladder is disabled. Skipping flash write\n",
__func__);
goto release_cache;
}
-#endif
+
part = (struct nvmem_partition *)nvmem_cache;
/* Has anything changed in the cache? */