]> git.proxmox.com Git - mirror_edk2.git/commitdiff
1. Enabled UGA Draw consuming in GraphicsLib of MdemodulePkg.
authorvanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 8 Jul 2008 08:15:20 +0000 (08:15 +0000)
committervanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 8 Jul 2008 08:15:20 +0000 (08:15 +0000)
2. ECC clean.

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

MdeModulePkg/Library/GraphicsLib/Graphics.c
MdePkg/Include/Library/GraphicsLib.h

index 10f857d96ee0e56d7cf700f8c6e7e70df18e1215..17fac2a27115e03122532d8a55aa39bc43154eda 100644 (file)
@@ -1,11 +1,11 @@
-/**@file\r
+/** @file\r
   Support for Basic Graphics operations.\r
 \r
   BugBug: Currently *.BMP files are supported. This will be replaced\r
           when Tiano graphics format is supported.\r
 \r
 \r
-Copyright (c) 2006, Intel Corporation\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
@@ -60,77 +60,58 @@ STATIC EFI_GRAPHICS_OUTPUT_BLT_PIXEL mEfiColors[16] = {
 };\r
 \r
 \r
+/**\r
+  Return the graphics image file named FileNameGuid into Image and return it's\r
+  size in ImageSize. All Firmware Volumes (FV) in the system are searched for the\r
+  file name.\r
+\r
+  @param  FileNameGuid          File Name of graphics file in the FV(s).\r
+  @param  Image                 Pointer to pointer to return graphics image.  If NULL, a \r
+                                buffer will be allocated.\r
+  @param  ImageSize             Size of the graphics Image in bytes. Zero if no image found.\r
+\r
+  @retval EFI_SUCCESS           Image and ImageSize are valid. \r
+  @retval EFI_BUFFER_TOO_SMALL  Image not big enough. ImageSize has required size\r
+  @retval EFI_NOT_FOUND         FileNameGuid not found\r
+\r
+**/\r
 EFI_STATUS\r
+EFIAPI\r
 GetGraphicsBitMapFromFV (\r
   IN  EFI_GUID      *FileNameGuid,\r
   OUT VOID          **Image,\r
   OUT UINTN         *ImageSize\r
   )\r
-/*++\r
-\r
-Routine Description:\r
+{\r
+  return GetGraphicsBitMapFromFVEx (NULL, FileNameGuid, Image, ImageSize);\r
+}\r
 \r
+/**\r
   Return the graphics image file named FileNameGuid into Image and return it's\r
   size in ImageSize. All Firmware Volumes (FV) in the system are searched for the\r
   file name.\r
 \r
-Arguments:\r
-\r
-  FileNameGuid  - File Name of graphics file in the FV(s).\r
-\r
-  Image         - Pointer to pointer to return graphics image.  If NULL, a\r
-                  buffer will be allocated.\r
-\r
-  ImageSize     - Size of the graphics Image in bytes. Zero if no image found.\r
-\r
+  @param  ImageHandle           The driver image handle of the caller. The parameter is used to\r
+                                optimize the loading of the image file so that the FV from which\r
+                                the driver image is loaded will be tried first. \r
+  @param  FileNameGuid          File Name of graphics file in the FV(s).\r
+  @param  Image                 Pointer to pointer to return graphics image.  If NULL, a \r
+                                buffer will be allocated.\r
+  @param  ImageSize             Size of the graphics Image in bytes. Zero if no image found.\r
 \r
-Returns:\r
-\r
-  EFI_SUCCESS          - Image and ImageSize are valid.\r
-  EFI_BUFFER_TOO_SMALL - Image not big enough. ImageSize has required size\r
-  EFI_NOT_FOUND        - FileNameGuid not found\r
-\r
---*/\r
-{\r
-  return GetGraphicsBitMapFromFVEx (NULL, FileNameGuid, Image, ImageSize);\r
-}\r
+  @retval EFI_SUCCESS           Image and ImageSize are valid. \r
+  @retval EFI_BUFFER_TOO_SMALL  Image not big enough. ImageSize has required size\r
+  @retval EFI_NOT_FOUND         FileNameGuid not found\r
 \r
+**/\r
 EFI_STATUS\r
