]> git.proxmox.com Git - mirror_edk2.git/blobdiff - DuetPkg/SmbiosGenDxe/SmbiosGen.c
DuetPkg: Fix GCC error to avoid the duplicated global variable in SmbiosGenDxe
[mirror_edk2.git] / DuetPkg / SmbiosGenDxe / SmbiosGen.c
index b615757553b8d92bdf176e870985f17950b1e2d5..393bb4d374e5f7d05f130e5a7b042481c94da227 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
 \r
-Copyright (c) 2009, Intel Corporation                                                         \r
-All rights reserved. This program and the accompanying materials                          \r
+Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
+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
 http://opensource.org/licenses/bsd-license.php                                            \r
@@ -18,7 +18,6 @@ Abstract:
 **/\r
 \r
 #include "SmbiosGen.h"\r
-EFI_HII_DATABASE_PROTOCOL   *gHiiDatabase;\r
 extern UINT8                SmbiosGenDxeStrings[];\r
 EFI_SMBIOS_PROTOCOL         *gSmbios;\r
 EFI_HII_HANDLE              gStringHandle;\r
@@ -30,11 +29,8 @@ GetSmbiosTablesFromHob (
 {\r
   EFI_PHYSICAL_ADDRESS       *Table;\r
   EFI_PEI_HOB_POINTERS        GuidHob;\r
-  //\r
-  // Get Hob List\r
-  //\r
-  GuidHob.Raw = GetHobList ();\r
-  GuidHob.Raw = GetNextGuidHob (&gEfiSmbiosTableGuid, GuidHob.Raw);\r
+\r
+  GuidHob.Raw = GetFirstGuidHob (&gEfiSmbiosTableGuid);\r
   if (GuidHob.Raw != NULL) {\r
     Table = GET_GUID_HOB_DATA (GuidHob.Guid);\r
     if (Table != NULL) {\r
@@ -214,16 +210,6 @@ SmbiosGenEntrypoint (
   if (EFI_ERROR (Status)) {\r
     return Status;\r
   }\r
-\r
-  Status = gBS->LocateProtocol (\r
-                  &gEfiHiiDatabaseProtocolGuid,\r
-                  NULL,\r
-                  (VOID**)&gHiiDatabase\r
-                  );\r
-\r
-  if (EFI_ERROR (Status)) {\r
-    return Status;\r
-  }\r
   \r
   gStringHandle = HiiAddPackages (\r
                     &gEfiCallerIdGuid,\r
@@ -333,7 +319,7 @@ LogSmbiosData (
   EFI_STATUS         Status;\r
   EFI_SMBIOS_HANDLE  SmbiosHandle;\r
   \r
-  SmbiosHandle = 0;\r
+  SmbiosHandle = SMBIOS_HANDLE_PI_RESERVED;\r
   Status = Smbios->Add (\r
                      Smbios,\r
                      NULL,\r