#include <Library/MemoryAllocationLib.h>\r
#include <Library/PcdLib.h>\r
#include <Library/UefiUsbLib.h>\r
-#include <Library/BaseLib.h>\r
-#include <Library/UefiUsbLib.h>\r
\r
#include <IndustryStandard/Usb.h>\r
\r
SCAN_F12, // EFI_FUNCTION_KEY_TWELVE_MODIFIER\r
};\r
\r
-EFI_GUID mKeyboardLayoutEventGuid = EFI_HII_SET_KEYBOARD_LAYOUT_EVENT_GUID;\r
-\r
/**\r
Initialize Key Convertion Table by using default keyboard layout.\r
\r
TPL_NOTIFY,\r
SetKeyboardLayoutEvent,\r
UsbKeyboardDevice,\r
- &mKeyboardLayoutEventGuid,\r
+ &gEfiHiiKeyBoardLayoutGuid,\r
&UsbKeyboardDevice->KeyboardLayoutEvent\r
);\r
if (EFI_ERROR (Status)) {\r
# USB Keyboard Driver that manages USB keyboard and produces Simple Text Input\r
# Protocol and Simple Text Input Ex Protocol.\r
#\r
+# USB Keyboard Driver consumes USB I/O Protocol and Device Path Protocol, and produces\r
+# Simple Text Input Protocol and Simple Text Input Ex Protocol on USB keyboard devices.\r
+# It initializes the keyboard layout according to info retrieved from HII database.\r
+# If HII cannot provide the info, this module uses its carried default one if PCD allows.\r
+# It manages the USB keyboard device via Asynchronous Interrupt Transfer of USB I/O Protocol,\r
+# and parses the data according to USB HID documents.\r
+# This module refers to following specifications:\r
+# 1. Universal Serial Bus HID Firmware Specification, ver 1.11\r
+# 2. Universal Serial Bus HID Usage Tables, ver 1.12\r
+# 3. UEFI Specification, v2.1\r
+#\r
# Copyright (c) 2006 - 2008, Intel Corporation. \r
#\r
# All rights reserved. This program and the accompanying materials\r
FILE_GUID = 2D2E62CF-9ECF-43b7-8219-94E7FC713DFE\r
MODULE_TYPE = UEFI_DRIVER\r
VERSION_STRING = 1.0\r
-\r
ENTRY_POINT = USBKeyboardDriverBindingEntryPoint\r
\r
#\r
MdePkg/MdePkg.dec\r
MdeModulePkg/MdeModulePkg.dec\r
\r
-\r
[LibraryClasses]\r
MemoryAllocationLib\r
UefiLib\r
DebugLib\r
PcdLib\r
UefiUsbLib\r
- BaseLib\r
+\r
+[Guids]\r
+ ##\r
+ # Event registered to EFI_HII_SET_KEYBOARD_LAYOUT_EVENT_GUID group,\r
+ # which will be triggered by EFI_HII_DATABASE_PROTOCOL.SetKeyboardLayout().\r
+ #\r
+ gEfiHiiKeyBoardLayoutGuid ## SOMETIME_CONSUMES ## Event\r
\r
[Protocols]\r
- gEfiUsbIoProtocolGuid # PROTOCOL TO_START\r
- gEfiDevicePathProtocolGuid # PROTOCOL TO_START\r
- gEfiSimpleTextInProtocolGuid # PROTOCOL BY_START\r
- gEfiSimpleTextInputExProtocolGuid # PROTOCOL BY_START\r
- gEfiHiiDatabaseProtocolGuid # PROTOCOL TO_START\r
- gSimpleTextInExNotifyGuid # PROTOCOL ALWAYS_CONSUMED\r
- gEfiHotPlugDeviceGuid # PROTOCOL ALWAYS_CONSUMED\r
+ gEfiUsbIoProtocolGuid ## TO_START\r
+ gEfiDevicePathProtocolGuid ## TO_START\r
+ gEfiSimpleTextInProtocolGuid ## BY_START\r
+ gEfiSimpleTextInputExProtocolGuid ## BY_START\r
+ gEfiHotPlugDeviceGuid ## BY_START\r
+ ##\r
+ # If HII Database Protocol exists, then keyboard layout from HII database is used.\r
+ # Otherwise, USB keyboard module tries to use its carried default layout.\r
+ #\r
+ gEfiHiiDatabaseProtocolGuid ## SOMETIMES_CONSUMES (Default value is used if it's absent.)\r
+ ##\r
+ # SimpleTextInExNotify is installed on the handle created by EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL.RegisterKeyNotify().\r
+ #\r
+ gSimpleTextInExNotifyGuid ## PRODUCES\r
\r
[FeaturePcd.common]\r
- gEfiMdeModulePkgTokenSpaceGuid.PcdDisableDefaultKeyboardLayoutInUsbKbDriver\r
+ gEfiMdeModulePkgTokenSpaceGuid.PcdDisableDefaultKeyboardLayoutInUsbKbDriver ## SOMETIME_CONSUMES (Checked when no layout is provided by HII.)\r
\r
[FixedPcd]\r
gEfiMdePkgTokenSpaceGuid.PcdStatusCodeValueKeyboardEnable\r
gEfiMdePkgTokenSpaceGuid.PcdStatusCodeValueKeyboardClearBuffer\r
gEfiMdePkgTokenSpaceGuid.PcdStatusCodeValueKeyboardSelfTest\r
gEfiMdePkgTokenSpaceGuid.PcdStatusCodeValueKeyboardInterfaceError\r
- gEfiMdePkgTokenSpaceGuid.PcdStatusCodeValueKeyboardInputError
\ No newline at end of file
+ gEfiMdePkgTokenSpaceGuid.PcdStatusCodeValueKeyboardInputError\r
+ \r
+\r
+# [Event]\r
+# ##\r
+# # Periodic timer event for generation of repeat key\r
+# #\r
+# EVENT_TYPE_PERIODIC_TIMER ## PRODUCES\r
+# ##\r
+# # Periodic timer event for delayed recovery, which deals with device error.\r
+# #\r
+# EVENT_TYPE_PERIODIC_TIMER ## PRODUCES\r
+# ##\r
+# # Event for EFI_SIMPLE_TEXT_INPUT_PROTOCOL.WaitForKey\r
+# #\r
+# EVENT_TYPE_NOTIFY_WAIT ## PRODUCES\r
+# ##\r
+# # Event for EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL.WaitForKeyEx\r
+# #\r
+# EVENT_TYPE_NOTIFY_WAIT ## PRODUCES\r
+#\r
+#\r
# The command set defines the command, data and result.\r
# The Bulk-Only-Transport and Control/Bulk/Interrupt transport are two transportation protocol.\r
# USB mass storage class adopts various industrial standard as its command set.\r
+# This module refers to following specifications:\r
+# 1. USB Mass Storage Specification for Bootability, Revision 1.0\r
+# 2. USB Mass Storage Class Control/Bulk/Interrupt (CBI) Transport, Revision 1.1\r
+# 3. USB Mass Storage Class Bulk-Only Transport, Revision 1.0.\r
+# 4. UEFI Specification, v2.1\r
#\r
# Copyright (c) 2006 - 2008, Intel Corporation. \r
#\r
FILE_GUID = 9FB4B4A7-42C0-4bcd-8540-9BCC6711F83E\r
MODULE_TYPE = UEFI_DRIVER\r
VERSION_STRING = 1.0\r
-\r
ENTRY_POINT = USBMassStorageEntryPoint\r
\r
#\r
\r
\r
[Protocols]\r
- gEfiUsbIoProtocolGuid # PROTOCOL TO_START\r
- gEfiDevicePathProtocolGuid # PROTOCOL TO_START\r
- gEfiBlockIoProtocolGuid # PROTOCOL BY_START\r
+ gEfiUsbIoProtocolGuid ## TO_START\r
+ gEfiDevicePathProtocolGuid ## TO_START\r
+ gEfiBlockIoProtocolGuid ## BY_START\r
\r
#/** @file\r
# USB Mouse Driver that manages USB mouse and produces Absolute Pointer Protocol.\r
#\r
+# USB Mouse Driver consumes USB I/O Protocol and Device Path Protocol, and produces\r
+# Absolute Pointer Protocol on USB mouse devices.\r
+# It manages the USB mouse device via Asynchronous Interrupt Transfer of USB I/O Protocol,\r
+# and parses the data according to USB HID Specification.\r
+# This module refers to following specifications:\r
+# 1. Universal Serial Bus HID Firmware Specification, ver 1.11\r
+# 2. UEFI Specification, v2.1\r
+#\r
# Copyright (c) 2006 - 2008, Intel Corporation. \r
#\r
# All rights reserved. This program and the accompanying materials\r
FILE_GUID = 4EA43463-747C-46eb-97FB-B0E5C5F05306\r
MODULE_TYPE = UEFI_DRIVER\r
VERSION_STRING = 1.0\r
-\r
ENTRY_POINT = USBMouseAbsolutePointerDriverBindingEntryPoint\r
\r
#\r
UefiUsbLib\r
\r
[Protocols]\r
- gEfiUsbIoProtocolGuid # PROTOCOL TO_START\r
- gEfiDevicePathProtocolGuid # PROTOCOL TO_START\r
- gEfiAbsolutePointerProtocolGuid # PROTOCOL BY_START\r
+ gEfiUsbIoProtocolGuid ## TO_START\r
+ gEfiDevicePathProtocolGuid ## TO_START\r
+ gEfiAbsolutePointerProtocolGuid ## BY_START\r
\r
[FixedPcd]\r
gEfiMdePkgTokenSpaceGuid.PcdStatusCodeValueMouseInterfaceError\r
gEfiMdePkgTokenSpaceGuid.PcdStatusCodeValueMouseInputError\r
gEfiMdePkgTokenSpaceGuid.PcdStatusCodeValueMouseReset\r
\r
+# [Event]\r
+# ##\r
+# # Periodic timer event for delayed recovery, which deals with device error.\r
+# #\r
+# EVENT_TYPE_PERIODIC_TIMER ## PRODUCES\r
+# ##\r
+# # Event for EFI_ABSOLUTE_POINTER_PROTOCOL.WaitForInput\r
+# #\r
+# EVENT_TYPE_NOTIFY_WAIT ## PRODUCES\r
+#\r
+#\r
\r
}\r
\r
/**\r
- Event notification function for SIMPLE_POINTER.WaitForInput event.\r
+ Event notification function for EFI_SIMPLE_POINTER_PROTOCOL.WaitForInput event.\r
\r
@param Event Event to be signaled when there's input from mouse.\r
@param Context Points to USB_MOUSE_DEV instance.\r
#/** @file\r
# USB Mouse Driver that manages USB mouse and produces Simple Pointer Protocol.\r
#\r
+# USB Mouse Driver consumes USB I/O Protocol and Device Path Protocol, and produces\r
+# Simple Pointer Protocol on USB mouse devices.\r
+# It manages the USB mouse device via Asynchronous Interrupt Transfer of USB I/O Protocol,\r
+# and parses the data according to USB HID Specification.\r
+# This module refers to following specifications:\r
+# 1. Universal Serial Bus HID Firmware Specification, ver 1.11\r
+# 2. UEFI Specification, v2.1\r
+#\r
# Copyright (c) 2006 - 2008, Intel Corporation. \r
#\r
# All rights reserved. This program and the accompanying materials\r
FILE_GUID = 2D2E62AA-9ECF-43b7-8219-94E7FC713DFE\r
MODULE_TYPE = UEFI_DRIVER\r
VERSION_STRING = 1.0\r
-\r
ENTRY_POINT = USBMouseDriverBindingEntryPoint\r
\r
#\r
UefiUsbLib\r
\r
[Protocols]\r
- gEfiUsbIoProtocolGuid # PROTOCOL TO_START\r
- gEfiDevicePathProtocolGuid # PROTOCOL TO_START\r
- gEfiSimplePointerProtocolGuid # PROTOCOL BY_START\r
+ gEfiUsbIoProtocolGuid ## TO_START\r
+ gEfiDevicePathProtocolGuid ## TO_START\r
+ gEfiSimplePointerProtocolGuid ## BY_START\r
\r
[FixedPcd]\r
gEfiMdePkgTokenSpaceGuid.PcdStatusCodeValueMouseInterfaceError\r
gEfiMdePkgTokenSpaceGuid.PcdStatusCodeValueMouseInputError\r
gEfiMdePkgTokenSpaceGuid.PcdStatusCodeValueMouseReset\r
\r
+# [Event]\r
+# ##\r
+# # Periodic timer event for delayed recovery, which deals with device error.\r
+# #\r
+# EVENT_TYPE_PERIODIC_TIMER ## PRODUCES\r
+# ##\r
+# # Event for EFI_SIMPLE_POINTER_PROTOCOL.WaitForInput\r
+# #\r
+# EVENT_TYPE_NOTIFY_WAIT ## PRODUCES\r
+#\r
+#\r
\r
#/** @file\r
-# Instance of Platform Driver Override Library.\r
+# Instance of Platform Driver Override Library to manage driver overriding relationship.\r
+#\r
+# This library instance provides functions to manage the database of overriding relationship\r
+# between controllers and drivers. Each entry of the database contains the mapping that Controller\r
+# Device Path to a set of Driver Device Paths. The database is stored in non-volatile variables.\r
#\r
# Copyright (c) 2007 - 2008, Intel Corporation. All rights reserved.\r
#\r
PrintLib\r
\r
[Guids]\r
- gEfiOverrideVariableGuid # ALWAYS_CONSUMED\r
+ ##\r
+ # There could be more than one variables, from PlatDriOver, PlatDriOver1, PlatDriOver2,...\r
+ #\r
+ gEfiOverrideVariableGuid ## CONSUMES ## Variable:L"PlatDriOver"\r
\r
[Protocols]\r
- gEfiFirmwareVolume2ProtocolGuid # PROTOCOL ALWAYS_CONSUMED\r
- gEfiLoadedImageProtocolGuid # PROTOCOL ALWAYS_CONSUMED\r
- gEfiBusSpecificDriverOverrideProtocolGuid # PROTOCOL ALWAYS_CONSUMED\r
- gEfiDriverBindingProtocolGuid # PROTOCOL ALWAYS_CONSUMED\r
- gEfiDevicePathProtocolGuid # PROTOCOL ALWAYS_CONSUMED\r
- gEfiLoadedImageDevicePathProtocolGuid # PROTOCOL ALWAYS_CONSUMED\r
+ gEfiFirmwareVolume2ProtocolGuid ## CONSUMES\r
+ gEfiLoadedImageProtocolGuid ## CONSUMES\r
+ gEfiBusSpecificDriverOverrideProtocolGuid ## CONSUMES\r
+ gEfiDriverBindingProtocolGuid ## CONSUMES\r
+ gEfiDevicePathProtocolGuid ## CONSUMES\r
+ gEfiLoadedImageDevicePathProtocolGuid ## CONSUMES\r
\r
\r
[Protocols]\r
- gEfiPrint2ProtocolGuid # PROTOCOL ALWAYS_CONSUMED\r
+ gEfiPrint2ProtocolGuid ## CONSUMES\r
\r
Device GUID on ControllerHandle.\r
\r
If this devcie is not one hot-plug devce, append its device path into the \r
- console environment variables ConOutDev, StdErrDev.\r
+ console environment variables ConOutDev, ErrOutDev.\r
\r
@param This Protocol instance pointer.\r
@param ControllerHandle Handle of device to bind driver to\r
}\r
//\r
// Check the device handle, if it is a hot plug device,\r
- // do not put the device path into ConOutDev and StdErrDev,\r
+ // do not put the device path into ConOutDev and ErrOutDev,\r
// and install gEfiConsoleOutDeviceGuid to the device handle directly.\r
// The policy is, make hot plug device plug in and play immediately.\r
//\r
APPEND\r
);\r
//\r
- // Then append the device path to the StdErrDev environment variable\r
+ // Then append the device path to the ErrOutDev environment variable\r
//\r
ConPlatformUpdateDeviceVariable (\r
L"ErrOutDev",\r
);\r
}\r
//\r
- // If the device path is successfully added to the StdErr environment variable,\r
+ // If the device path is successfully added to the ErrOut environment variable,\r
// then install EfiStandardErrorDeviceGuid onto ControllerHandle\r
//\r
Status = ConPlatformUpdateDeviceVariable (\r
EFI_DEVICE_PATH_PROTOCOL *DevicePath;\r
\r
//\r
- // If it is not a hot-plug device, first delete it from the ConOutDev and StdErrDev variable.\r
+ // If it is not a hot-plug device, first delete it from the ConOutDev and ErrOutDev variable.\r
//\r
if (!IsHotPlugDevice (This->DriverBindingHandle, ControllerHandle)) {\r
//\r
);\r
if (!EFI_ERROR (Status)) {\r
//\r
- // Remove DevicePath from ConOutDev, and StdErrDev\r
+ // Remove DevicePath from ConOutDev, and ErrOutDev\r
//\r
ConPlatformUpdateDeviceVariable (\r
L"ConOutDev",\r
}\r
\r
/**\r
- Get the necessary size of buffer and read the variabe.\r
+ Get the necessary size of buffer and read the variable.\r
\r
First get the necessary size of buffer. Then read the\r
EFI variable (Name) and return a dynamically allocated\r
Update console environment variables. \r
\r
@param VariableName Console environment variables, ConOutDev, ConInDev\r
- StdErrDev, ConIn or ConOut.\r
+ ErrOutDev, ConIn ,ConOut or ErrOut.\r
@param DevicePath Console devcie's device path.\r
@param Operation Variable operations, including APPEND, CHECK and DELETE.\r
\r
#/** @file\r
-# Console Platfrom DXE Driver, install Console protocols and updates environment variables.\r
+# Console Platfrom DXE Driver that specifies whether device can be used as console\r
+# input/output device or error output device and update global variables accordingly.\r
#\r
# Copyright (c) 2006 - 2008, Intel Corporation\r
#\r
DebugLib\r
\r
[Guids]\r
- gEfiGlobalVariableGuid ## SOMETIMES_CONSUMES ## Variable:L"ErrOut"\r
- gEfiStandardErrorDeviceGuid\r
- gEfiConsoleOutDeviceGuid\r
- gEfiConsoleInDeviceGuid\r
+ ##\r
+ # This is the VendorGuid of all architecturally defined variables in UEFI spec.\r
+ #\r
+ gEfiGlobalVariableGuid ## CONSUMES ## Variable:L"ConIn"\r
+ gEfiGlobalVariableGuid ## CONSUMES ## Variable:L"ConOut"\r
+ gEfiGlobalVariableGuid ## CONSUMES ## Variable:L"ErrOut"\r
+ gEfiGlobalVariableGuid ## CONSUMES ## Variable:L"ConInDev"\r
+ gEfiGlobalVariableGuid ## CONSUMES ## Variable:L"ConOutDev"\r
+ gEfiGlobalVariableGuid ## CONSUMES ## Variable:L"ErrOutDev"\r
+ ##\r
+ # This GUID is used to specify the device is the standard error device.\r
+ # If the device is a standard error device, this GUID as the protocol GUID will be installed\r
+ # onto this device handle.\r
+ #\r
+ gEfiStandardErrorDeviceGuid ## PROTOCOL\r
+ ##\r
+ # This GUID is used to specify the device is the console output device.\r
+ # If the device is a console output device, this GUID as the protocol GUID will be installed\r
+ # onto this device handle.\r
+ #\r
+ gEfiConsoleOutDeviceGuid ## PROTOCOL\r
+ ##\r
+ # This GUID is used to specify the device is the console input device.\r
+ # If the device is a console input device, this GUID as the protocol GUID will be installed\r
+ # onto this device handle.\r
+ #\r
+ gEfiConsoleInDeviceGuid ## PROTOCOL\r
\r
[Protocols]\r
gEfiDevicePathProtocolGuid ## TO_START\r
gEfiSimpleTextInProtocolGuid ## TO_START\r
gEfiSimpleTextOutProtocolGuid ## TO_START\r
- gEfiHotPlugDeviceGuid ## SOMETIMES_CONSUMES\r
+ gEfiHotPlugDeviceGuid ## SOMETIMES_CONSUMES (Used to check if it's a hot-plug device)\r
\ No newline at end of file
#/** @file\r
-# This PEIM provides memory test PPI for memory test in PEI Phase.\r
+# This PEIM provides Base Memory Test PPI for memory test in PEI Phase.\r
# \r
# Copyright (c) 2006 - 2008, Intel Corporation. <BR>\r
# All rights reserved. This program and the accompanying materials\r
PeiServicesLib\r
\r
[Ppis]\r
- gPeiBaseMemoryTestPpiGuid # PPI ALWAYS_PRODUCED\r
+ gPeiBaseMemoryTestPpiGuid ## PRODUCES\r
\r
[FixedPcd.common]\r
gEfiMdePkgTokenSpaceGuid.PcdStatusCodeValueMemoryTestStarted\r
DebugLib\r
\r
[Protocols]\r
- gEfiGenericMemTestProtocolGuid # PROTOCOL ALWAYS_PRODUCED\r
+ gEfiGenericMemTestProtocolGuid ## PRODUCES\r
\r
[Depex]\r
TRUE\r
#/** @file\r
-# This module produces the Metronome Architectural Protocol on top of an instance\r
-# of the Timer Library defined in the MdePkg.\r
+# This module produces the Metronome Architectural Protocol on top of Timer Library.\r
+#\r
+# This is a generic implementation of the Metronome Architectural Protocol that\r
+# layers on top of an instance of the Timer Library. The Timer Library provides\r
+# functions for nanosecond and microsecond delays. This generic implementation\r
+# produces a fixed TickPeriod of 100ns unit, and when the WaitForTick() service\r
+# is called, the number of ticks passed in is converted to either nanosecond or\r
+# microsecond units. If the number of ticks is small, then nanoseconds are used.\r
+# If the number of ticks is large, then microseconds are used. This prevents\r
+# overflows that could occur for long delays if only nanoseconds were used and also\r
+# provides the greatest accuracy for small delays. \r
#\r
# Copyright (c) 2008, Intel Corporation \r
# All rights reserved. This program and the accompanying materials \r
Metronome.h\r
\r
[Protocols]\r
- gEfiMetronomeArchProtocolGuid\r
+ gEfiMetronomeArchProtocolGuid ## PRODUCES\r
\r
[Depex]\r
TRUE\r
\r
\r
[Protocols]\r
- gEfiMonotonicCounterArchProtocolGuid # PROTOCOL ALWAYS_PRODUCED\r
+ gEfiMonotonicCounterArchProtocolGuid ## PRODUCES\r
\r
\r
[Depex]\r
gEfiVariableArchProtocolGuid AND gEfiVariableWriteArchProtocolGuid\r
\r
+\r
+# [Event]\r
+# ##\r
+# # This is a private event to update the Monotonic Counter's high part when low part overflows.\r
+# #\r
+# EVT_NOTIFY_SIGNAL ## PRODUCES\r
+#\r
+#
\ No newline at end of file
ReportStatusCodeLib\r
UefiDriverEntryPoint\r
DebugLib\r
+ PcdLib\r
\r
[Protocols]\r
- gEfiWatchdogTimerArchProtocolGuid # PROTOCOL ALWAYS_PRODUCED\r
+ gEfiWatchdogTimerArchProtocolGuid ## PRODUCES\r
\r
[FixedPcd.common]\r
gEfiMdePkgTokenSpaceGuid.PcdStatusCodeValueEfiWatchDogTimerExpired\r
[depex]\r
gEfiTimerArchProtocolGuid\r
\r
-
\ No newline at end of file
+# [Event]\r
+# ##\r
+# # Relative timer event set by EFI_WATCHDOG_TIMER_ARCH_PROTOCOL.SetTimerPeriod()\r
+# #\r
+# EVENT_TYPE_RELATIVE_TIMER ## PRODUCES\r
+#\r
+#
\ No newline at end of file