Opened 2 years ago

#20997 new defect

Scancode returned by int15h call in BIOS keyboard handler(int09h) is ignored.

Reported by: Yamu Owned by:
Component: other Version: VirtualBox 5.2.34
Keywords: BIOS Cc:
Guest type: other Host type: Linux


Keyboard scancode is handled as below:
in int09_handler ( src/VBox/Devices/PC/BIOS/orgs.asm )
(step1) get a scancode from keyboard hardware.
(step2) execute pusha(save the scancode in al into the stack).
(step3) call int15h(ah=04fh) to be able to modify the scancode.
(step4) call _int09_function to process the scancode.

in int09_function ( src/VBox/Devices/PC/BIOS/keyboard.c )
(step5) get the scancode from the stack saved at (step2)

So, the scancode modified at (step3) is ignored.

Here is the code snippet(from VirtualBox-6.1.34.tar.bz2):

          in      al, KBC_DATA  ;(step1)
          push    ds
          DO_pusha      ;<===(step2) save scancode in AL
          mov     ah, 4Fh
          int     15h   ; (step3)
          push    es
          call    _int09_function ; (step4)

  void BIOSCALL int09_function(uint16_t ES, uint16_t DI, uint16_t SI, uint16_t BP, uint16_t SP,
                               uint16_t BX, uint16_t DX, uint16_t CX, uint16_t AX)
    scancode = GET_AL();  // <===(step5) get scancode from the stack

  #define BIOSCALL    __cdecl
  #define GET_AL() ( AX & 0x00ff )

Change History (0)

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use