diff options
author | Joel Kitching <kitching@google.com> | 2019-10-16 17:44:14 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-12-06 16:07:31 +0000 |
commit | d543cbe84912f722b19f8e624d9d31254d5bed7f (patch) | |
tree | 02ef889bff60b576588bb9266b3c22ba8dd0d9f3 | |
parent | 2cd6efe60ed81a0d59ab91b94dc28212b1e59609 (diff) | |
download | chrome-ec-d543cbe84912f722b19f8e624d9d31254d5bed7f.tar.gz |
ec: remove entering_mode host command
After this host command is called, the value is stored in
g_vboot_mode and never accessed again.
BUG=b:124141368, chromium:1014379
TEST=make buildall -j
BRANCH=none
Change-Id: I7923658139d15394c1c3c07baca7168e34c111e9
Signed-off-by: Joel Kitching <kitching@google.com>
Cq-Depend: chromium:1830239, chromium:1864533
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1865050
Tested-by: Joel Kitching <kitching@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Commit-Queue: Joel Kitching <kitching@chromium.org>
-rw-r--r-- | common/host_command.c | 20 | ||||
-rw-r--r-- | extra/ftdi_hostcmd/test_cmds.c | 1 | ||||
-rw-r--r-- | include/ec_commands.h | 3 | ||||
-rw-r--r-- | include/host_command.h | 10 |
4 files changed, 3 insertions, 31 deletions
diff --git a/common/host_command.c b/common/host_command.c index c3a207937e..c7fd1baa15 100644 --- a/common/host_command.c +++ b/common/host_command.c @@ -33,9 +33,6 @@ static struct host_cmd_handler_args *pending_args; -/* Verify Boot Mode */ -static int g_vboot_mode; - #ifndef CONFIG_HOSTCMD_X86 /* * Simulated memory map. Must be word-aligned, because some of the elements @@ -98,11 +95,6 @@ uint8_t *host_get_memmap(int offset) #endif } -int host_get_vboot_mode(void) -{ - return g_vboot_mode; -} - test_mockable void host_send_response(struct host_cmd_handler_args *args) { #ifdef CONFIG_HOST_COMMAND_STATUS @@ -767,18 +759,6 @@ DECLARE_HOST_COMMAND(EC_CMD_RESEND_RESPONSE, EC_VER_MASK(0)); #endif /* CONFIG_HOST_COMMAND_STATUS */ -static enum ec_status -host_command_entering_mode(struct host_cmd_handler_args *args) -{ - struct ec_params_entering_mode *param = - (struct ec_params_entering_mode *)args->params; - args->response_size = 0; - g_vboot_mode = param->vboot_mode; - return EC_RES_SUCCESS; -} -DECLARE_HOST_COMMAND(EC_CMD_ENTERING_MODE, - host_command_entering_mode, EC_VER_MASK(0)); - /* Returns what we tell it to. */ static enum ec_status host_command_test_protocol(struct host_cmd_handler_args *args) diff --git a/extra/ftdi_hostcmd/test_cmds.c b/extra/ftdi_hostcmd/test_cmds.c index dc09c2b3cb..9ee27cd6d4 100644 --- a/extra/ftdi_hostcmd/test_cmds.c +++ b/extra/ftdi_hostcmd/test_cmds.c @@ -483,7 +483,6 @@ static struct lookup cmd_table[] = { {0xb3, "EC_CMD_SB_WRITE_BLOCK"}, {0xb4, "EC_CMD_BATTERY_VENDOR_PARAM"}, {0xb5, "EC_CMD_SB_FW_UPDATE"}, - {0xb6, "EC_CMD_ENTERING_MODE"}, {0xd2, "EC_CMD_REBOOT_EC"}, {0xd3, "EC_CMD_GET_PANIC_INFO"}, {0xd1, "EC_CMD_REBOOT"}, diff --git a/include/ec_commands.h b/include/ec_commands.h index 29278ddebe..fa982f1d55 100644 --- a/include/ec_commands.h +++ b/include/ec_commands.h @@ -4607,6 +4607,9 @@ struct ec_response_sb_fw_update { * 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. + * + * EC no longer needs to know what mode vboot has entered, + * so this command is deprecated. (See chromium:1014379.) */ #define EC_CMD_ENTERING_MODE 0x00B6 diff --git a/include/host_command.h b/include/host_command.h index 8ace629505..189def22f2 100644 --- a/include/host_command.h +++ b/include/host_command.h @@ -321,16 +321,6 @@ int pd_host_command(int command, int version, const void *outdata, int outsize, void *indata, int insize); - -/** - * EC: Get verify boot mode - * @return vboot_mode as the following: - * VBOOT_MODE_NORMAL - normal mode - * VBOOT_MODE_DEVELOPER - developer mode - * VBOOT_MODE_RECOVERY - recovery mode - */ -int host_get_vboot_mode(void); - /* * Sends an emulated sysrq to the host, used by button-based debug mode. * Only implemented on top of MKBP protocol. |