American Megatrends, Inc.

Ps2Ctl

Copyright

Release Notes

© American Megatrends, Inc.


Ps2Ctl

AMIBIOS Document References

Previous Release Notes

4.6.5_PS2CTL_001.htm

4.6.5_PS2CTL_002.htm

4654.htm

Built on 09:52:37 01/16/13


Release Notes - NDA Required

Component Information:
Component Title: PS2CTL
Component Reference Name: PS2CTL
Component Type: ModulePart
Release Date: 2012-05-15
Source Control Label: 4.6.5_PS2CTL_001
Source Control Location: SS: Alaska;$/Alaska/Source/Core/CORE_DXE/PS2CTL;
Dependencies
Component Dependencies
N0NE

File Dependencies
ONE
Dependent File Name with Extension: Tokens.c
Dependent Source Control Location: SS: Alaska;$/Alaska/BIN/Core/Library/Tokens.c;
Dependent Source Control Label: 20
TWO
Dependent File Name with Extension: CORE_DXE.sdl
Dependent Source Control Location: SS: Alaska;$/Alaska/BIN/Core/CORE_DXE/CORE_DXE.mak;
Dependent Source Control Label: 43

Protocol Dependencies
N0NE
Non-Compiled BIN and LIB File(s) within this Component:
N0NE
Component Description:
The PS2CTL Module can be added to a EFI BIOS to support PS2 Keyboard and PS2 Mouse. This driver supports PS/2 keyboard and/or PS/2 mouse depending on the switches in SDL tokens. Based on the switches enabled it will
  1. detect PS2 keyboard and install EFI_SIMPLE_TEXT_INPUT_PROTOCOL
  2. detect PS2 mouse and install EFI_SIMPLE_POINTER_PROTOCOL
PS2CTL module contains the following files:

Filename | Description
Main Component | Root\Core\em\PS2CTL
PS2Ctl.cif | Component information file for the ModulePart
PS2Ctl.sdl | Contains BIOS build parameters of PS/2 Controller driver.
ps2kbd.c | File contains PS/2 keyboard support routines.
ps2main.c | File contains main routines to suppport PS/2 keyboard and PS/2 mouse depending on the switches in SDL tokens.
ps2ctl.h | File contains the definitions of PS/2 Controller driver.
kbc.h | File contains the definitions of Keyboard Controller.
kbc.c | File contains PS/2 Controller I/O support functions.
ps2mouse.h | File contains the definitions for PS/2 mouse support routines.
mouse.c | File contains PS/2 mouse I/O support functions.
efismplpp.c | File contains functions related to PS/2 mouse implementation of simple pointer protocol.
Names.c | File contains functions related to Component name producer of PS/2 Controller driver.
hotkey.c | File contains PS/2 keyboard hotkeys support routines.
Ps2Ctl.chm | CHM file for the module part.

BIOS Parameters:
Parameter Name | Type | Description
PS2MOUSE_SUPPORT | Boolean | Switch to Enable/Disable PS2 Mouse support.
PS2KBD_SUPPORT | Boolean | Switch to Enable/Disable PS2 Keyboard support.
KBC_AUTODETECT_PORTS Boolean Auto detection of KB/MS using AMI KB-5. This switch will enable/disable the connector swap
of Keyboard and PS2 Mouse i.e. keyboard can be connected to PS2 Mouse connector
and vice-versa.
BLOCK_KBC_PIN_22_23_BIT Boolean Switch to block or unblock KBC lines P22 and P23.
If unblocked - KBC will be able to change lines P22 and P23 from high to low and back
using D1 command.
If blocked - KBC will not be able to change the state of P22 and P23 lines."
LEDS_AT_STARTUP Integer Keyboard LEDs after startup:
Bit0: ScrlLock is on/off;
Bit1: NumLock is on/off;
Bit2: CapsLock is on/off.
MAX_HOTKEYS | Integer | Number of hot keys.
INIT_DEFAULT_HOTKEYS | Boolean | Initialize default hot keys (perform system soft reset on Ctrl+Alt+Del combination).
KBC_BASIC_ASSURANCE_TEST Boolean Switch to to set the condition to Perform KBC Basic Assurance Test.
1 - Perform KBC Basic Assurance Test.
0 - Do not peform KBC Basic Assurance Test.
DETECT_PS2_KEYBOARD Boolean Switch to Enable/Disable PS2 Keyboard detection before installing SimpleTextIn Protocol.
1 - Perform PS2 Keyboard Detection.
0 - Do not perform PS2 Keyboard Detection.
DETECT_PS2_MOUSE Boolean Switch to Enable/Disable PS2 Mouse detection before installing AbsPointer Protocol.
1 - Perform PS2 Mouse Detection.
0 - Do not perform PS2 Mouse Detection.
INSTALL_KEYBOARD_MOUSE_ALWAYS Boolean Switch to set the condition to install SimpleTextIn and AbsPointer protocols.
1 - Install the above mentioned protocols Always.
0 - Install the above mentioned protocols only if the device is present at the time of detection.
RETURN_CURRENT_KEY_STATE Boolean 0 - return key shift and toggle states captured during a keypress.
1 - return current shift and toggle state.
AMI Build Tools:
Tools Label: 4.5.5_TOOLS_38, Dated: 2011-12-20
Visual eBios: RSS.5.70.0171, Dated: 2011-12-20
Compiler Tool(s): Microsoft's Windows Driver Kit (WDK) Ver. 7600.16385.1
New features added in this label:
EIP#63116 - PS/2 Keyboard/Mouse IRQ mode generic support.
General Bug Fixes and EIP Addressed in this Label:
General Bug Fixes
EIP#87058 - Not able to recognise Pause Key Click using ReadKeyStroke. - SDL token checking removed for the Pause Key detection
EIP#84902 - Enter key is not working in PS2 key board. - Replaced EfiKeyC12 value with EfiKeyEnter value to Interpreted Enter key properly.

EIP Addressed
EIP#87058 - Not able to recognise Pause Key Click using ReadKeyStroke.
EIP#84902 - Enter key is not working in PS2 key board.
EIP#63116 - PS/2 Keyboard/Mouse IRQ mode generic support
EIP#85747 -USB-ReadKeyStrokeEx is returning EFI_SUCCESS with KEY_STATE_EXPOSED for Caps, Num and Scroll Lock Key's. KEY_STATE_EXPOSED only for the ShiftState Key's and not for togglestate key's.
EIP#86986 -Can not detect F8 key on PS2 Keyboard while booting to EFI aware OS
Files Changed for General Bug Fixes and EIP Addressed in this Label:

