Skip to content
Snippets Groups Projects
Commit b5279249 authored by Simon Glass's avatar Simon Glass
Browse files

sandbox: cros_ec: Support EC_CMD_ENTERING_MODE emulation


Emualate this function which is used with Chrome OS verified boot.

Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
parent 38068820
No related branches found
No related tags found
No related merge requests found
...@@ -459,6 +459,8 @@ static int process_cmd(struct ec_state *ec, ...@@ -459,6 +459,8 @@ static int process_cmd(struct ec_state *ec,
case EC_CMD_MKBP_STATE: case EC_CMD_MKBP_STATE:
len = cros_ec_keyscan(ec, resp_data); len = cros_ec_keyscan(ec, resp_data);
break; break;
case EC_CMD_ENTERING_MODE:
break;
default: default:
printf(" ** Unknown EC command %#02x\n", req_hdr->command); printf(" ** Unknown EC command %#02x\n", req_hdr->command);
return -1; return -1;
......
...@@ -1555,6 +1555,21 @@ struct ec_params_sb_wr_block { ...@@ -1555,6 +1555,21 @@ struct ec_params_sb_wr_block {
uint16_t data[32]; uint16_t data[32];
} __packed; } __packed;
/*
* Entering Verified Boot Mode Command
* Default mode is VBOOT_MODE_NORMAL if EC did not receive this command.
* Valid Modes are: normal, developer, and recovery.
*/
#define EC_CMD_ENTERING_MODE 0xb6
struct ec_params_entering_mode {
int vboot_mode;
} __packed;
#define VBOOT_MODE_NORMAL 0
#define VBOOT_MODE_DEVELOPER 1
#define VBOOT_MODE_RECOVERY 2
/*****************************************************************************/ /*****************************************************************************/
/* System commands */ /* System commands */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment