TianoCore EDK2
master
Loading...
Searching...
No Matches
DxeDtPlatformDtbLoaderLibDefault.c
Go to the documentation of this file.
1
9
#include <
PiDxe.h
>
10
11
#include <
Library/BaseLib.h
>
12
#include <
Library/DxeServicesLib.h
>
13
#include <
Library/MemoryAllocationLib.h
>
14
27
EFI_STATUS
28
EFIAPI
29
DtPlatformLoadDtb
(
30
OUT
VOID **Dtb,
31
OUT
UINTN
*DtbSize
32
)
33
{
34
EFI_STATUS
Status;
35
VOID *OrigDtb;
36
VOID *CopyDtb;
37
UINTN
OrigDtbSize;
38
39
Status =
GetSectionFromAnyFv
(
40
&gDtPlatformDefaultDtbFileGuid,
41
EFI_SECTION_RAW,
42
0,
43
&OrigDtb,
44
&OrigDtbSize
45
);
46
if
(EFI_ERROR (Status)) {
47
return
EFI_NOT_FOUND;
48
}
49
50
CopyDtb =
AllocateCopyPool
(OrigDtbSize, OrigDtb);
51
if
(CopyDtb ==
NULL
) {
52
return
EFI_OUT_OF_RESOURCES;
53
}
54
55
*Dtb = CopyDtb;
56
*DtbSize = OrigDtbSize;
57
58
return
EFI_SUCCESS
;
59
}
UINTN
UINT64 UINTN
Definition:
ProcessorBind.h:112
BaseLib.h
DtPlatformLoadDtb
EFI_STATUS EFIAPI DtPlatformLoadDtb(OUT VOID **Dtb, OUT UINTN *DtbSize)
Definition:
DxeDtPlatformDtbLoaderLibDefault.c:29
DxeServicesLib.h
GetSectionFromAnyFv
EFI_STATUS EFIAPI GetSectionFromAnyFv(IN CONST EFI_GUID *NameGuid, IN EFI_SECTION_TYPE SectionType, IN UINTN SectionInstance, OUT VOID **Buffer, OUT UINTN *Size)
Definition:
DxeServicesLib.c:374
AllocateCopyPool
VOID *EFIAPI AllocateCopyPool(IN UINTN AllocationSize, IN CONST VOID *Buffer)
Definition:
MemoryAllocationLib.c:590
NULL
#define NULL
Definition:
Base.h:319
OUT
#define OUT
Definition:
Base.h:284
MemoryAllocationLib.h
PiDxe.h
EFI_STATUS
RETURN_STATUS EFI_STATUS
Definition:
UefiBaseType.h:29
EFI_SUCCESS
#define EFI_SUCCESS
Definition:
UefiBaseType.h:112
EmbeddedPkg
Library
DxeDtPlatformDtbLoaderLibDefault
DxeDtPlatformDtbLoaderLibDefault.c
Generated on Fri Nov 15 2024 18:01:07 for TianoCore EDK2 by
1.9.6