Re: Simple usb keyboard/mouse driver implementation after ExitBootServices
Laszlo Ersek
On 02/23/21 07:04, gomidas95@... wrote:
Hello, I am an amateur. I made a uefi app for reading some type of images (bmp os/2) and files in folders. That also provides mice and keyboard support. I did not use edk2 but gnu-efi later I will switch it to edk2. Gnu do not have any doc about drivers. When I exit boot services my keyboard (console output text) and mice (graphical cursor on screen) becomes unresponsive.Your "trick" is undefined behavior. EFI_SIMPLE_TEXT_INPUT_PROTOCOL is not a runtime protocol; you cannot use it after ExitBootServices(). TBH I don't understand your purpose. Why do you call ExitBootServices() in the first place, if you want to handle user input afterwards with your UEFI application? You're expected to call ExitBootServices() *because* the work of the bootloader application is done, and now it's time for the OS to take control. In that sense, to answer your question "What I should I do to allow keyboard and mice again on a real hardware", I'd say "launch an actual operating system after ExitBootServices". Please read up on the various firmware phases. https://github.com/tianocore-training/Tianocore_Training_Contents/wiki https://github.com/tianocore/tianocore.github.io/wiki/UEFI-EDKII-Learning-Dev Laszlo |
|