]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c
Patch to remove STATIC modifier. This is on longer recommended by EFI Framework codin...
[mirror_edk2.git] / MdeModulePkg / Universal / Console / ConSplitterDxe / ConSplitter.c
index 6e996c5fc2aa12d2fa53521f83d796b1acd60e2e..dacef61d45d59118961e6b160b99150574c15508 100644 (file)
@@ -30,9 +30,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include "ConSplitter.h"\r
 \r
 //\r
-// Global Variables\r
+// Template for Text In Splitter\r
 //\r
-STATIC TEXT_IN_SPLITTER_PRIVATE_DATA  mConIn = {\r
+TEXT_IN_SPLITTER_PRIVATE_DATA  mConIn = {\r
   TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE,\r
   (EFI_HANDLE) NULL,\r
   {\r
@@ -117,20 +117,29 @@ STATIC TEXT_IN_SPLITTER_PRIVATE_DATA  mConIn = {
   FALSE\r
 };\r
 \r
-GLOBAL_REMOVE_IF_UNREFERENCED EFI_UGA_DRAW_PROTOCOL gUgaDrawProtocolTemplate = {\r
+//\r
+// Template for Uga Draw Protocol\r
+//\r
+GLOBAL_REMOVE_IF_UNREFERENCED EFI_UGA_DRAW_PROTOCOL mUgaDrawProtocolTemplate = {\r
   ConSpliterUgaDrawGetMode,\r
   ConSpliterUgaDrawSetMode,\r
   ConSpliterUgaDrawBlt\r
 };\r
 \r
-GLOBAL_REMOVE_IF_UNREFERENCED EFI_GRAPHICS_OUTPUT_PROTOCOL gGraphicsOutputProtocolTemplate = {\r
+//\r
+// Template for Graphics Output Protocol\r
+//\r
+GLOBAL_REMOVE_IF_UNREFERENCED EFI_GRAPHICS_OUTPUT_PROTOCOL mGraphicsOutputProtocolTemplate = {\r
   ConSpliterGraphicsOutputQueryMode,\r
   ConSpliterGraphicsOutputSetMode,\r
   ConSpliterGraphicsOutputBlt,\r
   NULL\r
 };\r
 \r
-STATIC TEXT_OUT_SPLITTER_PRIVATE_DATA mConOut = {\r
+//\r
+// Template for Text Out Splitter\r
+//\r
+TEXT_OUT_SPLITTER_PRIVATE_DATA mConOut = {\r
   TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE,\r
   (EFI_HANDLE) NULL,\r
   {\r
@@ -194,7 +203,10 @@ STATIC TEXT_OUT_SPLITTER_PRIVATE_DATA mConOut = {
   (INT32 *) NULL\r
 };\r
 \r
-STATIC TEXT_OUT_SPLITTER_PRIVATE_DATA mStdErr = {\r
+//\r
+// Template for Standard Error Text Out Splitter\r
+//\r
+TEXT_OUT_SPLITTER_PRIVATE_DATA mStdErr = {\r
   TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE,\r
   (EFI_HANDLE) NULL,\r
   {\r
@@ -258,6 +270,9 @@ STATIC TEXT_OUT_SPLITTER_PRIVATE_DATA mStdErr = {
   (INT32 *) NULL\r
 };\r
 \r
+//\r
+// Driver binding instance for Console Input Device\r
+//\r
 EFI_DRIVER_BINDING_PROTOCOL           gConSplitterConInDriverBinding = {\r
   ConSplitterConInDriverBindingSupported,\r
   ConSplitterConInDriverBindingStart,\r
@@ -267,6 +282,9 @@ EFI_DRIVER_BINDING_PROTOCOL           gConSplitterConInDriverBinding = {
   NULL\r
 };\r
 \r
+//\r
+// Driver binding instance for Simple Pointer protocol\r
+//\r
 EFI_DRIVER_BINDING_PROTOCOL           gConSplitterSimplePointerDriverBinding = {\r
   ConSplitterSimplePointerDriverBindingSupported,\r
   ConSplitterSimplePointerDriverBindingStart,\r
@@ -288,6 +306,9 @@ EFI_DRIVER_BINDING_PROTOCOL           gConSplitterAbsolutePointerDriverBinding =
   NULL\r
 };\r
 \r
+//\r
+// Driver binding instance for Console Out device\r
+//\r
 EFI_DRIVER_BINDING_PROTOCOL           gConSplitterConOutDriverBinding = {\r
   ConSplitterConOutDriverBindingSupported,\r
   ConSplitterConOutDriverBindingStart,\r
@@ -297,6 +318,9 @@ EFI_DRIVER_BINDING_PROTOCOL           gConSplitterConOutDriverBinding = {
   NULL\r
 };\r
 \r
+//\r
+// Driver binding instance for Standard Error device\r
+//\r
 EFI_DRIVER_BINDING_PROTOCOL           gConSplitterStdErrDriverBinding = {\r
   ConSplitterStdErrDriverBindingSupported,\r
   ConSplitterStdErrDriverBindingStart,\r
@@ -309,6 +333,11 @@ EFI_DRIVER_BINDING_PROTOCOL           gConSplitterStdErrDriverBinding = {
 /**\r
   The user Entry Point for module ConSplitter. The user code starts with this function.\r
 \r
+  Installs driver module protocols and. Creates virtual device handles for ConIn,\r
+  ConOut, and StdErr. Installs Simple Text In protocol, Simple Text In Ex protocol,\r
+  Simple Pointer protocol, Absolute Pointer protocol on those virtual handlers. \r
+  Installs Graphics Output protocol and/or UGA Draw protocol if needed.\r
+\r
   @param[in] ImageHandle    The firmware allocated handle for the EFI image.\r
   @param[in] SystemTable    A pointer to the EFI System Table.\r
 \r
@@ -318,7 +347,7 @@ EFI_DRIVER_BINDING_PROTOCOL           gConSplitterStdErrDriverBinding = {
 **/\r
 EFI_STATUS\r
 EFIAPI\r
-InitializeConSplitter(\r
+ConSplitterDriverEntry(\r
   IN EFI_HANDLE           ImageHandle,\r
   IN EFI_SYSTEM_TABLE     *SystemTable\r
   )\r
@@ -379,36 +408,6 @@ InitializeConSplitter(
   ASSERT_EFI_ERROR (Status);\r
 \r
 \r
-  //\r
-  // Call the original Entry Point\r
-  //\r
-  Status = ConSplitterDriverEntry (ImageHandle, SystemTable);\r
-\r
-  return Status;\r
-}\r
-\r
-\r
-\r
-/**\r
-  Intialize a virtual console device to act as an agrigator of physical console\r
-  devices.\r
-\r
-  @param  ImageHandle              (Standard EFI Image entry -\r
-                                   EFI_IMAGE_ENTRY_POINT)\r
-  @param  SystemTable              (Standard EFI Image entry -\r
-                                   EFI_IMAGE_ENTRY_POINT)\r
- EFI_SUCCESS\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-ConSplitterDriverEntry (\r
-  IN EFI_HANDLE                       ImageHandle,\r
-  IN EFI_SYSTEM_TABLE                 *SystemTable\r
-  )\r
-{\r
-  EFI_STATUS  Status;\r
-\r
   ASSERT (FeaturePcdGet (PcdConOutGopSupport) ||\r
           FeaturePcdGet (PcdConOutUgaSupport));\r
   //\r
@@ -535,16 +534,19 @@ ConSplitterDriverEntry (
         );\r
 \r
   return EFI_SUCCESS;\r
+\r
 }\r
 \r
 \r
 /**\r
-  Construct the ConSplitter.\r
+  Construct console input devices' private data.\r
 \r
   @param  ConInPrivate             A pointer to the TEXT_IN_SPLITTER_PRIVATE_DATA\r
                                    structure.\r
 \r
   @retval EFI_OUT_OF_RESOURCES     Out of resources.\r
+  @retval EFI_SUCCESS              Text Input Devcie's private data has been constructed.\r
+  @retval other                    Failed to construct private data.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -654,6 +656,16 @@ ConSplitterTextInConstructor (
   return Status;\r
 }\r
 \r
+/**\r
+  Construct console output devices' private data.\r
+\r
+  @param  ConOutPrivate            A pointer to the TEXT_IN_SPLITTER_PRIVATE_DATA\r
+                                   structure.\r
+\r
+  @retval EFI_OUT_OF_RESOURCES     Out of resources.\r
+  @retval EFI_SUCCESS              Text Input Devcie's private data has been constructed.\r
+\r
+**/\r
 EFI_STATUS\r
 ConSplitterTextOutConstructor (\r
   TEXT_OUT_SPLITTER_PRIVATE_DATA      *ConOutPrivate\r
@@ -666,11 +678,11 @@ ConSplitterTextOutConstructor (
   // Copy protocols template\r
   //\r
   if (FeaturePcdGet (PcdConOutUgaSupport)) {\r
-    CopyMem (&ConOutPrivate->UgaDraw, &gUgaDrawProtocolTemplate, sizeof (EFI_UGA_DRAW_PROTOCOL));\r
+    CopyMem (&ConOutPrivate->UgaDraw, &mUgaDrawProtocolTemplate, sizeof (EFI_UGA_DRAW_PROTOCOL));\r
   }\r
 \r
   if (FeaturePcdGet (PcdConOutGopSupport)) {\r
-    CopyMem (&ConOutPrivate->GraphicsOutput, &gGraphicsOutputProtocolTemplate, sizeof (EFI_GRAPHICS_OUTPUT_PROTOCOL));\r
+    CopyMem (&ConOutPrivate->GraphicsOutput, &mGraphicsOutputProtocolTemplate, sizeof (EFI_GRAPHICS_OUTPUT_PROTOCOL));\r
   }\r
 \r
   //\r
@@ -749,25 +761,25 @@ ConSplitterTextOutConstructor (
 \r
     ConOutPrivate->GraphicsOutput.Mode->MaxMode = 1;\r
     //\r
-    // Initial current mode to unknow state, and then set to mode 0\r
+    // Initial current mode to unknown state, and then set to mode 0\r
     //\r
     ConOutPrivate->GraphicsOutput.Mode->Mode = 0xffff;\r
     ConOutPrivate->GraphicsOutput.SetMode (&ConOutPrivate->GraphicsOutput, 0);\r
   }\r
 \r
-  return Status;\r
+  return EFI_SUCCESS;\r
 }\r
 \r
 \r
 /**\r
-  Generic Supported Check\r
+  Test to see if the specified protocol could be supported on the ControllerHandle. \r
 \r
-  @param  This                     Pointer to protocol.\r
-  @param  ControllerHandle         Controller Handle.\r
-  @param  Guid                     Guid.\r
+  @param  This                Protocol instance pointer.\r
+  @param  ControllerHandle    Handle of device to test.\r
+  @param  Guid                The specified protocol guid.\r
 \r
-  @retval EFI_UNSUPPORTED          unsupported.\r
-  @retval EFI_SUCCESS              operation is OK.\r
+  @retval EFI_SUCCESS         The specified protocol is supported on this device.\r
+  @retval other               The specified protocol is not supported on this device.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -820,15 +832,16 @@ ConSplitterSupported (
   return EFI_SUCCESS;\r
 }\r
 \r
-\r
 /**\r
-  Console In Supported Check\r
+  Test to see if Console In Device could be supported on the ControllerHandle. \r
 \r
-  @param  This                     Pointer to protocol.\r
-  @param  ControllerHandle         Controller handle.\r
-  @param  RemainingDevicePath      Remaining device path.\r
+  @param  This                Protocol instance pointer.\r
+  @param  ControllerHandle    Handle of device to test.\r
+  @param  RemainingDevicePath Optional parameter use to pick a specific child\r
+                              device to start.\r
 \r
-  @return EFI_STATUS\r
+  @retval EFI_SUCCESS         This driver supports this device.\r
+  @retval other               This driver does not support this device.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -846,15 +859,16 @@ ConSplitterConInDriverBindingSupported (
           );\r
 }\r
 \r
-\r
 /**\r
-  Standard Error Supported Check\r
+  Test to see if Simple Pointer protocol could be supported on the ControllerHandle. \r
 \r
-  @param  This                     Pointer to protocol.\r
-  @param  ControllerHandle         Controller handle.\r
-  @param  RemainingDevicePath      Remaining device path.\r
+  @param  This                Protocol instance pointer.\r
+  @param  ControllerHandle    Handle of device to test.\r
+  @param  RemainingDevicePath Optional parameter use to pick a specific child\r
+                              device to start.\r
 \r
-  @return EFI_STATUS\r
+  @retval EFI_SUCCESS         This driver supports this device.\r
+  @retval other               This driver does not support this device.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -874,13 +888,15 @@ ConSplitterSimplePointerDriverBindingSupported (
 \r
 \r
 /**\r
-  Absolute Pointer Supported Check\r
+  Test to see if Absolute Pointer protocol could be supported on the ControllerHandle. \r
 \r
-  @param  This                     Pointer to protocol.\r
-  @param  ControllerHandle         Controller handle.\r
-  @param  RemainingDevicePath      Remaining device path.\r
+  @param  This                Protocol instance pointer.\r
+  @param  ControllerHandle    Handle of device to test.\r
+  @param  RemainingDevicePath Optional parameter use to pick a specific child\r
+                              device to start.\r
 \r
-  @return EFI_STATUS\r
+  @retval EFI_SUCCESS         This driver supports this device.\r
+  @retval other               This driver does not support this device.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -900,13 +916,15 @@ ConSplitterAbsolutePointerDriverBindingSupported (
 \r
 \r
 /**\r
-  Console Out Supported Check\r
+  Test to see if Console Out Device could be supported on the ControllerHandle. \r
 \r
-  @param  This                     Pointer to protocol.\r
-  @param  ControllerHandle         Controller handle.\r
-  @param  RemainingDevicePath      Remaining device path.\r
+  @param  This                Protocol instance pointer.\r
+  @param  ControllerHandle    Handle of device to test.\r
+  @param  RemainingDevicePath Optional parameter use to pick a specific child\r
+                              device to start.\r
 \r
-  @return EFI_STATUS\r
+  @retval EFI_SUCCESS         This driver supports this device.\r
+  @retval other               This driver does not support this device.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -924,15 +942,16 @@ ConSplitterConOutDriverBindingSupported (
           );\r
 }\r
 \r
-\r
 /**\r
-  Standard Error Supported Check\r
+  Test to see if Standard Error Device could be supported on the ControllerHandle. \r
 \r
-  @param  This                     Pointer to protocol.\r
-  @param  ControllerHandle         Controller handle.\r
-  @param  RemainingDevicePath      Remaining device path.\r
+  @param  This                Protocol instance pointer.\r
+  @param  ControllerHandle    Handle of device to test.\r
+  @param  RemainingDevicePath Optional parameter use to pick a specific child\r
+                              device to start.\r
 \r
-  @return EFI_STATUS\r
+  @retval EFI_SUCCESS         This driver supports this device.\r
+  @retval other               This driver does not support this device.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -952,30 +971,37 @@ ConSplitterStdErrDriverBindingSupported (
 \r
 \r
 /**\r
-  Start ConSplitter on ControllerHandle, and create the virtual\r
-  agrogated console device on first call Start for a SimpleTextIn handle.\r
-\r
-  (Standard DriverBinding Protocol Start() function)\r
-\r
-  @return EFI_ERROR if a SimpleTextIn protocol is not started.\r
+  Start ConSplitter on devcie handle by opening Console Device Guid on device handle \r
+  and the console virtual handle. And Get the console interface on controller handle.\r
+  \r
+  @param  This                      Protocol instance pointer.\r
+  @param  ControllerHandle          Handle of device.\r
+  @param  ConSplitterVirtualHandle  Console virtual Handle.\r
+  @param  DeviceGuid                The specified Console Device, such as ConInDev,\r
+                                    ConOutDev.\r
+  @param  InterfaceGuid             The specified protocol to be opened.\r
+  @param  Interface                 Protocol interface returned.\r
+\r
+  @retval EFI_SUCCESS               This driver supports this device.\r
+  @retval other                     Failed to open the specified Console Device Guid\r
+                                    or specified protocol.\r
 \r
 **/\r
 EFI_STATUS\r
-EFIAPI\r
 ConSplitterStart (\r
   IN  EFI_DRIVER_BINDING_PROTOCOL     *This,\r
   IN  EFI_HANDLE                      ControllerHandle,\r
   IN  EFI_HANDLE                      ConSplitterVirtualHandle,\r
   IN  EFI_GUID                        *DeviceGuid,\r
   IN  EFI_GUID                        *InterfaceGuid,\r
-  IN  VOID                            **Interface\r
+  OUT VOID                            **Interface\r
   )\r
 {\r
   EFI_STATUS  Status;\r
   VOID        *Instance;\r
 \r
   //\r
-  // Check to see whether the handle has the ConsoleInDevice GUID on it\r
+  // Check to see whether the ControllerHandle has the InterfaceGuid on it.\r
   //\r
   Status = gBS->OpenProtocol (\r
                   ControllerHandle,\r
@@ -1013,15 +1039,15 @@ ConSplitterStart (
 \r
 \r
 /**\r
-  Start ConSplitter on ControllerHandle, and create the virtual\r
-  agrogated console device on first call Start for a SimpleTextIn handle.\r
+  Start Console In Consplitter on device handle. \r
+  \r
+  @param  This                 Protocol instance pointer.\r
+  @param  ControllerHandle     Handle of device to bind driver to.\r
+  @param  RemainingDevicePath  Optional parameter use to pick a specific child\r
+                               device to start.\r
 \r
-  @param  This                     Pointer to protocol.\r
-  @param  ControllerHandle         Controller handle.\r
-  @param  RemainingDevicePath      Remaining device path.\r
-\r
-  @return EFI_STATUS\r
-  @return EFI_ERROR if a SimpleTextIn protocol is not started.\r
+  @retval EFI_SUCCESS          Console In Consplitter is added to ControllerHandle.\r
+  @retval other                Console In Consplitter does not support this device.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -1032,9 +1058,9 @@ ConSplitterConInDriverBindingStart (
   IN  EFI_DEVICE_PATH_PROTOCOL        *RemainingDevicePath\r
   )\r
 {\r
-  EFI_STATUS                     Status;\r
-  EFI_SIMPLE_TEXT_INPUT_PROTOCOL *TextIn;\r
-  EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *TextInEx;\r
+  EFI_STATUS                          Status;\r
+  EFI_SIMPLE_TEXT_INPUT_PROTOCOL      *TextIn;\r
+  EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL   *TextInEx;\r
 \r
   //\r
   // Start ConSplitter on ControllerHandle, and create the virtual\r
@@ -1052,6 +1078,9 @@ ConSplitterConInDriverBindingStart (
     return Status;\r
   }\r
 \r
+  //\r
+  // Add this device into Text In devices list.\r
+  //\r
   Status = ConSplitterTextInAddDevice (&mConIn, TextIn);\r
   if (EFI_ERROR (Status)) {\r
     return Status;\r
@@ -1065,25 +1094,28 @@ ConSplitterConInDriverBindingStart (
                   mConIn.VirtualHandle,\r
                   EFI_OPEN_PROTOCOL_GET_PROTOCOL\r
                   );\r
-  if (EFI_ERROR (Status)) {\r
-    return Status;\r
+  if (!EFI_ERROR (Status)) {\r
+    //\r
+    // If Simple Text Input Ex protocol exists,\r
+    // add this device into Text In Ex devices list.\r
+    //\r
+    Status = ConSplitterTextInExAddDevice (&mConIn, TextInEx);\r
   }\r
 \r
-  Status = ConSplitterTextInExAddDevice (&mConIn, TextInEx);\r
-\r
   return Status;\r
 }\r
 \r
 \r
 /**\r
-  Start ConSplitter on ControllerHandle, and create the virtual\r
-  agrogated console device on first call Start for a SimpleTextIn handle.\r
+  Start Simple Pointer Consplitter on device handle. \r
+  \r
+  @param  This                 Protocol instance pointer.\r
+  @param  ControllerHandle     Handle of device to bind driver to.\r
+  @param  RemainingDevicePath  Optional parameter use to pick a specific child\r
+                               device to start.\r
 \r
-  @param  This                     Pointer to protocol.\r
-  @param  ControllerHandle         Controller handle.\r
-  @param  RemainingDevicePath      Remaining device path.\r
-\r
-  @return EFI_ERROR if a SimpleTextIn protocol is not started.\r
+  @retval EFI_SUCCESS          Simple Pointer Consplitter is added to ControllerHandle.\r
+  @retval other                Simple Pointer Consplitter does not support this device.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -1097,6 +1129,10 @@ ConSplitterSimplePointerDriverBindingStart (
   EFI_STATUS                  Status;\r
   EFI_SIMPLE_POINTER_PROTOCOL *SimplePointer;\r
 \r
+  //\r
+  // Start ConSplitter on ControllerHandle, and create the virtual\r
+  // agrogated console device on first call Start for a SimplePointer handle.\r
+  //\r
   Status = ConSplitterStart (\r
             This,\r
             ControllerHandle,\r
@@ -1109,19 +1145,23 @@ ConSplitterSimplePointerDriverBindingStart (
     return Status;\r
   }\r
 \r
+  //\r
+  // Add this devcie into Simple Pointer devices list.\r
+  //\r
   return ConSplitterSimplePointerAddDevice (&mConIn, SimplePointer);\r
 }\r
 \r
 \r
 /**\r
-  Start ConSplitter on ControllerHandle, and create the virtual\r
-  agrogated console device on first call Start for a ConIn handle.\r
-\r
-  @param  This                     Pointer to protocol.\r
-  @param  ControllerHandle         Controller handle.\r
-  @param  RemainingDevicePath      Remaining device path.\r
+  Start Absolute Pointer Consplitter on device handle. \r
+  \r
+  @param  This                 Protocol instance pointer.\r
+  @param  ControllerHandle     Handle of device to bind driver to.\r
+  @param  RemainingDevicePath  Optional parameter use to pick a specific child\r
+                               device to start.\r
 \r
-  @return EFI_ERROR if a AbsolutePointer protocol is not started.\r
+  @retval EFI_SUCCESS          Absolute Pointer Consplitter is added to ControllerHandle.\r
+  @retval other                Absolute Pointer Consplitter does not support this device.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -1135,6 +1175,10 @@ ConSplitterAbsolutePointerDriverBindingStart (
   EFI_STATUS                        Status;\r
   EFI_ABSOLUTE_POINTER_PROTOCOL     *AbsolutePointer;\r
 \r
+  //\r
+  // Start ConSplitter on ControllerHandle, and create the virtual\r
+  // agrogated console device on first call Start for a AbsolutePointer handle.\r
+  //\r
   Status = ConSplitterStart (\r
              This,\r
              ControllerHandle,\r
@@ -1148,19 +1192,23 @@ ConSplitterAbsolutePointerDriverBindingStart (
     return Status;\r
   }\r
 \r
+  //\r
+  // Add this devcie into Absolute Pointer devices list.\r
+  //\r
   return ConSplitterAbsolutePointerAddDevice (&mConIn, AbsolutePointer);\r
 }\r
 \r
 \r
 /**\r
-  Start ConSplitter on ControllerHandle, and create the virtual\r
-  agrogated console device on first call Start for a SimpleTextIn handle.\r
+  Start Console Out Consplitter on device handle. \r
+  \r
+  @param  This                 Protocol instance pointer.\r
+  @param  ControllerHandle     Handle of device to bind driver to.\r
+  @param  RemainingDevicePath  Optional parameter use to pick a specific child\r
+                               device to start.\r
 \r
-  @param  This                     Pointer to protocol.\r
-  @param  ControllerHandle         Controller handle.\r
-  @param  RemainingDevicePath      Remaining device path.\r
-\r
-  @return EFI_ERROR if a SimpleTextIn protocol is not started.\r
+  @retval EFI_SUCCESS          Console Out Consplitter is added to ControllerHandle.\r
+  @retval other                Console Out Consplitter does not support this device.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -1176,6 +1224,10 @@ ConSplitterConOutDriverBindingStart (
   EFI_GRAPHICS_OUTPUT_PROTOCOL     *GraphicsOutput;\r
   EFI_UGA_DRAW_PROTOCOL            *UgaDraw;\r
 \r
+  //\r
+  // Start ConSplitter on ControllerHandle, and create the virtual\r
+  // agrogated console device on first call Start for a ConsoleOut handle.\r
+  //\r
   Status = ConSplitterStart (\r
             This,\r
             ControllerHandle,\r
@@ -1204,7 +1256,7 @@ ConSplitterConOutDriverBindingStart (
 \r
   if (EFI_ERROR (Status) && FeaturePcdGet (PcdUgaConsumeSupport)) {\r
     //\r
-    // Open UGA_DRAW protocol\r
+    // Open UGA DRAW protocol\r
     //\r
     Status = gBS->OpenProtocol (\r
                     ControllerHandle,\r
@@ -1248,14 +1300,15 @@ ConSplitterConOutDriverBindingStart (
 \r
 \r
 /**\r
-  Start ConSplitter on ControllerHandle, and create the virtual\r
-  agrogated console device on first call Start for a SimpleTextIn handle.\r
-\r
-  @param  This                     Pointer to protocol.\r
-  @param  ControllerHandle         Controller handle.\r
-  @param  RemainingDevicePath      Remaining device path.\r
+  Start Standard Error Consplitter on device handle. \r
+  \r
+  @param  This                 Protocol instance pointer.\r
+  @param  ControllerHandle     Handle of device to bind driver to.\r
+  @param  RemainingDevicePath  Optional parameter use to pick a specific child\r
+                               device to start.\r
 \r
-  @return EFI_ERROR if a SimpleTextIn protocol is not started.\r
+  @retval EFI_SUCCESS          Standard Error Consplitter is added to ControllerHandle.\r
+  @retval other                Standard Error Consplitter does not support this device.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -1269,6 +1322,10 @@ ConSplitterStdErrDriverBindingStart (
   EFI_STATUS                       Status;\r
   EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL  *TextOut;\r
 \r
+  //\r
+  // Start ConSplitter on ControllerHandle, and create the virtual\r
+  // agrogated console device on first call Start for a StandardError handle.\r
+  //\r
   Status = ConSplitterStart (\r
             This,\r
             ControllerHandle,\r
@@ -1316,14 +1373,22 @@ ConSplitterStdErrDriverBindingStart (
 \r
 \r
 /**\r
-\r
-  (Standard DriverBinding Protocol Stop() function)\r
-\r
-  @return None\r
+  Stop ConSplitter on device handle by closing Console Device Guid on device handle \r
+  and the console virtual handle.\r
+  \r
+  @param  This                      Protocol instance pointer.\r
+  @param  ControllerHandle          Handle of device.\r
+  @param  ConSplitterVirtualHandle  Console virtual Handle.\r
+  @param  DeviceGuid                The specified Console Device, such as ConInDev,\r
+                                    ConOutDev.\r
+  @param  InterfaceGuid             The specified protocol to be opened.\r
+  @param  Interface                 Protocol interface returned.\r
+\r
+  @retval EFI_SUCCESS               Stop ConSplitter on ControllerHandle successfully.\r
+  @retval other                     Failed to Stop ConSplitter on ControllerHandle.\r
 \r
 **/\r
 EFI_STATUS\r
-EFIAPI\r
 ConSplitterStop (\r
   IN  EFI_DRIVER_BINDING_PROTOCOL     *This,\r
   IN  EFI_HANDLE                      ControllerHandle,\r
@@ -1355,6 +1420,7 @@ ConSplitterStop (
         This->DriverBindingHandle,\r
         ConSplitterVirtualHandle\r
         );\r
+\r
   gBS->CloseProtocol (\r
         ControllerHandle,\r
         DeviceGuid,\r
@@ -1367,10 +1433,16 @@ ConSplitterStop (
 \r
 \r
 /**\r
+  Stop Console In ConSplitter on ControllerHandle by closing Console In Devcice GUID.\r
 \r
-  (Standard DriverBinding Protocol Stop() function)\r
+  @param  This              Protocol instance pointer.\r
+  @param  ControllerHandle  Handle of device to stop driver on\r
+  @param  NumberOfChildren  Number of Handles in ChildHandleBuffer. If number of\r
+                            children is zero stop the entire bus driver.\r
+  @param  ChildHandleBuffer List of Child Handles to Stop.\r
 \r
-  @return None\r
+  @retval EFI_SUCCESS       This driver is removed ControllerHandle\r
+  @retval other             This driver was not removed from this device\r
 \r
 **/\r
 EFI_STATUS\r
@@ -1382,10 +1454,10 @@ ConSplitterConInDriverBindingStop (
   IN  EFI_HANDLE                      *ChildHandleBuffer\r
   )\r
 {\r
-  EFI_STATUS                     Status;\r
-  EFI_SIMPLE_TEXT_INPUT_PROTOCOL *TextIn;\r
-\r
+  EFI_STATUS                        Status;\r
+  EFI_SIMPLE_TEXT_INPUT_PROTOCOL    *TextIn;\r
   EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *TextInEx;\r
+\r
   if (NumberOfChildren == 0) {\r
     return EFI_SUCCESS;\r
   }\r
@@ -1398,16 +1470,20 @@ ConSplitterConInDriverBindingStop (
                   ControllerHandle,\r
                   EFI_OPEN_PROTOCOL_GET_PROTOCOL\r
                   );\r
-  if (EFI_ERROR (Status)) {\r
-    return Status;\r
-  }\r
-\r
-  Status = ConSplitterTextInExDeleteDevice (&mConIn, TextInEx);\r
-  if (EFI_ERROR (Status)) {\r
-    return Status;\r
+  if (!EFI_ERROR (Status)) {\r
+    //\r
+    // If Simple Text Input Ex protocol exists,\r
+    // remove device from Text Input Ex devices list.\r
+    //  \r
+    Status = ConSplitterTextInExDeleteDevice (&mConIn, TextInEx);\r
+    if (EFI_ERROR (Status)) {\r
+      return Status;\r
+    }\r
   }\r
 \r
-\r
+  //\r
+  // Close Simple Text In protocol on controller handle and virtual handle.\r
+  //\r
   Status = ConSplitterStop (\r
             This,\r
             ControllerHandle,\r
@@ -1419,18 +1495,26 @@ ConSplitterConInDriverBindingStop (
   if (EFI_ERROR (Status)) {\r
     return Status;\r
   }\r
+\r
   //\r
-  // Delete this console input device's data structures.\r
-  //\r
+  // Remove device from Text Input devices list.\r
+  // \r
   return ConSplitterTextInDeleteDevice (&mConIn, TextIn);\r
 }\r
 \r
 \r
 /**\r
+  Stop Simple Pointer protocol ConSplitter on ControllerHandle by closing\r
+  Simple Pointer protocol.\r
 \r
-  (Standard DriverBinding Protocol Stop() function)\r
+  @param  This              Protocol instance pointer.\r
+  @param  ControllerHandle  Handle of device to stop driver on\r
+  @param  NumberOfChildren  Number of Handles in ChildHandleBuffer. If number of\r
+                            children is zero stop the entire bus driver.\r
+  @param  ChildHandleBuffer List of Child Handles to Stop.\r
 \r
-  @return None\r
+  @retval EFI_SUCCESS       This driver is removed ControllerHandle\r
+  @retval other             This driver was not removed from this device\r
 \r
 **/\r
 EFI_STATUS\r
@@ -1449,6 +1533,9 @@ ConSplitterSimplePointerDriverBindingStop (
     return EFI_SUCCESS;\r
   }\r
 \r
+  //\r
+  // Close Simple Pointer protocol on controller handle and virtual handle.\r
+  //\r
   Status = ConSplitterStop (\r
             This,\r
             ControllerHandle,\r
@@ -1460,18 +1547,26 @@ ConSplitterSimplePointerDriverBindingStop (
   if (EFI_ERROR (Status)) {\r
     return Status;\r
   }\r
+\r
   //\r
-  // Delete this console input device's data structures.\r
+  // Remove this device from Simple Pointer device list.\r
   //\r
   return ConSplitterSimplePointerDeleteDevice (&mConIn, SimplePointer);\r
 }\r
 \r
 \r
 /**\r
+  Stop Absolute Pointer protocol ConSplitter on ControllerHandle by closing\r
+  Absolute Pointer protocol.\r
 \r
-  (Standard DriverBinding Protocol Stop() function)\r
+  @param  This              Protocol instance pointer.\r
+  @param  ControllerHandle  Handle of device to stop driver on\r
+  @param  NumberOfChildren  Number of Handles in ChildHandleBuffer. If number of\r
+                            children is zero stop the entire bus driver.\r
+  @param  ChildHandleBuffer List of Child Handles to Stop.\r
 \r
-  @return None\r
+  @retval EFI_SUCCESS       This driver is removed ControllerHandle\r
+  @retval other             This driver was not removed from this device\r
 \r
 **/\r
 EFI_STATUS\r
@@ -1490,6 +1585,9 @@ ConSplitterAbsolutePointerDriverBindingStop (
     return EFI_SUCCESS;\r
   }\r
 \r
+  //\r
+  // Close Absolute Pointer protocol on controller handle and virtual handle.\r
+  //\r
   Status = ConSplitterStop (\r
              This,\r
              ControllerHandle,\r
@@ -1501,18 +1599,25 @@ ConSplitterAbsolutePointerDriverBindingStop (
   if (EFI_ERROR (Status)) {\r
     return Status;\r
   }\r
+\r
   //\r
-  // Delete this console input device's data structures.\r
+  // Remove this device from Absolute Pointer device list.\r
   //\r
   return ConSplitterAbsolutePointerDeleteDevice (&mConIn, AbsolutePointer);\r
 }\r
 \r
 \r
 /**\r
+  Stop Console Out ConSplitter on device handle by closing Console Out Devcice GUID.\r
 \r
-  (Standard DriverBinding Protocol Stop() function)\r
+  @param  This              Protocol instance pointer.\r
+  @param  ControllerHandle  Handle of device to stop driver on\r
+  @param  NumberOfChildren  Number of Handles in ChildHandleBuffer. If number of\r
+                            children is zero stop the entire bus driver.\r
+  @param  ChildHandleBuffer List of Child Handles to Stop.\r
 \r
-  @return None\r
+  @retval EFI_SUCCESS       This driver is removed ControllerHandle\r
+  @retval other             This driver was not removed from this device\r
 \r
 **/\r
 EFI_STATUS\r
@@ -1531,6 +1636,9 @@ ConSplitterConOutDriverBindingStop (
     return EFI_SUCCESS;\r
   }\r
 \r
+  //\r
+  // Close Absolute Pointer protocol on controller handle and virtual handle.\r
+  //\r
   Status = ConSplitterStop (\r
             This,\r
             ControllerHandle,\r
@@ -1544,17 +1652,23 @@ ConSplitterConOutDriverBindingStop (
   }\r
 \r
   //\r
-  // Delete this console output device's data structures.\r
+  // Remove this device from Text Out device list.\r
   //\r
   return ConSplitterTextOutDeleteDevice (&mConOut, TextOut);\r
 }\r
 \r
 \r
 /**\r
+  Stop Standard Error ConSplitter on ControllerHandle by closing Standard Error GUID.\r
 \r
-  (Standard DriverBinding Protocol Stop() function)\r
+  @param  This              Protocol instance pointer.\r
+  @param  ControllerHandle  Handle of device to stop driver on\r
+  @param  NumberOfChildren  Number of Handles in ChildHandleBuffer. If number of\r
+                            children is zero stop the entire bus driver.\r
+  @param  ChildHandleBuffer List of Child Handles to Stop.\r
 \r
-  @retval EFI_SUCCESS              Complete successfully.\r
+  @retval EFI_SUCCESS       This driver is removed ControllerHandle\r
+  @retval other             This driver was not removed from this device\r
 \r
 **/\r
 EFI_STATUS\r
@@ -1573,6 +1687,9 @@ ConSplitterStdErrDriverBindingStop (
     return EFI_SUCCESS;\r
   }\r
 \r
+  //\r
+  // Close Standard Error Device on controller handle and virtual handle.\r
+  //\r
   Status = ConSplitterStop (\r
             This,\r
             ControllerHandle,\r
@@ -1622,8 +1739,7 @@ ConSplitterStdErrDriverBindingStop (
                                    data\r
 \r
   @retval EFI_SUCCESS              Buffer size has grown\r
-  @retval EFI_OUT_OF_RESOURCES     Could not grow the buffer size\r
-  @return None\r
+  @retval EFI_OUT_OF_RESOURCES     Could not grow the buffer size.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -1664,10 +1780,13 @@ ConSplitterGrowBuffer (
 \r
 \r
 /**\r
+  Add Text Input Device in Consplitter Text Input list.\r
 \r
+  @param  Private                  Text In Splitter pointer.\r
+  @param  TextIn                   Simple Text Input protocol pointer.\r
 \r
-  @return EFI_SUCCESS\r
-  @return EFI_OUT_OF_RESOURCES\r
+  @retval EFI_SUCCESS              Text Input Device added successfully.\r
+  @retval EFI_OUT_OF_RESOURCES     Could not grow the buffer size.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -1707,10 +1826,13 @@ ConSplitterTextInAddDevice (
 \r
 \r
 /**\r
+  Remove Simple Text Device in Consplitter Absolute Pointer list.\r
 \r
+  @param  Private                  Text In Splitter pointer.\r
+  @param  TextIn                   Simple Text protocol pointer.\r
 \r
-  @return EFI_SUCCESS\r
-  @return EFI_NOT_FOUND\r
+  @retval EFI_SUCCESS              Simple Text Device removed successfully.\r
+  @retval EFI_NOT_FOUND            No Simple Text Device found.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -1738,6 +1860,16 @@ ConSplitterTextInDeleteDevice (
   return EFI_NOT_FOUND;\r
 }\r
 \r
+/**\r
+  Add Text Input Ex Device in Consplitter Text Input Ex list.\r
+\r
+  @param  Private                  Text In Splitter pointer.\r
+  @param  TextInEx                 Simple Text Ex Input protocol pointer.\r
+\r
+  @retval EFI_SUCCESS              Text Input Ex Device added successfully.\r
+  @retval EFI_OUT_OF_RESOURCES     Could not grow the buffer size.\r
+\r
+**/\r
 EFI_STATUS\r
 ConSplitterTextInExAddDevice (\r
   IN  TEXT_IN_SPLITTER_PRIVATE_DATA         *Private,\r
@@ -1773,6 +1905,16 @@ ConSplitterTextInExAddDevice (
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Remove Simple Text Ex Device in Consplitter Absolute Pointer list.\r
+\r
+  @param  Private                  Text In Splitter pointer.\r
+  @param  TextInEx                 Simple Text Ex protocol pointer.\r
+\r
+  @retval EFI_SUCCESS              Simple Text Ex Device removed successfully.\r
+  @retval EFI_NOT_FOUND            No Simple Text Ex Device found.\r
+\r
+**/\r
 EFI_STATUS\r
 ConSplitterTextInExDeleteDevice (\r
   IN  TEXT_IN_SPLITTER_PRIVATE_DATA         *Private,\r
@@ -1800,10 +1942,13 @@ ConSplitterTextInExDeleteDevice (
 \r
 \r
 /**\r
+  Add Simple Pointer Device in Consplitter Simple Pointer list.\r
 \r
+  @param  Private                  Text In Splitter pointer.\r
+  @param  SimplePointer            Simple Pointer protocol pointer.\r
 \r
-  @return EFI_OUT_OF_RESOURCES\r
-  @return EFI_SUCCESS\r
+  @retval EFI_SUCCESS              Simple Pointer Device added successfully.\r
+  @retval EFI_OUT_OF_RESOURCES     Could not grow the buffer size.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -1837,9 +1982,13 @@ ConSplitterSimplePointerAddDevice (
 \r
 \r
 /**\r
+  Remove Simple Pointer Device in Consplitter Absolute Pointer list.\r
 \r
+  @param  Private                  Text In Splitter pointer.\r
+  @param  SimplePointer            Simple Pointer protocol pointer.\r
 \r
-  @return None\r
+  @retval EFI_SUCCESS              Simple Pointer Device removed successfully.\r
+  @retval EFI_NOT_FOUND            No Simple Pointer Device found.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -1869,10 +2018,13 @@ ConSplitterSimplePointerDeleteDevice (
 \r
 \r
 /**\r
+  Add Absolute Pointer Device in Consplitter Absolute Pointer list.\r
 \r
+  @param  Private                  Text In Splitter pointer.\r
+  @param  AbsolutePointer          Absolute Pointer protocol pointer.\r
 \r
-  @return EFI_OUT_OF_RESOURCES\r
-  @return EFI_SUCCESS\r
+  @retval EFI_SUCCESS              Absolute Pointer Device added successfully.\r
+  @retval EFI_OUT_OF_RESOURCES     Could not grow the buffer size.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -1906,9 +2058,13 @@ ConSplitterAbsolutePointerAddDevice (
 \r
 \r
 /**\r
+  Remove Absolute Pointer Device in Consplitter Absolute Pointer list.\r
 \r
+  @param  Private                  Text In Splitter pointer.\r
+  @param  AbsolutePointer          Absolute Pointer protocol pointer.\r
 \r
-  @return None\r
+  @retval EFI_SUCCESS              Absolute Pointer Device removed successfully.\r
+  @retval EFI_NOT_FOUND            No Absolute Pointer Device found.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -1936,11 +2092,13 @@ ConSplitterAbsolutePointerDeleteDevice (
   return EFI_NOT_FOUND;\r
 }\r
 \r
-\r
 /**\r
+  Reallocate Text Out mode map.\r
 \r
+  @param  Private                  Consplitter Text Out pointer.\r
 \r
-  @return None\r
+  @retval EFI_SUCCESS              Buffer size has grown\r
+  @retval EFI_OUT_OF_RESOURCES     Could not grow the buffer size.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -2010,9 +2168,13 @@ ConSplitterGrowMapTable (
 \r
 \r
 /**\r
+  Add the device's output mode to console splitter's mode list.\r
 \r
-\r
-  @return None\r
+  @param  Private               Text Out Splitter pointer\r
+  @param  TextOut               Simple Text Output protocol pointer.\r
+  \r
+  @retval EFI_SUCCESS           Device added successfully.\r
+  @retval EFI_OUT_OF_RESOURCES  Could not grow the buffer size.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -2158,10 +2320,11 @@ ConSplitterGetIntersection (
 \r
 \r
 /**\r
+  Add the device's output mode to console splitter's mode list.\r
 \r
-  @param  Private                  Private data structure.\r
-  @param  TextOut                  Text Out Protocol.\r
-\r
+  @param  Private               Text Out Splitter pointer.\r
+  @param  TextOut               Simple Text Output protocol pointer.\r
+  \r
   @return None\r
 \r
 **/\r
@@ -2241,10 +2404,10 @@ ConSplitterSyncOutputMode (
 \r
 \r
 /**\r
+  Sync output device between ConOut and StdErr output.\r
 \r
-\r
-  @return EFI_SUCCESS\r
-  @return EFI_OUT_OF_RESOURCES\r
+  @retval EFI_SUCCESS              Sync implemented successfully.\r
+  @retval EFI_OUT_OF_RESOURCES     Could not grow the buffer size.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -2402,9 +2565,14 @@ ConSplitterGetIntersectionBetweenConOutAndStrErr (
 \r
 \r
 /**\r
+  Add GOP or UGA output mode into Consplitter Text Out list.\r
 \r
+  @param  Private               Text Out Splitter pointer.\r
+  @param  GraphicsOutput        Graphics Output protocol pointer.\r
+  @param  UgaDraw               UGA Draw protocol pointer.\r
 \r
-  @return None\r
+  @retval EFI_SUCCESS           Output mode added successfully.\r
+  @retval other                 Failed to add output mode.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -2657,7 +2825,7 @@ Done:
   from ConsoleOutMode variable and set it; if the variable does not exist,\r
   set to user defined console mode.\r
 \r
-  None\r
+  @param  Private            Consplitter Text Out pointer.\r
 \r
   @return None\r
 \r
@@ -2751,11 +2919,16 @@ ConsplitterSetConsoleOutMode (
 }\r
 \r
 \r
-\r
 /**\r
+  Add Text Output Device in Consplitter Text Output list.\r
 \r
+  @param  Private                  Text Out Splitter pointer.\r
+  @param  TextOut                  Simple Text Output protocol pointer.\r
+  @param  GraphicsOutput           Graphics Output protocol pointer.\r
+  @param  UgaDraw                  UGA Draw protocol pointer.\r
 \r
-  @return None\r
+  @retval EFI_SUCCESS              Text Output Device added successfully.\r
+  @retval EFI_OUT_OF_RESOURCES     Could not grow the buffer size.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -2913,9 +3086,13 @@ ConSplitterTextOutAddDevice (
 \r
 \r
 /**\r
+  Remove Text Out Device in Consplitter Text Out list.\r
 \r
+  @param  Private                  Text Out Splitter pointer.\r
+  @param  TextOut                  Simple Text Output Pointer protocol pointer.\r
 \r
-  @return None\r
+  @retval EFI_SUCCESS              Text Out Device removed successfully.\r
+  @retval EFI_NOT_FOUND            No Text Out Device found.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -3007,9 +3184,7 @@ ConSplitterTextOutDeleteDevice (
 \r
   return Status;\r
 }\r
-//\r
-// ConSplitter TextIn member functions\r
-//\r
+\r
 \r
 /**\r
   Reset the input device and optionaly run diagnostics\r
@@ -3059,7 +3234,7 @@ ConSplitterTextInReset (
   Reads the next keystroke from the input device. The WaitForKey Event can\r
   be used to test for existance of a keystroke via WaitForEvent () call.\r
 \r
-  @param  This                     Protocol instance pointer.\r
+  @param  Private                  Protocol instance pointer.\r
   @param  Key                      Driver may perform diagnostics on reset.\r
 \r
   @retval EFI_SUCCESS              The keystroke information was returned.\r
@@ -3127,7 +3302,9 @@ ConSpliterConssoleControlStdInLocked (
   password will cause the check to reset. As long a mConIn.PasswordEnabled is\r
   TRUE the StdIn splitter will not report any input.\r
 \r
-  (Standard EFI_EVENT_NOTIFY)\r
+  @param  Event                  The Event this notify function registered to.\r
+  @param  Context                Pointer to the context data registerd to the\r
+                                 Event.\r
 \r
   @return None\r
 \r
@@ -3174,7 +3351,7 @@ ConSpliterConsoleControlLockStdInEvent (
           BackSpaceString[0]  = CHAR_BACKSPACE;\r
           BackSpaceString[1]  = 0;\r
 \r
-          SpaceString[0]      = ' ';\r
+          SpaceString[0]      = L' ';\r
           SpaceString[1]      = 0;\r
 \r
           ConSplitterTextOutOutputString (&mConOut.TextOut, BackSpaceString);\r
@@ -3207,6 +3384,8 @@ ConSpliterConsoleControlLockStdInEvent (
   timer. If the Password is too big return an error. If the Password is valid\r
   Copy the Password and enable state variable and then arm the periodic timer\r
 \r
+  @param  This                     Console Control protocol pointer.\r
+  @param  Password                 The password input.\r
 \r
   @retval EFI_SUCCESS              Lock the StdIn device\r
   @retval EFI_INVALID_PARAMETER    Password is NULL\r
@@ -3333,6 +3512,7 @@ ConSplitterTextInWaitForKey (
 \r
 \r
 /**\r
+  Test if the key has been registered on input device.\r
 \r
   @param  RegsiteredData           A pointer to a buffer that is filled in with the\r
                                    keystroke state data for the key that was\r
@@ -3374,10 +3554,6 @@ IsKeyRegistered (
 \r
 }\r
 \r
-//\r
-// Simple Text Input Ex protocol functions\r
-//\r
-\r
 \r
 /**\r
   Reset the input device and optionaly run diagnostics\r
@@ -3797,7 +3973,8 @@ ConSplitterSimplePointerReset (
   Reads the next keystroke from the input device. The WaitForKey Event can\r
   be used to test for existance of a keystroke via WaitForEvent () call.\r
 \r
-  @param  This                     Protocol instance pointer. State  -\r
+  @param  Private                  Protocol instance pointer.\r
+  @param  State                    The state information of simple pointer device.\r
 \r
   @retval EFI_SUCCESS              The keystroke information was returned.\r
   @retval EFI_NOT_READY            There was no keystroke data availiable.\r
@@ -3873,9 +4050,10 @@ ConSplitterSimplePointerPrivateGetState (
   be used to test for existance of a keystroke via WaitForEvent () call.\r
   If the ConIn is password locked make it look like no keystroke is availible\r
 \r
-  @param  This                     Protocol instance pointer. State  -\r
+  @param  This                     A pointer to protocol instance.\r
+  @param  State                    A pointer to state information on the pointer device\r
 \r
-  @retval EFI_SUCCESS              The keystroke information was returned.\r
+  @retval EFI_SUCCESS              The keystroke information was returned in State.\r
   @retval EFI_NOT_READY            There was no keystroke data availiable.\r
   @retval EFI_DEVICE_ERROR         The keydtroke information was not returned due\r
                                    to hardware errors.\r
@@ -3955,11 +4133,6 @@ ConSplitterSimplePointerWaitForInput (
   }\r
 }\r
 \r
-//\r
-// Absolute Pointer Protocol functions\r
-//\r
-\r
-\r
 /**\r
   Resets the pointer device hardware.\r
 \r
@@ -4200,7 +4373,7 @@ ConSplitterTextOutReset (
   Write a Unicode string to the output device.\r
 \r
   @param  This                     Protocol instance pointer.\r
-  @param  String                   The NULL-terminated Unicode string to be\r
+  @param  WString                  The NULL-terminated Unicode string to be\r
                                    displayed on the output device(s). All output\r
                                    devices must also support the Unicode drawing\r
                                    defined in this file.\r
@@ -4281,7 +4454,7 @@ ConSplitterTextOutOutputString (
   target device.\r
 \r
   @param  This                     Protocol instance pointer.\r
-  @param  String                   The NULL-terminated Unicode string to be\r
+  @param  WString                  The NULL-terminated Unicode string to be\r
                                    examined for the output device(s).\r
 \r
   @retval EFI_SUCCESS              The device(s) are capable of rendering the\r
@@ -4334,7 +4507,9 @@ ConSplitterTextOutTestString (
 \r
   @param  This                     Protocol instance pointer.\r
   @param  ModeNumber               The mode number to return information on.\r
-  @param  Rows                     Returns the geometry of the text output device\r
+  @param  Columns                  Returns the columns of the text output device\r
+                                   for the requested ModeNumber.\r
+  @param  Rows                     Returns the rows of the text output device\r
                                    for the requested ModeNumber.\r
 \r
   @retval EFI_SUCCESS              The requested mode information was returned.\r
@@ -4583,9 +4758,12 @@ ConSplitterTextOutClearScreen (
   Sets the current coordinates of the cursor position\r
 \r
   @param  This                     Protocol instance pointer.\r
-  @param  Row                      the position to set the cursor to. Must be\r
+  @param  Column                   The column position to set the cursor to. Must be\r
+                                   greater than or equal to zero and less than the\r
+                                   number of columns by QueryMode ().\r
+  @param  Row                      The row position to set the cursor to. Must be\r
                                    greater than or equal to zero and less than the\r
-                                   number of columns and rows by QueryMode ().\r
+                                   number of rows by QueryMode ().\r
 \r
   @retval EFI_SUCCESS              The operation completed successfully.\r
   @retval EFI_DEVICE_ERROR         The device had an error and could not complete\r