From d674693d9b3f3a9ff0e3a0d00ebc35b75c4b3f43 Mon Sep 17 00:00:00 2001 From: Namyoon Woo Date: Fri, 27 Mar 2020 14:42:07 -0700 Subject: Print EC-EFS2 boot-mode upon ec_comm uart command This patch makes ec_comm uart command to display EC-EFS2 boot mode, either 'NORMAL' or 'NO_BOOT'. This shall be used for test purpose. BUG=b:150650877 TEST=manually checked on uart. > ec_comm ... ec_hash : LOADED secdata_error_code : 0x00000000 boot_mode : NORMAL Signed-off-by: Namyoon Woo Change-Id: Ia2ac1bf9fdecc641558856754f9df2c917434d95 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2125155 Tested-by: Namyoon Woo Reviewed-by: Mary Ruthven Commit-Queue: Namyoon Woo --- common/ec_efs.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/common/ec_efs.c b/common/ec_efs.c index 207056dce0..fabc549ec8 100644 --- a/common/ec_efs.c +++ b/common/ec_efs.c @@ -36,6 +36,11 @@ static struct ec_efs_context_ { uint8_t hash[SHA256_DIGEST_SIZE]; /* EC-RW digest */ } ec_efs_ctx; +static const char * const boot_mode_name_[] = { + "NORMAL", + "NO_BOOT", +}; + /* * Change the boot mode * @@ -274,6 +279,8 @@ void ec_efs_print_status(void) ec_efs_ctx.hash_is_loaded ? "" : "UN"); ccprintf("secdata_error_code : 0x%08x\n", ec_efs_ctx.secdata_error_code); + ccprintf("boot_mode : %s\n", + boot_mode_name_[ec_efs_ctx.boot_mode]); #ifdef CR50_RELAXED ccprintf("ec_hash_secdata : %ph\n", -- cgit v1.2.1