summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoredisonhello <edisonhello@google.com>2021-09-06 14:53:43 +0800
committerCommit Bot <commit-bot@chromium.org>2021-09-17 10:22:51 +0000
commita23fd3c3bc50213c878f81f59fcd6c7da328aa43 (patch)
tree2daecf9472f9e126ab6c18a97b17d44a86236435
parent8ee52d26e27a5423e1bca1c427db4209c08f1899 (diff)
downloadvboot-a23fd3c3bc50213c878f81f59fcd6c7da328aa43.tar.gz
vboot: Remove VbExKeyboard* functions from vboot API
Since the UI code has been moved to depthcharge, VbExKeyboardRead and VbExKeyboardReadWithFlags are not used in any function in vboot now. Remove these two functions in vboot. BUG=b:172339016 TEST=DEBUG=1 make -j test_setup && make -j runtests BRANCH=none Cq-Depend: chromium:3142696 Signed-off-by: edisonhello <edisonhello@google.com> Change-Id: I6ce983bf400141681dfd33a0e3c30fe74a992c77 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3143812 Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
-rw-r--r--firmware/include/vboot_api.h76
-rw-r--r--firmware/stub/vboot_api_stub.c12
2 files changed, 0 insertions, 88 deletions
diff --git a/firmware/include/vboot_api.h b/firmware/include/vboot_api.h
index 04ee05b8..b7b0ce54 100644
--- a/firmware/include/vboot_api.h
+++ b/firmware/include/vboot_api.h
@@ -267,82 +267,6 @@ vb2_error_t VbExStreamRead(VbExStream_t stream, uint32_t bytes, void *buffer);
void VbExStreamClose(VbExStream_t stream);
/*****************************************************************************/
-/* Keyboard and switches */
-
-/* Key code for CTRL + letter */
-#define VB_KEY_CTRL(letter) (letter & 0x1f)
-
-/* Key code for fn keys */
-#define VB_KEY_F(num) (num + 0x108)
-
-/* Key codes for required non-printable-ASCII characters. */
-enum VbKeyCode_t {
- VB_KEY_ENTER = '\r',
- VB_KEY_ESC = 0x1b,
- VB_KEY_BACKSPACE = 0x8,
- VB_KEY_UP = 0x100,
- VB_KEY_DOWN = 0x101,
- VB_KEY_LEFT = 0x102,
- VB_KEY_RIGHT = 0x103,
- VB_KEY_CTRL_ENTER = 0x104,
-};
-
-/*
- * WARNING!!! Before updating the codes in enum VbButtonCode_t, ensure that the
- * code does not overlap the values in VbKeyCode_t unless the button action is
- * the same as key action.
- */
-enum VbButtonCode_t {
- /* Volume up/down short press match the values in 8042 driver. */
- VB_BUTTON_VOL_UP_SHORT_PRESS = 0x62,
- VB_BUTTON_VOL_DOWN_SHORT_PRESS = 0x63,
- /* Dummy values used below. */
- VB_BUTTON_POWER_SHORT_PRESS = 0x90,
- VB_BUTTON_VOL_UP_LONG_PRESS = 0x91,
- VB_BUTTON_VOL_DOWN_LONG_PRESS = 0x92,
- VB_BUTTON_VOL_UP_DOWN_COMBO_PRESS = 0x93,
-};
-
-/* Flags for additional information.
- * TODO(semenzato): consider adding flags for modifiers instead of
- * making up some of the key codes above.
- */
-enum VbKeyFlags_t {
- VB_KEY_FLAG_TRUSTED_KEYBOARD = 1 << 0,
-};
-
-/**
- * Read the next keypress from the keyboard buffer.
- *
- * Returns the keypress, or zero if no keypress is pending or error.
- *
- * The following keys must be returned as ASCII character codes:
- * 0x08 Backspace
- * 0x09 Tab
- * 0x0D Enter (carriage return)
- * 0x01 - 0x1A Ctrl+A - Ctrl+Z (yes, those alias with backspace/tab/enter)
- * 0x1B Esc (VB_KEY_ESC)
- * 0x20 Space
- * 0x30 - 0x39 '0' - '9'
- * 0x60 - 0x7A 'a' - 'z'
- *
- * Some extended keys must also be supported; see the VB_KEY_* defines above.
- *
- * Keys ('/') or key-chords (Fn+Q) not defined above may be handled in any of
- * the following ways:
- * 1. Filter (don't report anything if one of these keys is pressed).
- * 2. Report as ASCII (if a well-defined ASCII value exists for the key).
- * 3. Report as any other value in the range 0x200 - 0x2FF.
- * It is not permitted to report a key as a multi-byte code (for example,
- * sending an arrow key as the sequence of keys '\x1b', '[', '1', 'A'). */
-uint32_t VbExKeyboardRead(void);
-
-/**
- * Same as VbExKeyboardRead(), but return extra information.
- */
-uint32_t VbExKeyboardReadWithFlags(uint32_t *flags_ptr);
-
-/*****************************************************************************/
/* Misc */
/**
diff --git a/firmware/stub/vboot_api_stub.c b/firmware/stub/vboot_api_stub.c
index bc5f2fe9..5e085566 100644
--- a/firmware/stub/vboot_api_stub.c
+++ b/firmware/stub/vboot_api_stub.c
@@ -19,18 +19,6 @@
#include "vboot_test.h"
__attribute__((weak))
-uint32_t VbExKeyboardRead(void)
-{
- return 0;
-}
-
-__attribute__((weak))
-uint32_t VbExKeyboardReadWithFlags(uint32_t *flags_ptr)
-{
- return 0;
-}
-
-__attribute__((weak))
uint32_t VbExIsShutdownRequested(void)
{
return 0;