TianoCore EDK2 master
PiHob.h
Go to the documentation of this file.
1
12#ifndef __PI_HOB_H__
13#define __PI_HOB_H__
14
15//
16// HobType of EFI_HOB_GENERIC_HEADER.
17//
18#define EFI_HOB_TYPE_HANDOFF 0x0001
19#define EFI_HOB_TYPE_MEMORY_ALLOCATION 0x0002
20#define EFI_HOB_TYPE_RESOURCE_DESCRIPTOR 0x0003
21#define EFI_HOB_TYPE_GUID_EXTENSION 0x0004
22#define EFI_HOB_TYPE_FV 0x0005
23#define EFI_HOB_TYPE_CPU 0x0006
24#define EFI_HOB_TYPE_MEMORY_POOL 0x0007
25#define EFI_HOB_TYPE_FV2 0x0009
26#define EFI_HOB_TYPE_LOAD_PEIM_UNUSED 0x000A
27#define EFI_HOB_TYPE_UEFI_CAPSULE 0x000B
28#define EFI_HOB_TYPE_FV3 0x000C
29#define EFI_HOB_TYPE_UNUSED 0xFFFE
30#define EFI_HOB_TYPE_END_OF_HOB_LIST 0xFFFF
31
36typedef struct {
40 UINT16 HobType;
44 UINT16 HobLength;
48 UINT32 Reserved;
50
54#define EFI_HOB_HANDOFF_TABLE_VERSION 0x0009
55
60typedef struct {
70 UINT32 Version;
98
104typedef struct {
113
120
125
132
136 UINT8 Reserved[4];
138
144typedef struct {
154 //
155 // Additional data pertaining to the "Name" Guid memory
156 // may go here.
157 //
159
165typedef struct {
176
183typedef struct {
194
198typedef struct {
219
223typedef UINT32 EFI_RESOURCE_TYPE;
224
225//
226// Value of ResourceType in EFI_HOB_RESOURCE_DESCRIPTOR.
227//
228#define EFI_RESOURCE_SYSTEM_MEMORY 0x00000000
229#define EFI_RESOURCE_MEMORY_MAPPED_IO 0x00000001
230#define EFI_RESOURCE_IO 0x00000002
231#define EFI_RESOURCE_FIRMWARE_DEVICE 0x00000003
232#define EFI_RESOURCE_MEMORY_MAPPED_IO_PORT 0x00000004
233#define EFI_RESOURCE_MEMORY_RESERVED 0x00000005
234#define EFI_RESOURCE_IO_RESERVED 0x00000006
235#define EFI_RESOURCE_MAX_MEMORY_TYPE 0x00000007
236
241
242//
243// These types can be ORed together as needed.
244//
245// The following attributes are used to describe settings
246//
247#define EFI_RESOURCE_ATTRIBUTE_PRESENT 0x00000001
248#define EFI_RESOURCE_ATTRIBUTE_INITIALIZED 0x00000002
249#define EFI_RESOURCE_ATTRIBUTE_TESTED 0x00000004
250#define EFI_RESOURCE_ATTRIBUTE_READ_PROTECTED 0x00000080
251//
252// This is typically used as memory cacheability attribute today.
253// NOTE: Since PI spec 1.4, please use EFI_RESOURCE_ATTRIBUTE_READ_ONLY_PROTECTED
254// as Physical write protected attribute, and EFI_RESOURCE_ATTRIBUTE_WRITE_PROTECTED
255// means Memory cacheability attribute: The memory supports being programmed with
256// a writeprotected cacheable attribute.
257//
258#define EFI_RESOURCE_ATTRIBUTE_WRITE_PROTECTED 0x00000100
259#define EFI_RESOURCE_ATTRIBUTE_EXECUTION_PROTECTED 0x00000200
260#define EFI_RESOURCE_ATTRIBUTE_PERSISTENT 0x00800000
261//
262// The rest of the attributes are used to describe capabilities
263//
264#define EFI_RESOURCE_ATTRIBUTE_SINGLE_BIT_ECC 0x00000008
265#define EFI_RESOURCE_ATTRIBUTE_MULTIPLE_BIT_ECC 0x00000010
266#define EFI_RESOURCE_ATTRIBUTE_ECC_RESERVED_1 0x00000020
267#define EFI_RESOURCE_ATTRIBUTE_ECC_RESERVED_2 0x00000040
268#define EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE 0x00000400
269#define EFI_RESOURCE_ATTRIBUTE_WRITE_COMBINEABLE 0x00000800
270#define EFI_RESOURCE_ATTRIBUTE_WRITE_THROUGH_CACHEABLE 0x00001000
271#define EFI_RESOURCE_ATTRIBUTE_WRITE_BACK_CACHEABLE 0x00002000
272#define EFI_RESOURCE_ATTRIBUTE_16_BIT_IO 0x00004000
273#define EFI_RESOURCE_ATTRIBUTE_32_BIT_IO 0x00008000
274#define EFI_RESOURCE_ATTRIBUTE_64_BIT_IO 0x00010000
275#define EFI_RESOURCE_ATTRIBUTE_UNCACHED_EXPORTED 0x00020000
276#define EFI_RESOURCE_ATTRIBUTE_READ_PROTECTABLE 0x00100000
277//
278// This is typically used as memory cacheability attribute today.
279// NOTE: Since PI spec 1.4, please use EFI_RESOURCE_ATTRIBUTE_READ_ONLY_PROTECTABLE
280// as Memory capability attribute: The memory supports being protected from processor
281// writes, and EFI_RESOURCE_ATTRIBUTE_WRITE_PROTEC TABLE means Memory cacheability attribute:
282// The memory supports being programmed with a writeprotected cacheable attribute.
283//
284#define EFI_RESOURCE_ATTRIBUTE_WRITE_PROTECTABLE 0x00200000
285#define EFI_RESOURCE_ATTRIBUTE_EXECUTION_PROTECTABLE 0x00400000
286#define EFI_RESOURCE_ATTRIBUTE_PERSISTABLE 0x01000000
287
288#define EFI_RESOURCE_ATTRIBUTE_READ_ONLY_PROTECTED 0x00040000
289#define EFI_RESOURCE_ATTRIBUTE_READ_ONLY_PROTECTABLE 0x00080000
290
291//
292// Physical memory relative reliability attribute. This
293// memory provides higher reliability relative to other
294// memory in the system. If all memory has the same
295// reliability, then this bit is not used.
296//
297#define EFI_RESOURCE_ATTRIBUTE_MORE_RELIABLE 0x02000000
298
304typedef struct {
331
336typedef struct {
345 //
346 // Guid specific data goes here
347 //
349
353typedef struct {
365 UINT64 Length;
367
372typedef struct {
384 UINT64 Length;
394
399typedef struct {
411 UINT64 Length;
420 BOOLEAN ExtractedFv;
432
436typedef struct {
452 UINT8 Reserved[6];
454
458typedef struct {
464
472typedef struct {
477
484 UINT64 Length;
486
490typedef union {
492 EFI_HOB_HANDOFF_INFO_TABLE *HandoffInformationTable;
493 EFI_HOB_MEMORY_ALLOCATION *MemoryAllocation;
494 EFI_HOB_MEMORY_ALLOCATION_BSP_STORE *MemoryAllocationBspStore;
495 EFI_HOB_MEMORY_ALLOCATION_STACK *MemoryAllocationStack;
496 EFI_HOB_MEMORY_ALLOCATION_MODULE *MemoryAllocationModule;
497 EFI_HOB_RESOURCE_DESCRIPTOR *ResourceDescriptor;
498 EFI_HOB_GUID_TYPE *Guid;
499 EFI_HOB_FIRMWARE_VOLUME *FirmwareVolume;
500 EFI_HOB_FIRMWARE_VOLUME2 *FirmwareVolume2;
501 EFI_HOB_FIRMWARE_VOLUME3 *FirmwareVolume3;
502 EFI_HOB_CPU *Cpu;
504 EFI_HOB_UEFI_CAPSULE *Capsule;
505 UINT8 *Raw;
507
508#endif
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
UINT8 SizeOfIoSpace
Definition: PiHob.h:448
EFI_HOB_GENERIC_HEADER Header
Definition: PiHob.h:440
UINT8 SizeOfMemorySpace
Definition: PiHob.h:444
EFI_PHYSICAL_ADDRESS BaseAddress
Definition: PiHob.h:380
EFI_HOB_GENERIC_HEADER Header
Definition: PiHob.h:376
UINT32 AuthenticationStatus
Definition: PiHob.h:415
EFI_HOB_GENERIC_HEADER Header
Definition: PiHob.h:403
EFI_PHYSICAL_ADDRESS BaseAddress
Definition: PiHob.h:407
EFI_HOB_GENERIC_HEADER Header
Definition: PiHob.h:357
EFI_PHYSICAL_ADDRESS BaseAddress
Definition: PiHob.h:361
EFI_HOB_GENERIC_HEADER Header
Definition: PiHob.h:340
EFI_GUID Name
Definition: PiHob.h:344
EFI_BOOT_MODE BootMode
Definition: PiHob.h:74
EFI_PHYSICAL_ADDRESS EfiFreeMemoryBottom
Definition: PiHob.h:92
EFI_PHYSICAL_ADDRESS EfiMemoryTop
Definition: PiHob.h:79
EFI_PHYSICAL_ADDRESS EfiFreeMemoryTop
Definition: PiHob.h:88
EFI_PHYSICAL_ADDRESS EfiMemoryBottom
Definition: PiHob.h:83
EFI_HOB_GENERIC_HEADER Header
Definition: PiHob.h:64
EFI_PHYSICAL_ADDRESS EfiEndOfHobList
Definition: PiHob.h:96
EFI_HOB_MEMORY_ALLOCATION_HEADER AllocDescriptor
Definition: PiHob.h:192
EFI_HOB_GENERIC_HEADER Header
Definition: PiHob.h:187
EFI_PHYSICAL_ADDRESS MemoryBaseAddress
Definition: PiHob.h:119
EFI_MEMORY_TYPE MemoryType
Definition: PiHob.h:131
EFI_PHYSICAL_ADDRESS EntryPoint
Definition: PiHob.h:217
EFI_HOB_GENERIC_HEADER Header
Definition: PiHob.h:202
EFI_HOB_MEMORY_ALLOCATION_HEADER MemoryAllocationHeader
Definition: PiHob.h:207
EFI_HOB_MEMORY_ALLOCATION_HEADER AllocDescriptor
Definition: PiHob.h:174
EFI_HOB_GENERIC_HEADER Header
Definition: PiHob.h:169
EFI_HOB_GENERIC_HEADER Header
Definition: PiHob.h:148
EFI_HOB_MEMORY_ALLOCATION_HEADER AllocDescriptor
Definition: PiHob.h:153
EFI_HOB_GENERIC_HEADER Header
Definition: PiHob.h:462
EFI_HOB_GENERIC_HEADER Header
Definition: PiHob.h:308
EFI_PHYSICAL_ADDRESS PhysicalStart
Definition: PiHob.h:325
EFI_RESOURCE_TYPE ResourceType
Definition: PiHob.h:317
EFI_RESOURCE_ATTRIBUTE_TYPE ResourceAttribute
Definition: PiHob.h:321
EFI_PHYSICAL_ADDRESS BaseAddress
Definition: PiHob.h:483
EFI_HOB_GENERIC_HEADER Header
Definition: PiHob.h:476
Definition: Base.h:213