1

In BIOS when we want to handle the keyboard we just make an interrupt descriptor table and then load it using:

lidt {address} 

But in UEFI things are a bit different and the osdev wiki did not write an article about that. So how could we handle timer/keyboard or any other interrupt using gnu uefi?

4
  • This is two questions, not one. UEFI does not define anything about interrupt handling. What you're asking about would under UEFI be handled using EFI_SIMPLE_INPUT_PROTOCOL and the Event boot services.
    – unixsmurf
    Commented Sep 8, 2021 at 13:53
  • 2
    UEFI doesn't use any device interrupts. The only interrupt it enables is the timer. It polls the keyboard and other devices in the timer interrupt handler.
    – prl
    Commented Sep 8, 2021 at 18:11
  • You can hook the timer interrupt by creating a timer event and calling SetTimer.
    – prl
    Commented Sep 8, 2021 at 18:19
  • lidt is a CPU instruction - it is not restricted to the BIOS and will work on UEFI. Note that some interrupts such as the PS2 mouse and keyboard may not work unless there is PS2 emulation enabled in the computer's firmware.
    – cael ras
    Commented Sep 27, 2021 at 1:12

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.