summaryrefslogtreecommitdiff
path: root/payloads/libpayload/drivers/serial/8250.c
diff options
context:
space:
mode:
authorMatt Delco <delco@chromium.org>2019-04-22 13:38:13 -0700
committerPatrick Georgi <pgeorgi@google.com>2019-05-13 09:20:25 +0000
commita20e59da157231f0a0e41774af80f6bccde1b280 (patch)
treeb367fa7ab1e35b39d8161f241a1e088fcf78b4d4 /payloads/libpayload/drivers/serial/8250.c
parentf2d173a554b82b731fceeecd00095f6c6433c7ba (diff)
libpayload: classify all keyboards
Depthcharge uses the keyboard type to help determine whether it can trust the keyboard for security-sensitive confirmations. Currently it trusts anything except usb, but now there's a need to distrust ec-based ps/2 keyboards that are associated with untrusted ECs. To help facilitate this, coreboot needs to report more details about non-usb keyboards, so this change replaces the current instances of unknown with enum values that distinguish uart and gpio from ec-based keyboards. BUG=b:129471321 BRANCH=None TEST=Local compile and flash to systems with trusted and non-trusted ECs. Confirmed that security confirmation can't be performed via keyboard on a system with an untrusted EC but can still be performed on a system with a trusted EC. Change-Id: Iee6295dafadf7cb3da98b62f43b0e184b2b69b1e Signed-off-by: Matt Delco <delco@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/32717 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'payloads/libpayload/drivers/serial/8250.c')
-rw-r--r--payloads/libpayload/drivers/serial/8250.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/payloads/libpayload/drivers/serial/8250.c b/payloads/libpayload/drivers/serial/8250.c
index f503bdb124..9502d4b147 100644
--- a/payloads/libpayload/drivers/serial/8250.c
+++ b/payloads/libpayload/drivers/serial/8250.c
@@ -98,7 +98,8 @@ static void serial_hardware_init(int speed, int word_bits,
static struct console_input_driver consin = {
.havekey = &serial_havechar,
- .getchar = &serial_getchar
+ .getchar = &serial_getchar,
+ .input_type = CONSOLE_INPUT_TYPE_UART,
};
static struct console_output_driver consout = {