From 2a7683af41a65907ed81f4a448390c5d0b09cedc Mon Sep 17 00:00:00 2001 From: Aseda Aboagye Date: Tue, 21 Feb 2017 17:12:35 -0800 Subject: cr50: Store console lock state in NvMem vars. This commit enables the use of the nvmem vars module. The console lock state is migrated from using the long life scratch register, to nvmem vars instead which will persist across power on reboots. BUG=b:35586145 BRANCH=None TEST=Flash a dev image. Lock the console. Remove all power from the system. Power on system and verify that console is still locked. Unlock the console, remove power from the system, power on the system, verify that the console is now unlocked. TEST=Repeat the above test, but using the nvtestvar console command instead. Change-Id: I03a2098bb0017cfca59889457a332eafb0e95db6 Signed-off-by: Aseda Aboagye Reviewed-on: https://chromium-review.googlesource.com/445804 Commit-Ready: Aseda Aboagye Tested-by: Aseda Aboagye Reviewed-by: Vadim Bendebury --- test/test_config.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test/test_config.h') diff --git a/test/test_config.h b/test/test_config.h index 029ce9bd70..d59652ec2b 100644 --- a/test/test_config.h +++ b/test/test_config.h @@ -199,6 +199,10 @@ enum nvmem_users { CONFIG_FLASH_NVMEM_VARS_USER_NUM, NVMEM_NUM_USERS }; +/* Define a test var. */ +enum nvmem_vars { + NVMEM_VAR_TEST_VAR, +}; #endif #define CONFIG_FLASH_NVMEM_VARS_USER_SIZE 600 #endif /* TEST_NVMEM_VARS */ -- cgit v1.2.1