2 HOB related definitions in PI.
4 Copyright (c) 2006 - 2007, Intel Corporation
5 All rights reserved. This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13 @par Revision Reference:
21 #include <ProcessorBind.h>
22 #include <Pi/PiBootMode.h>
23 #include <Uefi/UefiBaseType.h>
24 #include <Uefi/UefiMultiPhase.h>
27 // HobType of EFI_HOB_GENERIC_HEADER.
29 #define EFI_HOB_TYPE_HANDOFF 0x0001
30 #define EFI_HOB_TYPE_MEMORY_ALLOCATION 0x0002
31 #define EFI_HOB_TYPE_RESOURCE_DESCRIPTOR 0x0003
32 #define EFI_HOB_TYPE_GUID_EXTENSION 0x0004
33 #define EFI_HOB_TYPE_FV 0x0005
34 #define EFI_HOB_TYPE_CPU 0x0006
35 #define EFI_HOB_TYPE_MEMORY_POOL 0x0007
36 #define EFI_HOB_TYPE_FV2 0x0009
37 #define EFI_HOB_TYPE_LOAD_PEIM 0x000A
38 #define EFI_HOB_TYPE_UNUSED 0xFFFE
39 #define EFI_HOB_TYPE_END_OF_HOB_LIST 0xFFFF
42 // Describes the format and size of the data inside the HOB.
43 // All HOBs must contain this generic HOB header.
49 } EFI_HOB_GENERIC_HEADER
;
53 // Value of version ofinEFI_HOB_HANDOFF_INFO_TABLE.
55 #define EFI_HOB_HANDOFF_TABLE_VERSION 0x0009
57 // Contains general state information used by the HOB producer phase.
58 // This HOB must be the first one in the HOB list.
61 EFI_HOB_GENERIC_HEADER Header
;
63 EFI_BOOT_MODE BootMode
;
64 EFI_PHYSICAL_ADDRESS EfiMemoryTop
;
65 EFI_PHYSICAL_ADDRESS EfiMemoryBottom
;
66 EFI_PHYSICAL_ADDRESS EfiFreeMemoryTop
;
67 EFI_PHYSICAL_ADDRESS EfiFreeMemoryBottom
;
68 EFI_PHYSICAL_ADDRESS EfiEndOfHobList
;
69 } EFI_HOB_HANDOFF_INFO_TABLE
;
74 EFI_PHYSICAL_ADDRESS MemoryBaseAddress
;
76 EFI_MEMORY_TYPE MemoryType
;
79 // Padding for Itanium processor family
82 } EFI_HOB_MEMORY_ALLOCATION_HEADER
;
85 // Describes all memory ranges used during the HOB producer
86 // phase that exist outside the HOB list. This HOB type
87 // describes how memory is used,
88 // not the physical attributes of memory.
91 EFI_HOB_GENERIC_HEADER Header
;
92 EFI_HOB_MEMORY_ALLOCATION_HEADER AllocDescriptor
;
94 // Additional data pertaining to the "Name" Guid memory
97 } EFI_HOB_MEMORY_ALLOCATION
;
101 // Describes the memory stack that is produced by the HOB producer
102 // phase and upon which all postmemory-installed executable
103 // content in the HOB producer phase is executing.
106 EFI_HOB_GENERIC_HEADER Header
;
107 EFI_HOB_MEMORY_ALLOCATION_HEADER AllocDescriptor
;
108 } EFI_HOB_MEMORY_ALLOCATION_STACK
;
111 // Defines the location of the boot-strap
112 // processor (BSP) BSPStore ("Backing Store Pointer Store").
113 // This HOB is valid for the Itanium processor family only
114 // register overflow store.
117 EFI_HOB_GENERIC_HEADER Header
;
118 EFI_HOB_MEMORY_ALLOCATION_HEADER AllocDescriptor
;
119 } EFI_HOB_MEMORY_ALLOCATION_BSP_STORE
;
122 // Defines the location and entry point of the HOB consumer phase.
125 EFI_HOB_GENERIC_HEADER Header
;
126 EFI_HOB_MEMORY_ALLOCATION_HEADER MemoryAllocationHeader
;
128 EFI_PHYSICAL_ADDRESS EntryPoint
;
129 } EFI_HOB_MEMORY_ALLOCATION_MODULE
;
131 typedef UINT32 EFI_RESOURCE_TYPE
;
134 // Value of ResourceType in EFI_HOB_RESOURCE_DESCRIPTOR.
136 #define EFI_RESOURCE_SYSTEM_MEMORY 0x00000000
137 #define EFI_RESOURCE_MEMORY_MAPPED_IO 0x00000001
138 #define EFI_RESOURCE_IO 0x00000002
139 #define EFI_RESOURCE_FIRMWARE_DEVICE 0x00000003
140 #define EFI_RESOURCE_MEMORY_MAPPED_IO_PORT 0x00000004
141 #define EFI_RESOURCE_MEMORY_RESERVED 0x00000005
142 #define EFI_RESOURCE_IO_RESERVED 0x00000006
143 #define EFI_RESOURCE_MAX_MEMORY_TYPE 0x00000007
146 typedef UINT32 EFI_RESOURCE_ATTRIBUTE_TYPE
;
149 // These types can be ORed together as needed.
151 // The first three enumerations describe settings
153 #define EFI_RESOURCE_ATTRIBUTE_PRESENT 0x00000001
154 #define EFI_RESOURCE_ATTRIBUTE_INITIALIZED 0x00000002
155 #define EFI_RESOURCE_ATTRIBUTE_TESTED 0x00000004
157 // The rest of the settings describe capabilities
159 #define EFI_RESOURCE_ATTRIBUTE_SINGLE_BIT_ECC 0x00000008
160 #define EFI_RESOURCE_ATTRIBUTE_MULTIPLE_BIT_ECC 0x00000010
161 #define EFI_RESOURCE_ATTRIBUTE_ECC_RESERVED_1 0x00000020
162 #define EFI_RESOURCE_ATTRIBUTE_ECC_RESERVED_2 0x00000040
163 #define EFI_RESOURCE_ATTRIBUTE_READ_PROTECTED 0x00000080
164 #define EFI_RESOURCE_ATTRIBUTE_WRITE_PROTECTED 0x00000100
165 #define EFI_RESOURCE_ATTRIBUTE_EXECUTION_PROTECTED 0x00000200
166 #define EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE 0x00000400
167 #define EFI_RESOURCE_ATTRIBUTE_WRITE_COMBINEABLE 0x00000800
168 #define EFI_RESOURCE_ATTRIBUTE_WRITE_THROUGH_CACHEABLE 0x00001000
169 #define EFI_RESOURCE_ATTRIBUTE_WRITE_BACK_CACHEABLE 0x00002000
170 #define EFI_RESOURCE_ATTRIBUTE_16_BIT_IO 0x00004000
171 #define EFI_RESOURCE_ATTRIBUTE_32_BIT_IO 0x00008000
172 #define EFI_RESOURCE_ATTRIBUTE_64_BIT_IO 0x00010000
173 #define EFI_RESOURCE_ATTRIBUTE_UNCACHED_EXPORTED 0x00020000
176 // Describes the resource properties of all fixed,
177 // nonrelocatable resource ranges found on the processor
178 // host bus during the HOB producer phase.
181 EFI_HOB_GENERIC_HEADER Header
;
183 EFI_RESOURCE_TYPE ResourceType
;
184 EFI_RESOURCE_ATTRIBUTE_TYPE ResourceAttribute
;
185 EFI_PHYSICAL_ADDRESS PhysicalStart
;
186 UINT64 ResourceLength
;
187 } EFI_HOB_RESOURCE_DESCRIPTOR
;
190 // Allows writers of executable content in the HOB producer phase to
191 // maintain and manage HOBs with specific GUID.
194 EFI_HOB_GENERIC_HEADER Header
;
198 // Guid specific data goes here
203 // Details the location of firmware volumes that contain firmware files.
206 EFI_HOB_GENERIC_HEADER Header
;
207 EFI_PHYSICAL_ADDRESS BaseAddress
;
209 } EFI_HOB_FIRMWARE_VOLUME
;
212 // Details the location of a firmware volume which was extracted
213 // from a file within another firmware volume.
216 EFI_HOB_GENERIC_HEADER Header
;
217 EFI_PHYSICAL_ADDRESS BaseAddress
;
221 } EFI_HOB_FIRMWARE_VOLUME2
;
225 // Describes processor information, such as address space and I/O space capabilities.
228 EFI_HOB_GENERIC_HEADER Header
;
229 UINT8 SizeOfMemorySpace
;
236 // Describes pool memory allocations.
239 EFI_HOB_GENERIC_HEADER Header
;
240 } EFI_HOB_MEMORY_POOL
;
243 // Union of all the possible HOB Types
246 EFI_HOB_GENERIC_HEADER
*Header
;
247 EFI_HOB_HANDOFF_INFO_TABLE
*HandoffInformationTable
;
248 EFI_HOB_MEMORY_ALLOCATION
*MemoryAllocation
;
249 EFI_HOB_MEMORY_ALLOCATION_BSP_STORE
*MemoryAllocationBspStore
;
250 EFI_HOB_MEMORY_ALLOCATION_STACK
*MemoryAllocationStack
;
251 EFI_HOB_MEMORY_ALLOCATION_MODULE
*MemoryAllocationModule
;
252 EFI_HOB_RESOURCE_DESCRIPTOR
*ResourceDescriptor
;
253 EFI_HOB_GUID_TYPE
*Guid
;
254 EFI_HOB_FIRMWARE_VOLUME
*FirmwareVolume
;
255 EFI_HOB_FIRMWARE_VOLUME2
*FirmwareVolume2
;
257 EFI_HOB_MEMORY_POOL
*Pool
;
259 } EFI_PEI_HOB_POINTERS
;