+EFIAPI\r
 GetGraphicsBitMapFromFVEx (\r
   IN  EFI_HANDLE    ImageHandle,\r
   IN  EFI_GUID      *FileNameGuid,\r
   OUT VOID          **Image,\r
   OUT UINTN         *ImageSize\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Return the graphics image file named FileNameGuid into Image and return it's\r
-  size in ImageSize. All Firmware Volumes (FV) in the system are searched for the\r
-  file name.\r
-\r
-Arguments:\r
-\r
-  ImageHandle   - The driver image handle of the caller. The parameter is used to\r
-                  optimize the loading of the image file so that the FV from which\r
-                  the driver image is loaded will be tried first.\r
-\r
-  FileNameGuid  - File Name of graphics file in the FV(s).\r
-\r
-  Image         - Pointer to pointer to return graphics image.  If NULL, a\r
-                  buffer will be allocated.\r
-\r
-  ImageSize     - Size of the graphics Image in bytes. Zero if no image found.\r
-\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS          - Image and ImageSize are valid.\r
-  EFI_BUFFER_TOO_SMALL - Image not big enough. ImageSize has required size\r
-  EFI_NOT_FOUND        - FileNameGuid not found\r
-\r
---*/\r
 {\r
   return PiLibGetSectionFromAnyFv (\r
            FileNameGuid,\r
@@ -141,8 +122,27 @@ Returns:
            );\r
 }\r
 \r
+/**\r
+  Convert a *.BMP graphics image to a GOP/UGA blt buffer. If a NULL Blt buffer\r
+  is passed in a GopBlt buffer will be allocated by this routine. If a GopBlt\r
+  buffer is passed in it will be used if it is big enough.\r
+\r
+  @param  BmpImage      Pointer to BMP file\r
+  @param  BmpImageSize  Number of bytes in BmpImage\r
+  @param  GopBlt        Buffer containing GOP version of BmpImage.\r
+  @param  GopBltSize    Size of GopBlt in bytes.\r
+  @param  PixelHeight   Height of GopBlt/BmpImage in pixels\r
+  @param  PixelWidth    Width of GopBlt/BmpImage in pixels\r
+\r
+  @retval EFI_SUCCESS           GopBlt and GopBltSize are returned. \r
+  @retval EFI_UNSUPPORTED       BmpImage is not a valid *.BMP image\r
+  @retval EFI_BUFFER_TOO_SMALL  The passed in GopBlt buffer is not big enough.\r
+                                GopBltSize will contain the required size.\r
+  @retval EFI_OUT_OF_RESOURCES  No enough buffer to allocate\r
 \r
+**/\r
 EFI_STATUS\r
+EFIAPI\r
 ConvertBmpToGopBlt (\r
   IN  VOID      *BmpImage,\r
   IN  UINTN     BmpImageSize,\r
@@ -151,38 +151,6 @@ ConvertBmpToGopBlt (
   OUT UINTN     *PixelHeight,\r
   OUT UINTN     *PixelWidth\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Convert a *.BMP graphics image to a GOP/UGA blt buffer. If a NULL Blt buffer\r
-  is passed in a GopBlt buffer will be allocated by this routine. If a GopBlt\r
-  buffer is passed in it will be used if it is big enough.\r
-\r
-Arguments:\r
-\r
-  BmpImage      - Pointer to BMP file\r
-\r
-  BmpImageSize  - Number of bytes in BmpImage\r
-\r
-  GopBlt        - Buffer containing GOP version of BmpImage.\r
-\r
-  GopBltSize    - Size of GopBlt in bytes.\r
-\r
-  PixelHeight   - Height of GopBlt/BmpImage in pixels\r
-\r
-  PixelWidth    - Width of GopBlt/BmpImage in pixels\r
-\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS           - GopBlt and GopBltSize are returned.\r
-  EFI_UNSUPPORTED       - BmpImage is not a valid *.BMP image\r
-  EFI_BUFFER_TOO_SMALL  - The passed in GopBlt buffer is not big enough.\r
-                          GopBltSize will contain the required size.\r
-  EFI_OUT_OF_RESOURCES  - No enough buffer to allocate\r
-\r
---*/\r
 {\r
   UINT8             *Image;\r
   UINT8             *ImageHeader;\r
@@ -318,29 +286,24 @@ Returns:
 }\r
 \r
 \r
-EFI_STATUS\r
-LockKeyboards (\r
-  IN  CHAR16    *Password\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-  Use Console Control Protocol to lock the Console In Spliter virtual handle.\r
+/**\r
+  Use Console Control Protocol to lock the Console In Spliter virtual handle. \r
   This is the ConInHandle and ConIn handle in the EFI system table. All key\r
   presses will be ignored until the Password is typed in. The only way to\r
   disable the password is to type it in to a ConIn device.\r
 \r
-Arguments:\r
-  Password - Password used to lock ConIn device\r
-\r
+  @param  Password        Password used to lock ConIn device.\r
 \r
-Returns:\r
-\r
-  EFI_SUCCESS     - ConsoleControl has been flipped to graphics and logo\r
+  @retval EFI_SUCCESS     ConsoleControl has been flipped to graphics and logo\r
                           displayed.\r
-  EFI_UNSUPPORTED - Logo not found\r
+  @retval EFI_UNSUPPORTED Password not found\r
 \r
---*/\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+LockKeyboards (\r
+  IN  CHAR16    *Password\r
+  )\r
 {\r
   EFI_STATUS                    Status;\r
   EFI_CONSOLE_CONTROL_PROTOCOL  *ConsoleControl;\r
@@ -355,60 +318,44 @@ Returns:
 }\r
 \r
 \r
-EFI_STATUS\r
-EnableQuietBoot (\r
-  IN  EFI_GUID  *LogoFile\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
+/**\r
   Use Console Control to turn off UGA based Simple Text Out consoles from going\r
   to the UGA device. Put up LogoFile on every UGA device that is a console\r
 \r
-Arguments:\r
+  @param[in]  LogoFile   File name of logo to display on the center of the screen.\r
 \r
-  LogoFile - File name of logo to display on the center of the screen.\r
+  @retval EFI_SUCCESS     ConsoleControl has been flipped to graphics and logo displayed.\r
+  @retval EFI_UNSUPPORTED Logo not found\r
 \r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS           - ConsoleControl has been flipped to graphics and logo\r
-                          displayed.\r
-  EFI_UNSUPPORTED       - Logo not found\r
-\r
---*/\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+EnableQuietBoot (\r
+  IN  EFI_GUID  *LogoFile\r
+  )\r
 {\r
   return EnableQuietBootEx (LogoFile, NULL);\r
 }\r
 \r
+/**\r
+  Use Console Control to turn off GOP/UGA based Simple Text Out consoles from going\r
+  to the UGA device. Put up LogoFile on every UGA device that is a console\r
+\r
+  @param  LogoFile    File name of logo to display on the center of the screen.\r
+  @param  ImageHandle The driver image handle of the caller. The parameter is used to\r
+                      optimize the loading of the logo file so that the FV from which\r
+                      the driver image is loaded will be tried first.\r
+\r
+  @retval EFI_SUCCESS     ConsoleControl has been flipped to graphics and logo displayed.\r
+  @retval EFI_UNSUPPORTED Logo not found\r
+\r
+**/\r
 EFI_STATUS\r
+EFIAPI\r
 EnableQuietBootEx (\r
   IN  EFI_GUID    *LogoFile,\r
   IN  EFI_HANDLE  ImageHandle\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Use Console Control to turn off GOP/UGA based Simple Text Out consoles from going\r
-  to the GOP/UGA device. Put up LogoFile on every GOP/UGA device that is a console\r
-\r
-Arguments:\r
-\r
-  LogoFile    - File name of logo to display on the center of the screen.\r
-  ImageHandle - The driver image handle of the caller. The parameter is used to\r
-                optimize the loading of the logo file so that the FV from which\r
-                the driver image is loaded will be tried first.\r
-\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS           - ConsoleControl has been flipped to graphics and logo\r
-                          displayed.\r
-  EFI_UNSUPPORTED       - Logo not found\r
-\r
---*/\r
 {\r
   EFI_STATUS                    Status;\r
   EFI_CONSOLE_CONTROL_PROTOCOL  *ConsoleControl;\r
@@ -625,28 +572,19 @@ Returns:
   return Status;\r
 }\r
 \r
+/**\r
+  Use Console Control to turn on UGA based Simple Text Out consoles. The UGA \r
+  Simple Text Out screens will now be synced up with all non UGA output devices\r
 \r
+  @retval EFI_SUCCESS          UGA devices are back in text mode and synced up.\r
+  @retval EFI_UNSUPPORTED      Logo not found\r
+\r
+**/\r
 EFI_STATUS\r
+EFIAPI\r
 DisableQuietBoot (\r
   VOID\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Use Console Control to turn on GOP/UGA based Simple Text Out consoles. The GOP/UGA\r
-  Simple Text Out screens will now be synced up with all non GOP/UGA output devices\r
-\r
-Arguments:\r
-\r
-  NONE\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS           - GOP/UGA devices are back in text mode and synced up.\r
-  EFI_UNSUPPORTED       - Logo not found\r
-\r
---*/\r
 {\r
   EFI_STATUS                    Status;\r
   EFI_CONSOLE_CONTROL_PROTOCOL  *ConsoleControl;\r
@@ -659,8 +597,25 @@ Returns:
   return ConsoleControl->SetMode (ConsoleControl, EfiConsoleControlScreenText);\r
 }\r
 \r
+/**\r
+  Display string worker for: Print, PrintAt, IPrint, IPrintAt.\r
+\r
+  @param GraphicsOutput   Graphics output protocol interface\r
+  @param UgaDraw          UGA draw protocol interface\r
+  @param Sto              Simple text out protocol interface\r
+  @param X                X coordinate to start printing\r
+  @param Y                Y coordinate to start printing\r
+  @param Foreground       Foreground color\r
+  @param Background       Background color\r
+  @param fmt              Format string\r
+  @param args             Print arguments\r
+\r
+  @retval EFI_SUCCESS             Success.\r
+  @retval EFI_OUT_OF_RESOURCES    Out of resources.\r
+\r
+**/\r
 UINTN\r
-_IPrint (\r
+Print (\r
   IN EFI_GRAPHICS_OUTPUT_PROTOCOL     *GraphicsOutput,\r
   IN EFI_UGA_DRAW_PROTOCOL            *UgaDraw,\r
   IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL  *Sto,\r
@@ -671,38 +626,6 @@ _IPrint (
   IN CHAR16                           *fmt,\r
   IN VA_LIST                          args\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Display string worker for: Print, PrintAt, IPrint, IPrintAt\r
-\r
-Arguments:\r
-\r
-  GraphicsOutput  - Graphics output protocol interface\r
-\r
-  UgaDraw         - UGA draw protocol interface\r
-\r
-  Sto             - Simple text out protocol interface\r
-\r
-  X               - X coordinate to start printing\r
-\r
-  Y               - Y coordinate to start printing\r
-\r
-  Foreground      - Foreground color\r
-\r
-  Background      - Background color\r
-\r
-  fmt             - Format string\r
-\r
-  args            - Print arguments\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS             -  success\r
-  EFI_OUT_OF_RESOURCES    -  out of resources\r
-\r
---*/\r
 {\r
   VOID                           *Buffer;\r
   EFI_STATUS                     Status;\r
@@ -717,6 +640,8 @@ Returns:
   EFI_HII_FONT_PROTOCOL          *HiiFont;\r
   EFI_IMAGE_OUTPUT               *Blt;\r
   EFI_FONT_DISPLAY_INFO          *FontInfo;\r
+  EFI_HII_ROW_INFO               *RowInfoArray;\r
+  UINTN                          RowInfoArraySize;\r
 \r
   //\r
   // For now, allocate an arbitrarily long buffer\r
@@ -743,7 +668,6 @@ Returns:
 \r
   ASSERT ((HorizontalResolution != 0) && (VerticalResolution !=0));\r
 \r
-  ASSERT (GraphicsOutput != NULL);\r
   Status = gBS->LocateProtocol (&gEfiHiiFontProtocolGuid, NULL, (VOID **) &HiiFont);\r
   if (EFI_ERROR (Status)) {\r
     goto Error;\r
@@ -778,7 +702,6 @@ Returns:
 \r
   Blt->Width        = (UINT16) (HorizontalResolution);\r
   Blt->Height       = (UINT16) (VerticalResolution);\r
-  Blt->Image.Screen = GraphicsOutput;\r
 \r
   FontInfo = (EFI_FONT_DISPLAY_INFO *) AllocateZeroPool (sizeof (EFI_FONT_DISPLAY_INFO));\r
   if (FontInfo == NULL) {\r
@@ -804,19 +727,76 @@ Returns:
       );\r
   }\r
 \r
-  Status = HiiFont->StringToImage (\r
-                       HiiFont,\r
-                       EFI_HII_IGNORE_IF_NO_GLYPH | EFI_HII_DIRECT_TO_SCREEN,\r
-                       Buffer,\r
-                       FontInfo,\r
-                       &Blt,\r
-                       X,\r
-                       Y,\r
-                       NULL,\r
-                       NULL,\r
-                       NULL\r
-                       );\r
+  if (GraphicsOutput != NULL) {\r
+    Blt->Image.Screen = GraphicsOutput;\r
+    \r
+    Status = HiiFont->StringToImage (\r
+                         HiiFont,\r
+                         EFI_HII_IGNORE_IF_NO_GLYPH | EFI_HII_DIRECT_TO_SCREEN,\r
+                         Buffer,\r
+                         FontInfo,\r
+                         &Blt,\r
+                         X,\r
+                         Y,\r
+                         NULL,\r
+                         NULL,\r
+                         NULL\r
+                         );\r
+\r
+  } else if (FeaturePcdGet (PcdUgaConsumeSupport)) {\r
+    ASSERT (UgaDraw!= NULL);\r
+\r
+    Blt->Image.Bitmap = AllocateZeroPool (Blt->Width * Blt->Height * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL));\r
+    if (Blt->Image.Bitmap == NULL) {\r
+      SafeFreePool (Blt);\r
+      SafeFreePool (Buffer);\r
+      return EFI_OUT_OF_RESOURCES;\r
+    }\r
+\r
+    RowInfoArray = NULL;\r
+    //\r
+    //  StringToImage only support blt'ing image to device using GOP protocol. If GOP is not supported in this platform,\r
+    //  we ask StringToImage to print the string to blt buffer, then blt to device using UgaDraw.\r
+    //\r
+    Status = HiiFont->StringToImage (\r
+                         HiiFont,\r
+                         EFI_HII_IGNORE_IF_NO_GLYPH,\r
+                         Buffer,\r
+                         FontInfo,\r
+                         &Blt,\r
+                         X,\r
+                         Y,\r
+                         &RowInfoArray,\r
+                         &RowInfoArraySize,\r
+                         NULL\r
+                         );\r
+\r
+    if (!EFI_ERROR (Status)) {\r
+      //\r
+      // Line breaks are handled by caller of DrawUnicodeWeightAtCursorN, so the updated parameter RowInfoArraySize by StringToImage will\r
+      // always be 1 or 0 (if there is no valid Unicode Char can be printed). ASSERT here to make sure.\r
+      //\r
+      ASSERT (RowInfoArraySize <= 1);\r
+\r
+      Status = UgaDraw->Blt (\r
+                          UgaDraw,\r
+                          (EFI_UGA_PIXEL *) Blt->Image.Bitmap,\r
+                          EfiUgaBltBufferToVideo,\r
+                          X,\r
+                          Y,\r
+                          X,\r
+                          Y,\r
+                          RowInfoArray[0].LineWidth,\r
+                          RowInfoArray[0].LineHeight,\r
+                          Blt->Width * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)\r
+                          );\r
+    }\r
 \r
+    SafeFreePool (RowInfoArray);\r
+    SafeFreePool (Blt->Image.Bitmap);\r
+  } else {\r
+    Status = EFI_UNSUPPORTED;\r
+  }\r
 \r
 Error:\r
   SafeFreePool (Blt);\r
@@ -825,7 +805,22 @@ Error:
   return Status;\r
 }\r
 \r
+/**\r
+  Print to graphics screen at the given X,Y coordinates of the graphics screen.\r
+  see definition of Print to find rules for constructing Fmt.\r
+\r
+  @param  X            Row to start printing at\r
+  @param  Y            Column to start printing at\r
+  @param  ForeGround   Foreground color\r
+  @param  BackGround   background color\r
+  @param  Fmt          Print format sting. See definition of Print\r
+  @param  ...          Argumnet stream defined by Fmt string\r
+\r
+  @retval UINTN     Number of Characters printed\r
+\r
+**/\r
 UINTN\r
+EFIAPI\r
 PrintXY (\r
   IN UINTN                            X,\r
   IN UINTN                            Y,\r
@@ -834,31 +829,6 @@ PrintXY (
   IN CHAR16                           *Fmt,\r
   ...\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-    Prints a formatted unicode string to the default console\r
-\r
-Arguments:\r
-\r
-    X           - X coordinate to start printing\r
-\r
-    Y           - Y coordinate to start printing\r
-\r
-    ForeGround  - Foreground color\r
-\r
-    BackGround  - Background color\r
-\r
-    Fmt         - Format string\r
-\r
-    ...         - Print arguments\r
-\r
-Returns:\r
-\r
-    Length of string printed to the console\r
-\r
---*/\r
 {\r
   EFI_HANDLE                    Handle;\r
   EFI_GRAPHICS_OUTPUT_PROTOCOL  *GraphicsOutput;\r
@@ -901,6 +871,6 @@ Returns:
     return Status;\r
   }\r
 \r
-  return _IPrint (GraphicsOutput, UgaDraw, Sto, X, Y, ForeGround, BackGround, Fmt, Args);\r
+  return Print (GraphicsOutput, UgaDraw, Sto, X, Y, ForeGround, BackGround, Fmt, Args);\r
 }\r
 \r
index c9fa564a8c01337e31c7958621cabb9ccbc7f833..0f137d4ac04f305395ff7648d978149fe6ae6ac8 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Graphics Library\r
 \r
-  Copyright (c) 2006 - 2007, Intel Corporation.<BR>\r
+  Copyright (c) 2006 - 2008, Intel Corporation.<BR>\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
@@ -36,6 +36,7 @@
 \r
 **/\r
 EFI_STATUS\r
+EFIAPI\r
 GetGraphicsBitMapFromFV (\r
   IN  EFI_GUID      *FileNameGuid,\r
   OUT VOID          **Image,\r
@@ -63,6 +64,7 @@ GetGraphicsBitMapFromFV (
 \r
 **/\r
 EFI_STATUS\r
+EFIAPI\r
 GetGraphicsBitMapFromFVEx (\r
   IN  EFI_HANDLE    ImageHandle,\r
   IN  EFI_GUID      *FileNameGuid,\r
@@ -88,6 +90,7 @@ GetGraphicsBitMapFromFVEx (
                                 UgaBltSize will contain the required size.\r
 **/\r
 EFI_STATUS\r
+EFIAPI\r
 ConvertBmpToUgaBlt (\r
   IN  VOID      *BmpImage,\r
   IN  UINTN     BmpImageSize,\r
@@ -109,6 +112,7 @@ ConvertBmpToUgaBlt (
 \r
 **/\r
 EFI_STATUS\r
+EFIAPI\r
 EnableQuietBoot (\r
   IN  EFI_GUID  *LogoFile\r
   );\r
@@ -127,6 +131,7 @@ EnableQuietBoot (
 \r
 **/\r
 EFI_STATUS\r
+EFIAPI\r
 EnableQuietBootEx (\r
   IN  EFI_GUID    *LogoFile,\r
   IN  EFI_HANDLE  ImageHandle\r
@@ -141,6 +146,7 @@ EnableQuietBootEx (
 \r
 **/\r
 EFI_STATUS\r
+EFIAPI\r
 DisableQuietBoot (\r
   VOID\r
   );\r
@@ -160,6 +166,7 @@ DisableQuietBoot (
 \r
 **/\r
 EFI_STATUS\r
+EFIAPI\r
 LockKeyboards (\r
   IN  CHAR16    *Password\r
   );\r
@@ -171,8 +178,8 @@ LockKeyboards (
 \r
   @param[in]  X            Row to start printing at\r
   @param[in]  Y            Column to start printing at\r
-  @param[in]  Foreground   Foreground color\r
-  @param[in]  Background   background color\r
+  @param[in]  ForeGround   Foreground color\r
+  @param[in]  ForeGround   background color\r
   @param[in]  Fmt          Print format sting. See definition of Print\r
   @param[in]  ...          Argumnet stream defined by Fmt string\r
 \r
@@ -184,8 +191,8 @@ EFIAPI
 PrintXY (\r
   IN UINTN                            X,\r
   IN UINTN                            Y,\r
-  IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL    *Foreground, OPTIONAL\r
-  IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL    *Background, OPTIONAL\r
+  IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL    *ForeGround, OPTIONAL\r
+  IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL    *ForeGround, OPTIONAL\r
   IN CHAR16                           *Fmt,\r
   ...\r
   );\r