summaryrefslogtreecommitdiff
path: root/chip/stm32/gpio-f0-l.c
diff options
context:
space:
mode:
authorVadim Sukhomlinov <sukhomlinov@google.com>2021-09-21 16:12:01 -0700
committerCommit Bot <commit-bot@chromium.org>2021-09-22 18:38:53 +0000
commit3e79af7d30c9c71029873ebad4dead13d09e298c (patch)
treec9d4c7701c6873898fdb951c370f95f288715894 /chip/stm32/gpio-f0-l.c
parent12a022685da02b5b409a65347bdee1ba86b5b53d (diff)
downloadchrome-ec-stabilize-14238.B-cr50_stab.tar.gz
cr50: move several few static inline functions into dcrypto/internal.hstabilize-14238.B-cr50_stab
Several functions like lo32(), hi32(), clz() were defined into bn.c, but clz and ctz are used in fips_rand.c. Move these functions into internal.h to allow reuse. Both __builtin_ctz() and __builtin_clz() have undefined behavior for argument which is zero. Explicitly set result to 32 in such case. It was the case for __builtin_clz() in bn.c, but not for variants used in TRNG health tests. BUG=None TEST=make BOARD=cr50 CRYPTO_TEST=1; TCG tests Signed-off-by: Vadim Sukhomlinov <sukhomlinov@google.com> Change-Id: Ifc6fa7f820080bdad0f14fc079163f4976369724 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3174592 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Reviewed-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-by: Andrey Pronin <apronin@chromium.org> Tested-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Commit-Queue: Vadim Sukhomlinov <sukhomlinov@chromium.org>
Diffstat (limited to 'chip/stm32/gpio-f0-l.c')
0 files changed, 0 insertions, 0 deletions