14#define PS2_PACKET_LENGTH 3
15#define PS2_SYNC_MASK 0xc
16#define PS2_SYNC_BYTE 0x8
18#define IS_PS2_SYNC_BYTE(byte) ((byte & PS2_SYNC_MASK) == PS2_SYNC_BYTE)
20#define PS2_READ_BYTE_ONE 0
21#define PS2_READ_DATA_BYTE 1
22#define PS2_PROCESS_PACKET 2
25#define BAT_TIMEOUT 500000
30#define KBC_DATA_PORT 0x60
31#define KBC_CMD_STS_PORT 0x64
36#define READ_CMD_BYTE 0x20
37#define WRITE_CMD_BYTE 0x60
38#define DISABLE_AUX 0xa7
39#define ENABLE_AUX 0xa8
41#define DISABLE_KB 0xad
43#define WRITE_AUX_DEV 0xd4
45#define CMD_SYS_FLAG 0x04
46#define CMD_KB_STS 0x10
47#define CMD_KB_DIS 0x10
53#define SETSF1_CMD 0xe6
54#define SETSF2_CMD 0xe7
59#define ENABLE_CMD 0xf4
60#define DISABLE_CMD 0xf5
67#define PS2_RESEND 0xfe
68#define PS2MOUSE_BAT1 0xaa
69#define PS2MOUSE_BAT2 0x0
179 OUT BOOLEAN *KeyboardEnable
201 IN MOUSE_SR SampleRate
213 IN MOUSE_RE Resolution
EFI_STATUS PS2MouseReset(VOID)
EFI_STATUS In8042AuxData(IN OUT UINT8 *Data)
EFI_STATUS CheckKbStatus(OUT BOOLEAN *KeyboardEnable)
EFI_STATUS PS2MouseSetResolution(IN MOUSE_RE Resolution)
EFI_STATUS Out8042AuxCommand(IN UINT8 Command, IN BOOLEAN Resend)
EFI_STATUS Out8042Data(IN UINT8 Data)
EFI_STATUS Out8042AuxData(IN UINT8 Data)
EFI_STATUS PS2MouseRead(OUT UINT8 *Buffer, IN OUT UINTN *BufSize, IN UINTN State)
EFI_STATUS In8042Data(IN OUT UINT8 *Data)
EFI_STATUS KbcEnableAux(VOID)
EFI_STATUS CheckForInput(VOID)
EFI_STATUS PS2MouseSetSampleRate(IN MOUSE_SR SampleRate)
EFI_STATUS PS2MouseSetScaling(IN MOUSE_SF Scaling)
EFI_STATUS PS2MouseEnable(VOID)
EFI_STATUS PS2MouseGetPacket(PS2_MOUSE_DEV *MouseDev)
EFI_STATUS WaitInputEmpty(IN UINTN Timeout)
EFI_STATUS KbcDisableAux(VOID)
EFI_STATUS KbcSelfTest(VOID)
EFI_STATUS WaitOutputFull(IN UINTN Timeout)
EFI_STATUS KbcDisableKb(VOID)
EFI_STATUS KbcEnableKb(VOID)
EFI_STATUS Out8042Command(IN UINT8 Command)