Cr50: Let NVMEM take more time and memory

We were getting occasional stack overflow and watchdog timeouts
when clearing NVMEM. Bump up the stack size a bit in the HOOKS
task, and pet the watchdog before invoking the tpm2 init
functions.

BUG=chrome-os-partner:59419
BRANCH=none
TEST=make buildall, manual

Lock the console, then unlock it. This will reboot the EC & AP,
but should never reboot the Cr50.

Before this CL, it did about half the time.
After, it doesn't.

Change-Id: I33adfeb7360bf7d146a55ef16c923a1a0416393d
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/407847
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
This commit is contained in:
Bill Richardson
2016-11-04 18:54:07 -07:00
committed by chrome-bot
parent cc944ac92a
commit c335895df7
2 changed files with 3 additions and 1 deletions

View File

@@ -17,6 +17,6 @@
* 's' is the stack size in bytes; must be a multiple of 8
*/
#define CONFIG_TASK_LIST \
TASK_ALWAYS(HOOKS, hook_task, NULL, LARGER_TASK_STACK_SIZE) \
TASK_ALWAYS(HOOKS, hook_task, NULL, CONFIG_STACK_SIZE) \
TASK_NOTEST(TPM, tpm_task, NULL, 8192) \
TASK_ALWAYS(CONSOLE, console_task, NULL, TASK_STACK_SIZE)

View File

@@ -533,6 +533,8 @@ static void tpm_init(void)
/* Create version string to be read by host */
set_version_string();
watchdog_reload();
/*
* Make sure NV RAM metadata is initialized, needed to check
* manufactured status. This is a speculative call which will have to