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"
|
#include "DataHubGen.h"
|
||||||
|
EFI_HII_DATABASE_PROTOCOL *gHiiDatabase;
|
||||||
|
|
||||||
EFI_HII_PROTOCOL *gHii;
|
|
||||||
extern UINT8 DataHubGenDxeStrings[];
|
extern UINT8 DataHubGenDxeStrings[];
|
||||||
|
|
||||||
EFI_DATA_HUB_PROTOCOL *gDataHub;
|
EFI_DATA_HUB_PROTOCOL *gDataHub;
|
||||||
|
@ -30,27 +30,19 @@ GetSmbiosTablesFromHob (
|
||||||
VOID
|
VOID
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
|
||||||
EFI_HOB_HANDOFF_INFO_TABLE *HobList;
|
|
||||||
EFI_PHYSICAL_ADDRESS *Table;
|
EFI_PHYSICAL_ADDRESS *Table;
|
||||||
|
EFI_PEI_HOB_POINTERS GuidHob;
|
||||||
//
|
//
|
||||||
// Get Hob List
|
// Get Hob List
|
||||||
//
|
//
|
||||||
|
GuidHob.Raw = GetHobList ();
|
||||||
Status = EfiGetSystemConfigurationTable (&gEfiHobListGuid, (VOID *) &HobList);
|
GuidHob.Raw = GetNextGuidHob (&gEfiSmbiosTableGuid, GuidHob.Raw);
|
||||||
if (EFI_ERROR (Status)) {
|
if (GuidHob.Raw != NULL) {
|
||||||
return NULL;
|
Table = GET_GUID_HOB_DATA (GuidHob.Guid);
|
||||||
}
|
if (Table != 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;
|
return (VOID *)(UINTN)*Table;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -344,19 +336,12 @@ DataHubGenEntrypoint (
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if (EFI_SPECIFICATION_VERSION >= 0x0002000A)
|
|
||||||
Status = gBS->LocateProtocol (
|
Status = gBS->LocateProtocol (
|
||||||
&gEfiHiiDatabaseProtocolGuid,
|
&gEfiHiiDatabaseProtocolGuid,
|
||||||
NULL,
|
NULL,
|
||||||
&gHiiDatabase
|
&gHiiDatabase
|
||||||
);
|
);
|
||||||
#else
|
|
||||||
Status = gBS->LocateProtocol (
|
|
||||||
&gEfiHiiProtocolGuid,
|
|
||||||
NULL,
|
|
||||||
(VOID**)&gHii
|
|
||||||
);
|
|
||||||
#endif
|
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,6 +30,7 @@ Abstract:
|
||||||
|
|
||||||
#include <Protocol/Datahub.h>
|
#include <Protocol/Datahub.h>
|
||||||
#include <Protocol/FrameworkHii.h>
|
#include <Protocol/FrameworkHii.h>
|
||||||
|
#include <Protocol/HiiDatabase.h>
|
||||||
|
|
||||||
#include <Library/BaseLib.h>
|
#include <Library/BaseLib.h>
|
||||||
#include <Library/UefiLib.h>
|
#include <Library/UefiLib.h>
|
||||||
|
|
|
@ -59,5 +59,8 @@
|
||||||
gEfiMemoryProducerGuid
|
gEfiMemoryProducerGuid
|
||||||
gEfiHiiProtocolGuid
|
gEfiHiiProtocolGuid
|
||||||
|
|
||||||
|
[Protocols]
|
||||||
|
gEfiHiiDatabaseProtocolGuid
|
||||||
|
|
||||||
[Depex]
|
[Depex]
|
||||||
gEfiDataHubProtocolGuid AND gEfiHiiProtocolGuid
|
gEfiDataHubProtocolGuid AND gEfiHiiDatabaseProtocolGuid
|
Loading…
Reference in New Issue