From e0e2645b1e5e9fa8d039fead439cf2da8cbe1966 Mon Sep 17 00:00:00 2001 From: Vincent Palatin Date: Fri, 23 Feb 2018 17:00:02 +0100 Subject: meowth_fp: update RW signature verification config Move the RW signature verification in a dedicated task rather than on the synchronous startup path, in order to be compatible with our flashrom update mechanisms (but at the expense of additional latency in RO). Signed-off-by: Vincent Palatin BRANCH=none BUG=b:36125319 TEST=flashrom -p ec:type=fp -w ec.bin Change-Id: If9ae66bfde0c5922db86dc9acfd4ee766089fa1d Reviewed-on: https://chromium-review.googlesource.com/936542 Commit-Ready: Vincent Palatin Tested-by: Vincent Palatin Reviewed-by: Nicolas Boichat --- board/meowth_fp/ec.tasklist | 1 + board/meowth_fp/flash_fp_mcu | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/board/meowth_fp/ec.tasklist b/board/meowth_fp/ec.tasklist index 247f8729e9..564c9b3bac 100644 --- a/board/meowth_fp/ec.tasklist +++ b/board/meowth_fp/ec.tasklist @@ -17,6 +17,7 @@ * 's' is the stack size in bytes; must be a multiple of 8 */ #define CONFIG_TASK_LIST \ + TASK_ALWAYS_RO(RWSIG, rwsig_task, NULL, 1280) \ TASK_ALWAYS(HOOKS, hook_task, NULL, LARGER_TASK_STACK_SIZE) \ TASK_ALWAYS_RW(FPSENSOR, fp_task, NULL, 4096) \ TASK_ALWAYS(HOSTCMD, host_command_task, NULL, LARGER_TASK_STACK_SIZE) \ diff --git a/board/meowth_fp/flash_fp_mcu b/board/meowth_fp/flash_fp_mcu index 2887d472a3..2a6722076e 100755 --- a/board/meowth_fp/flash_fp_mcu +++ b/board/meowth_fp/flash_fp_mcu @@ -49,7 +49,7 @@ echo 1 > /sys/class/gpio/gpio${GPIO_NRST}/value echo "in" > /sys/class/gpio/gpio${GPIO_NRST}/direction -stm32mon -s ${SPIDEV} -e -w $1 +stm32mon -p -s ${SPIDEV} -e -w $1 # unload spidev echo "${SPIID}" > /sys/bus/spi/drivers/spidev/unbind @@ -66,8 +66,8 @@ echo "in" > /sys/class/gpio/gpio${GPIO_NRST}/direction echo ${GPIO_BOOT0} > /sys/class/gpio/unexport echo ${GPIO_NRST} > /sys/class/gpio/unexport -# wait for FP MCU to come back up -sleep 1 +# wait for FP MCU to come back up (including RWSIG delay) +sleep 2 # Put back cros_fp driver echo "${SPIID}" > /sys/bus/spi/drivers/cros-ec-spi/bind # Test it -- cgit v1.2.1