]> git.proxmox.com Git - mirror_edk2.git/commitdiff
1. added functions header for GraphicsConsoleDxe module.
authorvanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 7 Jul 2008 05:23:31 +0000 (05:23 +0000)
committervanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 7 Jul 2008 05:23:31 +0000 (05:23 +0000)
2. correct some funtions header for ConPlatformDxe module.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5411 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatform.c
MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatform.h
MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c
MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.h
MdeModulePkg/Universal/Console/GraphicsConsoleDxe/LaffStd.c

index 428b40e40412d599358bfeb1eecebb5668f83935..bfa25f7be4fdee5924c216afa0c4815118db4057 100644 (file)
@@ -205,7 +205,7 @@ ConPlatformDriverBindingSupported (
 \r
 /**\r
   Start this driver on ControllerHandle by opening Simple Text In protocol,\r
-  reading Device Path, and installing Console Devcice In GUID on ControllerHandle.\r
+  reading Device Path, and installing Console In Devcice GUID on ControllerHandle.\r
 \r
   If this devcie is not one hot-plug devce, append its device path into the \r
   console environment variables ConInDev.\r
@@ -315,7 +315,7 @@ ConPlatformTextInDriverBindingStart (
 \r
 /**\r
   Start this driver on ControllerHandle by opening Simple Text Out protocol,\r
-  reading Device Path, and installing Console Devcice Out GUID, Standard Error\r
+  reading Device Path, and installing Console Out Devcic GUID, Standard Error\r
   Device GUID on ControllerHandle.\r
 \r
   If this devcie is not one hot-plug devce, append its device path into the \r
@@ -457,7 +457,7 @@ ConPlatformTextOutDriverBindingStart (
 }\r
 \r
 /**\r
-  Stop this driver on ControllerHandle by removing Console Devcice In GUID \r
+  Stop this driver on ControllerHandle by removing Console In Devcice GUID \r
   and closing the Simple Text In protocol on ControllerHandle.\r
 \r
   @param  This              Protocol instance pointer.\r
@@ -533,7 +533,7 @@ ConPlatformTextInDriverBindingStop (
 \r
 \r
 /**\r
-  Stop this driver on ControllerHandle by removing Console Devcice Out GUID \r
+  Stop this driver on ControllerHandle by removing Console Out Devcice GUID \r
   and closing the Simple Text Out protocol on ControllerHandle.\r
 \r
   @param  This              Protocol instance pointer.\r
index 64bc589a9bc71574a4ab21e55b261cd972c536fc..d3adcc56a57f22885a1bee02e529ff6b1119c2d0 100644 (file)
@@ -114,7 +114,7 @@ ConPlatformTextOutDriverBindingSupported (
 \r
 /**\r
   Start this driver on ControllerHandle by opening Simple Text In protocol,\r
-  reading Device Path, and installing Console Devcice In GUID on ControllerHandle.\r
+  reading Device Path, and installing Console In Devcice GUID on ControllerHandle.\r
 \r
   If this devcie is not one hot-plug devce, append its device path into the \r
   console environment variables ConInDev.\r
@@ -139,7 +139,7 @@ ConPlatformTextInDriverBindingStart (
 \r
 /**\r
   Start this driver on ControllerHandle by opening Simple Text Out protocol,\r
-  reading Device Path, and installing Console Devcice Out GUID, Standard Error\r
+  reading Device Path, and installing Console Out Devcice GUID, Standard Error\r
   Device GUID on ControllerHandle.\r
 \r
   If this devcie is not one hot-plug devce, append its device path into the \r
@@ -164,7 +164,7 @@ ConPlatformTextOutDriverBindingStart (
   );\r
 \r
 /**\r
-  Stop this driver on ControllerHandle by removing Console Devcice In GUID \r
+  Stop this driver on ControllerHandle by removing Console In Devcice GUID \r
   and closing the Simple Text In protocol on ControllerHandle.\r
 \r
   @param  This              Protocol instance pointer.\r
@@ -187,7 +187,7 @@ ConPlatformTextInDriverBindingStop (
   );\r
 \r
 /**\r
-  Stop this driver on ControllerHandle by removing Console Devcice Out GUID \r
+  Stop this driver on ControllerHandle by removing Console Out Devcice GUID \r
   and closing the Simple Text Out protocol on ControllerHandle.\r
 \r
   @param  This              Protocol instance pointer.\r
index 1e1bd0edd4f1c6bd0ca7b7022536738ced9019c1..13486a0462255b6d03cf86429658df6d211118e4 100644 (file)
@@ -19,6 +19,16 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 #include "GraphicsConsole.h"\r
 \r
+/**\r
+  Gets Graphics Console devcie's foreground color and background color.\r
+\r
+  @param  This                  Protocol instance pointer.\r
+  @param  Foreground            Returned text foreground color.\r
+  @param  Background            Returned text background color.\r
+\r
+  @retval EFI_SUCCESS           It returned always.\r
+\r
+**/\r
 EFI_STATUS\r
 GetTextColors (\r
   IN  EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL  *This,\r
@@ -26,6 +36,19 @@ GetTextColors (
   OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL    *Background\r
   );\r
 \r
+/**\r
+  Draw Unicode string on the Graphice Console device's screen.\r
+\r
+  @param  This                  Protocol instance pointer.\r
+  @param  UnicodeWeight         One Unicode string to be displayed.\r
+  @param  Count                 The count of Unicode string.\r
+\r
+  @retval EFI_OUT_OF_RESOURCES  If no memory resource to use.\r
+  @retval EFI_UNSUPPORTED       If no Graphics Output protocol and UGA Draw\r
+                                protocol exist.\r
+  @retval EFI_SUCCESS           Drawing Unicode string implemented successfully.\r
+\r
+**/\r
 EFI_STATUS\r
 DrawUnicodeWeightAtCursorN (\r
   IN  EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL  *This,\r
@@ -33,11 +56,38 @@ DrawUnicodeWeightAtCursorN (
   IN  UINTN                            Count\r
   );\r
 \r
+/**\r
+  Erase the cursor on the screen.\r
+\r
+  @param  This                  Protocol instance pointer.\r
+\r
+  @retval EFI_SUCCESS           The cursor is erased successfully.\r
+\r
+**/\r
 EFI_STATUS\r
 EraseCursor (\r
   IN  EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL  *This\r
   );\r
 \r
+/**\r
+  Check if the current specific mode supported the user defined resolution\r
+  for the Graphice Console devcie based on Graphics Output Protocol.\r
+\r
+  If yes, set the graphic devcice's current mode to this specific mode.\r
+  \r
+  @param  GraphicsOutput        Graphics Output Protocol instance pointer.\r
+  @param  HorizontalResolution  User defined horizontal resolution\r
+  @param  VerticalResolution    User defined vertical resolution.\r
+  @param  CurrentModeNumber     Current specific mode to be check.\r
+\r
+  @retval EFI_SUCCESS       This driver is removed ControllerHandle.\r
+  @retval EFI_UNSUPPORTED   The specific mode is out of range of graphics \r
+                            devcie supported.\r
+  @retval other             The specific mode does not support user defined \r
+                            resolution or failed to set the current mode to the \r
+                            specific mode on graphics device.\r
+\r
+**/\r
 EFI_STATUS\r
 CheckModeSupported (\r
   EFI_GRAPHICS_OUTPUT_PROTOCOL  *GraphicsOutput,\r
@@ -130,6 +180,23 @@ EFI_DRIVER_BINDING_PROTOCOL gGraphicsConsoleDriverBinding = {
   NULL\r
 };\r
 \r
+\r
+/**\r
+  Test to see if Graphics Console could be supported on the ControllerHandle.\r
+\r
+  Graphics Console could be supported if Graphics Output Protocol or UGA Draw\r
+  Protocol exists on the ControllerHandle. (UGA Draw Protocol could be shipped\r
+  if PcdUgaConsumeSupport is set to FALSE.)\r
+\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
+  @retval EFI_SUCCESS         This driver supports this device\r
+  @retval other               This driver does not support this device\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 GraphicsConsoleControllerDriverSupported (\r
@@ -227,16 +294,17 @@ Error:
 \r
 \r
 /**\r
-  Start the controller.\r
-\r
-  @param  This                  A pointer to the EFI_DRIVER_BINDING_PROTOCOL\r
-                                instance.\r
-  @param  Controller            The handle of the controller to start.\r
-  @param  RemainingDevicePath   A pointer to the remaining portion of a devcie\r
-                                path.\r
-\r
-  @retval EFI_SUCCESS           Return successfully.\r
-  @retval EFI_OUT_OF_RESOURCES  Out of resources.\r
+  Start this driver on ControllerHandle by opening Graphics Output protocol or \r
+  UGA Draw protocol, and installing Simple Text Out protocol on ControllerHandle.\r
+  (UGA Draw protocol could be shkipped if PcdUgaConsumeSupport is set to FALSE.)\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
+  @retval EFI_SUCCESS          This driver is added to ControllerHandle\r
+  @retval other                This driver does not support this device\r
 \r
 **/\r
 EFI_STATUS\r
@@ -562,6 +630,24 @@ Error:
   return Status;\r
 }\r
 \r
+/**\r
+  Stop this driver on ControllerHandle by removing Simple Text Out protocol \r
+  and closing the Graphics Output Protocol or UGA Draw protocol on ControllerHandle.\r
+  (UGA Draw protocol could be shkipped if PcdUgaConsumeSupport is set to FALSE.)\r
+  \r
+\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       This driver is removed ControllerHandle.\r
+  @retval EFI_NOT_STARTED   Simple Text Out protocol could not be found the \r
+                            ControllerHandle.\r
+  @retval other             This driver was not removed from this device.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 GraphicsConsoleControllerDriverStop (\r
@@ -635,12 +721,31 @@ GraphicsConsoleControllerDriverStop (
   return Status;\r
 }\r
 \r
+/**\r
+  Check if the current specific mode supported the user defined resolution\r
+  for the Graphice Console devcie based on Graphics Output Protocol.\r
+\r
+  If yes, set the graphic devcice's current mode to this specific mode.\r
+  \r
+  @param  GraphicsOutput        Graphics Output Protocol instance pointer.\r
+  @param  HorizontalResolution  User defined horizontal resolution\r
+  @param  VerticalResolution    User defined vertical resolution.\r
+  @param  CurrentModeNumber     Current specific mode to be check.\r
+\r
+  @retval EFI_SUCCESS       This driver is removed ControllerHandle.\r
+  @retval EFI_UNSUPPORTED   The specific mode is out of range of graphics \r
+                            devcie supported.\r
+  @retval other             The specific mode does not support user defined \r
+                            resolution or failed to set the current mode to the \r
+                            specific mode on graphics device.\r
+\r
+**/\r
 EFI_STATUS\r
 CheckModeSupported (\r
   EFI_GRAPHICS_OUTPUT_PROTOCOL  *GraphicsOutput,\r
-  IN  UINT32  HorizontalResolution,\r
-  IN  UINT32  VerticalResolution,\r
-  OUT UINT32  *CurrentModeNumber\r
+  IN  UINT32                    HorizontalResolution,\r
+  IN  UINT32                    VerticalResolution,\r
+  OUT UINT32                    *CurrentModeNumber\r
   )\r
 {\r
   UINT32     ModeNumber;\r
@@ -680,9 +785,12 @@ CheckModeSupported (
 \r
 \r
 /**\r
-  Locate HII protocols for future usage.\r
-\r
+  Locate HII Database protocol and HII Font protocol.\r
 \r
+  @retval  EFI_SUCCESS     HII Database protocol and HII Font protocol \r
+                           are located successfully.\r
+  @return  other           Failed to locate HII Database protocol or \r
+                           HII Font protocol.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -734,20 +842,21 @@ EfiLocateHiiProtocol (
 //\r
 \r
 /**\r
+  Reset the text output device hardware and optionaly run diagnostics.\r
+  \r
   Implements SIMPLE_TEXT_OUTPUT.Reset().\r
   If ExtendeVerification is TRUE, then perform dependent Graphics Console\r
   device reset, and set display mode to mode 0.\r
   If ExtendedVerification is FALSE, only set display mode to mode 0.\r
 \r
-  @param  This                  Indicates the calling context.\r
+  @param  This                  Protocol instance pointer.\r
   @param  ExtendedVerification  Indicates that the driver may perform a more\r
                                 exhaustive verification operation of the device\r
                                 during reset.\r
 \r
-  @return EFI_SUCCESS\r
-  @return The reset operation succeeds.\r
-  @return EFI_DEVICE_ERROR\r
-  @return The Graphics Console is not functioning correctly\r
+  @retval EFI_SUCCESS          The text output device was reset.\r
+  @retval EFI_DEVICE_ERROR     The text output device is not functioning correctly and\r
+                               could not be reset.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -763,21 +872,25 @@ GraphicsConsoleConOutReset (
 \r
 \r
 /**\r
-  Implements SIMPLE_TEXT_OUTPUT.OutputString().\r
+  Write a Unicode string to the output device.\r
+\r
+  Implements SIMPLE_TEXT_OUTPUT.OutputString(). \r
   The Unicode string will be converted to Glyphs and will be\r
   sent to the Graphics Console.\r
 \r
-  @param  This                  Indicates the calling context.\r
-  @param  WString               The Null-terminated Unicode string to be displayed\r
-                                on the Graphics Console.\r
+  @param  This                    Protocol instance pointer.\r
+  @param  WString                 The NULL-terminated Unicode string to be displayed\r
+                                  on the output device(s). All output devices must\r
+                                  also support the Unicode drawing defined in this file.\r
 \r
-  @return EFI_SUCCESS\r
-  @return The string is output successfully.\r
-  @return EFI_DEVICE_ERROR\r
-  @return The Graphics Console failed to send the string out.\r
-  @return EFI_WARN_UNKNOWN_GLYPH\r
-  @return Indicates that some of the characters in the Unicode string could not\r
-  @return be rendered and are skipped.\r
+  @retval EFI_SUCCESS             The string was output to the device.\r
+  @retval EFI_DEVICE_ERROR        The device reported an error while attempting to output\r
+                                  the text.\r
+  @retval EFI_UNSUPPORTED         The output device's mode is not currently in a\r
+                                  defined text mode.\r
+  @retval EFI_WARN_UNKNOWN_GLYPH  This warning code indicates that some of the\r
+                                  characters in the Unicode string could not be\r
+                                  rendered and were skipped.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -1055,21 +1168,23 @@ GraphicsConsoleConOutOutputString (
 \r
 }\r
 \r
-\r
 /**\r
-  Implements SIMPLE_TEXT_OUTPUT.TestString().\r
-  If one of the characters in the *Wstring is\r
-  neither valid valid Unicode drawing characters,\r
-  not ASCII code, then this function will return\r
-  EFI_UNSUPPORTED.\r
+  Verifies that all characters in a Unicode string can be output to the \r
+  target device.\r
 \r
-  @param  This                  Indicates the calling context.\r
-  @param  WString               The Null-terminated Unicode string to be tested.\r
+  Implements SIMPLE_TEXT_OUTPUT.QueryMode().\r
+  If one of the characters in the *Wstring is neither valid valid Unicode\r
+  drawing characters, not ASCII code, then this function will return\r
+  EFI_UNSUPPORTED\r
+\r
+  @param  This    Protocol instance pointer.\r
+  @param  WString The NULL-terminated Unicode string to be examined for the output\r
+                  device(s).\r
 \r
-  @return EFI_SUCCESS\r
-  @return The Graphics Console is capable of rendering the output string.\r
-  @return EFI_UNSUPPORTED\r
-  @return Some of the characters in the Unicode string cannot be rendered.\r
+  @retval EFI_SUCCESS      The device(s) are capable of rendering the output string.\r
+  @retval EFI_UNSUPPORTED  Some of the characters in the Unicode string cannot be\r
+                           rendered by one or more of the output devices mapped\r
+                           by the EFI handle.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -1109,21 +1224,20 @@ GraphicsConsoleConOutTestString (
 \r
 \r
 /**\r
+  Returns information for an available text mode that the output device(s)\r
+  supports\r
+\r
   Implements SIMPLE_TEXT_OUTPUT.QueryMode().\r
-  It returnes information for an available text mode\r
-  that the Graphics Console supports.\r
-  In this driver,we only support text mode 80x25, which is\r
-  defined as mode 0.\r
+  It returnes information for an available text mode that the Graphics Console supports.\r
+  In this driver,we only support text mode 80x25, which is defined as mode 0.\r
 \r
-  @param  This                  Indicates the calling context.\r
+  @param  This                  Protocol instance pointer.\r
   @param  ModeNumber            The mode number to return information on.\r
   @param  Columns               The returned columns of the requested mode.\r
   @param  Rows                  The returned rows of the requested mode.\r
 \r
-  @return EFI_SUCCESS\r
-  @return The requested mode information is returned.\r
-  @return EFI_UNSUPPORTED\r
-  @return The mode number is not valid.\r
+  @retval EFI_SUCCESS           The requested mode information is returned.\r
+  @retval EFI_UNSUPPORTED       The mode number is not valid.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -1164,19 +1278,18 @@ Done:
 \r
 \r
 /**\r
+  Sets the output device(s) to a specified mode.\r
+  \r
   Implements SIMPLE_TEXT_OUTPUT.SetMode().\r
-  Set the Graphics Console to a specified mode.\r
-  In this driver, we only support mode 0.\r
+  Set the Graphics Console to a specified mode. In this driver, we only support mode 0.\r
 \r
-  @param  This                  Indicates the calling context.\r
+  @param  This                  Protocol instance pointer.\r
   @param  ModeNumber            The text mode to set.\r
 \r
-  @return EFI_SUCCESS\r
-  @return The requested text mode is set.\r
-  @return EFI_DEVICE_ERROR\r
-  @return The requested text mode cannot be set because of Graphics Console device error.\r
-  @return EFI_UNSUPPORTED\r
-  @return The text mode number is not valid.\r
+  @retval EFI_SUCCESS           The requested text mode is set.\r
+  @retval EFI_DEVICE_ERROR      The requested text mode cannot be set because of \r
+                                Graphics Console device error.\r
+  @retval EFI_UNSUPPORTED       The text mode number is not valid.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -1360,15 +1473,19 @@ Done:
 \r
 \r
 /**\r
+  Sets the background and foreground colors for the OutputString () and\r
+  ClearScreen () functions.\r
+\r
   Implements SIMPLE_TEXT_OUTPUT.SetAttribute().\r
 \r
-  @param  This                  Indicates the calling context.\r
-  @param  Attribute             The attribute to set. Only bit0..6 are valid, all\r
-                                other bits are undefined and must be zero.\r
+  @param  This                  Protocol instance pointer.\r
+  @param  Attribute             The attribute to set. Bits 0..3 are the foreground\r
+                                color, and bits 4..6 are the background color. \r
+                                All other bits are undefined and must be zero.\r
 \r
-  @return EFI_SUCCESS           The requested attribute is set.\r
-  @return EFI_DEVICE_ERROR      The requested attribute cannot be set due to Graphics Console port error.\r
-  @return EFI_UNSUPPORTED       The attribute requested is not defined by EFI spec.\r
+  @retval EFI_SUCCESS           The requested attribute is set.\r
+  @retval EFI_DEVICE_ERROR      The requested attribute cannot be set due to Graphics Console port error.\r
+  @retval EFI_UNSUPPORTED       The attribute requested is not defined.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -1403,18 +1520,16 @@ GraphicsConsoleConOutSetAttribute (
 \r
 \r
 /**\r
+  Clears the output device(s) display to the currently selected background \r
+  color.\r
+\r
   Implements SIMPLE_TEXT_OUTPUT.ClearScreen().\r
-  It clears the Graphics Console's display to the\r
-  currently selected background color.\r
 \r
-  @param  This                  Indicates the calling context.\r
+  @param  This                  Protocol instance pointer.\r
 \r
-  @return EFI_SUCCESS\r
-  @return The operation completed successfully.\r
-  @return EFI_DEVICE_ERROR\r
-  @return The Graphics Console cannot be cleared due to Graphics Console device error.\r
-  @return EFI_UNSUPPORTED\r
-  @return The Graphics Console is not in a valid text mode.\r
+  @retval  EFI_SUCCESS      The operation completed successfully.\r
+  @retval  EFI_DEVICE_ERROR The device had an error and could not complete the request.\r
+  @retval  EFI_UNSUPPORTED  The output device is not in a valid text mode.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -1482,19 +1597,22 @@ GraphicsConsoleConOutClearScreen (
 \r
 \r
 /**\r
+  Sets the current coordinates of the cursor position.\r
+\r
   Implements SIMPLE_TEXT_OUTPUT.SetCursorPosition().\r
 \r
-  @param  This                  Indicates the calling context.\r
-  @param  Column                The row to set cursor to.\r
-  @param  Row                   The column to set cursor to.\r
+  @param  This        Protocol instance pointer.\r
+  @param  Column      The position to set the cursor to. Must be greater than or\r
+                      equal to zero and less than the number of columns and rows\r
+                      by QueryMode ().\r
+  @param  Row         The position to set the cursor to. Must be greater than or\r
+                      equal to zero and less than the number of columns and rows\r
+                      by QueryMode ().\r
 \r
-  @return EFI_SUCCESS\r
-  @return The operation completed successfully.\r
-  @return EFI_DEVICE_ERROR\r
-  @return The request fails due to Graphics Console device error.\r
-  @return EFI_UNSUPPORTED\r
-  @return The Graphics Console is not in a valid text mode, or the cursor position\r
-  @return is invalid for current mode.\r
+  @retval EFI_SUCCESS      The operation completed successfully.\r
+  @retval EFI_DEVICE_ERROR The device had an error and could not complete the request.\r
+  @retval EFI_UNSUPPORTED  The output device is not in a valid text mode, or the\r
+                           cursor position is invalid for the current mode.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -1542,17 +1660,15 @@ Done:
 \r
 \r
 /**\r
+  Makes the cursor visible or invisible.\r
+\r
   Implements SIMPLE_TEXT_OUTPUT.EnableCursor().\r
-  In this driver, the cursor cannot be hidden.\r
 \r
-  @param  This                  Indicates the calling context.\r
+  @param  This                  Protocol instance pointer.\r
   @param  Visible               If TRUE, the cursor is set to be visible, If FALSE,\r
                                 the cursor is set to be invisible.\r
 \r
-  @return EFI_SUCCESS\r
-  @return The request is valid.\r
-  @return EFI_UNSUPPORTED\r
-  @return The Graphics Console does not support a hidden cursor.\r
+  @retval EFI_SUCCESS           The operation completed successfully.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -1576,6 +1692,16 @@ GraphicsConsoleConOutEnableCursor (
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Gets Graphics Console devcie's foreground color and background color.\r
+\r
+  @param  This                  Protocol instance pointer.\r
+  @param  Foreground            Returned text foreground color.\r
+  @param  Background            Returned text background color.\r
+\r
+  @retval EFI_SUCCESS           It returned always.\r
+\r
+**/\r
 EFI_STATUS\r
 GetTextColors (\r
   IN  EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL  *This,\r
@@ -1593,11 +1719,24 @@ GetTextColors (
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Draw Unicode string on the Graphice Console device's screen.\r
+\r
+  @param  This                  Protocol instance pointer.\r
+  @param  UnicodeWeight         One Unicode string to be displayed.\r
+  @param  Count                 The count of Unicode string.\r
+\r
+  @retval EFI_OUT_OF_RESOURCES  If no memory resource to use.\r
+  @retval EFI_UNSUPPORTED       If no Graphics Output protocol and UGA Draw\r
+                                protocol exist.\r
+  @retval EFI_SUCCESS           Drawing Unicode string implemented successfully.\r
+\r
+**/\r
 EFI_STATUS\r
 DrawUnicodeWeightAtCursorN (\r
   IN  EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL  *This,\r
-  IN  CHAR16                        *UnicodeWeight,\r
-  IN  UINTN                         Count\r
+  IN  CHAR16                           *UnicodeWeight,\r
+  IN  UINTN                            Count\r
   )\r
 {\r
   EFI_STATUS                        Status;\r
@@ -1712,7 +1851,14 @@ DrawUnicodeWeightAtCursorN (
   return Status;\r
 }\r
 \r
+/**\r
+  Erase the cursor on the screen.\r
 \r
+  @param  This                  Protocol instance pointer.\r
+\r
+  @retval EFI_SUCCESS           The cursor is erased successfully.\r
+\r
+**/\r
 EFI_STATUS\r
 EraseCursor (\r
   IN  EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL  *This\r
@@ -1741,7 +1887,7 @@ EraseCursor (
   UgaDraw = Private->UgaDraw;\r
 \r
   //\r
-  // BUGBUG - we need to think about what to do with wide and narrow character deletions.\r
+  // In this driver, only narrow character was supported.\r
   //\r
   //\r
   // Blt a character to the screen\r
index 00157e94920de65b99e5485e6d85f2d2a3c2cdc6..1b7ad6cff4817fed3651400e2b0188e247eb7a24 100644 (file)
@@ -220,9 +220,13 @@ typedef struct {
 //\r
 extern EFI_DRIVER_BINDING_PROTOCOL   gGraphicsConsoleDriverBinding;\r
 \r
-//\r
-// Prototypes\r
-//\r
+\r
+/**\r
+  Returns available Unicode glyphs narrow fonts(8*19 pixels) size.\r
+\r
+  @return Narrow foun size.\r
+\r
+**/\r
 UINTN\r
 ReturnNarrowFontSize (\r
   VOID\r
@@ -253,21 +257,25 @@ GraphicsConsoleConOutReset (
   );\r
 \r
 /**\r
-  Implements SIMPLE_TEXT_OUTPUT.OutputString().\r
+  Write a Unicode string to the output device.\r
+\r
+  Implements SIMPLE_TEXT_OUTPUT.OutputString(). \r
   The Unicode string will be converted to Glyphs and will be\r
   sent to the Graphics Console.\r
 \r
-  @param  This                  Indicates the calling context.\r
-  @param  WString               The Null-terminated Unicode string to be displayed\r
-                                on the Graphics Console.\r
+  @param  This                    Protocol instance pointer.\r
+  @param  WString                 The NULL-terminated Unicode string to be displayed\r
+                                  on the output device(s). All output devices must\r
+                                  also support the Unicode drawing defined in this file.\r
 \r
-  @return EFI_SUCCESS\r
-  @return The string is output successfully.\r
-  @return EFI_DEVICE_ERROR\r
-  @return The Graphics Console failed to send the string out.\r
-  @return EFI_WARN_UNKNOWN_GLYPH\r
-  @return Indicates that some of the characters in the Unicode string could not\r
-  @return be rendered and are skipped.\r
+  @retval EFI_SUCCESS             The string was output to the device.\r
+  @retval EFI_DEVICE_ERROR        The device reported an error while attempting to output\r
+                                  the text.\r
+  @retval EFI_UNSUPPORTED         The output device's mode is not currently in a\r
+                                  defined text mode.\r
+  @retval EFI_WARN_UNKNOWN_GLYPH  This warning code indicates that some of the\r
+                                  characters in the Unicode string could not be\r
+                                  rendered and were skipped.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -301,21 +309,20 @@ GraphicsConsoleConOutTestString (
   );\r
 \r
 /**\r
+  Returns information for an available text mode that the output device(s)\r
+  supports\r
+\r
   Implements SIMPLE_TEXT_OUTPUT.QueryMode().\r
-  It returnes information for an available text mode\r
-  that the Graphics Console supports.\r
-  In this driver,we only support text mode 80x25, which is\r
-  defined as mode 0.\r
+  It returnes information for an available text mode that the Graphics Console supports.\r
+  In this driver,we only support text mode 80x25, which is defined as mode 0.\r
 \r
-  @param  This                  Indicates the calling context.\r
+  @param  This                  Protocol instance pointer.\r
   @param  ModeNumber            The mode number to return information on.\r
   @param  Columns               The returned columns of the requested mode.\r
   @param  Rows                  The returned rows of the requested mode.\r
 \r
-  @return EFI_SUCCESS\r
-  @return The requested mode information is returned.\r
-  @return EFI_UNSUPPORTED\r
-  @return The mode number is not valid.\r
+  @retval EFI_SUCCESS           The requested mode information is returned.\r
+  @retval EFI_UNSUPPORTED       The mode number is not valid.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -327,20 +334,20 @@ GraphicsConsoleConOutQueryMode (
   OUT UINTN                            *Rows\r
   );\r
 \r
+\r
 /**\r
+  Sets the output device(s) to a specified mode.\r
+  \r
   Implements SIMPLE_TEXT_OUTPUT.SetMode().\r
-  Set the Graphics Console to a specified mode.\r
-  In this driver, we only support mode 0.\r
+  Set the Graphics Console to a specified mode. In this driver, we only support mode 0.\r
 \r
-  @param  This                  Indicates the calling context.\r
+  @param  This                  Protocol instance pointer.\r
   @param  ModeNumber            The text mode to set.\r
 \r
-  @return EFI_SUCCESS\r
-  @return The requested text mode is set.\r
-  @return EFI_DEVICE_ERROR\r
-  @return The requested text mode cannot be set because of Graphics Console device error.\r
-  @return EFI_UNSUPPORTED\r
-  @return The text mode number is not valid.\r
+  @retval EFI_SUCCESS           The requested text mode is set.\r
+  @retval EFI_DEVICE_ERROR      The requested text mode cannot be set because of \r
+                                Graphics Console device error.\r
+  @retval EFI_UNSUPPORTED       The text mode number is not valid.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -370,18 +377,16 @@ GraphicsConsoleConOutSetAttribute (
   );\r
 \r
 /**\r
+  Clears the output device(s) display to the currently selected background \r
+  color.\r
+\r
   Implements SIMPLE_TEXT_OUTPUT.ClearScreen().\r
-  It clears the Graphics Console's display to the\r
-  currently selected background color.\r
 \r
-  @param  This                  Indicates the calling context.\r
+  @param  This                  Protocol instance pointer.\r
 \r
-  @return EFI_SUCCESS\r
-  @return The operation completed successfully.\r
-  @return EFI_DEVICE_ERROR\r
-  @return The Graphics Console cannot be cleared due to Graphics Console device error.\r
-  @return EFI_UNSUPPORTED\r
-  @return The Graphics Console is not in a valid text mode.\r
+  @retval  EFI_SUCCESS      The operation completed successfully.\r
+  @retval  EFI_DEVICE_ERROR The device had an error and could not complete the request.\r
+  @retval  EFI_UNSUPPORTED  The output device is not in a valid text mode.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -414,18 +419,17 @@ GraphicsConsoleConOutSetCursorPosition (
   IN  UINTN                            Row\r
   );\r
 \r
+\r
 /**\r
+  Makes the cursor visible or invisible.\r
+\r
   Implements SIMPLE_TEXT_OUTPUT.EnableCursor().\r
-  In this driver, the cursor cannot be hidden.\r
 \r
-  @param  This                  Indicates the calling context.\r
+  @param  This                  Protocol instance pointer.\r
   @param  Visible               If TRUE, the cursor is set to be visible, If FALSE,\r
                                 the cursor is set to be invisible.\r
 \r
-  @return EFI_SUCCESS\r
-  @return The request is valid.\r
-  @return EFI_UNSUPPORTED\r
-  @return The Graphics Console does not support a hidden cursor.\r
+  @retval EFI_SUCCESS           The operation completed successfully.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -435,6 +439,22 @@ GraphicsConsoleConOutEnableCursor (
   IN  BOOLEAN                          Visible\r
   );\r
 \r
+/**\r
+  Test to see if Graphics Console could be supported on the ControllerHandle.\r
+\r
+  Graphics Console could be supported if Graphics Output Protocol or UGA Draw\r
+  Protocol exists on the ControllerHandle. (UGA Draw Protocol could be shipped\r
+  if PcdUgaConsumeSupport is set to FALSE.)\r
+\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
+  @retval EFI_SUCCESS         This driver supports this device\r
+  @retval other               This driver does not support this device\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 GraphicsConsoleControllerDriverSupported (\r
@@ -443,6 +463,20 @@ GraphicsConsoleControllerDriverSupported (
   IN EFI_DEVICE_PATH_PROTOCOL       *RemainingDevicePath\r
   );\r
 \r
+/**\r
+  Start this driver on ControllerHandle by opening Graphics Output protocol or \r
+  UGA Draw protocol, and installing Simple Text Out protocol on ControllerHandle.\r
+  (UGA Draw protocol could be shkipped if PcdUgaConsumeSupport is set to FALSE.)\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
+  @retval EFI_SUCCESS          This driver is added to ControllerHandle\r
+  @retval other                This driver does not support this device\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 GraphicsConsoleControllerDriverStart (\r
@@ -451,6 +485,24 @@ GraphicsConsoleControllerDriverStart (
   IN EFI_DEVICE_PATH_PROTOCOL       *RemainingDevicePath\r
   );\r
 \r
+/**\r
+  Stop this driver on ControllerHandle by removing Simple Text Out protocol \r
+  and closing the Graphics Output Protocol or UGA Draw protocol on ControllerHandle.\r
+  (UGA Draw protocol could be shkipped if PcdUgaConsumeSupport is set to FALSE.)\r
+  \r
+\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       This driver is removed ControllerHandle.\r
+  @retval EFI_NOT_STARTED   Simple Text Out protocol could not be found the \r
+                            ControllerHandle.\r
+  @retval other             This driver was not removed from this device.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 GraphicsConsoleControllerDriverStop (\r
@@ -461,6 +513,15 @@ GraphicsConsoleControllerDriverStop (
   );\r
 \r
 \r
+/**\r
+  Locate HII Database protocol and HII Font protocol.\r
+\r
+  @retval  EFI_SUCCESS     HII Database protocol and HII Font protocol \r
+                           are located successfully.\r
+  @return  other           Failed to locate HII Database protocol or \r
+                           HII Font protocol.\r
+\r
+**/\r
 EFI_STATUS\r
 EfiLocateHiiProtocol (\r
   VOID\r
index f0a4578b885618040484263fc67342e0097f32d5..6520f241d04d08fab1adee00e31b41458321d395 100644 (file)
@@ -270,6 +270,12 @@ EFI_NARROW_GLYPH  UsStdNarrowGlyphData[] = {
   { 0x0000, 0x00, {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}} //EOL\r
 };\r
 \r
+/**\r
+  Returns available Unicode glyphs narrow fonts(8*19 pixels) size.\r
+\r
+  @return Narrow foun size.\r
+\r
+**/\r
 UINTN\r
 ReturnNarrowFontSize (\r
   VOID\r