EIP Addressed
Core\EM\PS2CTL\ps2kbd.c (EIP #63116, #87058, #84902, #85747, #86986)
Core\EM\PS2CTL\ps2main.c (EIP #63116)
Core\EM\PS2CTL\kbc.h (EIP #63116,#85747)
Core\EM\PS2CTL\kbc.c (EIP #63116, #86986)
Core\EM\PS2CTL\mouse.c (EIP #63116)
Known Limitations and Erratas in this label:
NONE
Remaining Issues:
NONE
Unit Testing:
PS2Keyboard:

  1. Connect PS2 keyboard into PS2 connector.
  2. Boot the system.
  3. Keyboard gets detected and works properly in Setup and Shell.
PS2Mouse:

  1. Connect PS2 Mouse into PS2 connector.
  2. Boot the system.
  3. Mouse gets detected and works properly in Setup and Shell.
Validation Testing:
Here is the Quality Assurance System Test Plan
Here is the Quality Assurance Test Results
Release History:
4.6.5_PS2CTL_001

  • [TAG] - EIP63116
    [Category] - New Feature
    [Description] - PS\2 Keyboard\Mouse IRQ mode generic support
    [Files] - Token.c, Ps2main.c, Ps2kbd.c, Mouse.c, kbc.h, kbc.c, CORE_DXE.sdl

  • [TAG] - EIP87058
    [Category] - Bug Fix
    [Severity] - Minor
    [Symptom] - Not able to recognise Pause Key Click using ReadKeyStroke
    [RootCause] - Pause Key detection should be done always and only the pause key action should be controlled by PAUSEKEY_SUPPORT SDL token
    [Solution] - SDL token checking removed for the Pause Key detection
    [Files] - Ps2kbd.c

  • [TAG] -EIP84902
    [Category] -Bug Fix
    [Symptom] -Enter key is not working in PS2 key board
    [RootCause] -Filling wrong EFI KEY value in ScancodeToEfi_table.Therefor Enter key is interpreted wrongly as EfiKeyC12.
    [Solution] -Replaced EfiKeyC12 value with EfiKeyEnter value to Interpreted Enter key properly.
    [Files] -ps2kbd.c

  • [TAG] -EIP85747
    [Category] -Improvement
    [Description] -USB-ReadKeyStrokeEx is returning EFI_SUCCESS with KEY_STATE_EXPOSED for Caps, Num and Scroll Lock Key's. KEY_STATE_EXPOSED only for the ShiftState Key's and not for togglestate key's.
    [Files] -Efiusbkb.c, ps2kbd.c and kbc.h

  • [TAG] -EIP86986
    [Category] -Bug Fix
    [Severity] -Important
    [Symptom] -Can not detect F8 key on PS2 Keyboard while booting to EFI aware OS.
    [RootCause] -Make code of F8 key (0x42) is taken by int09h and EFI aware OS calls only one ReadKeyStroke() for any key catch, Now PS2 driver will take Break Code of F8 key(0xC2) and returns EFI_NOT_READY.
    [Solution] -Multiple Read from PS2 keyboard is implemented and read exits if any valid key is detected. Also, the BDA keyboard buffer is checked for any missed key in EFI.
    [Files] -ps2kbd.c, kbc.c, CORE_DXE.sdl

  • [TAG] -EIP63116
    [Category] -Improvement
    [Description] -PS\2 Keyboard\Mouse IRQ mode generic support
    [Files] -Ps2kbd.c, Mouse.c, kbc.h, kbc.c

4.6.5.3

    Labeled

4.6.5.2

  • [TAG] - EIP 58974
    [Category]- BUG FIX
    [Severity]- Minor
    [Symptom] - Yellow exclamation mark in Windows when PS2 KB\MS are not present.
    [RootCause]- ACPI name space variable reports that PS2 device present
    [Solution] - Updated the SIO device status based on the device present after BDS.
    [Files] - Kbc.c, Kbc.h , Ps2main.c

  • [TAG] - EIP73263
    [Category] - Improvement
    [Description] - PS2Ctl Driver Follow the UEFI Driver Model as per the UEFI Spec.
    [Files] - ps2main.c, efismplpp.c

  • [TAG] - EIP63054
    [Category] - New Feature
    [Description] - 0000790: Add warning to ReadKeyStrokeEx for partial key press
    [Files] - KeyboardCommonDefinitions.h, In.c, Kbc.h, Ps2Kbd.c, Efiusbkb.c, efiusbkb.h

  • [TAG] - EIP66198
    [Category] - Improvement
    [Description] - Added Mouse Wheel support in PS2 and USB drivers.
    [Files] - usbdef.h, usbms.c, efiusbms.c, ps2mouse.h, mouse.c

  • [TAG] - EIP63310
    [Category] - Bug Fix
    [Severity] - Normal
    [Symptom] - MouseGetState() does not differentiate between driver busy and no state change between GetState calls.
    [RootCause] - MouseGetState() return status codes does not follow UEFI specification.
    [Solution] - MouseGetState() return status codes has been updated as per UEFI specification.
    [Files] - mouse.c
4.6.5.1

  • EIP 49407
    [Category] - IMPROVEMENT
    [Description] - Move the Ps2 driver SDL tokens from Core Source to Core Bin,So that we don't need to add Core source for changing the Ps2 driver SDL tokens.
    [Files] - Ps2Ctl.sdl, ps2kbd.c, ps2main.c, ps2ctl.h, kbc.c, mouse.c, hotkey.c, CORE_DXE.sdl, Tokens.c
4.6.5.0

  • Enhancement :EIP 18488
    Symptoms : PS2CTL: Need hooks for port swap, Keyboard mouse detect.
    FilesModified : ps2ctl.sdl
    Details : Support may be needed for kbc controller or SIO with different support from AMI KB-5.
    NOTE: Implementation of this change requires changes to CORE_DXE.sdl and BdsBoard.c.
  • Improvement : EIP 35306
    Details : Report the Ps2 Controller and Device Error Codes.
    FilesModified : AmiStatuscodes.h, Kbc.c, Kbc.h,Ps2ctl.sdl, ps2kbd.c, ps2main.c ,Statuscode.h
  • Bug Fix :EIP 47011
    Symptoms: DTM IO Tests fail due to presence of PS\2 devices that are not ready - no PS\2 devices attached during test.
    Details :Updated the SIO device status based on the device presence.
    Files Modified : Kbc.c , Kbc.h, Mouse.c
  • Bug Fix :EIP 45947
    Symptoms : Build Error on disabling INIT_DEFAULT_HOTKEYS SDL Token.
    Details : KEY_ASSOCIATION structure variable declared based on INIT_DEFAULT_HOTKEYS SDL Token
    Files Modified : hotkey.c
  • Fixed bug with ellow exclamation mark in Windows, when PS2 keyboard is absent
    Files Modified : kbc.c
4.6.4.1

  • Bug Fix: EIP 40838
    Symptoms : KBC.C build failed in DetectPS2Keyboard() if DETECT_PS2_KEYBOARD=0 & PS2MOUSE_SUPPORT=0
    FilesModified : Efismplpp.c, Kbc.c, Kbc.h, Mouse.c PS2ctl.cif, Ps2ctl.sdl, Ps2Kbd.c, Ps2Mouse.h
    Details :
    1. Added Detect_PS2_Mouse sdl token and modified the code.
    2. INSTALL_KEYBOARD_MOUSE_ALWAYS sdl token added.

      3. 1 - Install the Keyboard- SimpleTextIn, Mouse - AbsPointer Always.
      0 - Install the Keyboard- SimpleTextIn, Mouse - AbsPointer only if the device is present at the time of detection.
    3. Code clean up in mouse.c EfiSmplpp.c ,ps2mouse.h
    4. Unused file automaton.h removed.
  • Bug Fix: EIP 40818
    Symptoms : Pause\Break function key has no function in logo screen
    FilesModified : HotKey.c
    Details : Pause key doesn't have valid Ps2 SCAN code. ProcesshotKey function will get 0 as input for Pause key and it tries to execute the invalid function.So getting exception.
  • Bug Fix: EIP 34615
    Symptoms : Pressing DEL key continously intermittently or sticking does not enter setup.
    FilesModified : Ps2Kbd.c.c
  • New Feature: EIP 38212
    Symptoms : PrintKey\SysRq key, Menu Key, Left Logo and Right Logo Key support added in Ps2 Keyboard driver
    FilesModified : Ps2Kbd.c
  • Bug Fix: EIP 38211
    Symptoms : Shift Key issues in RegsiterkeyNotify function.
    FilesModified : Ps2Kbd.c
    Details : ShiftKeyState and KeyToggleState verified for RegisterKeyNotify callback function
  • Bug Fix:
    FilesModified : Ps2Kbd.c
    Details : Added FreePool call in UnRegisterKeyNotify function.
  • Bug Fix: EIP 40515
    Symptoms : If PS\2 KBD isn't present, KBC returns oxFE when send 0xED command, that makes system to hang for 5 to 10 Sec
    FilesModified : Kbc.c
    Details : If command output is 0xFE (Resent) , tried for 3 times and gets out.
  • Bug Fix: EIP 40711
    Symptoms : Keyboard sometimes does not work in DOS if KBD is being pressed hapazardly during post
    FilesModified : Ps2Kbd.c
    Details : If command output is 0xFE (Resent) , tried for 3 times and gets out.
  • Test Report:
    - Tested Ps2 Keyboard in Post, AMITSE Setup and Shell
    - Tested Ps2keyboard and Ps2 Mouse in DOS.

© American Megatrends Inc.


Release Notes - NDA Required

Component Information:
Component Title: PS2CTL
Component Reference Name: PS2CTL
Component Type: ModulePart
Release Date: 2012-07-19
Source Control Label: 4.6.5_PS2CTL_002
Source Control Location: SS: Alaska;$/Alaska/Source/Core/CORE_DXE/PS2CTL;
Dependencies
Component Dependencies
N0NE

File Dependencies
ONE
Dependent File Name with Extension: Tokens.c
Dependent Source Control Location: SS: Alaska;$/Alaska/BIN/Core/Library/Tokens.c;
Dependent Source Control Label: 20
TWO
Dependent File Name with Extension: CORE_DXE.sdl
Dependent Source Control Location: SS: Alaska;$/Alaska/BIN/Core/CORE_DXE/CORE_DXE.mak;
Dependent Source Control Label: 53

Protocol Dependencies
N0NE
Non-Compiled BIN and LIB File(s) within this Component:
N0NE
Component Description:
The PS2CTL Module can be added to a EFI BIOS to support PS2 Keyboard and PS2 Mouse. This driver supports PS/2 keyboard and/or PS/2 mouse depending on the switches in SDL tokens. Based on the switches enabled it will
  1. detect PS2 keyboard and install EFI_SIMPLE_TEXT_INPUT_PROTOCOL
  2. detect PS2 mouse and install EFI_SIMPLE_POINTER_PROTOCOL
PS2CTL module contains the following files:

Filename | Description
Main Component | Root\Core\em\PS2CTL
PS2Ctl.cif | Component information file for the ModulePart
PS2Ctl.sdl | Contains BIOS build parameters of PS/2 Controller driver.
ps2kbd.c | File contains PS/2 keyboard support routines.
ps2main.c | File contains main routines to suppport PS/2 keyboard and PS/2 mouse depending on the switches in SDL tokens.
ps2ctl.h | File contains the definitions of PS/2 Controller driver.
kbc.h | File contains the definitions of Keyboard Controller.
kbc.c | File contains PS/2 Controller I/O support functions.
ps2mouse.h | File contains the definitions for PS/2 mouse support routines.
mouse.c | File contains PS/2 mouse I/O support functions.
efismplpp.c | File contains functions related to PS/2 mouse implementation of simple pointer protocol.
Names.c | File contains functions related to Component name producer of PS/2 Controller driver.
hotkey.c | File contains PS/2 keyboard hotkeys support routines.
Ps2Ctl.chm | CHM file for the module part.

BIOS Parameters:
Parameter Name | Type | Description
PS2MOUSE_SUPPORT | Boolean | Switch to Enable/Disable PS2 Mouse support.
PS2KBD_SUPPORT | Boolean | Switch to Enable/Disable PS2 Keyboard support.
KBC_AUTODETECT_PORTS Boolean Auto detection of KB/MS using AMI KB-5. This switch will enable/disable the connector swap
of Keyboard and PS2 Mouse i.e. keyboard can be connected to PS2 Mouse connector
and vice-versa.
BLOCK_KBC_PIN_22_23_BIT Boolean Switch to block or unblock KBC lines P22 and P23.
If unblocked - KBC will be able to change lines P22 and P23 from high to low and back
using D1 command.
If blocked - KBC will not be able to change the state of P22 and P23 lines."
LEDS_AT_STARTUP Integer Keyboard LEDs after startup:
Bit0: ScrlLock is on/off;
Bit1: NumLock is on/off;
Bit2: CapsLock is on/off.
MAX_HOTKEYS | Integer | Number of hot keys.
INIT_DEFAULT_HOTKEYS | Boolean | Initialize default hot keys (perform system soft reset on Ctrl+Alt+Del combination).
KBC_BASIC_ASSURANCE_TEST Boolean Switch to to set the condition to Perform KBC Basic Assurance Test.
1 - Perform KBC Basic Assurance Test.
0 - Do not peform KBC Basic Assurance Test.
DETECT_PS2_KEYBOARD Boolean Switch to Enable/Disable PS2 Keyboard detection before installing SimpleTextIn Protocol.
1 - Perform PS2 Keyboard Detection.
0 - Do not perform PS2 Keyboard Detection.
DETECT_PS2_MOUSE Boolean Switch to Enable/Disable PS2 Mouse detection before installing AbsPointer Protocol.
1 - Perform PS2 Mouse Detection.
0 - Do not perform PS2 Mouse Detection.
INSTALL_KEYBOARD_MOUSE_ALWAYS Boolean Switch to set the condition to install SimpleTextIn and AbsPointer protocols.
1 - Install the above mentioned protocols Always.
0 - Install the above mentioned protocols only if the device is present at the time of detection.
RETURN_CURRENT_KEY_STATE Boolean 0 - return key shift and toggle states captured during a keypress.
1 - return current shift and toggle state.
AMI Build Tools:
Tools Label: 4.5.5_TOOLS_39, Dated: 2012-01-04
Visual eBios: RSS.5.72.0220, Dated: 2012-01-04
Compiler Tool(s): Microsoft's Windows Driver Kit (WDK) Ver. 7600.16385.1
New features added in this label:
None
General Bug Fixes and EIP Addressed in this Label:
General Bug Fixes
EIP#94186 - side effect after adding the solution of can not catch F8 key event on Keyboard - PS2 KB generic implement (EIP6986)
EIP#91313 - Ps2 keyboard does not work with Ps2Ctl label (INT)4.6.5.4
EIP#89947 - Ps2Keyboard doesn't work after reconnect -r command from Shell
EIP#90180 - Ps2driver doesn't return the proper ShiftState if the valid Unicode char's are pressed.

EIP Addressed
EIP#57005 - Need to clear Struck Keys in StartKeyboard() & KbdReset() for some kinds of Notebook KBC. Implemented this feature based on CLEAR_PENDING_KEYS_IN_PS2 token.
EIP#94186 - side effect after adding the solution of can not catch F8 key event on Keyboard - PS2 KB generic implement (EIP6986)
EIP#91313 - Ps2 keyboard does not work with Ps2Ctl label (INT)4.6.5.4
EIP#89947 - Ps2Keyboard doesn't work after reconnect -r command from Shell
EIP#90180 - Ps2driver doesn't return the proper ShiftState if the valid Unicode char's are pressed.
Files Changed for General Bug Fixes and EIP Addressed in this Label:

EIP Addressed
Core\EM\PS2CTL\ps2kbd.c (EIP #57005, #94186, #89947, #90180)
Core\EM\PS2CTL\kbc.c (EIP #91313)
Known Limitations and Erratas in this label:
NONE
Remaining Issues:
NONE
Unit Testing:
PS2Keyboard:

  1. Connect PS2 keyboard into PS2 connector.
  2. Boot the system.
  3. Keyboard gets detected and works properly in Setup and Shell.
PS2Mouse:

  1. Connect PS2 Mouse into PS2 connector.
  2. Boot the system.
  3. Mouse gets detected and works properly in Setup and Shell.
Validation Testing:
Here is the Quality Assurance System Test Plan
Here is the Quality Assurance Test Results
Release History:

4.6.5_PS2CTL_002

  • [TAG] EIP57005
    [Category] Improvement
    [Description] Need to clear Struck Keys in StartKeyboard() & KbdReset() for some kinds of Notebook KBC. Implemented this feature based on CLEAR_PENDING_KEYS_IN_PS2 token.
    [Files] Ps2Kbd.c, CORE_DXE.sdl

  • [TAG] EIP94186
    [Category] Bug Fix
    [Severity] Important
    [Symptom] side effect after adding the solution of can not catch F8 key event on Keyboard - PS2 KB generic implement (EIP6986).
    [RootCause] BDA is Checked even when CSM is not launched. So even though keys are not pressed Junk Keys are reproted
    [Solution] Checked whether CSm is launched based of Presence of Legacy BIOS Protocol.
    [Files] Ps2Kbd.c

  • [TAG] EIP89947
    [Category] Bug Fix
    [Severity] Normal
    [Symptom] Ps2Keyboard doesn't work after reconnect -r command from Shell
    [RootCause] The keyboard driver's stop function does not uninstall AMIEFIKEYCODE Protocol.
    [Solution] AMIEFIKEYCODE Protocol uninstalled in stop function.
    [Files] ps2kbd.c

  • [TAG] EIP90180
    [Category] Bug Fix
    [Severity] Normal
    [Symptom] Ps2driver doesn't return the proper ShiftState if the valid Unicode char's are pressed.
    [RootCause] Shift State was not cleared for printable characters
    [Solution] Shift state is cleared for printable characters
    [Files] ps2kbd.c

  • [TAG] EIP91313
    [Category] Bug Fix
    [Severity] Critical
    [Symptom] Ps2 keyboard does not work with Ps2Ctl label (INT)4.6.5.4
    [RootCause] Could not process PS2 keyboard data since there were more frequent calls to DISABLE the Keyboard.
    [Solution] Disabled and enabled the keyboard only before processing the PS2 keyboard data.
    [Files] kbc.c

Release_4.6.5_PS2CTL_001

© American Megatrends Inc.


Release Notes - NDA Required

Component Information:
Component Title: PS2CTL
Component Reference Name: PS2CTL
Component Type: ModulePart
Release Date: 2012-05-24
Source Control Label: 4.6.5.4
Source Control Location: SS: Alaska;$/Alaska/Source/Core/CORE_DXE/PS2CTL;
Dependencies
Component Dependencies
N0NE

File Dependencies
ONE
Dependent File Name with Extension: Tokens.c
Dependent Source Control Location: SS: Alaska;$/Alaska/BIN/Core/Library/Tokens.c;
Dependent Source Control Label: 20
TWO
Dependent File Name with Extension: CORE_DXE.sdl
Dependent Source Control Location: SS: Alaska;$//Alaska/BIN/Core/CORE_DXE/CORE_DXE.mak;
Dependent Source Control Label: 43

Protocol Dependencies
N0NE
Non-Compiled BIN and LIB File(s) within this Component:
N0NE
Component Description:
The PS2CTL Module can be added to a EFI BIOS to support PS2 Keyboard and PS2 Mouse. This driver supports PS/2 keyboard and/or PS/2 mouse depending on the switches in SDL tokens. Based on the switches enabled it will
  1. detect PS2 keyboard and install EFI_SIMPLE_TEXT_INPUT_PROTOCOL
  2. detect PS2 mouse and install EFI_SIMPLE_POINTER_PROTOCOL
PS2CTL module contains the following files:

Filename | Description
Main Component | Root\Core\em\PS2CTL
PS2Ctl.cif | Component information file for the ModulePart
PS2Ctl.sdl | Contains BIOS build parameters of PS/2 Controller driver.
ps2kbd.c | File contains PS/2 keyboard support routines.
ps2main.c | File contains main routines to suppport PS/2 keyboard and PS/2 mouse depending on the switches in SDL tokens.
ps2ctl.h | File contains the definitions of PS/2 Controller driver.
kbc.h | File contains the definitions of Keyboard Controller.
kbc.c | File contains PS/2 Controller I/O support functions.
ps2mouse.h | File contains the definitions for PS/2 mouse support routines.
mouse.c | File contains PS/2 mouse I/O support functions.
efismplpp.c | File contains functions related to PS/2 mouse implementation of simple pointer protocol.
Names.c | File contains functions related to Component name producer of PS/2 Controller driver.
hotkey.c | File contains PS/2 keyboard hotkeys support routines.
Ps2Ctl.chm | CHM file for the module part.

BIOS Parameters:
Parameter Name | Type | Description
PS2MOUSE_SUPPORT | Boolean | Switch to Enable/Disable PS2 Mouse support.
PS2KBD_SUPPORT | Boolean | Switch to Enable/Disable PS2 Keyboard support.
KBC_AUTODETECT_PORTS Boolean Auto detection of KB/MS using AMI KB-5. This switch will enable/disable the connector swap
of Keyboard and PS2 Mouse i.e. keyboard can be connected to PS2 Mouse connector
and vice-versa.
BLOCK_KBC_PIN_22_23_BIT Boolean Switch to block or unblock KBC lines P22 and P23.
If unblocked - KBC will be able to change lines P22 and P23 from high to low and back
using D1 command.
If blocked - KBC will not be able to change the state of P22 and P23 lines."
LEDS_AT_STARTUP Integer Keyboard LEDs after startup:
Bit0: ScrlLock is on/off;
Bit1: NumLock is on/off;
Bit2: CapsLock is on/off.
MAX_HOTKEYS | Integer | Number of hot keys.
INIT_DEFAULT_HOTKEYS | Boolean | Initialize default hot keys (perform system soft reset on Ctrl+Alt+Del combination).
KBC_BASIC_ASSURANCE_TEST Boolean Switch to to set the condition to Perform KBC Basic Assurance Test.
1 - Perform KBC Basic Assurance Test.
0 - Do not peform KBC Basic Assurance Test.
DETECT_PS2_KEYBOARD Boolean Switch to Enable/Disable PS2 Keyboard detection before installing SimpleTextIn Protocol.
1 - Perform PS2 Keyboard Detection.
0 - Do not perform PS2 Keyboard Detection.
DETECT_PS2_MOUSE Boolean Switch to Enable/Disable PS2 Mouse detection before installing AbsPointer Protocol.
1 - Perform PS2 Mouse Detection.
0 - Do not perform PS2 Mouse Detection.
INSTALL_KEYBOARD_MOUSE_ALWAYS Boolean Switch to set the condition to install SimpleTextIn and AbsPointer protocols.
1 - Install the above mentioned protocols Always.
0 - Install the above mentioned protocols only if the device is present at the time of detection.
RETURN_CURRENT_KEY_STATE Boolean 0 - return key shift and toggle states captured during a keypress.
1 - return current shift and toggle state.
AMI Build Tools:
Tools Label: 4.5.5_TOOLS_38, Dated: 2011-12-20
Visual eBios: RSS.5.70.0171, Dated: 2011-12-20
Compiler Tool(s): Microsoft's Windows Driver Kit (WDK) Ver. 7600.16385.1
New features added in this label:
None
General Bug Fixes and EIP Addressed in this Label:
General Bug Fixes
EIP#90180 - Ps2driver doesn't return the proper ShiftState if the valid Unicode char's are pressed - Shift state is cleared for printable characters

EIP Addressed
EIP#90180 - Ps2driver doesn't return the proper ShiftState if the valid Unicode char's are pressed - Shift state is cleared for printable characters
Files Changed for General Bug Fixes and EIP Addressed in this Label:

EIP Addressed
Core/EM/PS2CTL/ps2kbd.c (EIP #90180)
Known Limitations and Erratas in this label:
NONE
Remaining Issues:
NONE
Unit Testing:
PS2Keyboard:

  1. Connect PS2 keyboard into PS2 connector.
  2. Boot the system.
  3. Keyboard gets detected and works properly in Setup and Shell.
PS2Mouse:

  1. Connect PS2 Mouse into PS2 connector.
  2. Boot the system.
  3. Mouse gets detected and works properly in Setup and Shell.
Validation Testing:
Here is the Quality Assurance System Test Plan
Release History:
4.6.5.4

  • [TAG] - EIP90180
    [Category] - Bug Fix
    [Severity] - Normal
    [Symptom] - Ps2driver doesn't return the proper ShiftState if the valid Unicode char's are pressed.
    [RootCause] - Shift State was not cleared for printable characters
    [Solution] - Shift state is cleared for printable characters
    [Files] - ps2kbd.c

4.6.5_PS2CTL_001

  • [TAG] - EIP63116
    [Category] - New Feature
    [Description] - PS/2 Keyboard/Mouse IRQ mode generic support
    [Files] - Token.c, Ps2main.c, Ps2kbd.c, Mouse.c, kbc.h, kbc.c, CORE_DXE.sdl

  • [TAG] - EIP87058
    [Category] - Bug Fix
    [Severity] - Minor
    [Symptom] - Not able to recognise Pause Key Click using ReadKeyStroke
    [RootCause] - Pause Key detection should be done always and only the pause key action should be controlled by PAUSEKEY_SUPPORT SDL token
    [Solution] - SDL token checking removed for the Pause Key detection
    [Files] - Ps2kbd.c

  • [TAG] -EIP84902
    [Category] -Bug Fix
    [Symptom] -Enter key is not working in PS2 key board
    [RootCause] -Filling wrong EFI KEY value in ScancodeToEfi_table.Therefor Enter key is interpreted wrongly as EfiKeyC12.
    [Solution] -Replaced EfiKeyC12 value with EfiKeyEnter value to Interpreted Enter key properly.
    [Files] -ps2kbd.c

  • [TAG] -EIP85747
    [Category] -Improvement
    [Description] -USB-ReadKeyStrokeEx is returning EFI_SUCCESS with KEY_STATE_EXPOSED for Caps, Num and Scroll Lock Key's. KEY_STATE_EXPOSED only for the ShiftState Key's and not for togglestate key's.
    [Files] -Efiusbkb.c, ps2kbd.c and kbc.h

  • [TAG] -EIP86986
    [Category] -Bug Fix
    [Severity] -Important
    [Symptom] -Can not detect F8 key on PS2 Keyboard while booting to EFI aware OS.
    [RootCause] -Make code of F8 key (0x42) is taken by int09h and EFI aware OS calls only one ReadKeyStroke() for any key catch, Now PS2 driver will take Break Code of F8 key(0xC2) and returns EFI_NOT_READY.
    [Solution] -Multiple Read from PS2 keyboard is implemented and read exits if any valid key is detected. Also, the BDA keyboard buffer is checked for any missed key in EFI.
    [Files] -ps2kbd.c, kbc.c, CORE_DXE.sdl

  • [TAG] -EIP63116
    [Category] -Improvement
    [Description] -PS/2 Keyboard/Mouse IRQ mode generic support
    [Files] -Ps2kbd.c, Mouse.c, kbc.h, kbc.c

4.6.5.3

    Labeled

4.6.5.2

  • [TAG] - EIP 58974
    [Category]- BUG FIX
    [Severity]- Minor
    [Symptom] - Yellow exclamation mark in Windows when PS2 KB/MS are not present.
    [RootCause]- ACPI name space variable reports that PS2 device present
    [Solution] - Updated the SIO device status based on the device present after BDS.
    [Files] - Kbc.c, Kbc.h , Ps2main.c

  • [TAG] - EIP73263
    [Category] - Improvement
    [Description] - PS2Ctl Driver Follow the UEFI Driver Model as per the UEFI Spec.
    [Files] - ps2main.c, efismplpp.c

  • [TAG] - EIP63054
    [Category] - New Feature
    [Description] - 0000790: Add warning to ReadKeyStrokeEx for partial key press
    [Files] - KeyboardCommonDefinitions.h, In.c, Kbc.h, Ps2Kbd.c, Efiusbkb.c, efiusbkb.h

  • [TAG] - EIP66198
    [Category] - Improvement
    [Description] - Added Mouse Wheel support in PS2 and USB drivers.
    [Files] - usbdef.h, usbms.c, efiusbms.c, ps2mouse.h, mouse.c

  • [TAG] - EIP63310
    [Category] - Bug Fix
    [Severity] - Normal
    [Symptom] - MouseGetState() does not differentiate between driver busy and no state change between GetState calls.
    [RootCause] - MouseGetState() return status codes does not follow UEFI specification.
    [Solution] - MouseGetState() return status codes has been updated as per UEFI specification.
    [Files] - mouse.c
4.6.5.1

  • EIP 49407
    [Category] - IMPROVEMENT
    [Description] - Move the Ps2 driver SDL tokens from Core Source to Core Bin,So that we don't need to add Core source for changing the Ps2 driver SDL tokens.
    [Files] - Ps2Ctl.sdl, ps2kbd.c, ps2main.c, ps2ctl.h, kbc.c, mouse.c, hotkey.c, CORE_DXE.sdl, Tokens.c
4.6.5.0

  • Enhancement :EIP 18488
    Symptoms : PS2CTL: Need hooks for port swap, Keyboard mouse detect.
    FilesModified : ps2ctl.sdl
    Details : Support may be needed for kbc controller or SIO with different support from AMI KB-5.
    NOTE: Implementation of this change requires changes to CORE_DXE.sdl and BdsBoard.c.
  • Improvement : EIP 35306
    Details : Report the Ps2 Controller and Device Error Codes.
    FilesModified : AmiStatuscodes.h, Kbc.c, Kbc.h,Ps2ctl.sdl, ps2kbd.c, ps2main.c ,Statuscode.h
  • Bug Fix :EIP 47011
    Symptoms: DTM IO Tests fail due to presence of PS/2 devices that are not ready - no PS/2 devices attached during test.
    Details :Updated the SIO device status based on the device presence.
    Files Modified : Kbc.c , Kbc.h, Mouse.c
  • Bug Fix :EIP 45947
    Symptoms : Build Error on disabling INIT_DEFAULT_HOTKEYS SDL Token.
    Details : KEY_ASSOCIATION structure variable declared based on INIT_DEFAULT_HOTKEYS SDL Token
    Files Modified : hotkey.c
  • Fixed bug with ellow exclamation mark in Windows, when PS2 keyboard is absent
    Files Modified : kbc.c
4.6.4.1

  • Bug Fix: EIP 40838
    Symptoms : KBC.C build failed in DetectPS2Keyboard() if DETECT_PS2_KEYBOARD=0 & PS2MOUSE_SUPPORT=0
    FilesModified : Efismplpp.c, Kbc.c, Kbc.h, Mouse.c PS2ctl.cif, Ps2ctl.sdl, Ps2Kbd.c, Ps2Mouse.h
    Details :
    1. Added Detect_PS2_Mouse sdl token and modified the code.
    2. INSTALL_KEYBOARD_MOUSE_ALWAYS sdl token added.

      3. 1 - Install the Keyboard- SimpleTextIn, Mouse - AbsPointer Always.
      0 - Install the Keyboard- SimpleTextIn, Mouse - AbsPointer only if the device is present at the time of detection.
    3. Code clean up in mouse.c EfiSmplpp.c ,ps2mouse.h
    4. Unused file automaton.h removed.
  • Bug Fix: EIP 40818
    Symptoms : Pause/Break function key has no function in logo screen
    FilesModified : HotKey.c
    Details : Pause key doesn't have valid Ps2 SCAN code. ProcesshotKey function will get 0 as input for Pause key and it tries to execute the invalid function.So getting exception.
  • Bug Fix: EIP 34615
    Symptoms : Pressing DEL key continously intermittently or sticking does not enter setup.
    FilesModified : Ps2Kbd.c.c
  • New Feature: EIP 38212
    Symptoms : PrintKey/SysRq key, Menu Key, Left Logo and Right Logo Key support added in Ps2 Keyboard driver
    FilesModified : Ps2Kbd.c
  • Bug Fix: EIP 38211
    Symptoms : Shift Key issues in RegsiterkeyNotify function.
    FilesModified : Ps2Kbd.c
    Details : ShiftKeyState and KeyToggleState verified for RegisterKeyNotify callback function
  • Bug Fix:
    FilesModified : Ps2Kbd.c
    Details : Added FreePool call in UnRegisterKeyNotify function.
  • Bug Fix: EIP 40515
    Symptoms : If PS/2 KBD isn't present, KBC returns oxFE when send 0xED command, that makes system to hang for 5 to 10 Sec
    FilesModified : Kbc.c
    Details : If command output is 0xFE (Resent) , tried for 3 times and gets out.
  • Bug Fix: EIP 40711
    Symptoms : Keyboard sometimes does not work in DOS if KBD is being pressed hapazardly during post
    FilesModified : Ps2Kbd.c
    Details : If command output is 0xFE (Resent) , tried for 3 times and gets out.
  • Test Report:
    - Tested Ps2 Keyboard in Post, AMITSE Setup and Shell
    - Tested Ps2keyboard and Ps2 Mouse in DOS.

© American Megatrends Inc.


Ps2Ctl

AMIBIOS Document References

Previous Validation Test Reports

Validation Test Report 001.htm

Validation Test Report 002.htm


Release Notes - NDA Required

Validation Test Report for PS2CTL Label (INT)_a_4.6.5_PS2CTL_001

Platform Information Form :

Board Information - ChiefRiver
BIOS Information (Label, Path) - Labeled'4.6.5.3_VEB_1APTJ019'; Path 'SS: Alaska;$/Alaska/Projects/Intel/IvyBridge/PantherPoint_ChiefRiver_Crb_1APTJ/CheifRiver.Veb';
Chipset Information (Type, Stepping) -
CPU Information (Type, Stepping) -
Memory Info (Manufacturer, Speed, Configuration) -
Graphics (Please specify which one in used) -
Chipset driver Version -
Graphics drive Version -

The following BQA Tests have been validated in UEFI 2.3.1 BIOS Versions
Ps2Ctl
1) REF-33216 UEFI Windows 7 PS/2 keyboard & Mouse detection in UEFI WIN7 x64 ----- PASS
Status Update:

2)REF-33217 Windows 7 x86 PS/2 keyboard & Mouse detection in WIN7 (x32)---- PASS
Status Update:

3) REF-33211 .N/A PS/2 keyboard detection in BIOS setup ---- PASS
Status Update:

4)REF-33212 DOS PS/2 keyboard detection in DOS ---- PASS
Status Update:

5)REF-33213 EFI PS/2 keyboard detection in SHELL ---- PASS
Status Update:

6)REF-33214.N/A PS/2 Mouse detection in BIOS setup ---- PASS
Status Update: In touch, use "ESC/Right Click: Exit" option from navigation window

7)REF-33215DOS PS/2 Mouse detection in DOS ---- PASS
Status Update: .

Board Information - Huron River
BIOS Information (Label, Path) - Labeled'4.6.5.1_VEB_1ABUC103'; Path 'SS: Alaska;$/Alaska/Projects/Intel/SandyBridge/CougarPoint_HuronRiver_4650_1ABUC/HuronRiver.veb';
Chipset Information (Type, Stepping) -
CPU Information (Type, Stepping) -
Memory Info (Manufacturer, Speed, Configuration) -
Graphics (Please specify which one in used) -
Chipset driver Version -
Graphics drive Version -

The following BQA Tests have been validated in UEFI 2.3.1 BIOS Versions
Ps2Ctl
1) REF-33216 UEFI Windows 7 PS/2 keyboard & Mouse detection in UEFI WIN7 x64 ----- PASS
Status Update:

