TianoCore EDK2 master
Loading...
Searching...
No Matches
Ps2Mouse.c
Go to the documentation of this file.
1
10#include "Ps2Mouse.h"
11#include "CommPs2.h"
12
20 0xa,
21 NULL,
22 NULL
23};
24
40EFIAPI
43 IN EFI_HANDLE Controller,
44 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
45 )
46{
47 EFI_STATUS Status;
49 EFI_DEVICE_PATH_PROTOCOL *DevicePath;
51
52 //
53 // Check whether the controller is keyboard.
54 //
55 Status = gBS->OpenProtocol (
56 Controller,
57 &gEfiDevicePathProtocolGuid,
58 (VOID **)&DevicePath,
59 This->DriverBindingHandle,
60 Controller,
61 EFI_OPEN_PROTOCOL_GET_PROTOCOL
62 );
63 if (EFI_ERROR (Status)) {
64 return Status;
65 }
66
67 do {
68 Acpi = (ACPI_HID_DEVICE_PATH *)DevicePath;
69 DevicePath = NextDevicePathNode (DevicePath);
70 } while (!IsDevicePathEnd (DevicePath));
71
72 if ((DevicePathType (Acpi) != ACPI_DEVICE_PATH) ||
74 {
75 return EFI_UNSUPPORTED;
76 }
77
78 switch (Acpi->HID) {
79 case EISA_PNP_ID (0xF03):
80 //
81 // Microsoft PS/2 style mouse
82 //
83 case EISA_PNP_ID (0xF13):
84 //
85 // PS/2 Port for PS/2-style Mice
86 //
87 break;
88
89 case EISA_PNP_ID (0x303):
90 //
91 // IBM Enhanced (101/102-key, PS/2 mouse support)
92 //
93 if (Acpi->UID == 1) {
94 break;
95 }
96
97 default:
98 return EFI_UNSUPPORTED;
99 break;
100 }
101
102 //
103 // Open the IO Abstraction(s) needed to perform the supported test
104 //
105 Status = gBS->OpenProtocol (
106 Controller,
107 &gEfiSioProtocolGuid,
108 (VOID **)&Sio,
109 This->DriverBindingHandle,
110 Controller,
111 EFI_OPEN_PROTOCOL_BY_DRIVER
112 );
113 if (EFI_ERROR (Status)) {
114 return Status;
115 }
116
117 //
118 // Close the I/O Abstraction(s) used to perform the supported test
119 //
120 gBS->CloseProtocol (
121 Controller,
122 &gEfiSioProtocolGuid,
123 This->DriverBindingHandle,
124 Controller
125 );
126
127 return Status;
128}
129
145EFIAPI
148 IN EFI_HANDLE Controller,
149 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
150 )
151{
152 EFI_STATUS Status;
153 EFI_STATUS EmptyStatus;
154 EFI_SIO_PROTOCOL *Sio;
155 PS2_MOUSE_DEV *MouseDev;
156 UINT8 Data;
157 EFI_TPL OldTpl;
158 EFI_STATUS_CODE_VALUE StatusCode;
159 EFI_DEVICE_PATH_PROTOCOL *DevicePath;
160
161 StatusCode = 0;
162
163 //
164 // Open the device path protocol
165 //
166 Status = gBS->OpenProtocol (
167 Controller,
168 &gEfiDevicePathProtocolGuid,
169 (VOID **)&DevicePath,
170 This->DriverBindingHandle,
171 Controller,
172 EFI_OPEN_PROTOCOL_GET_PROTOCOL
173 );
174 if (EFI_ERROR (Status)) {
175 return Status;
176 }
177
178 //
179 // Report that the keyboard is being enabled
180 //
183 EFI_PERIPHERAL_MOUSE | EFI_P_PC_ENABLE,
184 DevicePath
185 );
186
187 //
188 // Get the ISA I/O Protocol on Controller's handle
189 //
190 Status = gBS->OpenProtocol (
191 Controller,
192 &gEfiSioProtocolGuid,
193 (VOID **)&Sio,
194 This->DriverBindingHandle,
195 Controller,
196 EFI_OPEN_PROTOCOL_BY_DRIVER
197 );
198 if (EFI_ERROR (Status)) {
199 return Status;
200 }
201
202 //
203 // Raise TPL to avoid keyboard operation impact
204 //
205 OldTpl = gBS->RaiseTPL (TPL_NOTIFY);
206
207 //
208 // Allocate private data
209 //
210 MouseDev = AllocateZeroPool (sizeof (PS2_MOUSE_DEV));
211 if (MouseDev == NULL) {
212 Status = EFI_OUT_OF_RESOURCES;
213 goto ErrorExit;
214 }
215
216 //
217 // Setup the device instance
218 //
219 MouseDev->Signature = PS2_MOUSE_DEV_SIGNATURE;
220 MouseDev->Handle = Controller;
221 MouseDev->SampleRate = SampleRate20;
222 MouseDev->Resolution = MouseResolution4;
223 MouseDev->Scaling = Scaling1;
224 MouseDev->DataPackageSize = 3;
225 MouseDev->DevicePath = DevicePath;
226
227 //
228 // Resolution = 4 counts/mm
229 //
230 MouseDev->Mode.ResolutionX = 4;
231 MouseDev->Mode.ResolutionY = 4;
232 MouseDev->Mode.LeftButton = TRUE;
233 MouseDev->Mode.RightButton = TRUE;
234
235 MouseDev->SimplePointerProtocol.Reset = MouseReset;
236 MouseDev->SimplePointerProtocol.GetState = MouseGetState;
237 MouseDev->SimplePointerProtocol.Mode = &(MouseDev->Mode);
238
239 //
240 // Initialize keyboard controller if necessary
241 //
244 EFI_PERIPHERAL_MOUSE | EFI_P_MOUSE_PC_SELF_TEST,
245 DevicePath
246 );
247
248 Data = IoRead8 (KBC_CMD_STS_PORT);
249 //
250 // Fix for random hangs in System waiting for the Key if no KBC is present in BIOS.
251 //
252 if ((Data & (KBC_PARE | KBC_TIM)) == (KBC_PARE | KBC_TIM)) {
253 //
254 // If nobody decodes KBC I/O port, it will read back as 0xFF.
255 // Check the Time-Out and Parity bit to see if it has an active KBC in system
256 //
257 Status = EFI_DEVICE_ERROR;
258 StatusCode = EFI_PERIPHERAL_MOUSE | EFI_P_EC_NOT_DETECTED;
259 goto ErrorExit;
260 }
261
262 if ((Data & KBC_SYSF) != KBC_SYSF) {
263 Status = KbcSelfTest ();
264 if (EFI_ERROR (Status)) {
265 StatusCode = EFI_PERIPHERAL_MOUSE | EFI_P_EC_CONTROLLER_ERROR;
266 goto ErrorExit;
267 }
268 }
269
270 KbcEnableAux ();
271
274 EFI_PERIPHERAL_MOUSE | EFI_P_PC_PRESENCE_DETECT,
275 DevicePath
276 );
277
278 //
279 // Reset the mouse
280 //
281 Status = MouseDev->SimplePointerProtocol.Reset (
282 &MouseDev->SimplePointerProtocol,
283 FeaturePcdGet (PcdPs2MouseExtendedVerification)
284 );
285 if (EFI_ERROR (Status)) {
286 //
287 // mouse not connected
288 //
289 Status = EFI_SUCCESS;
290 StatusCode = EFI_PERIPHERAL_MOUSE | EFI_P_EC_NOT_DETECTED;
291 goto ErrorExit;
292 }
293
296 EFI_PERIPHERAL_MOUSE | EFI_P_PC_DETECTED,
297 DevicePath
298 );
299
300 //
301 // Setup the WaitForKey event
302 //
303 Status = gBS->CreateEvent (
304 EVT_NOTIFY_WAIT,
305 TPL_NOTIFY,
307 MouseDev,
308 &((MouseDev->SimplePointerProtocol).WaitForInput)
309 );
310 if (EFI_ERROR (Status)) {
311 Status = EFI_OUT_OF_RESOURCES;
312 goto ErrorExit;
313 }
314
315 //
316 // Setup a periodic timer, used to poll mouse state
317 //
318 Status = gBS->CreateEvent (
319 EVT_TIMER | EVT_NOTIFY_SIGNAL,
320 TPL_NOTIFY,
321 PollMouse,
322 MouseDev,
323 &MouseDev->TimerEvent
324 );
325 if (EFI_ERROR (Status)) {
326 Status = EFI_OUT_OF_RESOURCES;
327 goto ErrorExit;
328 }
329
330 //
331 // Start timer to poll mouse (100 samples per second)
332 //
333 Status = gBS->SetTimer (MouseDev->TimerEvent, TimerPeriodic, 100000);
334 if (EFI_ERROR (Status)) {
335 Status = EFI_OUT_OF_RESOURCES;
336 goto ErrorExit;
337 }
338
339 MouseDev->ControllerNameTable = NULL;
341 "eng",
342 gPs2MouseComponentName.SupportedLanguages,
343 &MouseDev->ControllerNameTable,
344 L"PS/2 Mouse Device",
345 TRUE
346 );
348 "en",
349 gPs2MouseComponentName2.SupportedLanguages,
350 &MouseDev->ControllerNameTable,
351 L"PS/2 Mouse Device",
352 FALSE
353 );
354
355 //
356 // Install protocol interfaces for the mouse device.
357 //
358 Status = gBS->InstallMultipleProtocolInterfaces (
359 &Controller,
360 &gEfiSimplePointerProtocolGuid,
361 &MouseDev->SimplePointerProtocol,
362 NULL
363 );
364 if (EFI_ERROR (Status)) {
365 goto ErrorExit;
366 }
367
368 gBS->RestoreTPL (OldTpl);
369
370 return Status;
371
372ErrorExit:
373
374 if (Status != EFI_DEVICE_ERROR) {
375 KbcDisableAux ();
376 }
377
378 if (StatusCode != 0) {
380 EFI_ERROR_CODE | EFI_ERROR_MINOR,
381 StatusCode,
382 DevicePath
383 );
384 }
385
386 if ((MouseDev != NULL) && (MouseDev->SimplePointerProtocol.WaitForInput != NULL)) {
387 gBS->CloseEvent (MouseDev->SimplePointerProtocol.WaitForInput);
388 }
389
390 if ((MouseDev != NULL) && (MouseDev->TimerEvent != NULL)) {
391 gBS->CloseEvent (MouseDev->TimerEvent);
392 }
393
394 if ((MouseDev != NULL) && (MouseDev->ControllerNameTable != NULL)) {
395 FreeUnicodeStringTable (MouseDev->ControllerNameTable);
396 }
397
398 if (Status != EFI_DEVICE_ERROR) {
399 //
400 // Since there will be no timer handler for mouse input any more,
401 // exhaust input data just in case there is still mouse data left
402 //
403 EmptyStatus = EFI_SUCCESS;
404 while (!EFI_ERROR (EmptyStatus)) {
405 EmptyStatus = In8042Data (&Data);
406 }
407 }
408
409 if (MouseDev != NULL) {
410 FreePool (MouseDev);
411 }
412
413 gBS->CloseProtocol (
414 Controller,
415 &gEfiDevicePathProtocolGuid,
416 This->DriverBindingHandle,
417 Controller
418 );
419
420 gBS->CloseProtocol (
421 Controller,
422 &gEfiSioProtocolGuid,
423 This->DriverBindingHandle,
424 Controller
425 );
426
427 gBS->RestoreTPL (OldTpl);
428
429 return Status;
430}
431
447EFIAPI
450 IN EFI_HANDLE Controller,
451 IN UINTN NumberOfChildren,
452 IN EFI_HANDLE *ChildHandleBuffer
453 )
454{
455 EFI_STATUS Status;
456 EFI_SIMPLE_POINTER_PROTOCOL *SimplePointerProtocol;
457 PS2_MOUSE_DEV *MouseDev;
458 UINT8 Data;
459
460 Status = gBS->OpenProtocol (
461 Controller,
462 &gEfiSimplePointerProtocolGuid,
463 (VOID **)&SimplePointerProtocol,
464 This->DriverBindingHandle,
465 Controller,
466 EFI_OPEN_PROTOCOL_GET_PROTOCOL
467 );
468 if (EFI_ERROR (Status)) {
469 return EFI_SUCCESS;
470 }
471
472 MouseDev = PS2_MOUSE_DEV_FROM_THIS (SimplePointerProtocol);
473
474 //
475 // Report that the keyboard is being disabled
476 //
479 EFI_PERIPHERAL_MOUSE | EFI_P_PC_DISABLE,
480 MouseDev->DevicePath
481 );
482
483 Status = gBS->UninstallProtocolInterface (
484 Controller,
485 &gEfiSimplePointerProtocolGuid,
486 &MouseDev->SimplePointerProtocol
487 );
488 if (EFI_ERROR (Status)) {
489 return Status;
490 }
491
492 //
493 // Cancel mouse data polling timer, close timer event
494 //
495 gBS->SetTimer (MouseDev->TimerEvent, TimerCancel, 0);
496 gBS->CloseEvent (MouseDev->TimerEvent);
497
498 //
499 // Since there will be no timer handler for mouse input any more,
500 // exhaust input data just in case there is still mouse data left
501 //
502 Status = EFI_SUCCESS;
503 while (!EFI_ERROR (Status)) {
504 Status = In8042Data (&Data);
505 }
506
507 gBS->CloseEvent (MouseDev->SimplePointerProtocol.WaitForInput);
508 FreeUnicodeStringTable (MouseDev->ControllerNameTable);
509 FreePool (MouseDev);
510
511 gBS->CloseProtocol (
512 Controller,
513 &gEfiDevicePathProtocolGuid,
514 This->DriverBindingHandle,
515 Controller
516 );
517
518 gBS->CloseProtocol (
519 Controller,
520 &gEfiSioProtocolGuid,
521 This->DriverBindingHandle,
522 Controller
523 );
524
525 return EFI_SUCCESS;
526}
527
541EFIAPI
544 IN BOOLEAN ExtendedVerification
545 )
546{
547 EFI_STATUS Status;
548 PS2_MOUSE_DEV *MouseDev;
549 EFI_TPL OldTpl;
550 BOOLEAN KeyboardEnable;
551 UINT8 Data;
552
553 MouseDev = PS2_MOUSE_DEV_FROM_THIS (This);
554
555 //
556 // Report reset progress code
557 //
560 EFI_PERIPHERAL_MOUSE | EFI_P_PC_RESET,
561 MouseDev->DevicePath
562 );
563
564 KeyboardEnable = FALSE;
565
566 //
567 // Raise TPL to avoid keyboard operation impact
568 //
569 OldTpl = gBS->RaiseTPL (TPL_NOTIFY);
570
571 ZeroMem (&MouseDev->State, sizeof (EFI_SIMPLE_POINTER_STATE));
572 MouseDev->StateChanged = FALSE;
573
574 //
575 // Exhaust input data
576 //
577 Status = EFI_SUCCESS;
578 while (!EFI_ERROR (Status)) {
579 Status = In8042Data (&Data);
580 }
581
582 CheckKbStatus (&KeyboardEnable);
583
584 KbcDisableKb ();
585
586 //
587 // if there's data block on KBC data port, read it out
588 //
589 if ((IoRead8 (KBC_CMD_STS_PORT) & KBC_OUTB) == KBC_OUTB) {
590 IoRead8 (KBC_DATA_PORT);
591 }
592
593 Status = EFI_SUCCESS;
594 //
595 // The PS2 mouse driver reset behavior is always successfully return no matter whether or not there is mouse connected to system.
596 // This behavior is needed by performance speed. The following mouse command only successfully finish when mouse device is
597 // connected to system, so if PS2 mouse device not connect to system or user not ask for, we skip the mouse configuration and enabling
598 //
599 if (ExtendedVerification && CheckMouseConnect (MouseDev)) {
600 //
601 // Send mouse reset command and set mouse default configure
602 //
603 Status = PS2MouseReset ();
604 if (EFI_ERROR (Status)) {
605 Status = EFI_DEVICE_ERROR;
606 goto Exit;
607 }
608
609 Status = PS2MouseSetSampleRate (MouseDev->SampleRate);
610 if (EFI_ERROR (Status)) {
611 Status = EFI_DEVICE_ERROR;
612 goto Exit;
613 }
614
615 Status = PS2MouseSetResolution (MouseDev->Resolution);
616 if (EFI_ERROR (Status)) {
617 Status = EFI_DEVICE_ERROR;
618 goto Exit;
619 }
620
621 Status = PS2MouseSetScaling (MouseDev->Scaling);
622 if (EFI_ERROR (Status)) {
623 Status = EFI_DEVICE_ERROR;
624 goto Exit;
625 }
626
627 Status = PS2MouseEnable ();
628 if (EFI_ERROR (Status)) {
629 Status = EFI_DEVICE_ERROR;
630 goto Exit;
631 }
632 }
633
634Exit:
635 gBS->RestoreTPL (OldTpl);
636
637 if (KeyboardEnable) {
638 KbcEnableKb ();
639 }
640
641 return Status;
642}
643
653BOOLEAN
655 IN PS2_MOUSE_DEV *MouseDev
656 )
657
658{
659 EFI_STATUS Status;
660
661 Status = PS2MouseEnable ();
662 if (!EFI_ERROR (Status)) {
663 return TRUE;
664 }
665
666 return FALSE;
667}
668
680EFIAPI
684 )
685{
686 PS2_MOUSE_DEV *MouseDev;
687 EFI_TPL OldTpl;
688
689 MouseDev = PS2_MOUSE_DEV_FROM_THIS (This);
690
691 if (State == NULL) {
692 return EFI_INVALID_PARAMETER;
693 }
694
695 if (!MouseDev->StateChanged) {
696 return EFI_NOT_READY;
697 }
698
699 OldTpl = gBS->RaiseTPL (TPL_NOTIFY);
700 CopyMem (State, &(MouseDev->State), sizeof (EFI_SIMPLE_POINTER_STATE));
701
702 //
703 // clear mouse state
704 //
705 MouseDev->State.RelativeMovementX = 0;
706 MouseDev->State.RelativeMovementY = 0;
707 MouseDev->State.RelativeMovementZ = 0;
708 MouseDev->StateChanged = FALSE;
709 gBS->RestoreTPL (OldTpl);
710
711 return EFI_SUCCESS;
712}
713
723VOID
724EFIAPI
726 IN EFI_EVENT Event,
727 IN VOID *Context
728 )
729{
730 PS2_MOUSE_DEV *MouseDev;
731
732 MouseDev = (PS2_MOUSE_DEV *)Context;
733
734 //
735 // Someone is waiting on the mouse event, if there's
736 // input from mouse, signal the event
737 //
738 if (MouseDev->StateChanged) {
739 gBS->SignalEvent (Event);
740 }
741}
742
751VOID
752EFIAPI
754 IN EFI_EVENT Event,
755 IN VOID *Context
756 )
757
758{
759 PS2_MOUSE_DEV *MouseDev;
760
761 MouseDev = (PS2_MOUSE_DEV *)Context;
762
763 //
764 // Polling mouse packet data
765 //
766 PS2MouseGetPacket (MouseDev);
767}
768
780EFIAPI
782 IN EFI_HANDLE ImageHandle,
783 IN EFI_SYSTEM_TABLE *SystemTable
784 )
785{
786 EFI_STATUS Status;
787
788 //
789 // Install driver model protocol(s).
790 //
792 ImageHandle,
793 SystemTable,
795 ImageHandle,
796 &gPs2MouseComponentName,
797 &gPs2MouseComponentName2
798 );
799 ASSERT_EFI_ERROR (Status);
800
801 return Status;
802}
UINT64 UINTN
VOID *EFIAPI CopyMem(OUT VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
VOID *EFIAPI ZeroMem(OUT VOID *Buffer, IN UINTN Length)
EFI_STATUS PS2MouseReset(VOID)
Definition: CommPs2.c:191
EFI_STATUS CheckKbStatus(OUT BOOLEAN *KeyboardEnable)
Definition: CommPs2.c:153
EFI_STATUS PS2MouseSetResolution(IN MOUSE_RE Resolution)
Definition: CommPs2.c:265
EFI_STATUS In8042Data(IN OUT UINT8 *Data)
Definition: CommPs2.c:582
EFI_STATUS KbcEnableAux(VOID)
Definition: CommPs2.c:83
EFI_STATUS PS2MouseSetSampleRate(IN MOUSE_SR SampleRate)
Definition: CommPs2.c:238
EFI_STATUS PS2MouseSetScaling(IN MOUSE_SF Scaling)
Definition: CommPs2.c:292
EFI_STATUS PS2MouseEnable(VOID)
Definition: CommPs2.c:308
EFI_STATUS PS2MouseGetPacket(PS2_MOUSE_DEV *MouseDev)
Definition: CommPs2.c:328
EFI_STATUS KbcDisableAux(VOID)
Definition: CommPs2.c:101
EFI_STATUS KbcSelfTest(VOID)
Definition: CommPs2.c:23
EFI_STATUS KbcDisableKb(VOID)
Definition: CommPs2.c:135
EFI_STATUS KbcEnableKb(VOID)
Definition: CommPs2.c:119
#define KBC_OUTB
Definition: CommPs2.h:117
#define KBC_SYSF
Definition: CommPs2.h:105
#define ACPI_DEVICE_PATH
Definition: DevicePath.h:190
#define ACPI_DP
Definition: DevicePath.h:195
#define ACPI_EXTENDED_DP
Definition: DevicePath.h:217
UINT8 EFIAPI DevicePathType(IN CONST VOID *Node)
UINT8 EFIAPI DevicePathSubType(IN CONST VOID *Node)
BOOLEAN EFIAPI IsDevicePathEnd(IN CONST VOID *Node)
EFI_DEVICE_PATH_PROTOCOL *EFIAPI NextDevicePathNode(IN CONST VOID *Node)
VOID *EFIAPI AllocateZeroPool(IN UINTN AllocationSize)
VOID EFIAPI FreePool(IN VOID *Buffer)
UINT8 EFIAPI IoRead8(IN UINTN Port)
Definition: IoLibArmVirt.c:175
#define NULL
Definition: Base.h:319
#define TRUE
Definition: Base.h:301
#define FALSE
Definition: Base.h:307
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
#define ASSERT_EFI_ERROR(StatusParameter)
Definition: DebugLib.h:462
#define REPORT_STATUS_CODE_WITH_DEVICE_PATH(Type, Value, DevicePathParameter)
#define FeaturePcdGet(TokenName)
Definition: PcdLib.h:50
UINT32 EFI_STATUS_CODE_VALUE
Definition: PiStatusCode.h:67
#define EFI_ERROR_MINOR
Definition: PiStatusCode.h:58
#define EFI_PROGRESS_CODE
Definition: PiStatusCode.h:43
#define EFI_P_MOUSE_PC_SELF_TEST
Definition: PiStatusCode.h:400
EFI_STATUS EFIAPI MouseGetState(IN EFI_SIMPLE_POINTER_PROTOCOL *This, IN OUT EFI_SIMPLE_POINTER_STATE *State)
Definition: Ps2Mouse.c:681
EFI_STATUS EFIAPI PS2MouseDriverStop(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE Controller, IN UINTN NumberOfChildren, IN EFI_HANDLE *ChildHandleBuffer)
Definition: Ps2Mouse.c:448
EFI_STATUS EFIAPI PS2MouseDriverSupported(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE Controller, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath)
Definition: Ps2Mouse.c:41
EFI_STATUS EFIAPI InitializePs2Mouse(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
Definition: Ps2Mouse.c:781
EFI_DRIVER_BINDING_PROTOCOL gPS2MouseDriver
Definition: Ps2Mouse.c:16
EFI_STATUS EFIAPI MouseReset(IN EFI_SIMPLE_POINTER_PROTOCOL *This, IN BOOLEAN ExtendedVerification)
Definition: Ps2Mouse.c:542
EFI_STATUS EFIAPI PS2MouseDriverStart(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE Controller, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath)
Definition: Ps2Mouse.c:146
VOID EFIAPI MouseWaitForInput(IN EFI_EVENT Event, IN VOID *Context)
Definition: Ps2Mouse.c:725
BOOLEAN CheckMouseConnect(IN PS2_MOUSE_DEV *MouseDev)
Definition: Ps2Mouse.c:654
VOID EFIAPI PollMouse(IN EFI_EVENT Event, IN VOID *Context)
Definition: Ps2Mouse.c:753
VOID EFIAPI Exit(IN EFI_STATUS Status)
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
VOID * EFI_EVENT
Definition: UefiBaseType.h:37
UINTN EFI_TPL
Definition: UefiBaseType.h:41
VOID * EFI_HANDLE
Definition: UefiBaseType.h:33
#define EFI_SUCCESS
Definition: UefiBaseType.h:112
EFI_BOOT_SERVICES * gBS
EFI_STATUS EFIAPI AddUnicodeString2(IN CONST CHAR8 *Language, IN CONST CHAR8 *SupportedLanguages, IN OUT EFI_UNICODE_STRING_TABLE **UnicodeStringTable, IN CONST CHAR16 *UnicodeString, IN BOOLEAN Iso639Language)
Definition: UefiLib.c:1087
EFI_STATUS EFIAPI EfiLibInstallDriverBindingComponentName2(IN CONST EFI_HANDLE ImageHandle, IN CONST EFI_SYSTEM_TABLE *SystemTable, IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding, IN EFI_HANDLE DriverBindingHandle, IN CONST EFI_COMPONENT_NAME_PROTOCOL *ComponentName OPTIONAL, IN CONST EFI_COMPONENT_NAME2_PROTOCOL *ComponentName2 OPTIONAL)
EFI_STATUS EFIAPI FreeUnicodeStringTable(IN EFI_UNICODE_STRING_TABLE *UnicodeStringTable)
Definition: UefiLib.c:1257
@ TimerCancel
Definition: UefiSpec.h:531
@ TimerPeriodic
Definition: UefiSpec.h:535
EFI_SIMPLE_POINTER_MODE * Mode