mirror of https://github.com/acidanthera/audk.git
Fix the bugs for DatahubGen module
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5151 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
eb16e24041
commit
9aa08808da
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -59,5 +59,8 @@
|
|||
gEfiMemoryProducerGuid
|
||||
gEfiHiiProtocolGuid
|
||||
|
||||
[Protocols]
|
||||
gEfiHiiDatabaseProtocolGuid
|
||||
|
||||
[Depex]
|
||||
gEfiDataHubProtocolGuid AND gEfiHiiProtocolGuid
|
||||
gEfiDataHubProtocolGuid AND gEfiHiiDatabaseProtocolGuid
|
Loading…
Reference in New Issue