]> xenbits.xensource.com Git - unikraft/unikraft.git/commit
drivers: Add `PS/2` subsystem with a dumbed down PS2 keyboard driver
authorSergiu Moga <sergiu@unikraft.io>
Tue, 16 Jan 2024 20:35:50 +0000 (22:35 +0200)
committerUnikraft Bot <monkey@unikraft.io>
Thu, 6 Mar 2025 10:49:16 +0000 (10:49 +0000)
commit64cb671ad84d3dbae86d0ddf0fde67ba9eacf311
treede78b7d2bc686e29cb6420afeb8934be720c1a33
parenta4ac885477bcdf825087c3b69f75799c6d6a7588
drivers: Add `PS/2` subsystem with a dumbed down PS2 keyboard driver

Add a directory to represent what will be in the future the
subsystem for PS/2 controller drivers subsystem.

Implement a basic, dumbed down, driver stub for the PS/2 keyboard.
Write just enough functionality to register an IRQ handler for the
well known default legacy PIC routed PS/2 keyboard IRQ line and be
able to process 3 scan codes received in a burst manner:
CTRL + ALT + DEL

This functionality is bare minimum required to achieve shutdown with
Firecracker's `SendCtrlAltDel` command. It may not work on QEMU and
is obviously not the way the real driver should be implemented.

Additionally, introduce a new invisible config option:
`CONFIG_HAVE_SHUTDOWN_DISPATCHER`
Now, whenever a component implements the functionality of raising a
shutdown event, it must announce it system-wide by selecting this
config. That being said, make the keyboard driver do this.
(In the future, when we will be able to receive actual keystrokes,
we may be able to make this a separate config of the keyboard driver,
besides the actual functionality of processing keystrokes).

Signed-off-by: Sergiu Moga <sergiu@unikraft.io>
Approved-by: Michalis Pappas <michalis@unikraft.io>
Reviewed-by: Michalis Pappas <michalis@unikraft.io>
GitHub-Closes: #1265
drivers/Config.uk
drivers/Makefile.uk
drivers/ukps2/Config.uk [new file with mode: 0644]
drivers/ukps2/Makefile.uk [new file with mode: 0644]
drivers/ukps2/kbd/Config.uk [new file with mode: 0644]
drivers/ukps2/kbd/Makefile.uk [new file with mode: 0644]
drivers/ukps2/kbd/dumbkbd.c [new file with mode: 0644]
lib/ukboot/Config.uk
plat/Config.uk
plat/kvm/Config.uk