-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Arm virtio keyboard driver #5996
Conversation
Linux keyboard keycodes are used by many drivers. This commit add its header file to EDK2 source tree. Signed-off-by: Paweł Poławski <ppolawsk@redhat.com>
This commit adds: - missing virtio subsystem ID for input device - PrepareVirtioKeyboardDevicePath() handler to boot manager library Signed-off-by: Paweł Poławski <ppolawsk@redhat.com>
This is virtio based keyboard driver designed to be used on ARM platform. The driver implements basic and extended text input interface. UEFI requires only basic text input interface, but Gnome needs extended text input to work on. To run with qemu: CODE=../edk2/Build/Ovmf3264/DEBUG_GCC5/FV/OVMF_CODE.fd VARS=../edk2/Build/Ovmf3264/DEBUG_GCC5/FV/OVMF_VARS.fd qemu-system-x86_64 \ -blockdev node-name=code,driver=file,filename=${CODE},read-only=on \ -drive if=none,id=vars,format=raw,file=${VARS},snapshot=on \ -machine q35,kernel-irqchip=on,smm=on,pflash0=code,pflash1=vars \ -accel kvm -m 4G -cpu host -smp cores=2,threads=1 \ -chardev stdio,id=fwlog \ -device isa-debugcon,iobase=0x402,chardev=fwlog \ -net none \ -device virtio-keyboard-pci Signed-off-by: Paweł Poławski <ppolawsk@redhat.com>
@kraxel @osteffenrh - following latest EDK2 development guidelines, instead of mailing list I have created PR here for the easier review and discussion :) |
CI found some errors:
Strange that the spell check complains about that. This is code and not regular text:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We cannot incorporate GPL sources. Why do we need this?
The GPL file is a straight copy from the linux kernel source tree ( The driver is useful to have keyboard support without depending either PS/2 (which is x86-only) or USB. |
I can eventually copy over keycodes I am using but it may not be the "cleanest" solution to this problem. Yet it would satisfy the CI. |
It is possible to exclude files from licence checks via |
This presupposes that it is actually fine to incorporate this code, and I am not convinced about that. |
No, we can't have GPL in this repo. I'm not super happy about the MIT situation either (because that loses the explicit patent grant, which perhaps could be resolved by an SPDX "and" statement?), but clearly we dropped the ball there. If the argument is that there is no copyright in effect on this header, then the submitter should be able to change the license outright and still comply with the DCO. Are we happy there is no copyright? (I'm not entirely convinced.) |
What if I will just copy needed definitions directly into the driver code / header? It would solve the issue but eventually in the future we could go out of sync with the original header. |
TL;DR: yes, that works for me. Given that this header is (unfortunately) referenced as the canonical definition by the virtio spec, it wouldn't seem to make sense to use any other source. But the following statement in the original header |
I don't think we hve to worry too much about things running out of sync. Even if there are new keys added down the road (such as microsoft defining a new copilot key) it is highly unlikely that supporting them makes sense for the firmware. |
This PR has been automatically marked as stale because it has not had activity in 60 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions. |
This pull request has been automatically been closed because it did not have any activity in 60 days and no follow up within 7 days after being marked stale. Thank you for your contributions. |
I missed the fact that GH closed this PR and I cant overwrite this. I have addressed review comments and opened new PR: #6444 |
Description
This set of commits introduces virtio based keyboard driver. The main idea is to
have a keyboard driver which is more "light" than standard USB based driver.
This may be better for some small ARM based platforms with limited resources.
How This Was Tested
I have tested this manually with RPi5 ARM platform and qemu. For test I have navigated
over efi shell, config and grub bootloader window running from Fedora ISO.
CODE=/home/koniu/RedHat/git/virt/edk2/Build/Ovmf3264/DEBUG_GCC5/FV/OVMF_CODE.fd
VARS=/home/koniu/RedHat/git/virt/edk2/Build/Ovmf3264/DEBUG_GCC5/FV/OVMF_VARS.fd
qemu-system-x86_64
-blockdev node-name=code,driver=file,filename=${CODE},read-only=on
-drive if=none,id=vars,format=raw,file=${VARS},snapshot=on
-machine q35,kernel-irqchip=on,smm=on,pflash0=code,pflash1=vars
-accel kvm -m 4G -cpu host -smp cores=2,threads=1
-chardev stdio,id=fwlog
-device isa-debugcon,iobase=0x402,chardev=fwlog
-net none
-device virtio-keyboard-pci
-boot d -cdrom ~/Pobrane/Fedora.iso
Integration Instructions
N/A