2)REF-33217 Windows 7 x86 PS/2 keyboard & Mouse detection in WIN7 (x32)---- PASS
Status Update:

3) REF-33211 .N/A PS/2 keyboard detection in BIOS setup ---- PASS
Status Update:

4)REF-33212 DOS PS/2 keyboard detection in DOS ---- PASS
Status Update:

5)REF-33213 EFI PS/2 keyboard detection in SHELL ---- PASS
Status Update:

6)REF-33214.N/A PS/2 Mouse detection in BIOS setup ---- PASS
Status Update: In touch, use "ESC/Right Click: Exit" option from navigation window

7)REF-33215DOS PS/2 Mouse detection in DOS ---- PASS
Status Update: .


Release Notes - NDA Required

Validation Test Report for PS2CTL Label (INT)_a_4.6.5_PS2CTL_002

Platform Information Form :

Board Information - HuronRiver
BIOS Information (Label, Path) - Labeled'4.6.5.3_VEB_1ABUC104'; Path 'SS: Alaska;$/Alaska/Projects/Intel/SandyBridge/CougarPoint_HuronRiver_4650_1ABUC/HuronRiver.Veb';
Chipset Information (Type, Stepping) -
CPU Information (Type, Stepping) -
Memory Info (Manufacturer, Speed, Configuration) -
Graphics (Please specify which one in used) -
Chipset driver Version -
Graphics drive Version -

The following BQA Tests have been validated in UEFI 2.3.1 BIOS Versions
Ps2Ctl
1) REF-33216 UEFI Windows 7 PS/2 keyboard & Mouse detection in UEFI WIN7 x64 ----- PASS
Status Update:

2)REF-33217 Windows 7 x86 PS/2 keyboard & Mouse detection in WIN7 (x32)---- PASS
Status Update:

3) REF-33211 .N/A PS/2 keyboard detection in BIOS setup ---- PASS
Status Update:

4)REF-33212 DOS PS/2 keyboard detection in DOS ---- PASS
Status Update:

5)REF-33213 EFI PS/2 keyboard detection in SHELL ---- PASS
Status Update:

6)REF-33214.N/A PS/2 Mouse detection in BIOS setup ---- PASS
Status Update:

7)REF-33215DOS PS/2 Mouse detection in DOS ---- PASS
Status Update: .

Board Information - SugarBay
BIOS Information (Label, Path) - Labeled'4.6.5.4_VEB_1AOQI001';
Chipset Information (Type, Stepping) -
CPU Information (Type, Stepping) -
Memory Info (Manufacturer, Speed, Configuration) -
Graphics (Please specify which one in used) -
Chipset driver Version -
Graphics drive Version -

The following BQA Tests have been validated in UEFI 2.3.1 BIOS Versions
Ps2Ctl
1) REF-33216 UEFI Windows 7 PS/2 keyboard & Mouse detection in UEFI WIN7 x64 ----- PASS
Status Update:

2)REF-33217 Windows 7 x86 PS/2 keyboard & Mouse detection in WIN7 (x32)---- PASS
Status Update:

3) REF-33211 .N/A PS/2 keyboard detection in BIOS setup ---- PASS
Status Update:

4)REF-33212 DOS PS/2 keyboard detection in DOS ---- PASS
Status Update:

5)REF-33213 EFI PS/2 keyboard detection in SHELL ---- PASS
Status Update:

6)REF-33214.N/A PS/2 Mouse detection in BIOS setup ---- PASS
Status Update:

7)REF-33215DOS PS/2 Mouse detection in DOS ---- PASS
Status Update: .


Copyright

American Megatrends, Inc.
5555 Oakbrook Parkway
Suite 200
Norcross, GA 30093 (USA)

Copyright (c) 1999-2013 American Megatrends, Inc. All Rights Reserved.

This publication contains proprietary information, which is protected by copyright. No part of this publication may be reproduced, transcribed, stored in a retrieval system, translated into any language or computer language, or transmitted in any form whatsoever without the prior written consent of the publisher, American Megatrends, Inc.

American Megatrends, Inc. retains the right to update, change, modify this publication at any time, without notice.

For Additional Information

Call American Megatrends BIOS Sales Department at 1-800-828-9264 for additional information.

Limitations of Liability

In no event shall American Megatrends be held liable for any loss, expenses, or damages of any kind whatsoever, whether direct, indirect, incidental, or consequential, arising from the design or use of this product or the support materials provided with the product.

Limited Warranty

No warranties are made, either expressed or implied, with regard to the contents of this work, its merchantability, or fitness for a particular use. American Megatrends assumes no responsibility for errors and omissions or for the uses made of the material contained herein or reader decisions based on such use.

Trademark and Copyright Acknowledgments

All product names used in this publication are for identification purposes only and are trademarks of their respective Companies.


Release Notes - NDA Required

Component Information:
Component Title: PS2CTL
Component Reference Name: PS2CTL
Component Type: ModulePart
Release Date: 2012-01-07
Source Control Label: 4.6.5_PS2CTL_003
Source Control Location: SS: Alaska;$/Alaska/Source/Core/CORE_DXE/PS2CTL;
Dependencies
Component Dependencies
N0NE

File Dependencies
ONE
Dependent File Name with Extension: Tokens.c
Dependent Source Control Location: SS: Alaska;$/Alaska/BIN/Core/Library/Tokens.c;
Dependent Source Control Label: 24
TWO
Dependent File Name with Extension: CORE_DXE.sdl
Dependent Source Control Location: SS: Alaska;$/Alaska/BIN/Core/CORE_DXE/CORE_DXE.mak;
Dependent Source Control Label: 55
THREE
Dependent File Name with Extension: AmiKeycode.h
Dependent Source Control Location: SS: Alaska;$/Alaska/BIN/Core/Include/Protocol/AmiKeycode.h;
Dependent Source Control Label: 10

