diff options
author | Allen Webb <allenwebb@google.com> | 2018-12-10 15:51:29 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-12-20 13:49:43 -0800 |
commit | 9df27e27ad1115f35c6d050bf07f8ebd1f9c411d (patch) | |
tree | f287cafcbedc7e735c25870df266a6e60876c3f3 | |
parent | 3a2ce4663378c90062487c7215ad678b614fb7a6 (diff) | |
download | chrome-ec-9df27e27ad1115f35c6d050bf07f8ebd1f9c411d.tar.gz |
cr50_fuzz: Fix build errors related to nvmem_wipe_cache.
The declaration of nvmem_wipe_cache is now inside the extern "C"
section and a definition was added to cr50_fuzz.
BRANCH=None
BUG=None
TEST=make -j buildall
Change-Id: Ie7401d8880e7982c84fa6a5df5015cbd145fc6d1
Signed-off-by: Allen Webb <allenwebb@google.com>
Reviewed-on: https://chromium-review.googlesource.com/1370746
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Reviewed-by: Manoj Gupta <manojgupta@chromium.org>
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
-rw-r--r-- | fuzz/cr50_fuzz.cc | 12 | ||||
-rw-r--r-- | include/nvmem.h | 4 |
2 files changed, 10 insertions, 6 deletions
diff --git a/fuzz/cr50_fuzz.cc b/fuzz/cr50_fuzz.cc index 4c842631bd..e891ee5d85 100644 --- a/fuzz/cr50_fuzz.cc +++ b/fuzz/cr50_fuzz.cc @@ -56,6 +56,14 @@ extern "C" uint8_t get_current_pcr_digest(const uint8_t bitmask[2], return 0; } +extern "C" int DCRYPTO_ladder_is_enabled(void) { + return 1; +} + +extern "C" void nvmem_wipe_cache(void) { + // Nothing to do since there is no cache in this implementation. +} + // Needed for test targets to build. extern "C" void run_test(void) {} @@ -139,7 +147,3 @@ extern "C" int test_fuzz_one_input(const uint8_t* data, unsigned int size) { } return 0; } - -extern "C" int DCRYPTO_ladder_is_enabled(void) { - return 1; -} diff --git a/include/nvmem.h b/include/nvmem.h index 87eb0fa7c5..4a15656ea4 100644 --- a/include/nvmem.h +++ b/include/nvmem.h @@ -210,10 +210,10 @@ int nvmem_enable_commits(void); */ void nvmem_clear_cache(void); +void nvmem_wipe_cache(void); + #ifdef __cplusplus } #endif -void nvmem_wipe_cache(void); - #endif /* __CROS_EC_NVMEM_UTILS_H */ |