mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-30 18:41:11 +00:00
tpm: fix TPM reset
use the right prototype for the memset() clearing the TPM .bss space on reset, use addresses of variables instead of their values, and do not clear tpm_resisters.c .bss section, tpm_init() does the right thing. BRANCH=gru BUG=chrome-os-partner:52366 TEST=make buildall Change-Id: I4c8c0ae61a0e70c9fc211420bbf44bbc7d8de3ed Signed-off-by: Vincent Palatin <vpalatin@chromium.org> Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/389331 Commit-Ready: Bill Richardson <wfrichar@chromium.org> Reviewed-by: Bill Richardson <wfrichar@chromium.org>
This commit is contained in:
committed by
chrome-bot
parent
8697386a8b
commit
75aaabcd9a
@@ -614,7 +614,9 @@ static void tpm_reset_now(void)
|
||||
* includes this file's .bss in the same section, so it will be cleared
|
||||
* at the same time.
|
||||
*/
|
||||
memset(__bss_libtpm2_start, __bss_libtpm2_end - __bss_libtpm2_start, 0);
|
||||
memset(&__bss_libtpm2_start, 0,
|
||||
(uintptr_t)(&__bss_libtpm2_end) -
|
||||
(uintptr_t)(&__bss_libtpm2_start));
|
||||
|
||||
/*
|
||||
* NOTE: Any initialized variables in this file must be placed in a
|
||||
|
||||
Reference in New Issue
Block a user