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//
236// BZ3937_EFI_RESOURCE_MEMORY_UNACCEPTED is defined for unaccepted memory.
237// But this defitinion has not been officially in the PI spec. Base
238// on the code-first we define BZ3937_EFI_RESOURCE_MEMORY_UNACCEPTED at
239// MdeModulePkg/Include/Pi/PrePiHob.h and update EFI_RESOURCE_MAX_MEMORY_TYPE
240// to 8. After BZ3937_EFI_RESOURCE_MEMORY_UNACCEPTED is officially published
241// in PI spec, we will re-visit here.
242//
243// #define BZ3937_EFI_RESOURCE_MEMORY_UNACCEPTED 0x00000007
244#define EFI_RESOURCE_MAX_MEMORY_TYPE 0x00000008
245
250
251//
252// These types can be ORed together as needed.
253//
254// The following attributes are used to describe settings
255//
256#define EFI_RESOURCE_ATTRIBUTE_PRESENT 0x00000001
257#define EFI_RESOURCE_ATTRIBUTE_INITIALIZED 0x00000002
258#define EFI_RESOURCE_ATTRIBUTE_TESTED 0x00000004
259#define EFI_RESOURCE_ATTRIBUTE_READ_PROTECTED 0x00000080
260//
261// This is typically used as memory cacheability attribute today.
262// NOTE: Since PI spec 1.4, please use EFI_RESOURCE_ATTRIBUTE_READ_ONLY_PROTECTED
263// as Physical write protected attribute, and EFI_RESOURCE_ATTRIBUTE_WRITE_PROTECTED
264// means Memory cacheability attribute: The memory supports being programmed with
265// a writeprotected cacheable attribute.
266//
267#define EFI_RESOURCE_ATTRIBUTE_WRITE_PROTECTED 0x00000100
268#define EFI_RESOURCE_ATTRIBUTE_EXECUTION_PROTECTED 0x00000200
269#define EFI_RESOURCE_ATTRIBUTE_PERSISTENT 0x00800000
270//
271// The rest of the attributes are used to describe capabilities
272//
273#define EFI_RESOURCE_ATTRIBUTE_SINGLE_BIT_ECC 0x00000008
274#define EFI_RESOURCE_ATTRIBUTE_MULTIPLE_BIT_ECC 0x00000010
275#define EFI_RESOURCE_ATTRIBUTE_ECC_RESERVED_1 0x00000020
276#define EFI_RESOURCE_ATTRIBUTE_ECC_RESERVED_2 0x00000040
277#define EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE 0x00000400
278#define EFI_RESOURCE_ATTRIBUTE_WRITE_COMBINEABLE 0x00000800
279#define EFI_RESOURCE_ATTRIBUTE_WRITE_THROUGH_CACHEABLE 0x00001000
280#define EFI_RESOURCE_ATTRIBUTE_WRITE_BACK_CACHEABLE 0x00002000
281#define EFI_RESOURCE_ATTRIBUTE_16_BIT_IO 0x00004000
282#define EFI_RESOURCE_ATTRIBUTE_32_BIT_IO 0x00008000
283#define EFI_RESOURCE_ATTRIBUTE_64_BIT_IO 0x00010000
284#define EFI_RESOURCE_ATTRIBUTE_UNCACHED_EXPORTED 0x00020000
285#define EFI_RESOURCE_ATTRIBUTE_READ_PROTECTABLE 0x00100000
286//
287// This is typically used as memory cacheability attribute today.
288// NOTE: Since PI spec 1.4, please use EFI_RESOURCE_ATTRIBUTE_READ_ONLY_PROTECTABLE
289// as Memory capability attribute: The memory supports being protected from processor
290// writes, and EFI_RESOURCE_ATTRIBUTE_WRITE_PROTEC TABLE means Memory cacheability attribute:
291// The memory supports being programmed with a writeprotected cacheable attribute.
292//
293#define EFI_RESOURCE_ATTRIBUTE_WRITE_PROTECTABLE 0x00200000
294#define EFI_RESOURCE_ATTRIBUTE_EXECUTION_PROTECTABLE 0x00400000
295#define EFI_RESOURCE_ATTRIBUTE_PERSISTABLE 0x01000000
296
297#define EFI_RESOURCE_ATTRIBUTE_READ_ONLY_PROTECTED 0x00040000
298#define EFI_RESOURCE_ATTRIBUTE_READ_ONLY_PROTECTABLE 0x00080000
299
300//
301// Physical memory relative reliability attribute. This
302// memory provides higher reliability relative to other
303// memory in the system. If all memory has the same
304// reliability, then this bit is not used.
305//
306#define EFI_RESOURCE_ATTRIBUTE_MORE_RELIABLE 0x02000000
307
313typedef struct {
340
345typedef struct {
354 //
355 // Guid specific data goes here
356 //
358
362typedef struct {
374 UINT64 Length;
376
381typedef struct {
393 UINT64 Length;
403
408typedef struct {
420 UINT64 Length;
429 BOOLEAN ExtractedFv;
441
445typedef struct {
461 UINT8 Reserved[6];
463
467typedef struct {
473
481typedef struct {
486
493 UINT64 Length;
495
499typedef union {
501 EFI_HOB_HANDOFF_INFO_TABLE *HandoffInformationTable;
502 EFI_HOB_MEMORY_ALLOCATION *MemoryAllocation;
503 EFI_HOB_MEMORY_ALLOCATION_BSP_STORE *MemoryAllocationBspStore;
504 EFI_HOB_MEMORY_ALLOCATION_STACK *MemoryAllocationStack;
505 EFI_HOB_MEMORY_ALLOCATION_MODULE *MemoryAllocationModule;
506 EFI_HOB_RESOURCE_DESCRIPTOR *ResourceDescriptor;
507 EFI_HOB_GUID_TYPE *Guid;
508 EFI_HOB_FIRMWARE_VOLUME *FirmwareVolume;
509 EFI_HOB_FIRMWARE_VOLUME2 *FirmwareVolume2;
510 EFI_HOB_FIRMWARE_VOLUME3 *FirmwareVolume3;
511 EFI_HOB_CPU *Cpu;
513 EFI_HOB_UEFI_CAPSULE *Capsule;
514 UINT8 *Raw;
516
517#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:249
UINT64 EFI_PHYSICAL_ADDRESS
Definition: UefiBaseType.h:50
EFI_MEMORY_TYPE
UINT8 SizeOfIoSpace
Definition: PiHob.h:457
EFI_HOB_GENERIC_HEADER Header
Definition: PiHob.h:449
UINT8 SizeOfMemorySpace
Definition: PiHob.h:453
EFI_PHYSICAL_ADDRESS BaseAddress
Definition: PiHob.h:389
EFI_HOB_GENERIC_HEADER Header
Definition: PiHob.h:385
UINT32 AuthenticationStatus
Definition: PiHob.h:424
EFI_HOB_GENERIC_HEADER Header
Definition: PiHob.h:412
EFI_PHYSICAL_ADDRESS BaseAddress
Definition: PiHob.h:416
EFI_HOB_GENERIC_HEADER Header
Definition: PiHob.h:366
EFI_PHYSICAL_ADDRESS BaseAddress
Definition: PiHob.h:370
EFI_HOB_GENERIC_HEADER Header
Definition: PiHob.h:349
EFI_GUID Name
Definition: PiHob.h:353
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:471
EFI_HOB_GENERIC_HEADER Header
Definition: PiHob.h:317
EFI_PHYSICAL_ADDRESS PhysicalStart
Definition: PiHob.h:334
EFI_RESOURCE_TYPE ResourceType
Definition: PiHob.h:326
EFI_RESOURCE_ATTRIBUTE_TYPE ResourceAttribute
Definition: PiHob.h:330
EFI_PHYSICAL_ADDRESS BaseAddress
Definition: PiHob.h:492
EFI_HOB_GENERIC_HEADER Header
Definition: PiHob.h:485
Definition: Base.h:213