TianoCore EDK2 master
HobLib.h
Go to the documentation of this file.
1
16#ifndef __HOB_LIB_H__
17#define __HOB_LIB_H__
18
35VOID *
36EFIAPI
38 VOID
39 );
40
58VOID *
59EFIAPI
61 IN UINT16 Type,
62 IN CONST VOID *HobStart
63 );
64
78VOID *
79EFIAPI
81 IN UINT16 Type
82 );
83
106VOID *
107EFIAPI
109 IN CONST EFI_GUID *Guid,
110 IN CONST VOID *HobStart
111 );
112
131VOID *
132EFIAPI
134 IN CONST EFI_GUID *Guid
135 );
136
151EFIAPI
153 VOID
154 );
155
172VOID
173EFIAPI
175 IN CONST EFI_GUID *ModuleName,
176 IN EFI_PHYSICAL_ADDRESS MemoryAllocationModule,
177 IN UINT64 ModuleLength,
178 IN EFI_PHYSICAL_ADDRESS EntryPoint
179 );
180
197VOID
198EFIAPI
200 IN EFI_RESOURCE_TYPE ResourceType,
201 IN EFI_RESOURCE_ATTRIBUTE_TYPE ResourceAttribute,
202 IN EFI_PHYSICAL_ADDRESS PhysicalStart,
203 IN UINT64 NumberOfBytes,
204 IN EFI_GUID *OwnerGUID
205 );
206
222VOID
223EFIAPI
225 IN EFI_RESOURCE_TYPE ResourceType,
226 IN EFI_RESOURCE_ATTRIBUTE_TYPE ResourceAttribute,
227 IN EFI_PHYSICAL_ADDRESS PhysicalStart,
228 IN UINT64 NumberOfBytes
229 );
230
253VOID *
254EFIAPI
256 IN CONST EFI_GUID *Guid,
257 IN UINTN DataLength
258 );
259
285VOID *
286EFIAPI
288 IN CONST EFI_GUID *Guid,
289 IN VOID *Data,
290 IN UINTN DataLength
291 );
292
307VOID
308EFIAPI
310 IN EFI_PHYSICAL_ADDRESS BaseAddress,
311 IN UINT64 Length
312 );
313
330VOID
331EFIAPI
333 IN EFI_PHYSICAL_ADDRESS BaseAddress,
334 IN UINT64 Length,
335 IN CONST EFI_GUID *FvName,
336 IN CONST EFI_GUID *FileName
337 );
338
360VOID
361EFIAPI
363 IN EFI_PHYSICAL_ADDRESS BaseAddress,
364 IN UINT64 Length,
365 IN UINT32 AuthenticationStatus,
366 IN BOOLEAN ExtractedFv,
367 IN CONST EFI_GUID *FvName OPTIONAL,
368 IN CONST EFI_GUID *FileName OPTIONAL
369 );
370
385VOID
386EFIAPI
388 IN EFI_PHYSICAL_ADDRESS BaseAddress,
389 IN UINT64 Length
390 );
391
405VOID
406EFIAPI
408 IN UINT8 SizeOfMemorySpace,
409 IN UINT8 SizeOfIoSpace
410 );
411
425VOID
426EFIAPI
428 IN EFI_PHYSICAL_ADDRESS BaseAddress,
429 IN UINT64 Length
430 );
431
446VOID
447EFIAPI
449 IN EFI_PHYSICAL_ADDRESS BaseAddress,
450 IN UINT64 Length,
451 IN EFI_MEMORY_TYPE MemoryType
452 );
453
468VOID
469EFIAPI
471 IN EFI_PHYSICAL_ADDRESS BaseAddress,
472 IN UINT64 Length,
473 IN EFI_MEMORY_TYPE MemoryType
474 );
475
487#define GET_HOB_TYPE(HobStart) \
488 ((*(EFI_HOB_GENERIC_HEADER **)&(HobStart))->HobType)
489
501#define GET_HOB_LENGTH(HobStart) \
502 ((*(EFI_HOB_GENERIC_HEADER **)&(HobStart))->HobLength)
503
515#define GET_NEXT_HOB(HobStart) \
516 (VOID *)(*(UINT8 **)&(HobStart) + GET_HOB_LENGTH (HobStart))
517
531#define END_OF_HOB_LIST(HobStart) (GET_HOB_TYPE (HobStart) == (UINT16)EFI_HOB_TYPE_END_OF_HOB_LIST)
532
544#define GET_GUID_HOB_DATA(HobStart) \
545 (VOID *)(*(UINT8 **)&(HobStart) + sizeof (EFI_HOB_GUID_TYPE))
546
557#define GET_GUID_HOB_DATA_SIZE(HobStart) \
558 (UINT16)(GET_HOB_LENGTH (HobStart) - sizeof (EFI_HOB_GUID_TYPE))
559
560#endif
UINT64 UINTN
#define CONST
Definition: Base.h:259
#define IN
Definition: Base.h:279
VOID EFIAPI BuildFv2Hob(IN EFI_PHYSICAL_ADDRESS BaseAddress, IN UINT64 Length, IN CONST EFI_GUID *FvName, IN CONST EFI_GUID *FileName)
Definition: HobLib.c:433
VOID *EFIAPI GetFirstHob(IN UINT16 Type)
Definition: HobLib.c:142
VOID *EFIAPI GetFirstGuidHob(IN CONST EFI_GUID *Guid)
Definition: HobLib.c:215
VOID *EFIAPI BuildGuidDataHob(IN CONST EFI_GUID *Guid, IN VOID *Data, IN UINTN DataLength)
Definition: HobLib.c:375
VOID EFIAPI BuildModuleHob(IN CONST EFI_GUID *ModuleName, IN EFI_PHYSICAL_ADDRESS MemoryAllocationModule, IN UINT64 ModuleLength, IN EFI_PHYSICAL_ADDRESS EntryPoint)
Definition: HobLib.c:269
VOID EFIAPI BuildCpuHob(IN UINT8 SizeOfMemorySpace, IN UINT8 SizeOfIoSpace)
Definition: HobLib.c:520
VOID EFIAPI BuildResourceDescriptorHob(IN EFI_RESOURCE_TYPE ResourceType, IN EFI_RESOURCE_ATTRIBUTE_TYPE ResourceAttribute, IN EFI_PHYSICAL_ADDRESS PhysicalStart, IN UINT64 NumberOfBytes)
Definition: HobLib.c:299
VOID EFIAPI BuildFvHob(IN EFI_PHYSICAL_ADDRESS BaseAddress, IN UINT64 Length)
Definition: HobLib.c:404
VOID *EFIAPI BuildGuidHob(IN CONST EFI_GUID *Guid, IN UINTN DataLength)
Definition: HobLib.c:336
VOID EFIAPI BuildBspStoreHob(IN EFI_PHYSICAL_ADDRESS BaseAddress, IN UINT64 Length, IN EFI_MEMORY_TYPE MemoryType)
Definition: HobLib.c:573
VOID EFIAPI BuildFv3Hob(IN EFI_PHYSICAL_ADDRESS BaseAddress, IN UINT64 Length, IN UINT32 AuthenticationStatus, IN BOOLEAN ExtractedFv, IN CONST EFI_GUID *FvName OPTIONAL, IN CONST EFI_GUID *FileName OPTIONAL)
Definition: HobLib.c:466
VOID EFIAPI BuildMemoryAllocationHob(IN EFI_PHYSICAL_ADDRESS BaseAddress, IN UINT64 Length, IN EFI_MEMORY_TYPE MemoryType)
Definition: HobLib.c:601
VOID *EFIAPI GetNextHob(IN UINT16 Type, IN CONST VOID *HobStart)
Definition: HobLib.c:103
VOID EFIAPI BuildCvHob(IN EFI_PHYSICAL_ADDRESS BaseAddress, IN UINT64 Length)
Definition: HobLib.c:494
VOID *EFIAPI GetNextGuidHob(IN CONST EFI_GUID *Guid, IN CONST VOID *HobStart)
Definition: HobLib.c:176
VOID *EFIAPI GetHobList(VOID)
Definition: HobLib.c:76
VOID EFIAPI BuildStackHob(IN EFI_PHYSICAL_ADDRESS BaseAddress, IN UINT64 Length)
Definition: HobLib.c:546
EFI_BOOT_MODE EFIAPI GetBootModeHob(VOID)
Definition: HobLib.c:240
VOID EFIAPI BuildResourceDescriptorWithOwnerHob(IN EFI_RESOURCE_TYPE ResourceType, IN EFI_RESOURCE_ATTRIBUTE_TYPE ResourceAttribute, IN EFI_PHYSICAL_ADDRESS PhysicalStart, IN UINT64 NumberOfBytes, IN EFI_GUID *OwnerGUID)
UINT32 EFI_BOOT_MODE
Definition: PiBootMode.h:18
UINT32 EFI_RESOURCE_TYPE
Definition: PiHob.h:223
UINT32 EFI_RESOURCE_ATTRIBUTE_TYPE
Definition: PiHob.h:240
UINT64 EFI_PHYSICAL_ADDRESS
Definition: UefiBaseType.h:49
EFI_MEMORY_TYPE
Definition: Base.h:213