Protocol Dependencies
N0NE
Non-Compiled BIN and LIB File(s) within this Component:
N0NE
Component Description:
The PS2CTL Module can be added to a EFI BIOS to support PS2 Keyboard and PS2 Mouse. This driver supports PS/2 keyboard and/or PS/2 mouse depending on the switches in SDL tokens. Based on the switches enabled it will
  1. detect PS2 keyboard and install EFI_SIMPLE_TEXT_INPUT_PROTOCOL
  2. detect PS2 mouse and install EFI_SIMPLE_POINTER_PROTOCOL
PS2CTL module contains the following files:

Filename | Description
Main Component | Root\Core\em\PS2CTL
PS2Ctl.cif | Component information file for the ModulePart
PS2Ctl.sdl | Contains BIOS build parameters of PS/2 Controller driver.
ps2kbd.c | File contains PS/2 keyboard support routines.
ps2main.c | File contains main routines to suppport PS/2 keyboard and PS/2 mouse depending on the switches in SDL tokens.
ps2ctl.h | File contains the definitions of PS/2 Controller driver.
kbc.h | File contains the definitions of Keyboard Controller.
kbc.c | File contains PS/2 Controller I/O support functions.
ps2mouse.h | File contains the definitions for PS/2 mouse support routines.
mouse.c | File contains PS/2 mouse I/O support functions.
efismplpp.c | File contains functions related to PS/2 mouse implementation of simple pointer protocol.
Names.c | File contains functions related to Component name producer of PS/2 Controller driver.
hotkey.c | File contains PS/2 keyboard hotkeys support routines.
Ps2Ctl.chm | CHM file for the module part.

BIOS Parameters:
Parameter Name | Type | Description
PS2MOUSE_SUPPORT | Boolean | Switch to Enable/Disable PS2 Mouse support.
PS2KBD_SUPPORT | Boolean | Switch to Enable/Disable PS2 Keyboard support.
KBC_AUTODETECT_PORTS Boolean Auto detection of KB/MS using AMI KB-5. This switch will enable/disable the connector swap
of Keyboard and PS2 Mouse i.e. keyboard can be connected to PS2 Mouse connector
and vice-versa.
BLOCK_KBC_PIN_22_23_BIT Boolean Switch to block or unblock KBC lines P22 and P23.
If unblocked - KBC will be able to change lines P22 and P23 from high to low and back
using D1 command.
If blocked - KBC will not be able to change the state of P22 and P23 lines."
LEDS_AT_STARTUP Integer Keyboard LEDs after startup:
Bit0: ScrlLock is on/off;
Bit1: NumLock is on/off;
Bit2: CapsLock is on/off.
MAX_HOTKEYS | Integer | Number of hot keys.
INIT_DEFAULT_HOTKEYS | Boolean | Initialize default hot keys (perform system soft reset on Ctrl+Alt+Del combination).
KBC_BASIC_ASSURANCE_TEST Boolean Switch to to set the condition to Perform KBC Basic Assurance Test.
1 - Perform KBC Basic Assurance Test.
0 - Do not peform KBC Basic Assurance Test.
DETECT_PS2_KEYBOARD Boolean Switch to Enable/Disable PS2 Keyboard detection before installing SimpleTextIn Protocol.
1 - Perform PS2 Keyboard Detection.
0 - Do not perform PS2 Keyboard Detection.
DETECT_PS2_MOUSE Boolean Switch to Enable/Disable PS2 Mouse detection before installing AbsPointer Protocol.
1 - Perform PS2 Mouse Detection.
0 - Do not perform PS2 Mouse Detection.
INSTALL_KEYBOARD_MOUSE_ALWAYS Boolean Switch to set the condition to install SimpleTextIn and AbsPointer protocols.
1 - Install the above mentioned protocols Always.
0 - Install the above mentioned protocols only if the device is present at the time of detection.
RETURN_CURRENT_KEY_STATE Boolean 0 - return key shift and toggle states captured during a keypress.
1 - return current shift and toggle state.
AMI Build Tools:
Tools Label: 4.5.5_TOOLS_40, Dated: 2012-06-21
Visual eBios: RSS.5.73.0239, Dated: 2012-06-21
Compiler Tool(s): Microsoft's Windows Driver Kit (WDK) Ver. 7600.16385.1
New features added in this label:
None
General Bug Fixes and EIP Addressed in this Label:
General Bug Fixes
EIP#95111 - PS2 mouse is not working in setup.

EIP Addressed
EIP#70313 - Used CheckIssueLEDCmd in function LEDsOnOff insteed of OutToKb(Kbd, 0xED).
EIP#101100 - Implement support for multi language in PS2 driver.)
EIP#99411 - Add port validation check in the PS2Ctrl module before starting the driver.)
EIP#95111 - PS2 mouse is not working in setup.
Files Changed for General Bug Fixes and EIP Addressed in this Label:

EIP Addressed
Core\EM\PS2CTL\ps2kbd.c (EIP #95111, #101100, #70313)
Core\EM\PS2CTL\mouse.c (EIP #95111, #99411)
Core\EM\PS2CTL\kbc.c (EIP #70313, #99411)
Core\EM\PS2CTL\kbc.h (EIP #70313, #99411)
Core\EM\PS2CTL\ps2main.c (EIP #99411)
Known Limitations and Erratas in this label:
NONE
Remaining Issues:
NONE
Unit Testing:
PS2Keyboard:

  1. Connect PS2 keyboard into PS2 connector.
  2. Boot the system.
  3. Keyboard gets detected and works properly in Setup and Shell.
PS2Mouse:

  1. Connect PS2 Mouse into PS2 connector.
  2. Boot the system.
  3. Mouse gets detected and works properly in Setup and Shell.
Validation Testing:
Here is the Quality Assurance System Test Plan
Here is the Quality Assurance Test Results
Release History:

4.6.5_PS2CTL_003

  • [TAG] EIP101100
    [Category] Improvement
    [Description] Multi Language is supported in Ps2ctl driver
    [Files] CORE_DXE.sdl, kbc.h, ps2kbd.c and Tokens.c

  • [TAG] EIP70313
    [Category] Improvement
    [Description] Used CheckIssueLEDCmd in function LEDsOnOff instead of OutToKb(Kbd, 0xED)
    [Files] kbc.c, ps2kbd.c and kbc.h

  • [TAG] EIP95111
    [Category] Bug Fix
    [Symptom] PS2 mouse is not working in setup.
    [RootCause] In stream mode data reporting is disabled by default. The mouse will not actually issue any movement data packets until it receives the "Enable Data Reporting" (0xF4) command. So even when the DETECT_PS2_KEYBOARD and DETECT_PS2_MOUSE token is disabled we need to send command 0xf4 to Enable Data Reporting.
    [Solution] In MouseReset function, Set sampleRate ,Resolution and Enable streaming.
    [Files] mouse.c and ps2kbd.c

  • [TAG] EIP99411
    [Category] Improvement
    [Description] Add port validation check in the PS2Ctrl module before starting the driver.
    [Files] kbc.c, kbc.h, mouse.c, ps2main.c, CORE_DXE.sdl, Tokens.c

Release_4.6.5_PS2CTL_002
Release_4.6.5_PS2CTL_001

© American Megatrends Inc.


Release Notes - NDA Required

Validation Test Report for PS2CTL Label (INT)_a_4.6.5_PS2CTL_003

Platform Information Form :

Board Information - ChiefRiver
BIOS Information (Label, Path) - Labeled'4.6.5.4_VEB_1APTJ025'; Path 'SS: Alaska;$/Alaska/Projects/Intel/IvyBridge/PantherPoint_ChiefRiver_Crb_1APTJ/ChiefRiver.Veb';
Chipset Information (Type, Stepping) -
CPU Information (Type, Stepping) -
Memory Info (Manufacturer, Speed, Configuration) -
Graphics (Please specify which one in used) -
Chipset driver Version -
Graphics drive Version -

The following BQA Tests have been validated in UEFI 2.3.1 BIOS Versions
Ps2Ctl
1) REF-33216 UEFI Windows 7 PS/2 keyboard & Mouse detection in UEFI WIN7 x64 ----- PASS
Status Update:

2)REF-33217 Windows 7 x86 PS/2 keyboard & Mouse detection in WIN7 (x32)---- PASS
Status Update:

3) REF-33211 .N/A PS/2 keyboard detection in BIOS setup ---- PASS
Status Update:

4)REF-33212 DOS PS/2 keyboard detection in DOS ---- PASS
Status Update:

5)REF-33213 EFI PS/2 keyboard detection in SHELL ---- PASS
Status Update:

6)REF-33214.N/A PS/2 Mouse detection in BIOS setup ---- PASS
Status Update:

7)REF-33215DOS PS/2 Mouse detection in DOS ---- PASS
Status Update:

8)REF-28581SCT Execution ---- PASS
Status Update:

Board Information - SugarBay
BIOS Information (Label, Path) - Labeled'4.6.5.4_VEB_1AOQI001';
Chipset Information (Type, Stepping) -
CPU Information (Type, Stepping) -
Memory Info (Manufacturer, Speed, Configuration) -
Graphics (Please specify which one in used) -
Chipset driver Version -
Graphics drive Version -

The following BQA Tests have been validated in UEFI 2.3.1 BIOS Versions
Ps2Ctl
1) REF-33216 UEFI Windows 7 PS/2 keyboard & Mouse detection in UEFI WIN7 x64 ----- PASS
Status Update:

2)REF-33217 Windows 7 x86 PS/2 keyboard & Mouse detection in WIN7 (x32)---- PASS
Status Update:

3) REF-33211 .N/A PS/2 keyboard detection in BIOS setup ---- PASS
Status Update:

4)REF-33212 DOS PS/2 keyboard detection in DOS ---- PASS
Status Update:

5)REF-33213 EFI PS/2 keyboard detection in SHELL ---- PASS
Status Update:

6)REF-33214.N/A PS/2 Mouse detection in BIOS setup ---- PASS
Status Update:

7)REF-33215DOS PS/2 Mouse detection in DOS ---- PASS
Status Update: .

8)REF-28581SCT Execution ---- U/T
Status Update: Unable to run SCT.


Function by File Name

AMIBIOS Function Reference

By File Name

The following is a list of the .asm files.
For a list in alphabetical order, see In Alphabetical Order.

  • efismplpp.c
  • hotkey.c
  • kbc.c
  • kbc.h
  • mouse.c
  • Names.c
  • ps2ctl.h
  • ps2kbd.c
  • ps2main.c
  • ps2mouse.h


efismplpp.c

Description:
PS/2 mouse implmentation of simple pointer protocol

The following functions are used in the file: efismplpp.c.

Function | Description
StartMouse | This routine is called from Driver Binding Start function. It starts the mouse support Parameters: EFI_DRIVER_BINDING_PROTOCOL *This - Pointer to this instance of driver binding protocol structure EFI_HANDLE Controller - Handle for this driver
StopMouse | This routine is called from Driver Binding Start function. It stops the mouse support Parameters: EFI_DRIVER_BINDING_PROTOCOL *This - Pointer to this instance of driver binding protocol structure EFI_HANDLE Controller - Handle for this driver


StartMouse in the efismplpp.c

Function : StartMouse

File: efismplpp.c
Description:
This routine is called from Driver Binding Start function.
   It starts the mouse support

Parameters:
EFI_DRIVER_BINDING_PROTOCOL *This -  Pointer to this instance of driver
                          binding protocol structure
EFI_HANDLE Controller - Handle for this driver
Output:
EFI_STATUS - Status of the operation


StopMouse in the efismplpp.c

Function : StopMouse

File: efismplpp.c
Description:
This routine is called from Driver Binding Start function.
   It stops the mouse support

Parameters:
EFI_DRIVER_BINDING_PROTOCOL *This -  Pointer to this instance of driver
                          binding protocol structure
EFI_HANDLE Controller - Handle for this driver
Output:
EFI_STATUS - Status of the operation


hotkey.c

Description:
PS/2 keyboard hotkeys support routines

The following functions are used in the file: hotkey.c.

Function | Description
CopyKey | HotKey helper function - Copies key codes from source to target buffers Parameters: KEY_ASSOCIATION *SrcKey - Pointer to source buffer KEY_ASSOCIATION *TrgKey - Pointer to target buffer
InitHotKeys | This routine is called from StartKeyboard function, it initializes the PS/2 keyboard hot keys and produces HotKeys protocol. Parameters: EFI_HANDLE Controller - Handle for this driver
ProcessHotKey | This routine searches the HotKey table for the matching key and executes the corresponding "key extension" function. Parameters: UINT8 Code - key make code UINT16 KeyShiftState - Shift/Alt/Ctrl modifiers: RIGHT_SHIFT_PRESSED 0x00000001 LEFT_SHIFT_PRESSED 0x00000002 RIGHT_CONTROL_PRESSED 0x00000004 LEFT_CONTROL_PRESSED 0x00000008 RIGHT_ALT_PRESSED 0x00000010 LEFT_ALT_PRESSED 0x00000020 RIGHT_LOGO_PRESSED 0x00000040 LEFT_LOGO_PRESSED 0x00000080
RegisterHotKey | This is HotKey protocol API implementation function. It registers the "extended" key function. Parameters: KEY_ASSOCIATION *HotKey - Key code to register BOOLEAN ReplaceExisting - a rule that tells whether or not we will replace the existing function; this parameter will not be considered in case the function for a given key is not assigned yet. Output : EFI_SUCCESS if function is successfully registered EFI_OUT_OF_RESOURCES if we already have reached MAX_HOTKEYS registered functions and we are not replacing the existing one EFI_ACCESS_DENIED if requested key has been already assigned, can be returned only when ReplaceExisting is FALSE
ResetSystem | This routine performs a warm boot of the system Parameters: VOID *Context - Pointer to context
UnregisterHotKeys | This is HotKey protocol API implementation function. It unregisters all "extended" key functions. Parameters: None


CopyKey in the hotkey.c

Function : CopyKey

File: hotkey.c
Description:
HotKey helper function - Copies key codes from source to
   target buffers

Parameters:
KEY_ASSOCIATION *SrcKey - Pointer to source buffer
KEY_ASSOCIATION *TrgKey - Pointer to target buffer
Output:
None


InitHotKeys in the hotkey.c

Function : InitHotKeys

File: hotkey.c
Description:
This routine is called from StartKeyboard function,
   it initializes the PS/2 keyboard hot keys and produces
   HotKeys protocol.

Parameters:      EFI_HANDLE Controller - Handle for this driver
Output:
EFI_STATUS - Status of the operation
Modified:
HotKeysProtocol


ProcessHotKey in the hotkey.c

Function : ProcessHotKey

File: hotkey.c
Description:
This routine searches the HotKey table for the matching
   key and executes the corresponding "key extension"
   function.

Parameters:      UINT8  Code - key make code
   UINT16 KeyShiftState - Shift/Alt/Ctrl modifiers:
   RIGHT_SHIFT_PRESSED     0x00000001
   LEFT_SHIFT_PRESSED      0x00000002
   RIGHT_CONTROL_PRESSED   0x00000004
   LEFT_CONTROL_PRESSED    0x00000008
   RIGHT_ALT_PRESSED       0x00000010
   LEFT_ALT_PRESSED        0x00000020
   RIGHT_LOGO_PRESSED      0x00000040
   LEFT_LOGO_PRESSED       0x00000080
Output:
EFI_SUCCESS if 1)key is not found or 2)key is found,
       function executed and key has to be reported back
       to the caller;
   EFI_NOT_READY if key is found but is not to be reported
       back to the caller.
Referrals:
HotKeys_Table


RegisterHotKey in the hotkey.c

Function : RegisterHotKey

File: hotkey.c
Description:
This is HotKey protocol API implementation function.
   It registers the "extended" key function.

