]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Code scrub for Universal\Console\GraphicsConsoleDxe.
authorgikidy <gikidy@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 17 Dec 2008 06:23:23 +0000 (06:23 +0000)
committergikidy <gikidy@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 17 Dec 2008 06:23:23 +0000 (06:23 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7061 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c
MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.h
MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf
MdeModulePkg/Universal/Console/GraphicsConsoleDxe/LaffStd.c

index f925daa975bd935c7b4e2c622f15f9620663a3d6..407eefb5ba34ac4a5d73545ad2d4eac81a473e8f 100644 (file)
@@ -14,9 +14,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 #include "GraphicsConsole.h"\r
 \r
-\r
 //\r
-// Graphics Console Devcie Private Data template\r
+// Graphics Console Device Private Data template\r
 //\r
 GRAPHICS_CONSOLE_DEV    mGraphicsConsoleDevTemplate = {\r
   GRAPHICS_CONSOLE_DEV_SIGNATURE,\r
@@ -62,24 +61,24 @@ CHAR16               mCrLfString[3] = { CHAR_CARRIAGE_RETURN, CHAR_LINEFEED, CHA
 \r
 EFI_GRAPHICS_OUTPUT_BLT_PIXEL        mEfiColors[16] = {\r
   //\r
-  // B     G     R\r
+  // B    G    R   reserved\r
   //\r
   {0x00, 0x00, 0x00, 0x00},  // BLACK\r
-  {0x98, 0x00, 0x00, 0x00},  // BLUE\r
-  {0x00, 0x98, 0x00, 0x00},  // GREEN\r
-  {0x98, 0x98, 0x00, 0x00},  // CYAN\r
-  {0x00, 0x00, 0x98, 0x00},  // RED\r
+  {0x98, 0x00, 0x00, 0x00},  // LIGHTBLUE\r
+  {0x00, 0x98, 0x00, 0x00},  // LIGHGREEN\r
+  {0x98, 0x98, 0x00, 0x00},  // LIGHCYAN\r
+  {0x00, 0x00, 0x98, 0x00},  // LIGHRED\r
   {0x98, 0x00, 0x98, 0x00},  // MAGENTA\r
   {0x00, 0x98, 0x98, 0x00},  // BROWN\r
   {0x98, 0x98, 0x98, 0x00},  // LIGHTGRAY\r
   {0x30, 0x30, 0x30, 0x00},  // DARKGRAY - BRIGHT BLACK\r
-  {0xff, 0x00, 0x00, 0x00},  // LIGHTBLUE - ?\r
-  {0x00, 0xff, 0x00, 0x00},  // LIGHTGREEN - ?\r
-  {0xff, 0xff, 0x00, 0x00},  // LIGHTCYAN\r
-  {0x00, 0x00, 0xff, 0x00},  // LIGHTRED\r
-  {0xff, 0x00, 0xff, 0x00},  // LIGHTMAGENTA\r
-  {0x00, 0xff, 0xff, 0x00},  // LIGHTBROWN\r
-  {0xff, 0xff, 0xff, 0x00}  // WHITE\r
+  {0xff, 0x00, 0x00, 0x00},  // BLUE\r
+  {0x00, 0xff, 0x00, 0x00},  // LIME\r
+  {0xff, 0xff, 0x00, 0x00},  // CYAN\r
+  {0x00, 0x00, 0xff, 0x00},  // RED\r
+  {0xff, 0x00, 0xff, 0x00},  // FUCHSIA\r
+  {0x00, 0xff, 0xff, 0x00},  // YELLOW\r
+  {0xff, 0xff, 0xff, 0x00}   // WHITE\r
 };\r
 \r
 EFI_NARROW_GLYPH     mCursorGlyph = {\r
@@ -117,7 +116,7 @@ GetTextColors (
   );\r
 \r
 /**\r
-  Draw Unicode string on the Graphice Console device's screen.\r
+  Draw Unicode string on the Graphics Console device's screen.\r
 \r
   @param  This                  Protocol instance pointer.\r
   @param  UnicodeWeight         One Unicode string to be displayed.\r
@@ -151,9 +150,9 @@ EraseCursor (
 \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
+  for the Graphics Console device based on Graphics Output Protocol.\r
 \r
-  If yes, set the graphic devcice's current mode to this specific mode.\r
+  If yes, set the graphic device's current mode to this specific mode.\r
   \r
   @param  GraphicsOutput        Graphics Output Protocol instance pointer.\r
   @param  HorizontalResolution  User defined horizontal resolution\r
@@ -162,7 +161,7 @@ EraseCursor (
 \r
   @retval EFI_SUCCESS       The mode is supported.\r
   @retval EFI_UNSUPPORTED   The specific mode is out of range of graphics \r
-                            devcie supported.\r
+                            device 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
@@ -292,7 +291,7 @@ Error:
 /**\r
   Start this driver on Controller by opening Graphics Output protocol or \r
   UGA Draw protocol, and installing Simple Text Out protocol on Controller.\r
-  (UGA Draw protocol could be shkipped if PcdUgaConsumeSupport is set to FALSE.)\r
+  (UGA Draw protocol could be skipped if PcdUgaConsumeSupport is set to FALSE.)\r
   \r
   @param  This                 Protocol instance pointer.\r
   @param  Controller           Handle of device to bind driver to\r
@@ -313,7 +312,7 @@ GraphicsConsoleControllerDriverStart (
 {\r
   EFI_STATUS                           Status;\r
   GRAPHICS_CONSOLE_DEV                 *Private;\r
-  UINT                               NarrowFontSize;\r
+  UINT32                               NarrowFontSize;\r
   UINT32                               HorizontalResolution;\r
   UINT32                               VerticalResolution;\r
   UINT32                               ColorDepth;\r
@@ -323,11 +322,11 @@ GraphicsConsoleControllerDriverStart (
   UINTN                                Rows;\r
   UINT32                               ModeNumber;\r
   EFI_HII_SIMPLE_FONT_PACKAGE_HDR      *SimplifiedFont;\r
-  UINT                               PackageLength;\r
+  UINT32                               PackageLength;\r
   EFI_HII_PACKAGE_LIST_HEADER          *PackageList;\r
   UINT8                                *Package;\r
   UINT8                                *Location;\r
-\r
+  EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE    *Mode;\r
   ModeNumber = 0;\r
 \r
   //\r
@@ -374,13 +373,27 @@ GraphicsConsoleControllerDriverStart (
     // Add 4 bytes to the header for entire length for HiiLibPreparePackageList use only.\r
     // Looks ugly. Might be updated when font tool is ready.\r
     //\r
+    //    +--------------------------------+ <-- Package\r
+    //    |                                |\r
+    //    |    PackageLength(4 bytes)      | \r
+    //    |                                |\r
+    //    |--------------------------------| <-- SimplifiedFont\r
+    //    |                                |\r
+    //    |EFI_HII_SIMPLE_FONT_PACKAGE_HDR | \r
+    //    |                                |\r
+    //    |--------------------------------| <-- Location\r
+    //    |                                |\r
+    //    |     gUsStdNarrowGlyphData      |\r
+    //    |                                |\r
+    //    +--------------------------------+\r
+    \r
     PackageLength   = sizeof (EFI_HII_SIMPLE_FONT_PACKAGE_HDR) + NarrowFontSize + 4;\r
     Package = AllocateZeroPool (PackageLength);\r
     if (Package == NULL) {\r
       return EFI_OUT_OF_RESOURCES;\r
     }\r
-    CopyMem (Package, &PackageLength, 4);\r
-    SimplifiedFont = (EFI_HII_SIMPLE_FONT_PACKAGE_HDR*) (Package + 4);\r
+    WriteUnaligned32((UINT32 *) Package,PackageLength);\r
+    SimplifiedFont = (EFI_HII_SIMPLE_FONT_PACKAGE_HDR *) (Package + 4);\r
     SimplifiedFont->Header.Length        = (UINT32) (PackageLength - 4);\r
     SimplifiedFont->Header.Type          = EFI_HII_PACKAGE_SIMPLE_FONTS;\r
     SimplifiedFont->NumberOfNarrowGlyphs = (UINT16) (NarrowFontSize / sizeof (EFI_NARROW_GLYPH));\r
@@ -400,8 +413,8 @@ GraphicsConsoleControllerDriverStart (
     mFirstAccessFlag = FALSE;\r
   }\r
   //\r
-  // If the current mode information can not be retrieved, then attemp to set the default mode\r
-  // of 800x600, 32 bit colot, 60 Hz refresh.\r
+  // If the current mode information can not be retrieved, then attempt to set the default mode\r
+  // of 800x600, 32 bit color, 60 Hz refresh.\r
   //\r
   HorizontalResolution  = 800;\r
   VerticalResolution    = 600;\r
@@ -435,14 +448,16 @@ GraphicsConsoleControllerDriverStart (
                    &ModeNumber\r
                    );\r
     }\r
-\r
-    if (EFI_ERROR (Status) || (ModeNumber == Private->GraphicsOutput->Mode->MaxMode)) {\r
+    \r
+    Mode = Private->GraphicsOutput->Mode;\r
+     \r
+    if (EFI_ERROR (Status) || (Mode->MaxMode)) {\r
       //\r
       // Set default mode failed or device don't support default mode, then get the current mode information\r
       //\r
-      HorizontalResolution = Private->GraphicsOutput->Mode->Info->HorizontalResolution;\r
-      VerticalResolution = Private->GraphicsOutput->Mode->Info->VerticalResolution;\r
-      ModeNumber = Private->GraphicsOutput->Mode->Mode;\r
+      HorizontalResolution = Mode->Info->HorizontalResolution;\r
+      VerticalResolution = Mode->Info->VerticalResolution;\r
+      ModeNumber = Mode->Mode;\r
     }\r
   } else if (FeaturePcdGet (PcdUgaConsumeSupport)) {\r
     //\r
@@ -629,7 +644,7 @@ Error:
 /**\r
   Stop this driver on Controller by removing Simple Text Out protocol \r
   and closing the Graphics Output Protocol or UGA Draw protocol on Controller.\r
-  (UGA Draw protocol could be shkipped if PcdUgaConsumeSupport is set to FALSE.)\r
+  (UGA Draw protocol could be skipped if PcdUgaConsumeSupport is set to FALSE.)\r
   \r
 \r
   @param  This              Protocol instance pointer.\r
@@ -719,7 +734,7 @@ GraphicsConsoleControllerDriverStop (
 \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
+  for the Graphics Console device based on Graphics Output Protocol.\r
 \r
   If yes, set the graphic devcice's current mode to this specific mode.\r
   \r
@@ -730,7 +745,7 @@ GraphicsConsoleControllerDriverStop (
 \r
   @retval EFI_SUCCESS       The mode is supported.\r
   @retval EFI_UNSUPPORTED   The specific mode is out of range of graphics \r
-                            devcie supported.\r
+                            device 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
@@ -838,7 +853,7 @@ EfiLocateHiiProtocol (
 //\r
 \r
 /**\r
-  Reset the text output device hardware and optionaly run diagnostics.\r
+  Reset the text output device hardware and optionally run diagnostics.\r
   \r
   Implements SIMPLE_TEXT_OUTPUT.Reset().\r
   If ExtendeVerification is TRUE, then perform dependent Graphics Console\r
@@ -1086,27 +1101,12 @@ GraphicsConsoleConOutOutputString (
       // Count is used to determine how many characters are used regardless of their attributes\r
       //\r
       for (Count = 0, Index = 0; (This->Mode->CursorColumn + Index) < MaxColumn; Count++, Index++) {\r
-        if (WString[Count] == CHAR_NULL) {\r
-          break;\r
-        }\r
-\r
-        if (WString[Count] == CHAR_BACKSPACE) {\r
-          break;\r
-        }\r
-\r
-        if (WString[Count] == CHAR_LINEFEED) {\r
-          break;\r
-        }\r
-\r
-        if (WString[Count] == CHAR_CARRIAGE_RETURN) {\r
-          break;\r
-        }\r
-\r
-        if (WString[Count] == WIDE_CHAR) {\r
-          break;\r
-        }\r
-\r
-        if (WString[Count] == NARROW_CHAR) {\r
+        if (WString[Count] == CHAR_NULL || \r
+            WString[Count] == CHAR_BACKSPACE || \r
+            WString[Count] == CHAR_LINEFEED ||\r
+            WString[Count] == CHAR_CARRIAGE_RETURN ||\r
+            WString[Count] == WIDE_CHAR ||\r
+            WString[Count] == NARROW_CHAR) {\r
           break;\r
         }\r
         //\r
@@ -1379,7 +1379,7 @@ GraphicsConsoleConOutSetMode (
   if (GraphicsOutput != NULL) {\r
     if (ModeData->GopModeNumber != GraphicsOutput->Mode->Mode) {\r
       //\r
-      // Either no graphics mode is currently set, or it is set to the wrong resolution, so set the new grapghics mode\r
+      // Either no graphics mode is currently set, or it is set to the wrong resolution, so set the new graphics mode\r
       //\r
       Status = GraphicsOutput->SetMode (GraphicsOutput, ModeData->GopModeNumber);\r
       if (EFI_ERROR (Status)) {\r
@@ -1418,7 +1418,7 @@ GraphicsConsoleConOutSetMode (
                         );\r
     if (EFI_ERROR (Status) || HorizontalResolution != ModeData->GopWidth || VerticalResolution != ModeData->GopHeight) {\r
       //\r
-      // Either no graphics mode is currently set, or it is set to the wrong resolution, so set the new grapghics mode\r
+      // Either no graphics mode is currently set, or it is set to the wrong resolution, so set the new graphics mode\r
       //\r
       Status = UgaDraw->SetMode (\r
                           UgaDraw,\r
@@ -1458,7 +1458,7 @@ GraphicsConsoleConOutSetMode (
   This->Mode->Mode = (INT32) ModeNumber;\r
 \r
   //\r
-  // Move the text cursor to the upper left hand corner of the displat and enable it\r
+  // Move the text cursor to the upper left hand corner of the display and enable it\r
   //\r
   This->SetCursorPosition (This, 0, 0);\r
 \r
@@ -1718,7 +1718,7 @@ GetTextColors (
 }\r
 \r
 /**\r
-  Draw Unicode string on the Graphice Console device's screen.\r
+  Draw Unicode string on the Graphics Console device's screen.\r
 \r
   @param  This                  Protocol instance pointer.\r
   @param  UnicodeWeight         One Unicode string to be displayed.\r
@@ -1778,7 +1778,7 @@ DrawUnicodeWeightAtCursorN (
 \r
   if (Private->GraphicsOutput != NULL) {\r
     //\r
-    // If Graphcis Output protocol exists, using HII Font protocol to draw. \r
+    // If Graphics Output protocol exists, using HII Font protocol to draw. \r
     //\r
     Blt->Image.Screen = Private->GraphicsOutput;\r
 \r
@@ -1946,7 +1946,7 @@ EraseCursor (
   //\r
   for (PosY = 0; PosY < EFI_GLYPH_HEIGHT; PosY++) {\r
     for (PosX = 0; PosX < EFI_GLYPH_WIDTH; PosX++) {\r
-      if ((mCursorGlyph.GlyphCol1[PosY] & (1 << PosX)) != 0) {\r
+      if ((mCursorGlyph.GlyphCol1[PosY] & (BIT0 << PosX)) != 0) {\r
         BltChar[PosY][EFI_GLYPH_WIDTH - PosX - 1].Raw ^= Foreground.Raw;\r
       }\r
     }\r
index dd5e6e5b35dd1bc4b1b1303df9c1177d686c9227..e8678f109c01d9c2b1a20073bc7c35789c6f49d1 100644 (file)
@@ -38,6 +38,53 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 extern EFI_COMPONENT_NAME_PROTOCOL   gGraphicsConsoleComponentName;\r
 extern EFI_COMPONENT_NAME2_PROTOCOL  gGraphicsConsoleComponentName2;\r
+extern EFI_DRIVER_BINDING_PROTOCOL   gGraphicsConsoleDriverBinding;\r
+extern EFI_NARROW_GLYPH              gUsStdNarrowGlyphData[];\r
+\r
+\r
+//\r
+// User can define valid graphic resolution here\r
+// e.g. 640x480, 800x600, 1024x768...\r
+//\r
+#define CURRENT_HORIZONTAL_RESOLUTION  800\r
+#define CURRENT_VERTICAL_RESOLUTION    600\r
+\r
+typedef union {\r
+  EFI_NARROW_GLYPH  NarrowGlyph;\r
+  EFI_WIDE_GLYPH    WideGlyph;\r
+} GLYPH_UNION;\r
+\r
+//\r
+// Device Structure\r
+//\r
+#define GRAPHICS_CONSOLE_DEV_SIGNATURE  SIGNATURE_32 ('g', 's', 't', 'o')\r
+\r
+typedef struct {\r
+  UINTN   Columns;\r
+  UINTN   Rows;\r
+  INTN    DeltaX;\r
+  INTN    DeltaY;\r
+  UINT32  GopWidth;\r
+  UINT32  GopHeight;\r
+  UINT32  GopModeNumber;\r
+} GRAPHICS_CONSOLE_MODE_DATA;\r
+\r
+#define GRAPHICS_MAX_MODE 4\r
+\r
+typedef struct {\r
+  UINTN                            Signature;\r
+  EFI_GRAPHICS_OUTPUT_PROTOCOL     *GraphicsOutput;\r
+  EFI_UGA_DRAW_PROTOCOL            *UgaDraw;\r
+  EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL  SimpleTextOutput;\r
+  EFI_SIMPLE_TEXT_OUTPUT_MODE      SimpleTextOutputMode;\r
+  GRAPHICS_CONSOLE_MODE_DATA       ModeData[GRAPHICS_MAX_MODE];\r
+  EFI_GRAPHICS_OUTPUT_BLT_PIXEL    *LineBuffer;\r
+  EFI_HII_HANDLE                   HiiHandle;\r
+} GRAPHICS_CONSOLE_DEV;\r
+\r
+#define GRAPHICS_CONSOLE_CON_OUT_DEV_FROM_THIS(a) \\r
+  CR (a, GRAPHICS_CONSOLE_DEV, SimpleTextOutput, GRAPHICS_CONSOLE_DEV_SIGNATURE)\r
+\r
 \r
 //\r
 // EFI Component Name Functions\r
@@ -169,64 +216,15 @@ GraphicsConsoleComponentNameGetControllerName (
   );\r
 \r
 \r
-//\r
-// User can define valid graphic resolution here\r
-// e.g. 640x480, 800x600, 1024x768...\r
-//\r
-#define CURRENT_HORIZONTAL_RESOLUTION  800\r
-#define CURRENT_VERTICAL_RESOLUTION    600\r
-\r
-typedef union {\r
-  EFI_NARROW_GLYPH  NarrowGlyph;\r
-  EFI_WIDE_GLYPH    WideGlyph;\r
-} GLYPH_UNION;\r
-\r
-extern EFI_NARROW_GLYPH  gUsStdNarrowGlyphData[];\r
-\r
-//\r
-// Device Structure\r
-//\r
-#define GRAPHICS_CONSOLE_DEV_SIGNATURE  SIGNATURE_32 ('g', 's', 't', 'o')\r
-\r
-typedef struct {\r
-  UINTN   Columns;\r
-  UINTN   Rows;\r
-  INTN    DeltaX;\r
-  INTN    DeltaY;\r
-  UINT32  GopWidth;\r
-  UINT32  GopHeight;\r
-  UINT32  GopModeNumber;\r
-} GRAPHICS_CONSOLE_MODE_DATA;\r
-\r
-#define GRAPHICS_MAX_MODE 4\r
-\r
-typedef struct {\r
-  UINTN                            Signature;\r
-  EFI_GRAPHICS_OUTPUT_PROTOCOL     *GraphicsOutput;\r
-  EFI_UGA_DRAW_PROTOCOL            *UgaDraw;\r
-  EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL  SimpleTextOutput;\r
-  EFI_SIMPLE_TEXT_OUTPUT_MODE      SimpleTextOutputMode;\r
-  GRAPHICS_CONSOLE_MODE_DATA       ModeData[GRAPHICS_MAX_MODE];\r
-  EFI_GRAPHICS_OUTPUT_BLT_PIXEL    *LineBuffer;\r
-  EFI_HII_HANDLE                   HiiHandle;\r
-} GRAPHICS_CONSOLE_DEV;\r
-\r
-#define GRAPHICS_CONSOLE_CON_OUT_DEV_FROM_THIS(a) \\r
-  CR (a, GRAPHICS_CONSOLE_DEV, SimpleTextOutput, GRAPHICS_CONSOLE_DEV_SIGNATURE)\r
-\r
-//\r
-// Global Variables\r
-//\r
-extern EFI_DRIVER_BINDING_PROTOCOL   gGraphicsConsoleDriverBinding;\r
 \r
 \r
 /**\r
   Returns available Unicode glyphs narrow fonts(8*19 pixels) size.\r
 \r
-  @return Narrow foun size.\r
+  @return Narrow font size.\r
 \r
 **/\r
-UINTN\r
+UINT32\r
 ReturnNarrowFontSize (\r
   VOID\r
   );\r
@@ -466,7 +464,7 @@ GraphicsConsoleControllerDriverSupported (
 /**\r
   Start this driver on Controller by opening Graphics Output protocol or \r
   UGA Draw protocol, and installing Simple Text Out protocol on Controller.\r
-  (UGA Draw protocol could be shkipped if PcdUgaConsumeSupport is set to FALSE.)\r
+  (UGA Draw protocol could be skipped if PcdUgaConsumeSupport is set to FALSE.)\r
   \r
   @param  This                 Protocol instance pointer.\r
   @param  Controller           Handle of device to bind driver to\r
@@ -488,7 +486,7 @@ GraphicsConsoleControllerDriverStart (
 /**\r
   Stop this driver on Controller by removing Simple Text Out protocol \r
   and closing the Graphics Output Protocol or UGA Draw protocol on Controller.\r
-  (UGA Draw protocol could be shkipped if PcdUgaConsumeSupport is set to FALSE.)\r
+  (UGA Draw protocol could be skipped if PcdUgaConsumeSupport is set to FALSE.)\r
   \r
 \r
   @param  This              Protocol instance pointer.\r
index 6a585190abc6ef56577e5e7719ec50808350446b..b6a4bfe6a86bb2b2067b680af6d3499c4767fb62 100644 (file)
@@ -1,9 +1,10 @@
 #/** @file\r
-# Component description file for GraphicsConsole module\r
-#\r
-# This is the main routine for initializing the Graphics Console support routines.\r
-# Copyright (c) 2006 - 2008, Intel Corporation\r
+# \r
+#  Component description file for GraphicsConsole module\r
 #\r
+#  This is the main routine for initializing the Graphics Console support routines.\r
+#  \r
+#  Copyright (c) 2006 - 2008, Intel Corporation\r
 #  All rights reserved. This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
 #  which accompanies this distribution. The full text of the license may be found at\r
index dd7b02bb482041cef70789659c8a741fbc87a8a5..786cd9aeaf605ee3400987728bcfb6179e10a6c1 100644 (file)
@@ -273,10 +273,10 @@ EFI_NARROW_GLYPH  gUsStdNarrowGlyphData[] = {
 /**\r
   Returns available Unicode glyphs narrow fonts(8*19 pixels) size.\r
 \r
-  @return Narrow foun size.\r
+  @return Narrow font size.\r
 \r
 **/\r
-UINTN\r
+UINT32\r
 ReturnNarrowFontSize (\r
   VOID\r
   )\r