summaryrefslogtreecommitdiffstats
path: root/DuetPkg
diff options
context:
space:
mode:
authorklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2008-04-30 01:48:23 +0000
committerklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2008-04-30 01:48:23 +0000
commit9aa08808da674b5a1ea613218605ba1a3a38afd3 (patch)
treec8c0eba0ce5ff1e4cf215f227e03d6d86a9b73b0 /DuetPkg
parenteb16e24041d74b607d848adba78ea4f417edff44 (diff)
downloadedk2-9aa08808da674b5a1ea613218605ba1a3a38afd3.tar.gz
edk2-9aa08808da674b5a1ea613218605ba1a3a38afd3.tar.bz2
edk2-9aa08808da674b5a1ea613218605ba1a3a38afd3.zip
Fix the bugs for DatahubGen module
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5151 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'DuetPkg')
-rw-r--r--DuetPkg/DataHubGenDxe/DataHubGen.c35
-rw-r--r--DuetPkg/DataHubGenDxe/DataHubGen.h1
-rw-r--r--DuetPkg/DataHubGenDxe/DataHubGen.inf5
3 files changed, 15 insertions, 26 deletions
diff --git a/DuetPkg/DataHubGenDxe/DataHubGen.c b/DuetPkg/DataHubGenDxe/DataHubGen.c
index 4ff92c4d1f..dcb42bb96b 100644
--- a/DuetPkg/DataHubGenDxe/DataHubGen.c
+++ b/DuetPkg/DataHubGenDxe/DataHubGen.c
@@ -18,8 +18,8 @@ Abstract:
**/
#include "DataHubGen.h"
+EFI_HII_DATABASE_PROTOCOL *gHiiDatabase;
-EFI_HII_PROTOCOL *gHii;
extern UINT8 DataHubGenDxeStrings[];
EFI_DATA_HUB_PROTOCOL *gDataHub;
@@ -30,26 +30,18 @@ GetSmbiosTablesFromHob (
VOID
)
{
- EFI_STATUS Status;
- EFI_HOB_HANDOFF_INFO_TABLE *HobList;
EFI_PHYSICAL_ADDRESS *Table;
-
+ EFI_PEI_HOB_POINTERS GuidHob;
//
// Get Hob List
//
-
- Status = EfiGetSystemConfigurationTable (&gEfiHobListGuid, (VOID *) &HobList);
- if (EFI_ERROR (Status)) {
- return NULL;
- }
-
- //
- // If there is a SMBIOS table in the HOB add it to the EFI System table
- //
- Table = GetNextGuidHob (&gEfiSmbiosTableGuid, &HobList);
-
- if (!EFI_ERROR (Status)) {
- return (VOID *)(UINTN)*Table;
+ GuidHob.Raw = GetHobList ();
+ GuidHob.Raw = GetNextGuidHob (&gEfiSmbiosTableGuid, GuidHob.Raw);
+ if (GuidHob.Raw != NULL) {
+ Table = GET_GUID_HOB_DATA (GuidHob.Guid);
+ if (Table != NULL) {
+ return (VOID *)(UINTN)*Table;
+ }
}
return NULL;
@@ -344,19 +336,12 @@ DataHubGenEntrypoint (
return Status;
}
-#if (EFI_SPECIFICATION_VERSION >= 0x0002000A)
Status = gBS->LocateProtocol (
&gEfiHiiDatabaseProtocolGuid,
NULL,
&gHiiDatabase
);
-#else
- Status = gBS->LocateProtocol (
- &gEfiHiiProtocolGuid,
- NULL,
- (VOID**)&gHii
- );
-#endif
+
if (EFI_ERROR (Status)) {
return Status;
}
diff --git a/DuetPkg/DataHubGenDxe/DataHubGen.h b/DuetPkg/DataHubGenDxe/DataHubGen.h
index d45f212a7a..4d1eb61b35 100644
--- a/DuetPkg/DataHubGenDxe/DataHubGen.h
+++ b/DuetPkg/DataHubGenDxe/DataHubGen.h
@@ -30,6 +30,7 @@ Abstract:
#include <Protocol/Datahub.h>
#include <Protocol/FrameworkHii.h>
+#include <Protocol/HiiDatabase.h>
#include <Library/BaseLib.h>
#include <Library/UefiLib.h>
diff --git a/DuetPkg/DataHubGenDxe/DataHubGen.inf b/DuetPkg/DataHubGenDxe/DataHubGen.inf
index 58ff185b39..6a4056605b 100644
--- a/DuetPkg/DataHubGenDxe/DataHubGen.inf
+++ b/DuetPkg/DataHubGenDxe/DataHubGen.inf
@@ -59,5 +59,8 @@
gEfiMemoryProducerGuid
gEfiHiiProtocolGuid
+[Protocols]
+ gEfiHiiDatabaseProtocolGuid
+
[Depex]
- gEfiDataHubProtocolGuid AND gEfiHiiProtocolGuid \ No newline at end of file
+ gEfiDataHubProtocolGuid AND gEfiHiiDatabaseProtocolGuid \ No newline at end of file