TianoCore EDK2 master
Loading...
Searching...
No Matches
DxeHobListLib.c
Go to the documentation of this file.
1
10#include <Uefi.h>
11
12VOID *gHobList = NULL;
13
26BOOLEAN
28 IN CONST GUID *Guid1,
29 IN CONST GUID *Guid2
30 )
31{
32 UINT64 *Left;
33 UINT64 *Right;
34
35 Left = (UINT64 *)Guid1;
36 Right = (UINT64 *)Guid2;
37
38 return (BOOLEAN)(Left[0] == Right[0] && Left[1] == Right[1]);
39}
40
49EFIAPI
51 IN EFI_HANDLE ImageHandle,
52 IN EFI_SYSTEM_TABLE *SystemTable
53 )
54{
55 UINTN Index;
56
57 for (Index = 0; Index < SystemTable->NumberOfTableEntries; Index++) {
58 if (LocalCompareGuid (&gEfiHobListGuid, &SystemTable->ConfigurationTable[Index].VendorGuid)) {
59 gHobList = SystemTable->ConfigurationTable[Index].VendorTable;
60 return EFI_SUCCESS;
61 }
62 }
63
64 return EFI_NOT_FOUND;
65}
UINT64 UINTN
EFI_STATUS EFIAPI DxeHobListLibConstructor(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
Definition: DxeHobListLib.c:50
VOID * gHobList
Definition: DxeHobListLib.c:12
BOOLEAN LocalCompareGuid(IN CONST GUID *Guid1, IN CONST GUID *Guid2)
Definition: DxeHobListLib.c:27
#define NULL
Definition: Base.h:319
#define CONST
Definition: Base.h:259
#define IN
Definition: Base.h:279
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
VOID * EFI_HANDLE
Definition: UefiBaseType.h:33
#define EFI_SUCCESS
Definition: UefiBaseType.h:112
Definition: Base.h:213