Parameters:      KEY_ASSOCIATION *HotKey - Key code to register
   BOOLEAN ReplaceExisting - a rule that tells whether or
       not we will replace the existing function; this
       parameter will not be considered in case the function
       for a given key is not assigned yet.

Output  :        EFI_SUCCESS if function is successfully registered
   EFI_OUT_OF_RESOURCES if we already have reached
       MAX_HOTKEYS registered functions and we are not
       replacing the existing one
   EFI_ACCESS_DENIED if requested key has been already
       assigned, can be returned only when ReplaceExisting
       is FALSE
Modified:
HotKeys_Table
Referrals:
HotKeys_Table


ResetSystem in the hotkey.c

Function : ResetSystem

File: hotkey.c
Description:
This routine performs a warm boot of the system

Parameters:      VOID *Context - Pointer to context
Output:
EFI_SUCCESS


UnregisterHotKeys in the hotkey.c

Function : UnregisterHotKeys

File: hotkey.c
Description:
This is HotKey protocol API implementation function.
   It unregisters all "extended" key functions.

Parameters:      None
Output:
EFI_SUCCESS if functions are successfully unregistered
   EFI_ACCESS_DENIED if functions are not unregistered
Modified:
HotKeys_Table
Referrals:
HotKeys_Table


kbc.c

Description:
PS/2 Controller I/O support fuctions

The following functions are used in the file: kbc.c.

Function | Description
AutodetectKbdMousePorts | Auto detection of KB/MS using AMI KB-5. This code will allow the connector swap of Keyboard and PS2 Mouse i.e. keyboard can be connected to PS2 Mouse connector and vice-versa. Parameters: None. AMI KB-5 present in the system, keyboard controller BAT is complete.
AuxDeviceCommand | This routine issues AuxDevice command, and returns the from the AUX device the connector swap of Keyboard and PS2 Mouse i.e. keyboard can be connected to PS2 Mouse connector and vice-versa. Parameters: UINT8 bCmd - AUX device command
CheckIssueLEDCmd | This function check if KBD LED command ED needs to be issued. If 'yes', sends ED command. No data is read. Parameters: KEYBOARD *kbd - Pointer to keyboard buffer
DetectPS2Keyboard | Detects the presence of Keyboard in KBC port. Parameters: None
DetectPS2KeyboardAndMouse | Detects the presence of Keyboard and Mouse in KBC port. Parameters: None. Keyboard interface is disabled.
DisableAuxDevice | Disables Aux interface. Paremeters: None
DisableKeyboard | Disables KBD interface and reads the data from KBC data port.
EnableAuxDevice | Enables Aux interface. Paremeters: None
EnableKeyboard | Enables KBD interface. Paremeters: None
IbFree | Waits for Iutput Buffer to be empty Parameters: None
IbFreeTimeout | Waits a specified timeout for Iutput Buffer to be empty Parameters: UINT32 TimeoutValue Return value: EFI_STATUS (EFI_SUCCESS or EFI_TIMEOUT)
IoDelay | Performs IO delay by executing IO read. Parameters: None
IssueCommand | Helper function to read the data after executing AUX device command. Parameters: UINT8 bCmd - AUX device command
KBCBatTest | Runs Basic Assurance Test on KBC. Parameters: None
KBCDummyGetData | Reads keyboard data port to clear it Parameters: VOID *Context - Pointer to context
KBCGetData | Reads and returns byte of data from KBC data port. Also used as dummy KBC data process routine. Parameters: VOID *Context - Pointer to the context of this function
MouseDummyGetData | Reads keyboard data port to clear it Parameters: VOID *Context - Pointer to context
ObFullRead | Waits for Output Buffer Full and then reads the data port Parameters: None
ObFullReadTimeout | This routine checks for the data availbility in output buffer for a short period of time, if data is available within this time, it reads and returns the data from output buffer. Paremeters: UINT8* data - Pointer to the byte to be updated UINT32 msec - Milliseconds timeout BOOLEAN ONLYOBF - Only waits for OBF if true
OutToKb | Send the given command to KDB during runtime. Parameters: KEYBOARD* kbd - Pointer to keyboard buffer UINT8 bCmd - Command to send to keyboard
ProcessKBDResponse | If 0xFA is received as data, check for any pending ACK and take necessary action. Parameters: KEYBOARD* kbd - Pointer to keyboard buffer UINT8 bData - Data received from keyboard
PS2DataDispatcher | This fuction checks whether data is available in the PS2 controller output buffer. If so, it gives control to the corresponding state machine executor. Parameters: VOID *Context - Pointer to the context for this function
Read8042 | Sends the given command to KBC, reads and returns the acknowledgement byte returned from KBC. Parameters: UINT8 bCmd - Command to send to KBC
ReadDevice | Sends the given command to KBD, reads and returns the acknowledgement byte returned from KBD. Parameters: UINT8 bCmd - Command to send to KBC UINT8 *Data - Pointer to data buffer UINT8 Response - Response expected
UpdateSioVariableForKeyboardMouse | Update the SIO variable in the ACPI name space depend on the Ps2keyboard and Mouse Present state. Parameters: None
Write8042CommandByte | Writes CCB to KBC Parameters: UINT8 bCCB - Command byte to send to KBC
WriteKeyboardCommand | Writes command to KBC. Parameters: UINT8 bCmd - Command to send to KBC
WriteKeyboardData | Writes data to KBC. Parameters: UINT8 bCmd - Data to send to KBC


AutodetectKbdMousePorts in the kbc.c

Function : AutodetectKbdMousePorts

File: kbc.c
Description:
Auto detection of KB/MS using AMI KB-5.  This code will
   allow the connector swap of Keyboard and PS2 Mouse i.e.
   keyboard can be connected to PS2 Mouse connector and
   vice-versa.

Parameters:      None. AMI KB-5 present in the system, keyboard controller
   BAT is complete.
Output:
None
Notes:
This code should be used only if the motherboard has
   AMI KB-5 which is also available in IO chipsets having KBC
   e.g. SMC932, etc.


AuxDeviceCommand in the kbc.c

Function : AuxDeviceCommand

File: kbc.c
Description:
This routine issues AuxDevice command, and returns the
   from the AUX device
   the connector swap of Keyboard and PS2 Mouse i.e. keyboard
   can be connected to PS2 Mouse connector and vice-versa.

Parameters:      UINT8 bCmd - AUX device command
Output:
UINT8 Data from AUX device
Notes:
Only AUX commands that expect the response from AUX device
   can be executed using this function; otherwise the code will
   be stuck waiting for OBF


CheckIssueLEDCmd in the kbc.c

Function : CheckIssueLEDCmd

File: kbc.c
Description:
This function check if KBD LED command ED needs to be
   issued.
   If 'yes', sends ED command. No data is read.

Parameters:      KEYBOARD *kbd - Pointer to keyboard buffer
Output:
None


DetectPS2Keyboard in the kbc.c

Function : DetectPS2Keyboard

File: kbc.c
Description:
Detects the presence of Keyboard in KBC port.

Parameters:      None
Output:
EFI_SUCCESS if mouse is detected
   EFI_NOT_FOUND if mouse is not detected


DetectPS2KeyboardAndMouse in the kbc.c

Function : DetectPS2KeyboardAndMouse

File: kbc.c
Description:
Detects the presence of Keyboard and Mouse in KBC port.

Parameters:      None. Keyboard interface is disabled.
Output:
Ps2KbdDetected and Ps2MouseDetected variable set accorinding
   the device presence
Modified:
Ps2KbdDetected, Ps2MouseDetected


DisableAuxDevice in the kbc.c

Function : DisableAuxDevice

File: kbc.c
Description:
Disables Aux interface.

Paremeters:      None
Output:
None
Modified:
MouseEnableState
Referrals:
MouseEnableState


DisableKeyboard in the kbc.c

Function : DisableKeyboard

File: kbc.c
Description:
Disables KBD interface and reads the data from KBC
   data port.
Modified:
KBDEnableState

Referral(s):     KBDEnableState


EnableAuxDevice in the kbc.c

Function : EnableAuxDevice

File: kbc.c
Description:
Enables Aux interface.

Paremeters:      None
Output:
None
Modified:
MouseEnableState
Referrals:
MouseEnableState


EnableKeyboard in the kbc.c

Function : EnableKeyboard

File: kbc.c
Description:
Enables KBD interface.

Paremeters:      None
Output:
Status
Modified:
KBDEnableState


IbFree in the kbc.c

Function : IbFree

File: kbc.c
Description:
Waits for Iutput Buffer to be empty

Parameters:      None
Output:
None


IbFreeTimeout in the kbc.c

Function : IbFreeTimeout

File: kbc.c
Description:
Waits a specified timeout for Iutput Buffer to be empty

Parameters:		UINT32 TimeoutValue

Return value:	EFI_STATUS (EFI_SUCCESS or EFI_TIMEOUT)


IoDelay in the kbc.c

Function : IoDelay

File: kbc.c
Description:
Performs IO delay by executing IO read.

Parameters:      None
Output:
None


IssueCommand in the kbc.c

Function : IssueCommand

File: kbc.c
Description:
Helper function to read the data after executing AUX
   device command.

Parameters:      UINT8 bCmd - AUX device command
Output:
UINT8 Data from AUX device
Notes:
Only AUX commands that expect the response from AUX device
   can be executed using this function; otherwise the code will
   be stuck waiting for OBF


KBCBatTest in the kbc.c

Function : KBCBatTest

File: kbc.c
Description:
Runs Basic Assurance Test on KBC.

Parameters:      None
Output:
EFI_SUCCESS or EFI_DEVICE_ERROR


KBCDummyGetData in the kbc.c

Function : KBCDummyGetData

File: kbc.c
Description:
Reads keyboard data port to clear it

Parameters:      VOID *Context - Pointer to context
Output:
UINT8 - Keyboard data port data


KBCGetData in the kbc.c

Function : KBCGetData

File: kbc.c
Description:
Reads and returns byte of data from KBC data port. Also
   used as dummy KBC data process routine.

Parameters:      VOID *Context - Pointer to the context of this function
Output:
UINT8 Data read from KBC Data port.


MouseDummyGetData in the kbc.c

Function : MouseDummyGetData

File: kbc.c
Description:
Reads keyboard data port to clear it

Parameters:      VOID *Context - Pointer to context
Output:
UINT8 - Keyboard data port data
Modified:
MouseResetRequired


ObFullRead in the kbc.c

Function : ObFullRead

File: kbc.c
Description:
Waits for Output Buffer Full and then reads the data port

Parameters:      None
Output:
UINT8 KBC Data port data


ObFullReadTimeout in the kbc.c

Function : ObFullReadTimeout

File: kbc.c
Description:
This routine checks for the data availbility in output
   buffer for a short period of time, if data is available
   within this time, it reads and returns the data from
   output buffer.

Paremeters:      UINT8* data - Pointer to the byte to be updated
   UINT32 msec - Milliseconds timeout
   BOOLEAN ONLYOBF - Only waits for OBF if true
Output:
BOOLEAN - Returns FALSE if data is successfully updated
   (no timeout), data is updated
   Returns TRUE if time-out


OutToKb in the kbc.c

Function : OutToKb

File: kbc.c
Description:
Send the given command to KDB during runtime.

Parameters:      KEYBOARD* kbd - Pointer to keyboard buffer
   UINT8 bCmd - Command to send to keyboard
Output:
EFI_SUCCESS or EFI_DEVICE_ERROR


ProcessKBDResponse in the kbc.c

Function : ProcessKBDResponse

File: kbc.c
Description:
If 0xFA is received as data, check for any pending ACK
   and take necessary action.

Parameters:      KEYBOARD* kbd - Pointer to keyboard buffer
   UINT8 bData - Data received from keyboard
Output:
None


PS2DataDispatcher in the kbc.c

Function : PS2DataDispatcher

File: kbc.c
Description:
This fuction checks whether data is available in the PS2
   controller output buffer. If so, it gives control to the
   corresponding state machine executor.

Parameters:      VOID *Context - Pointer to the context for this function
Output:
None


Read8042 in the kbc.c

Function : Read8042

File: kbc.c
Description:
Sends the given command to KBC, reads and returns the
   acknowledgement byte returned from KBC.

Parameters:      UINT8 bCmd - Command to send to KBC
Output:
UINT8 Acknowledgment byte


ReadDevice in the kbc.c

Function : ReadDevice

File: kbc.c
Description:
Sends the given command to KBD, reads and returns the
   acknowledgement byte returned from KBD.

Parameters:      UINT8 bCmd - Command to send to KBC
   UINT8 *Data - Pointer to data buffer
   UINT8 Response - Response expected
Output:
EFI_SUCCESS - Data == Response
   EFI_DEVICE_ERROR - Data != Response


UpdateSioVariableForKeyboardMouse in the kbc.c

Function : UpdateSioVariableForKeyboardMouse

File: kbc.c
Description:
Update the SIO variable in the ACPI name space depend on the
   Ps2keyboard and Mouse Present state.

Parameters:      None
Output:
None


Write8042CommandByte in the kbc.c

Function : Write8042CommandByte

File: kbc.c
Description:
Writes CCB to KBC

Parameters:      UINT8 bCCB - Command byte to send to KBC
Output:
None


WriteKeyboardCommand in the kbc.c

Function : WriteKeyboardCommand

File: kbc.c
Description:
Writes command to KBC.

Parameters:      UINT8 bCmd - Command to send to KBC
Output:
None


WriteKeyboardData in the kbc.c

Function : WriteKeyboardData

File: kbc.c
Description:
Writes data to KBC.

Parameters:      UINT8 bCmd - Data to send to KBC
Output:
None


kbc.h

Description:
Keyboard Controller functions header


mouse.c

Description:
This is the PS/2 mouse EFI driver source file.

The following functions are used in the file: mouse.c.

Function | Description
DetectPs2Mouse | Implements Reset operation of SimplePointer protocol. As part of initialization process, the firmware/device will make a quick but reasonable attempt to verify that the device is functioning. If the ExtendedVerification flag is TRUE the firmware may take an extended amount of time to verify the device is operating on reset. Otherwise the reset operation is to occur as quickly as possible. Parameters: None
GetMouseData | Enables Mouse and returns data if available Parameters: None
GetMouseDataFromIrq | Enables Mouse and returns data if available Parameters: None
InitMOUSE | Initializes mouse driver Parameters: MOUSE** ppMouse - Pointer to mouse structure
MouseGetState | Retrieves the current state of a pointer device. Parameters: MOUSE *self - Pointer to the mouse structure EFI_SIMPLE_POINTER_STATE *state - Pointer to state machine buffer
MouseInterruptHandler | An interrupt handler for PS2 mouse
MouseReset | Implements Reset operation of SimplePointer protocol. As part of initialization process, the firmware/device will make a quick but reasonable attempt to verify that the device is functioning. If the ExtendedVerification flag is TRUE the firmware may take an extended amount of time to verify the device is operating on reset. Otherwise the reset operation is to occur as quickly as possible. Parameters: MOUSE *self - pointer to the mouse structure BOOLEAN extended - Indicates that the driver may perform a more exhaustive verification operation of the device during reset.
ObFullRead | Waits for Output Buffer Full and then reads the data port Parameters: None
ObFullReadMTimeout | This routine checks for the data availbility in output buffer for a short period of time, if data is available within this time, it reads and returns the data from output buffer. Paremeters: UINT8* data - Pointer to the byte to be updated UINT32 msec - Milliseconds timeout
OnWaitingOnMouse | Callback for the WaitForInput event; checks whether the mouse state has changed and if so - signals the event. Parameters: EFI_EVENT event - Event to signal MOUSE *self - Pointer to the mouse structure
ReadDeviceM | Sends the given command to KBD, reads and returns the acknowledgement byte returned from KBD. Parameters: UINT8 bCmd - Command to send to KBC UINT8 *Data - Pointer to data buffer UINT8 Response - Response expected


DetectPs2Mouse in the mouse.c

Function : DetectPs2Mouse

