Revision: 14236
          http://edk2.svn.sourceforge.net/edk2/?rev=14236&view=rev
Author:   lzeng14
Date:     2013-04-02 03:23:54 +0000 (Tue, 02 Apr 2013)
Log Message:
-----------
Don't assume HiiDatabase has been present at the entrypoint and don't assume 
HiiDatabase and HiiFont are on the same handle according to the UEFI spec.

Signed-off-by: Star Zeng <[email protected]>
Reviewed-by: Elvin Li <[email protected]>

Modified Paths:
--------------
    
trunk/edk2/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c

Modified: 
trunk/edk2/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c
===================================================================
--- 
trunk/edk2/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c  
    2013-04-02 02:30:45 UTC (rev 14235)
+++ 
trunk/edk2/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c  
    2013-04-02 03:23:54 UTC (rev 14236)
@@ -57,7 +57,7 @@
 EFI_HII_DATABASE_PROTOCOL   *mHiiDatabase;
 EFI_HII_FONT_PROTOCOL       *mHiiFont;
 EFI_HII_HANDLE              mHiiHandle;
-EFI_EVENT                   mHiiRegistration;
+VOID                        *mHiiRegistration;
 
 EFI_GUID             mFontPackageListGuid = {0xf5f219d3, 0x7006, 0x4648, 
{0xac, 0x8d, 0xd6, 0x1d, 0xfb, 0x7b, 0xc6, 0xad}};
 
@@ -806,42 +806,14 @@
   VOID
   )
 {
-  EFI_HANDLE  Handle;
-  UINTN       Size;
   EFI_STATUS  Status;
 
-  //
-  // There should only be one - so buffer size is this
-  //
-  Size = sizeof (EFI_HANDLE);
-
-  Status = gBS->LocateHandle (
-                  ByProtocol,
-                  &gEfiHiiDatabaseProtocolGuid,
-                  NULL,
-                  &Size,
-                  (VOID **) &Handle
-                  );
-
+  Status = gBS->LocateProtocol (&gEfiHiiDatabaseProtocolGuid, NULL, (VOID **) 
&mHiiDatabase);
   if (EFI_ERROR (Status)) {
     return Status;
   }
 
-  Status = gBS->HandleProtocol (
-                  Handle,
-                  &gEfiHiiDatabaseProtocolGuid,
-                  (VOID **) &mHiiDatabase
-                  );
-
-  if (EFI_ERROR (Status)) {
-    return Status;
-  }
-
-  Status = gBS->HandleProtocol (
-                  Handle,
-                  &gEfiHiiFontProtocolGuid,
-                  (VOID **) &mHiiFont
-                  );
+  Status = gBS->LocateProtocol (&gEfiHiiFontProtocolGuid, NULL, (VOID **) 
&mHiiFont);
   return Status;
 }
 
@@ -2057,7 +2029,9 @@
                   NULL,
                   (VOID **) &HiiDatabase
                   );
-  ASSERT_EFI_ERROR (Status);
+  if (EFI_ERROR (Status)) {
+    return;
+  }
 
   //
   // Add 4 bytes to the header for entire length for HiiAddPackages use only.

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Own the Future-Intel(R) Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest. Compete 
for recognition, cash, and the chance to get your game on Steam. 
$5K grand prize plus 10 genre and skill prizes. Submit your demo 
by 6/6/13. http://altfarm.mediaplex.com/ad/ck/12124-176961-30367-2
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to