summaryrefslogtreecommitdiff
path: root/sys/include/arch
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2025-08-20 03:54:35 +0000
committerIan Moffett <ian@osmora.org>2025-08-20 04:00:20 +0000
commit74101c4128d8a4fc0e71be329865ca5d21c96ace (patch)
treede392531fc0bcd752e95a27fb5a921a08e6fe9e0 /sys/include/arch
parentb3cb4bb6737585dc72c72b8c0f3ffc94408fb22d (diff)
kernel/amd64: Add initial ext scancode support
Most keyboards nowadays support extended scancodes which are multi-byte packets prefixed with a 0xE0 byte to represent non-standard special keys. This commit introduces the initial groundwork for supporting such scancodes. - i8042_drain() now takes a (nullable) pointer to a i8042 data buffer which will hold bytes drained - Made some timing adjustments between i8042 register reads in the i8042_drain() function - Removed nonessential and contentious locks which choked up input performance Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/include/arch')
-rw-r--r--sys/include/arch/amd64/isa/i8042var.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/include/arch/amd64/isa/i8042var.h b/sys/include/arch/amd64/isa/i8042var.h
index 13c3095..9619920 100644
--- a/sys/include/arch/amd64/isa/i8042var.h
+++ b/sys/include/arch/amd64/isa/i8042var.h
@@ -74,6 +74,10 @@
#define I8042_LED_NUM BIT(1)
#define I8042_LED_CAPS BIT(2)
+/* Extended scancode types */
+#define I8042_XSC_ENDPR 0 /* End pressed */
+#define I8042_XSC_ENDRL 1 /* End released */
+
/* Quirks */
#define I8042_HOSTILE BIT(0) /* If EC likes throwing NMIs */