File: mouse.c
Description:
Implements Reset operation of SimplePointer protocol.
As part of initialization process, the firmware/device will make a quick
but reasonable attempt to verify that the device is functioning. If the
ExtendedVerification flag is TRUE the firmware may take an extended amount
of time to verify the device is operating on reset. Otherwise the reset
operation is to occur as quickly as possible.

Parameters:  None
Output:
Returns EFI_SUCCESS if the device was reset, othewise returns
EFI_DEVICE_ERROR - device is not functioning correctly and could
not be reset.
Modified:
MouseEnableState


GetMouseData in the mouse.c

Function : GetMouseData

File: mouse.c
Description:
Enables Mouse and returns data if available

Parameters:      None
Output:
EFI_SUCCESS - Mouse data returned
   EFI_NO_RESPONSE - No response from mouse
Modified:
MouseData, InsideGetMouseData
Referrals:
MouseData, InsideGetMouseData, MouseResetRequired,
   InsideKbdReadKey, InsideOnWaitingOnKey, gKbd


GetMouseDataFromIrq in the mouse.c

Function : GetMouseDataFromIrq

File: mouse.c
Description:
Enables Mouse and returns data if available

Parameters:      None
Output:
EFI_SUCCESS - Mouse data returned
   EFI_NO_RESPONSE - No response from mouse
Modified:
MouseData, InsideGetMouseData
Referrals:
MouseData, InsideGetMouseData, MouseResetRequired,
   InsideKbdReadKey, InsideOnWaitingOnKey, gKbd


InitMOUSE in the mouse.c

Function : InitMOUSE

File: mouse.c
Description:
Initializes mouse driver

Parameters:      MOUSE** ppMouse - Pointer to mouse structure
Output:
EFI_SUCCESS - Mouse initialized
   EFI_DEVICE_ERROR - Mouse not detected
   EFI_OUT_OF_RESOURCES - Not enough memory for buffers


MouseGetState in the mouse.c

Function : MouseGetState

File: mouse.c
Description:
Retrieves the current state of a pointer device.

Parameters:
MOUSE *self - Pointer to the mouse structure
EFI_SIMPLE_POINTER_STATE *state - Pointer to state machine buffer
Output:
EFI_SUCCESS - Mouse data ready
   EFI_NOT_READY - Mouse data not ready
Modified:
MouseData
Notes:
The function retrieves the current state of a pointer device. This includes
information on the buttons associated with the pointer device and the
distance that each of the axes associated with the pointer device has been
moved. If the state of the pointer device has not changed since the last
call to MouseGetState(), then EFI_NOT_READY is returned. If the state of
the pointer device has changed since the last call to MouseGetState(), then
the state information is placed in State, and EFI_SUCCESS is returned. If a
device error occurs while attempting to retrieve the state information,
then EFI_DEVICE_ERROR is returned.
Referrals:
MouseData


MouseInterruptHandler in the mouse.c

Function : MouseInterruptHandler

File: mouse.c
Description:
An interrupt handler for PS2 mouse
Input:
InterruptType  Interrupt type
SystemContext  System context
Output:
EFI_SUCCESS


MouseReset in the mouse.c

Function : MouseReset

File: mouse.c
Description:
Implements Reset operation of SimplePointer protocol.
As part of initialization process, the firmware/device will make a quick
but reasonable attempt to verify that the device is functioning. If the
ExtendedVerification flag is TRUE the firmware may take an extended amount
of time to verify the device is operating on reset. Otherwise the reset
operation is to occur as quickly as possible.

Parameters:
MOUSE *self     - pointer to the mouse structure
BOOLEAN extended - Indicates that the driver may perform a more exhaustive
   verification operation of the device during reset.
Output:
Returns EFI_SUCCESS if the device was reset, othewise returns
EFI_DEVICE_ERROR - device is not functioning correctly and could
not be reset.


ObFullRead in the mouse.c

Function : ObFullRead

File: mouse.c
Description:
Waits for Output Buffer Full and then reads the data port

Parameters:      None
Output:
UINT8 KBC Data port data


ObFullReadMTimeout in the mouse.c

Function : ObFullReadMTimeout

File: mouse.c
Description:
This routine checks for the data availbility in output
   buffer for a short period of time, if data is available
   within this time, it reads and returns the data from
   output buffer.

Paremeters:      UINT8* data - Pointer to the byte to be updated
   UINT32 msec - Milliseconds timeout
Output:
BOOLEAN - Returns FALSE if data is successfully updated
   (no timeout), data is updated
   Returns TRUE if time-out


OnWaitingOnMouse in the mouse.c

Function : OnWaitingOnMouse

File: mouse.c
Description:
Callback for the WaitForInput event;
   checks whether the mouse state has changed and if so -
   signals the event.

Parameters:      EFI_EVENT event - Event to signal
   MOUSE *self - Pointer to the mouse structure
Output:
None


ReadDeviceM in the mouse.c

Function : ReadDeviceM

File: mouse.c
Description:
Sends the given command to KBD, reads and returns the
   acknowledgement byte returned from KBD.

Parameters:      UINT8 bCmd - Command to send to KBC
   UINT8 *Data - Pointer to data buffer
   UINT8 Response - Response expected
Output:
EFI_SUCCESS - Data == Response
   EFI_DEVICE_ERROR - Data != Response


Names.c

Description:
Component name producer for PS/2 Controller DXE driver

The following functions are used in the file: Names.c.

Function | Description
PS2GetControllerName | Retrieves a Unicode string that is the user readable name of the controller that is being managed by an EFI Driver. Parameters: EFI_COMPONENT_NAME_PROTOCOL This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance. EFI_HANDLE ControllerHandle - The handle of a controller that the driver specified by This is managing. This handle specifies the controller whose name is to be returned. EFI_HANDLE ChildHandle - The handle of the child controller to retrieve the name of. This is an optional parameter that may be NULL. It will be NULL for device drivers. It will also be NULL for a bus drivers that wish to retrieve the name of the bus controller. It will not be NULL for a bus driver that wishes to retrieve the name of a child controller. CHAR8 *Language - A pointer to a three character ISO 639-2 language identifier. This is the language of the controller name that that the caller is requesting, and it must match one of the languages specified in SupportedLanguages. The number of languages supported by a driver is up to the driver writer. CHAR16 **ControllerName - A pointer to the Unicode string to return. This Unicode string is the name of the controller specified by ControllerHandle and ChildHandle in the language specified by Language from the point of view of the driver specified by This.
PS2GetDriverName | Retrieves a Unicode string that is the user readable name of the EFI Driver. Parameters: EFI_COMPONENT_NAME_PROTOCOL This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance. CHAR8 Language - A pointer to a three character ISO 639-2 language identifier. This is the language of the driver name that that the caller is requesting, and it must match one of the languages specified in SupportedLanguages. The number of languages supported by a driver is up to the driver writer. CHAR16 DriverName - A pointer to the Unicode string to return. This Unicode string is the name of the driver specified by This in the language specified by Language.


PS2GetControllerName in the Names.c

Function : PS2GetControllerName

File: Names.c
Description:
Retrieves a Unicode string that is the user readable name of
the controller that is being managed by an EFI Driver.

Parameters:
EFI_COMPONENT_NAME_PROTOCOL
This             - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
EFI_HANDLE
ControllerHandle - The handle of a controller that the driver specified by
        This is managing.  This handle specifies the controller
        whose name is to be returned.
EFI_HANDLE
ChildHandle      - The handle of the child controller to retrieve the name
        of.  This is an optional parameter that may be NULL.  It
        will be NULL for device drivers.  It will also be NULL
        for a bus drivers that wish to retrieve the name of the
        bus controller.  It will not be NULL for a bus driver
        that wishes to retrieve the name of a child controller.
CHAR8
*Language        - A pointer to a three character ISO 639-2 language
        identifier.  This is the language of the controller name
        that that the caller is requesting, and it must match one
        of the languages specified in SupportedLanguages.  The
        number of languages supported by a driver is up to the
        driver writer.
CHAR16
**ControllerName - A pointer to the Unicode string to return.  This Unicode
        string is the name of the controller specified by
        ControllerHandle and ChildHandle in the language
        specified by Language from the point of view of the
        driver specified by This.
Output:
EFI_SUCCESS           - The Unicode string for the user readable name in the
             language specified by Language for the driver
             specified by This was returned in DriverName.
EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.
EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid
             EFI_HANDLE.
EFI_INVALID_PARAMETER - Language is NULL.
EFI_INVALID_PARAMETER - ControllerName is NULL.
EFI_UNSUPPORTED       - The driver specified by This is not currently
             managing the controller specified by
             ControllerHandle and ChildHandle.
EFI_UNSUPPORTED       - The driver specified by This does not support the
             language specified by Language.


PS2GetDriverName in the Names.c

Function : PS2GetDriverName

File: Names.c
Description:
Retrieves a Unicode string that is the user readable name of
the EFI Driver.
Parameters:
EFI_COMPONENT_NAME_PROTOCOL
This       - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
CHAR8
Language   - A pointer to a three character ISO 639-2 language identifier.
  This is the language of the driver name that that the caller
  is requesting, and it must match one of the languages specified
  in SupportedLanguages.  The number of languages supported by a
  driver is up to the driver writer.
CHAR16
DriverName - A pointer to the Unicode string to return.  This Unicode string
  is the name of the driver specified by This in the language
  specified by Language.
Output:
EFI_SUCCES            - The Unicode string for the Driver specified by This
             and the language specified by Language was returned
             in DriverName.
EFI_INVALID_PARAMETER - Language is NULL.
EFI_INVALID_PARAMETER - DriverName is NULL.
EFI_UNSUPPORTED       - The driver specified by This does not support the
             language specified by Language.


ps2ctl.h

Description:
PS/2 Controller DXE driver header


ps2kbd.c

Description:
PS/2 keyboard support routines

The following functions are used in the file: ps2kbd.c.

Function | Description
CheckKeyinBuffer | Checks if any key is present in the buffer
CheckKeyNotify | Call the notification function based on the key pressed
CheckPartialKey | Gets the next key from the circular buffer
ClearKbBuffer | This function clear PS2 KB buffer
ClearOBF | Clears any pending keys in Ps2 Output Buffer.
GetKeyFromBuffer | Gets the next key from the circular buffer
HandleKBDData | Processes the input data. If a callback function is associated with the key, then it is executed. Paremeters: KEYBOARD *Kbd - Pointer to key buffer UINT8 data - Key data
InitKeyboardIrq | To initialize keyboard interrupt, register keyboard handler, and enable the keyboard interrupt
InsertKeyToBuffer | Insert the key into the circular buffer
IsLetter | Returns TRUE if the given make code belongs to the alphabetical symbol, otherwise returns FALSE. Paremeters: UINT8 data - The character to test
KbdReadKey | Reads the next keystroke from the input device. This routine is a part of SimpleTextIn protocol implementation. Paremeters: EFI_SIMPLE_TEXT_INPUT_PROTOCOL This - A pointer to the EFI_SIMPLE_TEXT_INPUT_PROTOCOL instance. EFI_INPUT_KEY InputKey - A pointer to a buffer that is to be filled in with the keystroke information for the key that was pressed.
KbdReadKeyEx | Reads the next keystroke from the input device. This routine is a part of SimpleTextInEx protocol implementation. Paremeters: EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This - A pointer to the EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL instance.
KbdReset | Resets the input device hardware. This routine is a part of SimpleTextIn protocol implementation. Parameters: EFI_SIMPLE_TEXT_INPUT_PROTOCOL *This - A pointer to the EFI_SIMPLE_TEXT_INPUT_PROTOCOL instance. BOOLEAN ExtendedVerification - Indicates that the driver may perform a more exhaustive verification operation of the device during reset.
KeyboardInterruptHandler | An interrupt handler for keyboard IRQ.
LEDsOnOff | Turns keyboard LEDs on and off.
OnWaitingOnKey | Callback for the EFI_SIMPLE_TEXT_INPUT_PROTOCOL.WaitForKey event; checks whether the new key is available and if so - signals the event.
ProcessByte | Checks for valid key, updates key modifiers, keyboard queue head and tail as well as Kbd->KeyIsReady field.
ProcessKBDData | If key is ready, processes any hotkey, and inserts key in buffer Parameters: KEYBOARD *Kbd - Pointer to key buffer UINT8 data - Key data
ProcessLEDCommandData | Process the LED command and data.
ProcessMultiLanguage | It maps the current key to a Unicode character from the keyboard layout Paremeters: KeyData - Pointer to the AMI_EFI_KEY_DATA .
Ps2KbdReset | Reset the Ps2 Keyboard by sending disabling and Enabling scanning.
ReadAndProcessKey | PS2 keyboard keys processor, called from main PS2 dispatcher. It gets the key from KBC output buffer and calls HandleKBDData. Paremeters: void *Context - keyboard device pointer
RegisterKeyNotify | Register the callback function for the specific Key
SetState | Set certain state for the input device. Paremeters: This - A pointer to the EFI_SIMPLE_TEXT_INPUT_PROTOCOL_EX instance. KeyToggleState - Pointer to the EFI_KEY_TOGGLE_STATE to set the state for the input device.
StartKeyboard | This routine is called from Driver Binding Start function, it starts the keyboard Paremeters: EFI_DRIVER_BINDING_PROTOCOL *This - A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance EFI_HANDLE Controller - Handle for this controller
StartPollingKey | Get the keys from the keyboard controller Paremeters: IN EFI_EVENT Event event that has been signaled IN VOID *Context
StopKeyboard | This routine is called from Driver Binding Stop function. Paremeters: EFI_DRIVER_BINDING_PROTOCOL *This - A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance EFI_HANDLE Controller - Handle for this controller
UnRegisterKeyNotify | Unregister the callback function
UpdateVariabletoCheckBda | This function updates variable Legacy BIOS Protocol found,to check BDA for pending keys in EFI.


CheckKeyinBuffer in the ps2kbd.c

Function : CheckKeyinBuffer

File: ps2kbd.c
Description:
Checks if any key is present in the buffer
Input:
KEYBOARD *Kbd - A pointer to the KEYBOARD device.
Output:
BOOLEAN - TRUE if a key is in the buffer, FALSE otherwise.


CheckKeyNotify in the ps2kbd.c

Function : CheckKeyNotify

File: ps2kbd.c
Description:
Call the notification function based on the key pressed
Input:
Key - Key pressed
Output:
None


CheckPartialKey in the ps2kbd.c

Function : CheckPartialKey

File: ps2kbd.c
Description:
Gets the next key from the circular buffer
Input:
KEYBOARD *Kbd - A pointer to the KEYBOARD device.
   EFI_INPUT_KEY *key - Pointer to input key data
Output:
EFI_SUCCESS - Partial Key Found
   EFI_NOT_READY - no key in buffer


ClearKbBuffer in the ps2kbd.c

Function : ClearKbBuffer

File: ps2kbd.c
Description:
This function clear PS2 KB buffer
Input:
IN EFI_EVENT	Event - signalled event
IN VOID 		*Context - pointer to event context
Output:
VOID
Modified:
Notes:

Referrals:


ClearOBF in the ps2kbd.c

Function : ClearOBF

File: ps2kbd.c
Description:
Clears any pending keys in Ps2 Output Buffer.
Input:
VOID
Output:
VOID
Modified:
Notes:
This OBF clear is done since some PS2 KBC has pending keys even
after resetting the Keyboard.
Referrals:


GetKeyFromBuffer in the ps2kbd.c

Function : GetKeyFromBuffer

File: ps2kbd.c
Description:
Gets the next key from the circular buffer
Input:
KEYBOARD *Kbd - A pointer to the KEYBOARD device.
   EFI_INPUT_KEY *key - Pointer to input key data
Output:
EFI_SUCCESS - key.ScanCode and key.UnicodeChar updated
   EFI_NOT_READY - no key in buffer


HandleKBDData in the ps2kbd.c

Function : HandleKBDData

File: ps2kbd.c
Description:
Processes the input data. If a callback function is
   associated with the key, then it is executed.

