TianoCore EDK2 master
Loading...
Searching...
No Matches
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_MEMORY_UNACCEPTED 0x00000007
236#define EFI_RESOURCE_MAX_MEMORY_TYPE 0x00000008
237
242
243//
244// These types can be ORed together as needed.
245//
246// The following attributes are used to describe settings
247//
248#define EFI_RESOURCE_ATTRIBUTE_PRESENT 0x00000001
249#define EFI_RESOURCE_ATTRIBUTE_INITIALIZED 0x00000002
250#define EFI_RESOURCE_ATTRIBUTE_TESTED 0x00000004
251#define EFI_RESOURCE_ATTRIBUTE_READ_PROTECTED 0x00000080
252//
253// This is typically used as memory cacheability attribute today.
254// NOTE: Since PI spec 1.4, please use EFI_RESOURCE_ATTRIBUTE_READ_ONLY_PROTECTED
255// as Physical write protected attribute, and EFI_RESOURCE_ATTRIBUTE_WRITE_PROTECTED
256// means Memory cacheability attribute: The memory supports being programmed with
257// a writeprotected cacheable attribute.
258//
259#define EFI_RESOURCE_ATTRIBUTE_WRITE_PROTECTED 0x00000100
260#define EFI_RESOURCE_ATTRIBUTE_EXECUTION_PROTECTED 0x00000200
261#define EFI_RESOURCE_ATTRIBUTE_PERSISTENT 0x00800000
262//
263// The rest of the attributes are used to describe capabilities
264//
265#define EFI_RESOURCE_ATTRIBUTE_SINGLE_BIT_ECC 0x00000008
266#define EFI_RESOURCE_ATTRIBUTE_MULTIPLE_BIT_ECC 0x00000010
267#define EFI_RESOURCE_ATTRIBUTE_ECC_RESERVED_1 0x00000020
268#define EFI_RESOURCE_ATTRIBUTE_ECC_RESERVED_2 0x00000040
269#define EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE 0x00000400
270#define EFI_RESOURCE_ATTRIBUTE_WRITE_COMBINEABLE 0x00000800
271#define EFI_RESOURCE_ATTRIBUTE_WRITE_THROUGH_CACHEABLE 0x00001000
272#define EFI_RESOURCE_ATTRIBUTE_WRITE_BACK_CACHEABLE 0x00002000
273#define EFI_RESOURCE_ATTRIBUTE_16_BIT_IO 0x00004000
274#define EFI_RESOURCE_ATTRIBUTE_32_BIT_IO 0x00008000
275#define EFI_RESOURCE_ATTRIBUTE_64_BIT_IO 0x00010000
276#define EFI_RESOURCE_ATTRIBUTE_UNCACHED_EXPORTED 0x00020000
277#define EFI_RESOURCE_ATTRIBUTE_READ_PROTECTABLE 0x00100000
278//
279// This is typically used as memory cacheability attribute today.
280// NOTE: Since PI spec 1.4, please use EFI_RESOURCE_ATTRIBUTE_READ_ONLY_PROTECTABLE
281// as Memory capability attribute: The memory supports being protected from processor
282// writes, and EFI_RESOURCE_ATTRIBUTE_WRITE_PROTEC TABLE means Memory cacheability attribute:
283// The memory supports being programmed with a writeprotected cacheable attribute.
284//
285#define EFI_RESOURCE_ATTRIBUTE_WRITE_PROTECTABLE 0x00200000
286#define EFI_RESOURCE_ATTRIBUTE_EXECUTION_PROTECTABLE 0x00400000
287#define EFI_RESOURCE_ATTRIBUTE_PERSISTABLE 0x01000000
288
289#define EFI_RESOURCE_ATTRIBUTE_READ_ONLY_PROTECTED 0x00040000
290#define EFI_RESOURCE_ATTRIBUTE_READ_ONLY_PROTECTABLE 0x00080000
291
292#define EFI_RESOURCE_ATTRIBUTE_ENCRYPTED 0x04000000
293#define EFI_RESOURCE_ATTRIBUTE_SPECIAL_PURPOSE 0x08000000
294//
295// Physical memory relative reliability attribute. This
296// memory provides higher reliability relative to other
297// memory in the system. If all memory has the same
298// reliability, then this bit is not used.
299//
300#define EFI_RESOURCE_ATTRIBUTE_MORE_RELIABLE 0x02000000
301
307typedef struct {
334
339typedef struct {
348 //
349 // Guid specific data goes here
350 //
352
356typedef struct {
368 UINT64 Length;
370
375typedef struct {
387 UINT64 Length;
397
402typedef struct {
414 UINT64 Length;
423 BOOLEAN ExtractedFv;
435
439typedef struct {
455 UINT8 Reserved[6];
457
461typedef struct {
467
475typedef struct {
480
487 UINT64 Length;
489
493typedef union {
495 EFI_HOB_HANDOFF_INFO_TABLE *HandoffInformationTable;
496 EFI_HOB_MEMORY_ALLOCATION *MemoryAllocation;
497 EFI_HOB_MEMORY_ALLOCATION_BSP_STORE *MemoryAllocationBspStore;
498 EFI_HOB_MEMORY_ALLOCATION_STACK *MemoryAllocationStack;
499 EFI_HOB_MEMORY_ALLOCATION_MODULE *MemoryAllocationModule;
500 EFI_HOB_RESOURCE_DESCRIPTOR *ResourceDescriptor;
501 EFI_HOB_GUID_TYPE *Guid;
502 EFI_HOB_FIRMWARE_VOLUME *FirmwareVolume;
503 EFI_HOB_FIRMWARE_VOLUME2 *FirmwareVolume2;
504 EFI_HOB_FIRMWARE_VOLUME3 *FirmwareVolume3;
505 EFI_HOB_CPU *Cpu;
507 EFI_HOB_UEFI_CAPSULE *Capsule;
508 UINT8 *Raw;
510
511#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:241
UINT64 EFI_PHYSICAL_ADDRESS
Definition: UefiBaseType.h:50
EFI_MEMORY_TYPE
UINT8 SizeOfIoSpace
Definition: PiHob.h:451
EFI_HOB_GENERIC_HEADER Header
Definition: PiHob.h:443
UINT8 SizeOfMemorySpace
Definition: PiHob.h:447
EFI_PHYSICAL_ADDRESS BaseAddress
Definition: PiHob.h:383
EFI_HOB_GENERIC_HEADER Header
Definition: PiHob.h:379
UINT32 AuthenticationStatus
Definition: PiHob.h:418
EFI_HOB_GENERIC_HEADER Header
Definition: PiHob.h:406
EFI_PHYSICAL_ADDRESS BaseAddress
Definition: PiHob.h:410
EFI_HOB_GENERIC_HEADER Header
Definition: PiHob.h:360
EFI_PHYSICAL_ADDRESS BaseAddress
Definition: PiHob.h:364
EFI_HOB_GENERIC_HEADER Header
Definition: PiHob.h:343
EFI_GUID Name
Definition: PiHob.h:347
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:465
EFI_HOB_GENERIC_HEADER Header
Definition: PiHob.h:311
EFI_PHYSICAL_ADDRESS PhysicalStart
Definition: PiHob.h:328
EFI_RESOURCE_TYPE ResourceType
Definition: PiHob.h:320
EFI_RESOURCE_ATTRIBUTE_TYPE ResourceAttribute
Definition: PiHob.h:324
EFI_PHYSICAL_ADDRESS BaseAddress
Definition: PiHob.h:486
EFI_HOB_GENERIC_HEADER Header
Definition: PiHob.h:479
Definition: Base.h:213