TianoCore EDK2 master
Loading...
Searching...
No Matches
FitLib.h
Go to the documentation of this file.
1
7#ifndef FIT_LIB_H_
8#define FIT_LIB_H_
9
10#include <PiPei.h>
11#include <Library/DebugLib.h>
12#include <Library/FdtLib.h>
13
14typedef struct {
15 UINT64 Offset;
16 UINT64 RelocateType;
18
19typedef struct {
20 EFI_PHYSICAL_ADDRESS ImageBase;
21 EFI_PHYSICAL_ADDRESS PayloadBaseAddress;
22 UINT64 PayloadSize;
23 UINTN PayloadEntryOffset;
24 UINTN PayloadEntrySize;
25 EFI_PHYSICAL_ADDRESS PayloadEntryPoint;
26 UINTN RelocateTableOffset;
27 UINTN RelocateTableCount;
28 EFI_PHYSICAL_ADDRESS PayloadLoadAddress;
30
31typedef struct {
32 CHAR8 *Name;
33 UINT32 Offset;
35
36#define IMAGE_BASE_OFFSET OFFSET_OF (FIT_IMAGE_CONTEXT, ImageBase)
37#define PAYLOAD_BASE_ADDR_OFFSET OFFSET_OF (FIT_IMAGE_CONTEXT, PayloadBaseAddress)
38#define PAYLOAD_BASE_SIZE_OFFSET OFFSET_OF (FIT_IMAGE_CONTEXT, PayloadSize)
39#define PAYLOAD_ENTRY_OFFSET_OFFSET OFFSET_OF (FIT_IMAGE_CONTEXT, PayloadEntryOffset)
40#define PAYLOAD_ENTRY_SIZE_OFFSET OFFSET_OF (FIT_IMAGE_CONTEXT, PayloadEntrySize)
41#define PAYLOAD_ENTRY_POINT_OFFSET OFFSET_OF (FIT_IMAGE_CONTEXT, PayloadEntryPoint)
42#define RELOCATE_TABLE_OFFSET_OFFSET OFFSET_OF (FIT_IMAGE_CONTEXT, RelocateTableOffset)
43#define RELOCATE_TABLE_COUNT_OFFSET OFFSET_OF (FIT_IMAGE_CONTEXT, RelocateTableCount)
44#define PAYLOAD_LOAD_ADDR_OFFSET OFFSET_OF (FIT_IMAGE_CONTEXT, PayloadLoadAddress)
45
54EFIAPI
56 IN VOID *ImageBase,
57 OUT FIT_IMAGE_CONTEXT *Context
58 );
59
60#endif
UINT64 UINTN
EFI_STATUS EFIAPI ParseFitImage(IN VOID *ImageBase, OUT FIT_IMAGE_CONTEXT *Context)
Definition: FitLib.c:82
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
UINT64 EFI_PHYSICAL_ADDRESS
Definition: UefiBaseType.h:50
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29