Paremeters:
KEYBOARD    *Kbd - Pointer to key buffer
UINT8       data - Key data
Output:
None
Notes:
This routine can be called re-entrantly from LEDsOnOff(OutToKb)
   e.g. when Numlock and Del is pressed continously.
   Incoming key is processed, Context->KeyIsReady is updated.


InitKeyboardIrq in the ps2kbd.c

Function : InitKeyboardIrq

File: ps2kbd.c
Description:
To initialize keyboard interrupt, register keyboard
   handler, and enable the keyboard interrupt
Input:

Paremeters:
Output:
None


InsertKeyToBuffer in the ps2kbd.c

Function : InsertKeyToBuffer

File: ps2kbd.c
Description:
Insert the key into the circular buffer
Input:
KEYBOARD *Kbd - A pointer to the KEYBOARD device.
   AMI_EFI_INPUT_KEY key - input key data
Output:
EFI_SUCCESS - Key placed in buffer
   EFI_WARN_BUFFER_TOO_SMALL - Buffer to small
Notes:
If buffer is full, the EFI_WARN_BUFFER_TOO_SMALL.
   Tail points to the new Data.


IsLetter in the ps2kbd.c

Function : IsLetter

File: ps2kbd.c
Description:
Returns TRUE if the given make code belongs to the
   alphabetical symbol, otherwise returns FALSE.

Paremeters:      UINT8 data - The character to test
Output:
BOOLEAN - True if character is letter


KbdReadKey in the ps2kbd.c

Function : KbdReadKey

File: ps2kbd.c
Description:
Reads the next keystroke from the input device. This
   routine is a part of SimpleTextIn protocol
   implementation.

Paremeters:      EFI_SIMPLE_TEXT_INPUT_PROTOCOL
   This - A pointer to the EFI_SIMPLE_TEXT_INPUT_PROTOCOL
       instance.
   EFI_INPUT_KEY
   InputKey -  A pointer to a buffer that is to be filled in
       with the keystroke information for the key that was
       pressed.
Output:
EFI_SUCCESS - The keystroke information was returned.
   EFI_NOT_READY - There was no keystroke data available.
   EFI_DEVICE_ERROR - The keystroke information was not
       returned due to hardware errors.
Modified:
InsideKbdReadKey

Referral(s):     InsideGetMouseData, InsideGetMouseData,
   InsideOnWaitingOnKey


KbdReadKeyEx in the ps2kbd.c

Function : KbdReadKeyEx

File: ps2kbd.c
Description:
Reads the next keystroke from the input device. This
   routine is a part of SimpleTextInEx protocol
   implementation.

Paremeters:      EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
   *This - A pointer to the EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL
       instance.
Output:
EFI_INPUT_KEY
   *key -  A pointer to a buffer that is filled in with the
           keystroke state data for the key that was pressed.


KbdReset in the ps2kbd.c

Function : KbdReset

File: ps2kbd.c
Description:
Resets the input device hardware. This routine is a part
   of SimpleTextIn protocol implementation.

Parameters:      EFI_SIMPLE_TEXT_INPUT_PROTOCOL
   *This - A pointer to the EFI_SIMPLE_TEXT_INPUT_PROTOCOL
   instance.
   BOOLEAN
   ExtendedVerification - Indicates that the driver may
   perform a more exhaustive verification operation of the
   device during reset.
Output:
EFI_SUCCESS The device was reset.
   EFI_DEVICE_ERROR The device is not functioning correctly
   and could not be reset.
Modified:
KBDEnableState


KeyboardInterruptHandler in the ps2kbd.c

Function : KeyboardInterruptHandler

File: ps2kbd.c
Description:
An interrupt handler for keyboard IRQ.
Input:
InterruptType  Interrupt type
SystemContext  System context
Output:
EFI_SUCCESS


LEDsOnOff in the ps2kbd.c

Function : LEDsOnOff

File: ps2kbd.c
Description:
Turns keyboard LEDs on and off.
Input:
KEYBOARD *Kbd - A pointer to the KEYBOARD device.
Output:
None


OnWaitingOnKey in the ps2kbd.c

Function : OnWaitingOnKey

File: ps2kbd.c
Description:
Callback for the EFI_SIMPLE_TEXT_INPUT_PROTOCOL.WaitForKey
   event;
   checks whether the new key is available and if so -
   signals the event.
Input:
EFI_EVENT Event - Event to signal
   void Context - Event specific context (pointer to Kbd
       device)
Output:
None
Modified:
InsideOnWaitingOnKey
Referrals:
InsideGetMouseData, InsideKbdReadKey,
   InsideOnWaitingOnKey


ProcessByte in the ps2kbd.c

Function : ProcessByte

File: ps2kbd.c
Description:
Checks for valid key, updates key modifiers, keyboard
   queue head and tail as well as Kbd->KeyIsReady field.
Input:
KEYBOARD *Kbd - A pointer to the KEYBOARD device.
   UINT8 data - byte to process
   BOOLEAN long_sequence - the indication of whether it is a
   4 byte sequence or not; used to differentiate Shift keys
Output:
None


ProcessKBDData in the ps2kbd.c

Function : ProcessKBDData

File: ps2kbd.c
Description:
If key is ready, processes any hotkey, and inserts key
   in buffer

Parameters:
KEYBOARD    *Kbd - Pointer to key buffer
UINT8       data - Key data
Output:
None
Notes:
Incoming key is processed, Context->KeyIsReady is updated


ProcessLEDCommandData in the ps2kbd.c

Function : ProcessLEDCommandData

File: ps2kbd.c
Description:
Process the LED command and data.
Input:
KEYBOARD *Kbd - A pointer to the KEYBOARD device.
Output:
None


ProcessMultiLanguage in the ps2kbd.c

Function : ProcessMultiLanguage

File: ps2kbd.c
Description:
It maps the current key to a Unicode character from
   the keyboard layout

Paremeters:      KeyData - Pointer to the AMI_EFI_KEY_DATA .
Output:
None


Ps2KbdReset in the ps2kbd.c

Function : Ps2KbdReset

File: ps2kbd.c
Description:
Reset the Ps2 Keyboard by sending disabling and Enabling scanning.
Input:
VOID
Output:
VOID
Modified:
Notes:

Referrals:


ReadAndProcessKey in the ps2kbd.c

Function : ReadAndProcessKey

File: ps2kbd.c
Description:
PS2 keyboard keys processor, called from main PS2
   dispatcher.
   It gets the key from KBC output buffer and calls
   HandleKBDData.

Paremeters:      void *Context - keyboard device pointer
Output:
None
Notes:
PS2 output buffer has data, incoming key is processed,
   Context->KeyIsReady is updated.


RegisterKeyNotify in the ps2kbd.c

Function : RegisterKeyNotify

File: ps2kbd.c
Description:
Register the callback function for the specific Key
Input:
This - A pointer to the EFI_SIMPLE_TEXT_INPUT_PROTOCOL_EX
           instance.
   KeyData - Key value
   KeyNotificationFunction- Pointer to the Notification Function
   NotificationHandle - Handle to be unregisterd
Output:
None


SetState in the ps2kbd.c

Function : SetState

File: ps2kbd.c
Description:
Set certain state for the input device.

Paremeters:      This - A pointer to the EFI_SIMPLE_TEXT_INPUT_PROTOCOL_EX
           instance.
   KeyToggleState - Pointer to the EFI_KEY_TOGGLE_STATE to
           set the state for the input device.
Output:
None


StartKeyboard in the ps2kbd.c

Function : StartKeyboard

File: ps2kbd.c
Description:
This routine is called from Driver Binding Start function,
   it starts the keyboard

Paremeters:      EFI_DRIVER_BINDING_PROTOCOL *This - A pointer to the
       EFI_DRIVER_BINDING_PROTOCOL instance
   EFI_HANDLE Controller - Handle for this controller
Output:
EFI_STATUS - status of the operation
Referrals:
gEfiSimpleTextInProtocolGuid


StartPollingKey in the ps2kbd.c

Function : StartPollingKey

File: ps2kbd.c
Description:
Get the keys from the keyboard controller

Paremeters:      IN EFI_EVENT  Event      event that has been signaled
   IN VOID       *Context
Output:
None


StopKeyboard in the ps2kbd.c

Function : StopKeyboard

File: ps2kbd.c
Description:
This routine is called from Driver Binding Stop function.

Paremeters:      EFI_DRIVER_BINDING_PROTOCOL *This - A pointer to the
       EFI_DRIVER_BINDING_PROTOCOL instance
   EFI_HANDLE Controller - Handle for this controller
Output:
EFI_STATUS - status of the operation
Referrals:
gEfiSimpleTextInProtocolGuid


UnRegisterKeyNotify in the ps2kbd.c

Function : UnRegisterKeyNotify

File: ps2kbd.c
Description:
Unregister the callback function
Input:
This - A pointer to the EFI_SIMPLE_TEXT_INPUT_PROTOCOL_EX
           instance.
   NotificationHandle - Handle to be unregisterd
Output:
None


UpdateVariabletoCheckBda in the ps2kbd.c

Function : UpdateVariabletoCheckBda

File: ps2kbd.c
Description:
This function updates variable Legacy BIOS Protocol found,to check BDA
for pending keys in EFI.
Input:
IN EFI_EVENT Event - signalled event
IN VOID *Context - pointer to event context
Output:
VOID
Modified:
Notes:

Referrals:


ps2main.c

Description:
PS/2 Controller DXE driver
This driver supports PS/2 keyboard and/or PS/2 mouse depending on the
switches in SDL tokens.

The following functions are used in the file: ps2main.c.

Function | Description
GetPS2_DP | This fuction returns the last node in the device path for the given controller. Paremeters: EFI_DRIVER_BINDING_PROTOCOL *This - Pointer to this instance of the driver binding protocol EFI_HANDLE Controller - Handle for this controller ACPI_HID_DEVICE_PATH** ps2dp - Pointer to ACPI HID device path UINT32 Attributes - Attributes passed to driver binding protocol
LookupPs2Hid | This fuction searches the PS2 device in table that matches given HID and UID Paremeters: PS2DEV_TABLE * devTable - Lookup table pointer UINT32 hid - HID to look for UINT32 uid - UID to look for PS2DEV_TABLE** dev - address of the matched table entry
PS2CtlEntryPoint | PS/2 Controller Driver Entry Point This function is a part of DriverBinfing protocol Parameters: EFI_HANDLE ImageHandle - Image handle for this driver image EFI_SYSTEM_TABLE *SystemTable - pointer to the EFI system table
PS2CtlStart | PS/2 Controller Driver Start function This function is a part of DriverBinfing protocol Paremeters: EFI_DRIVER_BINDING_PROTOCOL *This - Pointer to this instance of the driver binding protocol EFI_HANDLE Controller - Handle for this controller EFI_DEVICE_PATH_PROTOCOL - *RemainingDevicePath - Pointer to last node in device path
PS2CtlStop | PS/2 Controller Driver Stop function This function is a part of DriverBinfing protocol Paremeters: EFI_DRIVER_BINDING_PROTOCOL *This - Pointer to this instance of the driver binding protocol EFI_HANDLE Controller - Handle for this controller UINTN NumberOfChildren - Number of children of this controller EFI_HANDLE *ChildHandleBuffer - Pointer to a buffer for child handles
PS2CtlSupported | PS/2 Controller Driver Supported function This function is a part of DriverBinfing protocol Paremeters: EFI_DRIVER_BINDING_PROTOCOL *This - Pointer to this instance of the driver binding protocol EFI_HANDLE Controller - Handle for this controller EFI_DEVICE_PATH_PROTOCOL - *RemainingDevicePath - Pointer to last node in device path


GetPS2_DP in the ps2main.c

Function : GetPS2_DP

File: ps2main.c
Description:
This fuction returns the last node in the device
   path for the given controller.

Paremeters:      EFI_DRIVER_BINDING_PROTOCOL *This - Pointer to this
       instance of the driver binding protocol
   EFI_HANDLE Controller - Handle for this controller
   ACPI_HID_DEVICE_PATH** ps2dp - Pointer to ACPI HID
       device path
   UINT32 Attributes - Attributes passed to driver binding
       protocol
Output:
EFI_SUCCESS or EFI_UNSUPPORTED


LookupPs2Hid in the ps2main.c

Function : LookupPs2Hid

File: ps2main.c
Description:
This fuction searches the PS2 device in table that
   matches given HID and UID

Paremeters:
PS2DEV_TABLE *  devTable - Lookup table pointer
UINT32          hid - HID to look for
UINT32          uid - UID to look for
PS2DEV_TABLE**  dev - address of the matched table entry
Output:
BOOLEAN - TRUE if match is found, FALSE otherwise


PS2CtlEntryPoint in the ps2main.c

Function : PS2CtlEntryPoint

File: ps2main.c
Description:
PS/2 Controller Driver Entry Point
   This function is a part of DriverBinfing protocol

Parameters:      EFI_HANDLE ImageHandle - Image handle for this driver
                            image
   EFI_SYSTEM_TABLE *SystemTable - pointer to the EFI
                                   system table
Output:
EFI_STATUS - Status of the operation


PS2CtlStart in the ps2main.c

Function : PS2CtlStart

File: ps2main.c
Description:
PS/2 Controller Driver Start function
   This function is a part of DriverBinfing protocol

Paremeters:      EFI_DRIVER_BINDING_PROTOCOL *This - Pointer to this
       instance of the driver binding protocol
   EFI_HANDLE Controller - Handle for this controller
   EFI_DEVICE_PATH_PROTOCOL - *RemainingDevicePath -
       Pointer to last node in device path
Output:
EFI_STATUS - Status of the operation


PS2CtlStop in the ps2main.c

Function : PS2CtlStop

File: ps2main.c
Description:
PS/2 Controller Driver Stop function
   This function is a part of DriverBinfing protocol

Paremeters:      EFI_DRIVER_BINDING_PROTOCOL *This - Pointer to this
       instance of the driver binding protocol
   EFI_HANDLE Controller - Handle for this controller
   UINTN NumberOfChildren - Number of children of this
       controller
   EFI_HANDLE *ChildHandleBuffer - Pointer to a buffer
       for child handles
Output:
EFI_STATUS - Status of the operation


PS2CtlSupported in the ps2main.c

Function : PS2CtlSupported

File: ps2main.c
Description:
PS/2 Controller Driver Supported function
   This function is a part of DriverBinfing protocol

Paremeters:      EFI_DRIVER_BINDING_PROTOCOL *This - Pointer to this
       instance of the driver binding protocol
   EFI_HANDLE Controller - Handle for this controller
   EFI_DEVICE_PATH_PROTOCOL - *RemainingDevicePath -
       Pointer to last node in device path
Output:
EFI_SUCCESS - Ps2 Controller supported
   EFI_UNSUPPORTED -- Ps2 Controller not supported


ps2mouse.h

Description:
Ps2 mouse support header


Functions in Alphabetical Order

In Alphabetical Order

The following topics provide a list in alphabetical order.
For a list by file name, see By File Name.

  • A
  • C
  • D
  • E
  • G
  • H
  • I
  • K
  • L
  • M
  • O
  • P
  • R
  • S
  • U
  • W


Functions in Alphabetical Order

A

Function | Description
AutodetectKbdMousePorts | Auto detection of KB/MS using AMI KB-5. This code will allow the connector swap of Keyboard and PS2 Mouse i.e. keyboard can be connected to PS2 Mouse connector and vice-versa. Parameters: None. AMI KB-5 present in the system, keyboard controller BAT is complete.
AuxDeviceCommand | This routine issues AuxDevice command, and returns the from the AUX device the connector swap of Keyboard and PS2 Mouse i.e. keyboard can be connected to PS2 Mouse connector and vice-versa. Parameters: UINT8 bCmd - AUX device command


Functions in Alphabetical Order

C

Function | Description
CheckIssueLEDCmd | This function check if KBD LED command ED needs to be issued. If 'yes', sends ED command. No data is read. Parameters: KEYBOARD *kbd - Pointer to keyboard buffer
CheckKeyinBuffer | Checks if any key is present in the buffer
CheckKeyNotify | Call the notification function based on the key pressed
CheckPartialKey | Gets the next key from the circular buffer
ClearKbBuffer | This function clear PS2 KB buffer
ClearOBF | Clears any pending keys in Ps2 Output Buffer.
CopyKey | HotKey helper function - Copies key codes from source to target buffers Parameters: KEY_ASSOCIATION *SrcKey - Pointer to source buffer KEY_ASSOCIATION *TrgKey - Pointer to target buffer


Functions in Alphabetical Order

D

Function | Description
DetectPS2Keyboard | Detects the presence of Keyboard in KBC port. Parameters: None
DetectPS2KeyboardAndMouse | Detects the presence of Keyboard and Mouse in KBC port. Parameters: None. Keyboard interface is disabled.
DetectPs2Mouse | Implements Reset operation of SimplePointer protocol. As part of initialization process, the firmware/device will make a quick but reasonable attempt to verify that the device is functioning. If the ExtendedVerification flag is TRUE the firmware may take an extended amount of time to verify the device is operating on reset. Otherwise the reset operation is to occur as quickly as possible. Parameters: None
DisableAuxDevice | Disables Aux interface. Paremeters: None
DisableKeyboard | Disables KBD interface and reads the data from KBC data port.


Functions in Alphabetical Order

E

Function | Description
EnableAuxDevice | Enables Aux interface. Paremeters: None
EnableKeyboard | Enables KBD interface. Paremeters: None


Functions in Alphabetical Order

G

Function | Description
GetKeyFromBuffer | Gets the next key from the circular buffer
GetMouseData | Enables Mouse and returns data if available Parameters: None
GetMouseDataFromIrq | Enables Mouse and returns data if available Parameters: None
GetPS2_DP | This fuction returns the last node in the device path for the given controller. Paremeters: EFI_DRIVER_BINDING_PROTOCOL *This - Pointer to this instance of the driver binding protocol EFI_HANDLE Controller - Handle for this controller ACPI_HID_DEVICE_PATH** ps2dp - Pointer to ACPI HID device path UINT32 Attributes - Attributes passed to driver binding protocol


Functions in Alphabetical Order

H

Function | Description
HandleKBDData | Processes the input data. If a callback function is associated with the key, then it is executed. Paremeters: KEYBOARD *Kbd - Pointer to key buffer UINT8 data - Key data


Functions in Alphabetical Order

I

Function | Description
IbFree | Waits for Iutput Buffer to be empty Parameters: None
IbFreeTimeout | Waits a specified timeout for Iutput Buffer to be empty Parameters: UINT32 TimeoutValue Return value: EFI_STATUS (EFI_SUCCESS or EFI_TIMEOUT)
InitHotKeys | This routine is called from StartKeyboard function, it initializes the PS/2 keyboard hot keys and produces HotKeys protocol. Parameters: EFI_HANDLE Controller - Handle for this driver
InitKeyboardIrq | To initialize keyboard interrupt, register keyboard handler, and enable the keyboard interrupt
InitMOUSE | Initializes mouse driver Parameters: MOUSE** ppMouse - Pointer to mouse structure
InsertKeyToBuffer | Insert the key into the circular buffer
IoDelay | Performs IO delay by executing IO read. Parameters: None
IsLetter | Returns TRUE if the given make code belongs to the alphabetical symbol, otherwise returns FALSE. Paremeters: UINT8 data - The character to test
IssueCommand | Helper function to read the data after executing AUX device command. Parameters: UINT8 bCmd - AUX device command


Functions in Alphabetical Order

K

Function | Description
KBCBatTest | Runs Basic Assurance Test on KBC. Parameters: None
KBCDummyGetData | Reads keyboard data port to clear it Parameters: VOID *Context - Pointer to context
KBCGetData | Reads and returns byte of data from KBC data port. Also used as dummy KBC data process routine. Parameters: VOID *Context - Pointer to the context of this function
KbdReadKey | Reads the next keystroke from the input device. This routine is a part of SimpleTextIn protocol implementation. Paremeters: EFI_SIMPLE_TEXT_INPUT_PROTOCOL This - A pointer to the EFI_SIMPLE_TEXT_INPUT_PROTOCOL instance. EFI_INPUT_KEY InputKey - A pointer to a buffer that is to be filled in with the keystroke information for the key that was pressed.
KbdReadKeyEx | Reads the next keystroke from the input device. This routine is a part of SimpleTextInEx protocol implementation. Paremeters: EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This - A pointer to the EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL instance.
KbdReset | Resets the input device hardware. This routine is a part of SimpleTextIn protocol implementation. Parameters: EFI_SIMPLE_TEXT_INPUT_PROTOCOL *This - A pointer to the EFI_SIMPLE_TEXT_INPUT_PROTOCOL instance. BOOLEAN ExtendedVerification - Indicates that the driver may perform a more exhaustive verification operation of the device during reset.
KeyboardInterruptHandler | An interrupt handler for keyboard IRQ.


Functions in Alphabetical Order

L

Function | Description
LEDsOnOff | Turns keyboard LEDs on and off.
LookupPs2Hid | This fuction searches the PS2 device in table that matches given HID and UID Paremeters: PS2DEV_TABLE * devTable - Lookup table pointer UINT32 hid - HID to look for UINT32 uid - UID to look for PS2DEV_TABLE** dev - address of the matched table entry


Functions in Alphabetical Order

M

Function | Description
MouseDummyGetData | Reads keyboard data port to clear it Parameters: VOID *Context - Pointer to context
MouseGetState | Retrieves the current state of a pointer device. Parameters: MOUSE *self - Pointer to the mouse structure EFI_SIMPLE_POINTER_STATE *state - Pointer to state machine buffer
MouseInterruptHandler | An interrupt handler for PS2 mouse
MouseReset | Implements Reset operation of SimplePointer protocol. As part of initialization process, the firmware/device will make a quick but reasonable attempt to verify that the device is functioning. If the ExtendedVerification flag is TRUE the firmware may take an extended amount of time to verify the device is operating on reset. Otherwise the reset operation is to occur as quickly as possible. Parameters: MOUSE *self - pointer to the mouse structure BOOLEAN extended - Indicates that the driver may perform a more exhaustive verification operation of the device during reset.


Functions in Alphabetical Order

O

Function | Description
ObFullRead | Waits for Output Buffer Full and then reads the data port Parameters: None
ObFullRead | Waits for Output Buffer Full and then reads the data port Parameters: None
ObFullReadMTimeout | This routine checks for the data availbility in output buffer for a short period of time, if data is available within this time, it reads and returns the data from output buffer. Paremeters: UINT8* data - Pointer to the byte to be updated UINT32 msec - Milliseconds timeout
ObFullReadTimeout | This routine checks for the data availbility in output buffer for a short period of time, if data is available within this time, it reads and returns the data from output buffer. Paremeters: UINT8* data - Pointer to the byte to be updated UINT32 msec - Milliseconds timeout BOOLEAN ONLYOBF - Only waits for OBF if true
OnWaitingOnKey | Callback for the EFI_SIMPLE_TEXT_INPUT_PROTOCOL.WaitForKey event; checks whether the new key is available and if so - signals the event.
OnWaitingOnMouse | Callback for the WaitForInput event; checks whether the mouse state has changed and if so - signals the event. Parameters: EFI_EVENT event - Event to signal MOUSE *self - Pointer to the mouse structure
OutToKb | Send the given command to KDB during runtime. Parameters: KEYBOARD* kbd - Pointer to keyboard buffer UINT8 bCmd - Command to send to keyboard


Functions in Alphabetical Order

P

Function | Description
ProcessByte | Checks for valid key, updates key modifiers, keyboard queue head and tail as well as Kbd->KeyIsReady field.
ProcessHotKey | This routine searches the HotKey table for the matching key and executes the corresponding "key extension" function. Parameters: UINT8 Code - key make code UINT16 KeyShiftState - Shift/Alt/Ctrl modifiers: RIGHT_SHIFT_PRESSED 0x00000001 LEFT_SHIFT_PRESSED 0x00000002 RIGHT_CONTROL_PRESSED 0x00000004 LEFT_CONTROL_PRESSED 0x00000008 RIGHT_ALT_PRESSED 0x00000010 LEFT_ALT_PRESSED 0x00000020 RIGHT_LOGO_PRESSED 0x00000040 LEFT_LOGO_PRESSED 0x00000080
ProcessKBDData | If key is ready, processes any hotkey, and inserts key in buffer Parameters: KEYBOARD *Kbd - Pointer to key buffer UINT8 data - Key data
ProcessKBDResponse | If 0xFA is received as data, check for any pending ACK and take necessary action. Parameters: KEYBOARD* kbd - Pointer to keyboard buffer UINT8 bData - Data received from keyboard
ProcessLEDCommandData | Process the LED command and data.
ProcessMultiLanguage | It maps the current key to a Unicode character from the keyboard layout Paremeters: KeyData - Pointer to the AMI_EFI_KEY_DATA .
PS2CtlEntryPoint | PS/2 Controller Driver Entry Point This function is a part of DriverBinfing protocol Parameters: EFI_HANDLE ImageHandle - Image handle for this driver image EFI_SYSTEM_TABLE *SystemTable - pointer to the EFI system table
PS2CtlStart | PS/2 Controller Driver Start function This function is a part of DriverBinfing protocol Paremeters: EFI_DRIVER_BINDING_PROTOCOL *This - Pointer to this instance of the driver binding protocol EFI_HANDLE Controller - Handle for this controller EFI_DEVICE_PATH_PROTOCOL - *RemainingDevicePath - Pointer to last node in device path
PS2CtlStop | PS/2 Controller Driver Stop function This function is a part of DriverBinfing protocol Paremeters: EFI_DRIVER_BINDING_PROTOCOL *This - Pointer to this instance of the driver binding protocol EFI_HANDLE Controller - Handle for this controller UINTN NumberOfChildren - Number of children of this controller EFI_HANDLE *ChildHandleBuffer - Pointer to a buffer for child handles
PS2CtlSupported | PS/2 Controller Driver Supported function This function is a part of DriverBinfing protocol Paremeters: EFI_DRIVER_BINDING_PROTOCOL *This - Pointer to this instance of the driver binding protocol EFI_HANDLE Controller - Handle for this controller EFI_DEVICE_PATH_PROTOCOL - *RemainingDevicePath - Pointer to last node in device path
PS2DataDispatcher | This fuction checks whether data is available in the PS2 controller output buffer. If so, it gives control to the corresponding state machine executor. Parameters: VOID *Context - Pointer to the context for this function
PS2GetControllerName | Retrieves a Unicode string that is the user readable name of the controller that is being managed by an EFI Driver. Parameters: EFI_COMPONENT_NAME_PROTOCOL This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance. EFI_HANDLE ControllerHandle - The handle of a controller that the driver specified by This is managing. This handle specifies the controller whose name is to be returned. EFI_HANDLE ChildHandle - The handle of the child controller to retrieve the name of. This is an optional parameter that may be NULL. It will be NULL for device drivers. It will also be NULL for a bus drivers that wish to retrieve the name of the bus controller. It will not be NULL for a bus driver that wishes to retrieve the name of a child controller. CHAR8 *Language - A pointer to a three character ISO 639-2 language identifier. This is the language of the controller name that that the caller is requesting, and it must match one of the languages specified in SupportedLanguages. The number of languages supported by a driver is up to the driver writer. CHAR16 **ControllerName - A pointer to the Unicode string to return. This Unicode string is the name of the controller specified by ControllerHandle and ChildHandle in the language specified by Language from the point of view of the driver specified by This.
PS2GetDriverName | Retrieves a Unicode string that is the user readable name of the EFI Driver. Parameters: EFI_COMPONENT_NAME_PROTOCOL This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance. CHAR8 Language - A pointer to a three character ISO 639-2 language identifier. This is the language of the driver name that that the caller is requesting, and it must match one of the languages specified in SupportedLanguages. The number of languages supported by a driver is up to the driver writer. CHAR16 DriverName - A pointer to the Unicode string to return. This Unicode string is the name of the driver specified by This in the language specified by Language.
Ps2KbdReset | Reset the Ps2 Keyboard by sending disabling and Enabling scanning.


Functions in Alphabetical Order

R

Function | Description
Read8042 | Sends the given command to KBC, reads and returns the acknowledgement byte returned from KBC. Parameters: UINT8 bCmd - Command to send to KBC
ReadAndProcessKey | PS2 keyboard keys processor, called from main PS2 dispatcher. It gets the key from KBC output buffer and calls HandleKBDData. Paremeters: void *Context - keyboard device pointer
ReadDevice | Sends the given command to KBD, reads and returns the acknowledgement byte returned from KBD. Parameters: UINT8 bCmd - Command to send to KBC UINT8 *Data - Pointer to data buffer UINT8 Response - Response expected
ReadDeviceM | Sends the given command to KBD, reads and returns the acknowledgement byte returned from KBD. Parameters: UINT8 bCmd - Command to send to KBC UINT8 *Data - Pointer to data buffer UINT8 Response - Response expected
RegisterHotKey | This is HotKey protocol API implementation function. It registers the "extended" key function. Parameters: KEY_ASSOCIATION *HotKey - Key code to register BOOLEAN ReplaceExisting - a rule that tells whether or not we will replace the existing function; this parameter will not be considered in case the function for a given key is not assigned yet. Output : EFI_SUCCESS if function is successfully registered EFI_OUT_OF_RESOURCES if we already have reached MAX_HOTKEYS registered functions and we are not replacing the existing one EFI_ACCESS_DENIED if requested key has been already assigned, can be returned only when ReplaceExisting is FALSE
RegisterKeyNotify | Register the callback function for the specific Key
ResetSystem | This routine performs a warm boot of the system Parameters: VOID *Context - Pointer to context


Functions in Alphabetical Order

S

Function | Description
SetState | Set certain state for the input device. Paremeters: This - A pointer to the EFI_SIMPLE_TEXT_INPUT_PROTOCOL_EX instance. KeyToggleState - Pointer to the EFI_KEY_TOGGLE_STATE to set the state for the input device.
StartKeyboard | This routine is called from Driver Binding Start function, it starts the keyboard Paremeters: EFI_DRIVER_BINDING_PROTOCOL *This - A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance EFI_HANDLE Controller - Handle for this controller
StartMouse | This routine is called from Driver Binding Start function. It starts the mouse support Parameters: EFI_DRIVER_BINDING_PROTOCOL *This - Pointer to this instance of driver binding protocol structure EFI_HANDLE Controller - Handle for this driver
StartPollingKey | Get the keys from the keyboard controller Paremeters: IN EFI_EVENT Event event that has been signaled IN VOID *Context
StopKeyboard | This routine is called from Driver Binding Stop function. Paremeters: EFI_DRIVER_BINDING_PROTOCOL *This - A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance EFI_HANDLE Controller - Handle for this controller
StopMouse | This routine is called from Driver Binding Start function. It stops the mouse support Parameters: EFI_DRIVER_BINDING_PROTOCOL *This - Pointer to this instance of driver binding protocol structure EFI_HANDLE Controller - Handle for this driver


Functions in Alphabetical Order

U

Function | Description
UnregisterHotKeys | This is HotKey protocol API implementation function. It unregisters all "extended" key functions. Parameters: None
UnRegisterKeyNotify | Unregister the callback function
UpdateSioVariableForKeyboardMouse | Update the SIO variable in the ACPI name space depend on the Ps2keyboard and Mouse Present state. Parameters: None
UpdateVariabletoCheckBda | This function updates variable Legacy BIOS Protocol found,to check BDA for pending keys in EFI.


Functions in Alphabetical Order

W

Function | Description
Write8042CommandByte | Writes CCB to KBC Parameters: UINT8 bCCB - Command byte to send to KBC
WriteKeyboardCommand | Writes command to KBC. Parameters: UINT8 bCmd - Command to send to KBC
WriteKeyboardData | Writes data to KBC. Parameters: UINT8 bCmd - Data to send to KBC


General Information