]>
Commit | Line | Data |
---|---|---|
738ec565 | 1 | /** @file\r |
6812ef9f | 2 | HOB Library implemenation for Dxe Phase.\r |
738ec565 | 3 | \r |
6d11b822 | 4 | Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>\r |
19388d29 | 5 | This program and the accompanying materials\r |
3e5c3238 | 6 | are licensed and made available under the terms and conditions of the BSD License\r |
7 | which accompanies this distribution. The full text of the license may be found at\r | |
8 | http://opensource.org/licenses/bsd-license.php\r | |
738ec565 | 9 | \r |
3e5c3238 | 10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r |
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
738ec565 | 12 | \r |
738ec565 | 13 | **/\r |
14 | \r | |
c7d265a9 | 15 | #include <PiDxe.h>\r |
c892d846 | 16 | \r |
c7d265a9 | 17 | #include <Guid/HobList.h>\r |
c892d846 | 18 | \r |
c7d265a9 | 19 | #include <Library/HobLib.h>\r |
20 | #include <Library/UefiLib.h>\r | |
21 | #include <Library/DebugLib.h>\r | |
22 | #include <Library/BaseMemoryLib.h>\r | |
738ec565 | 23 | \r |
fe467413 | 24 | VOID *mHobList = NULL;\r |
738ec565 | 25 | \r |
738ec565 | 26 | /**\r |
27 | Returns the pointer to the HOB list.\r | |
28 | \r | |
29 | This function returns the pointer to first HOB in the list.\r | |
3e5c3238 | 30 | For PEI phase, the PEI service GetHobList() can be used to retrieve the pointer \r |
31 | to the HOB list. For the DXE phase, the HOB list pointer can be retrieved through\r | |
32 | the EFI System Table by looking up theHOB list GUID in the System Configuration Table.\r | |
33 | Since the System Configuration Table does not exist that the time the DXE Core is \r | |
34 | launched, the DXE Core uses a global variable from the DXE Core Entry Point Library \r | |
35 | to manage the pointer to the HOB list.\r | |
6d11b822 | 36 | \r |
3e5c3238 | 37 | If the pointer to the HOB list is NULL, then ASSERT().\r |
6d11b822 SZ |
38 | \r |
39 | This function also caches the pointer to the HOB list retrieved.\r | |
40 | \r | |
738ec565 | 41 | @return The pointer to the HOB list.\r |
42 | \r | |
43 | **/\r | |
44 | VOID *\r | |
45 | EFIAPI\r | |
46 | GetHobList (\r | |
47 | VOID\r | |
48 | )\r | |
49 | {\r | |
6d11b822 SZ |
50 | EFI_STATUS Status;\r |
51 | \r | |
52 | if (mHobList == NULL) {\r | |
53 | Status = EfiGetSystemConfigurationTable (&gEfiHobListGuid, &mHobList);\r | |
54 | ASSERT_EFI_ERROR (Status);\r | |
55 | ASSERT (mHobList != NULL);\r | |
56 | }\r | |
738ec565 | 57 | return mHobList;\r |
58 | }\r | |
59 | \r | |
6d11b822 SZ |
60 | /**\r |
61 | The constructor function caches the pointer to HOB list by calling GetHobList()\r | |
62 | and will always return EFI_SUCCESS. \r | |
63 | \r | |
64 | @param ImageHandle The firmware allocated handle for the EFI image.\r | |
65 | @param SystemTable A pointer to the EFI System Table.\r | |
66 | \r | |
67 | @retval EFI_SUCCESS The constructor successfully gets HobList.\r | |
68 | \r | |
69 | **/\r | |
70 | EFI_STATUS\r | |
71 | EFIAPI\r | |
72 | HobLibConstructor (\r | |
73 | IN EFI_HANDLE ImageHandle,\r | |
74 | IN EFI_SYSTEM_TABLE *SystemTable\r | |
75 | )\r | |
76 | {\r | |
77 | GetHobList ();\r | |
78 | \r | |
79 | return EFI_SUCCESS;\r | |
80 | }\r | |
81 | \r | |
738ec565 | 82 | /**\r |
83 | Returns the next instance of a HOB type from the starting HOB.\r | |
84 | \r | |
85 | This function searches the first instance of a HOB type from the starting HOB pointer. \r | |
86 | If there does not exist such HOB type from the starting HOB pointer, it will return NULL.\r | |
87 | In contrast with macro GET_NEXT_HOB(), this function does not skip the starting HOB pointer\r | |
88 | unconditionally: it returns HobStart back if HobStart itself meets the requirement;\r | |
89 | caller is required to use GET_NEXT_HOB() if it wishes to skip current HobStart.\r | |
3e5c3238 | 90 | \r |
738ec565 | 91 | If HobStart is NULL, then ASSERT().\r |
92 | \r | |
93 | @param Type The HOB type to return.\r | |
94 | @param HobStart The starting HOB pointer to search from.\r | |
95 | \r | |
96 | @return The next instance of a HOB type from the starting HOB.\r | |
97 | \r | |
98 | **/\r | |
99 | VOID *\r | |
100 | EFIAPI\r | |
101 | GetNextHob (\r | |
102 | IN UINT16 Type,\r | |
103 | IN CONST VOID *HobStart\r | |
104 | )\r | |
105 | {\r | |
106 | EFI_PEI_HOB_POINTERS Hob;\r | |
107 | \r | |
108 | ASSERT (HobStart != NULL);\r | |
109 | \r | |
110 | Hob.Raw = (UINT8 *) HobStart;\r | |
111 | //\r | |
112 | // Parse the HOB list until end of list or matching type is found.\r | |
113 | //\r | |
114 | while (!END_OF_HOB_LIST (Hob)) {\r | |
115 | if (Hob.Header->HobType == Type) {\r | |
116 | return Hob.Raw;\r | |
117 | }\r | |
118 | Hob.Raw = GET_NEXT_HOB (Hob);\r | |
119 | }\r | |
120 | return NULL;\r | |
121 | }\r | |
122 | \r | |
123 | /**\r | |
124 | Returns the first instance of a HOB type among the whole HOB list.\r | |
125 | \r | |
126 | This function searches the first instance of a HOB type among the whole HOB list. \r | |
127 | If there does not exist such HOB type in the HOB list, it will return NULL. \r | |
3e5c3238 | 128 | \r |
129 | If the pointer to the HOB list is NULL, then ASSERT().\r | |
738ec565 | 130 | \r |
131 | @param Type The HOB type to return.\r | |
132 | \r | |
133 | @return The next instance of a HOB type from the starting HOB.\r | |
134 | \r | |
135 | **/\r | |
136 | VOID *\r | |
137 | EFIAPI\r | |
138 | GetFirstHob (\r | |
139 | IN UINT16 Type\r | |
140 | )\r | |
141 | {\r | |
142 | VOID *HobList;\r | |
143 | \r | |
144 | HobList = GetHobList ();\r | |
145 | return GetNextHob (Type, HobList);\r | |
146 | }\r | |
147 | \r | |
148 | /**\r | |
3e5c3238 | 149 | Returns the next instance of the matched GUID HOB from the starting HOB.\r |
150 | \r | |
738ec565 | 151 | This function searches the first instance of a HOB from the starting HOB pointer. \r |
152 | Such HOB should satisfy two conditions: \r | |
153 | its HOB type is EFI_HOB_TYPE_GUID_EXTENSION and its GUID Name equals to the input Guid. \r | |
154 | If there does not exist such HOB from the starting HOB pointer, it will return NULL. \r | |
155 | Caller is required to apply GET_GUID_HOB_DATA () and GET_GUID_HOB_DATA_SIZE ()\r | |
58380e9c | 156 | to extract the data section and its size information, respectively.\r |
738ec565 | 157 | In contrast with macro GET_NEXT_HOB(), this function does not skip the starting HOB pointer\r |
158 | unconditionally: it returns HobStart back if HobStart itself meets the requirement;\r | |
159 | caller is required to use GET_NEXT_HOB() if it wishes to skip current HobStart.\r | |
3e5c3238 | 160 | \r |
738ec565 | 161 | If Guid is NULL, then ASSERT().\r |
162 | If HobStart is NULL, then ASSERT().\r | |
163 | \r | |
164 | @param Guid The GUID to match with in the HOB list.\r | |
165 | @param HobStart A pointer to a Guid.\r | |
166 | \r | |
167 | @return The next instance of the matched GUID HOB from the starting HOB.\r | |
168 | \r | |
169 | **/\r | |
170 | VOID *\r | |
171 | EFIAPI\r | |
172 | GetNextGuidHob (\r | |
173 | IN CONST EFI_GUID *Guid,\r | |
174 | IN CONST VOID *HobStart\r | |
175 | )\r | |
176 | {\r | |
177 | EFI_PEI_HOB_POINTERS GuidHob;\r | |
178 | \r | |
179 | GuidHob.Raw = (UINT8 *) HobStart;\r | |
180 | while ((GuidHob.Raw = GetNextHob (EFI_HOB_TYPE_GUID_EXTENSION, GuidHob.Raw)) != NULL) {\r | |
181 | if (CompareGuid (Guid, &GuidHob.Guid->Name)) {\r | |
182 | break;\r | |
183 | }\r | |
184 | GuidHob.Raw = GET_NEXT_HOB (GuidHob);\r | |
185 | }\r | |
186 | return GuidHob.Raw;\r | |
187 | }\r | |
188 | \r | |
189 | /**\r | |
3e5c3238 | 190 | Returns the first instance of the matched GUID HOB among the whole HOB list.\r |
191 | \r | |
738ec565 | 192 | This function searches the first instance of a HOB among the whole HOB list. \r |
193 | Such HOB should satisfy two conditions:\r | |
194 | its HOB type is EFI_HOB_TYPE_GUID_EXTENSION and its GUID Name equals to the input Guid.\r | |
195 | If there does not exist such HOB from the starting HOB pointer, it will return NULL.\r | |
196 | Caller is required to apply GET_GUID_HOB_DATA () and GET_GUID_HOB_DATA_SIZE ()\r | |
58380e9c | 197 | to extract the data section and its size information, respectively.\r |
3e5c3238 | 198 | \r |
199 | If the pointer to the HOB list is NULL, then ASSERT().\r | |
738ec565 | 200 | If Guid is NULL, then ASSERT().\r |
201 | \r | |
202 | @param Guid The GUID to match with in the HOB list.\r | |
203 | \r | |
204 | @return The first instance of the matched GUID HOB among the whole HOB list.\r | |
205 | \r | |
206 | **/\r | |
207 | VOID *\r | |
208 | EFIAPI\r | |
209 | GetFirstGuidHob (\r | |
210 | IN CONST EFI_GUID *Guid\r | |
211 | )\r | |
212 | {\r | |
213 | VOID *HobList;\r | |
214 | \r | |
215 | HobList = GetHobList ();\r | |
216 | return GetNextGuidHob (Guid, HobList);\r | |
217 | }\r | |
218 | \r | |
219 | /**\r | |
3e5c3238 | 220 | Get the system boot mode from the HOB list.\r |
738ec565 | 221 | \r |
222 | This function returns the system boot mode information from the \r | |
3e5c3238 | 223 | PHIT HOB in HOB list.\r |
738ec565 | 224 | \r |
3e5c3238 | 225 | If the pointer to the HOB list is NULL, then ASSERT().\r |
226 | \r | |
738ec565 | 227 | @param VOID\r |
228 | \r | |
229 | @return The Boot Mode.\r | |
230 | \r | |
231 | **/\r | |
232 | EFI_BOOT_MODE\r | |
233 | EFIAPI\r | |
234 | GetBootModeHob (\r | |
235 | VOID\r | |
236 | )\r | |
237 | {\r | |
238 | EFI_HOB_HANDOFF_INFO_TABLE *HandOffHob;\r | |
239 | \r | |
240 | HandOffHob = (EFI_HOB_HANDOFF_INFO_TABLE *) GetHobList ();\r | |
241 | \r | |
242 | return HandOffHob->BootMode;\r | |
243 | }\r | |
244 | \r | |
245 | /**\r | |
246 | Builds a HOB for a loaded PE32 module.\r | |
247 | \r | |
248 | This function builds a HOB for a loaded PE32 module.\r | |
249 | It can only be invoked during PEI phase;\r | |
250 | for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.\r | |
3e5c3238 | 251 | \r |
738ec565 | 252 | If ModuleName is NULL, then ASSERT().\r |
253 | If there is no additional space for HOB creation, then ASSERT().\r | |
254 | \r | |
255 | @param ModuleName The GUID File Name of the module.\r | |
256 | @param MemoryAllocationModule The 64 bit physical address of the module.\r | |
257 | @param ModuleLength The length of the module in bytes.\r | |
3e5c3238 | 258 | @param EntryPoint The 64 bit physical address of the module entry point.\r |
738ec565 | 259 | \r |
260 | **/\r | |
261 | VOID\r | |
262 | EFIAPI\r | |
263 | BuildModuleHob (\r | |
264 | IN CONST EFI_GUID *ModuleName,\r | |
265 | IN EFI_PHYSICAL_ADDRESS MemoryAllocationModule,\r | |
266 | IN UINT64 ModuleLength,\r | |
267 | IN EFI_PHYSICAL_ADDRESS EntryPoint\r | |
268 | )\r | |
269 | {\r | |
270 | //\r | |
271 | // PEI HOB is read only for DXE phase\r | |
272 | //\r | |
273 | ASSERT (FALSE);\r | |
274 | }\r | |
275 | \r | |
e4b0415d | 276 | /**\r |
f1e2b728 | 277 | Builds a HOB that describes a chunk of system memory with Owner GUID.\r |
e4b0415d HT |
278 | \r |
279 | This function builds a HOB that describes a chunk of system memory.\r | |
280 | It can only be invoked during PEI phase;\r | |
281 | for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.\r | |
282 | \r | |
283 | If there is no additional space for HOB creation, then ASSERT().\r | |
284 | \r | |
285 | @param ResourceType The type of resource described by this HOB.\r | |
286 | @param ResourceAttribute The resource attributes of the memory described by this HOB.\r | |
287 | @param PhysicalStart The 64 bit physical address of memory described by this HOB.\r | |
288 | @param NumberOfBytes The length of the memory described by this HOB in bytes.\r | |
f1e2b728 | 289 | @param OwnerGUID GUID for the owner of this resource.\r |
e4b0415d HT |
290 | \r |
291 | **/\r | |
292 | VOID\r | |
293 | EFIAPI\r | |
294 | BuildResourceDescriptorWithOwnerHob (\r | |
295 | IN EFI_RESOURCE_TYPE ResourceType,\r | |
296 | IN EFI_RESOURCE_ATTRIBUTE_TYPE ResourceAttribute,\r | |
297 | IN EFI_PHYSICAL_ADDRESS PhysicalStart,\r | |
298 | IN UINT64 NumberOfBytes,\r | |
299 | IN EFI_GUID *OwnerGUID\r | |
300 | )\r | |
301 | {\r | |
f1e2b728 SZ |
302 | //\r |
303 | // PEI HOB is read only for DXE phase\r | |
304 | //\r | |
305 | ASSERT (FALSE);\r | |
306 | }\r | |
307 | \r | |
738ec565 | 308 | /**\r |
309 | Builds a HOB that describes a chunk of system memory.\r | |
310 | \r | |
311 | This function builds a HOB that describes a chunk of system memory.\r | |
312 | It can only be invoked during PEI phase;\r | |
313 | for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.\r | |
3e5c3238 | 314 | \r |
738ec565 | 315 | If there is no additional space for HOB creation, then ASSERT().\r |
316 | \r | |
317 | @param ResourceType The type of resource described by this HOB.\r | |
318 | @param ResourceAttribute The resource attributes of the memory described by this HOB.\r | |
319 | @param PhysicalStart The 64 bit physical address of memory described by this HOB.\r | |
320 | @param NumberOfBytes The length of the memory described by this HOB in bytes.\r | |
321 | \r | |
322 | **/\r | |
323 | VOID\r | |
324 | EFIAPI\r | |
325 | BuildResourceDescriptorHob (\r | |
326 | IN EFI_RESOURCE_TYPE ResourceType,\r | |
327 | IN EFI_RESOURCE_ATTRIBUTE_TYPE ResourceAttribute,\r | |
328 | IN EFI_PHYSICAL_ADDRESS PhysicalStart,\r | |
329 | IN UINT64 NumberOfBytes\r | |
330 | )\r | |
331 | {\r | |
332 | //\r | |
333 | // PEI HOB is read only for DXE phase\r | |
334 | //\r | |
335 | ASSERT (FALSE);\r | |
336 | }\r | |
337 | \r | |
338 | /**\r | |
3e5c3238 | 339 | Builds a customized HOB tagged with a GUID for identification and returns \r |
340 | the start address of GUID HOB data.\r | |
738ec565 | 341 | \r |
342 | This function builds a customized HOB tagged with a GUID for identification \r | |
343 | and returns the start address of GUID HOB data so that caller can fill the customized data. \r | |
344 | The HOB Header and Name field is already stripped.\r | |
345 | It can only be invoked during PEI phase;\r | |
346 | for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.\r | |
3e5c3238 | 347 | \r |
738ec565 | 348 | If Guid is NULL, then ASSERT().\r |
349 | If there is no additional space for HOB creation, then ASSERT().\r | |
192764db LG |
350 | If DataLength > (0xFFF8 - sizeof (EFI_HOB_GUID_TYPE)), then ASSERT().\r |
351 | HobLength is UINT16 and multiples of 8 bytes, so the max HobLength is 0xFFF8.\r | |
738ec565 | 352 | \r |
353 | @param Guid The GUID to tag the customized HOB.\r | |
354 | @param DataLength The size of the data payload for the GUID HOB.\r | |
355 | \r | |
ef2635c3 RN |
356 | @retval NULL The GUID HOB could not be allocated.\r |
357 | @retval others The start address of GUID HOB data.\r | |
738ec565 | 358 | \r |
359 | **/\r | |
360 | VOID *\r | |
361 | EFIAPI\r | |
362 | BuildGuidHob (\r | |
363 | IN CONST EFI_GUID *Guid,\r | |
364 | IN UINTN DataLength\r | |
365 | )\r | |
366 | {\r | |
367 | //\r | |
368 | // PEI HOB is read only for DXE phase\r | |
369 | //\r | |
370 | ASSERT (FALSE);\r | |
371 | return NULL;\r | |
372 | }\r | |
373 | \r | |
374 | /**\r | |
3e5c3238 | 375 | Builds a customized HOB tagged with a GUID for identification, copies the input data to the HOB \r |
376 | data field, and returns the start address of the GUID HOB data.\r | |
738ec565 | 377 | \r |
3e5c3238 | 378 | This function builds a customized HOB tagged with a GUID for identification and copies the input\r |
379 | data to the HOB data field and returns the start address of the GUID HOB data. It can only be \r | |
380 | invoked during PEI phase; for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase. \r | |
738ec565 | 381 | The HOB Header and Name field is already stripped.\r |
382 | It can only be invoked during PEI phase;\r | |
383 | for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.\r | |
3e5c3238 | 384 | \r |
738ec565 | 385 | If Guid is NULL, then ASSERT().\r |
386 | If Data is NULL and DataLength > 0, then ASSERT().\r | |
387 | If there is no additional space for HOB creation, then ASSERT().\r | |
192764db LG |
388 | If DataLength > (0xFFF8 - sizeof (EFI_HOB_GUID_TYPE)), then ASSERT().\r |
389 | HobLength is UINT16 and multiples of 8 bytes, so the max HobLength is 0xFFF8.\r | |
738ec565 | 390 | \r |
391 | @param Guid The GUID to tag the customized HOB.\r | |
392 | @param Data The data to be copied into the data field of the GUID HOB.\r | |
393 | @param DataLength The size of the data payload for the GUID HOB.\r | |
394 | \r | |
ef2635c3 RN |
395 | @retval NULL The GUID HOB could not be allocated.\r |
396 | @retval others The start address of GUID HOB data.\r | |
738ec565 | 397 | \r |
398 | **/\r | |
399 | VOID *\r | |
400 | EFIAPI\r | |
401 | BuildGuidDataHob (\r | |
402 | IN CONST EFI_GUID *Guid,\r | |
403 | IN VOID *Data,\r | |
404 | IN UINTN DataLength\r | |
405 | )\r | |
406 | {\r | |
407 | //\r | |
408 | // PEI HOB is read only for DXE phase\r | |
409 | //\r | |
410 | ASSERT (FALSE);\r | |
411 | return NULL;\r | |
412 | }\r | |
413 | \r | |
414 | /**\r | |
415 | Builds a Firmware Volume HOB.\r | |
416 | \r | |
417 | This function builds a Firmware Volume HOB.\r | |
418 | It can only be invoked during PEI phase;\r | |
419 | for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.\r | |
3e5c3238 | 420 | \r |
738ec565 | 421 | If there is no additional space for HOB creation, then ASSERT().\r |
471d6210 | 422 | If the FvImage buffer is not at its required alignment, then ASSERT().\r |
738ec565 | 423 | \r |
424 | @param BaseAddress The base address of the Firmware Volume.\r | |
425 | @param Length The size of the Firmware Volume in bytes.\r | |
426 | \r | |
427 | **/\r | |
428 | VOID\r | |
429 | EFIAPI\r | |
430 | BuildFvHob (\r | |
431 | IN EFI_PHYSICAL_ADDRESS BaseAddress,\r | |
432 | IN UINT64 Length\r | |
433 | )\r | |
434 | {\r | |
435 | //\r | |
436 | // PEI HOB is read only for DXE phase\r | |
437 | //\r | |
438 | ASSERT (FALSE);\r | |
439 | }\r | |
440 | \r | |
07ad9b81 | 441 | /**\r |
442 | Builds a EFI_HOB_TYPE_FV2 HOB.\r | |
443 | \r | |
444 | This function builds a EFI_HOB_TYPE_FV2 HOB.\r | |
445 | It can only be invoked during PEI phase;\r | |
446 | for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.\r | |
3e5c3238 | 447 | \r |
07ad9b81 | 448 | If there is no additional space for HOB creation, then ASSERT().\r |
471d6210 | 449 | If the FvImage buffer is not at its required alignment, then ASSERT().\r |
07ad9b81 | 450 | \r |
451 | @param BaseAddress The base address of the Firmware Volume.\r | |
452 | @param Length The size of the Firmware Volume in bytes.\r | |
3e5c3238 | 453 | @param FvName The name of the Firmware Volume.\r |
07ad9b81 | 454 | @param FileName The name of the file.\r |
455 | \r | |
456 | **/\r | |
457 | VOID\r | |
458 | EFIAPI\r | |
459 | BuildFv2Hob (\r | |
460 | IN EFI_PHYSICAL_ADDRESS BaseAddress,\r | |
461 | IN UINT64 Length,\r | |
462 | IN CONST EFI_GUID *FvName,\r | |
463 | IN CONST EFI_GUID *FileName\r | |
464 | )\r | |
465 | {\r | |
466 | ASSERT (FALSE);\r | |
467 | }\r | |
468 | \r | |
5450086c SZ |
469 | /**\r |
470 | Builds a EFI_HOB_TYPE_FV3 HOB.\r | |
471 | \r | |
472 | This function builds a EFI_HOB_TYPE_FV3 HOB.\r | |
473 | It can only be invoked during PEI phase;\r | |
474 | for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.\r | |
475 | \r | |
476 | If there is no additional space for HOB creation, then ASSERT().\r | |
477 | If the FvImage buffer is not at its required alignment, then ASSERT().\r | |
478 | \r | |
479 | @param BaseAddress The base address of the Firmware Volume.\r | |
480 | @param Length The size of the Firmware Volume in bytes.\r | |
481 | @param AuthenticationStatus The authentication status.\r | |
482 | @param ExtractedFv TRUE if the FV was extracted as a file within\r | |
483 | another firmware volume. FALSE otherwise.\r | |
484 | @param FvName The name of the Firmware Volume.\r | |
485 | Valid only if IsExtractedFv is TRUE.\r | |
486 | @param FileName The name of the file.\r | |
487 | Valid only if IsExtractedFv is TRUE.\r | |
488 | \r | |
489 | **/\r | |
490 | VOID\r | |
491 | EFIAPI\r | |
492 | BuildFv3Hob (\r | |
493 | IN EFI_PHYSICAL_ADDRESS BaseAddress,\r | |
494 | IN UINT64 Length,\r | |
495 | IN UINT32 AuthenticationStatus,\r | |
496 | IN BOOLEAN ExtractedFv,\r | |
497 | IN CONST EFI_GUID *FvName, OPTIONAL\r | |
498 | IN CONST EFI_GUID *FileName OPTIONAL\r | |
499 | )\r | |
500 | {\r | |
501 | ASSERT (FALSE);\r | |
502 | }\r | |
07ad9b81 | 503 | \r |
738ec565 | 504 | /**\r |
505 | Builds a Capsule Volume HOB.\r | |
506 | \r | |
507 | This function builds a Capsule Volume HOB.\r | |
508 | It can only be invoked during PEI phase;\r | |
509 | for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.\r | |
3e5c3238 | 510 | \r |
c85cea80 | 511 | If the platform does not support Capsule Volume HOBs, then ASSERT().\r |
738ec565 | 512 | If there is no additional space for HOB creation, then ASSERT().\r |
513 | \r | |
514 | @param BaseAddress The base address of the Capsule Volume.\r | |
515 | @param Length The size of the Capsule Volume in bytes.\r | |
516 | \r | |
517 | **/\r | |
518 | VOID\r | |
519 | EFIAPI\r | |
520 | BuildCvHob (\r | |
521 | IN EFI_PHYSICAL_ADDRESS BaseAddress,\r | |
522 | IN UINT64 Length\r | |
523 | )\r | |
524 | {\r | |
525 | //\r | |
526 | // PEI HOB is read only for DXE phase\r | |
527 | //\r | |
528 | ASSERT (FALSE);\r | |
529 | }\r | |
530 | \r | |
531 | /**\r | |
532 | Builds a HOB for the CPU.\r | |
533 | \r | |
534 | This function builds a HOB for the CPU.\r | |
535 | It can only be invoked during PEI phase;\r | |
536 | for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.\r | |
3e5c3238 | 537 | \r |
738ec565 | 538 | If there is no additional space for HOB creation, then ASSERT().\r |
539 | \r | |
540 | @param SizeOfMemorySpace The maximum physical memory addressability of the processor.\r | |
541 | @param SizeOfIoSpace The maximum physical I/O addressability of the processor.\r | |
542 | \r | |
543 | **/\r | |
544 | VOID\r | |
545 | EFIAPI\r | |
546 | BuildCpuHob (\r | |
547 | IN UINT8 SizeOfMemorySpace,\r | |
548 | IN UINT8 SizeOfIoSpace\r | |
549 | )\r | |
550 | {\r | |
551 | //\r | |
552 | // PEI HOB is read only for DXE phase\r | |
553 | //\r | |
554 | ASSERT (FALSE);\r | |
555 | }\r | |
556 | \r | |
557 | /**\r | |
558 | Builds a HOB for the Stack.\r | |
559 | \r | |
560 | This function builds a HOB for the stack.\r | |
561 | It can only be invoked during PEI phase;\r | |
562 | for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.\r | |
3e5c3238 | 563 | \r |
738ec565 | 564 | If there is no additional space for HOB creation, then ASSERT().\r |
565 | \r | |
566 | @param BaseAddress The 64 bit physical address of the Stack.\r | |
567 | @param Length The length of the stack in bytes.\r | |
568 | \r | |
569 | **/\r | |
570 | VOID\r | |
571 | EFIAPI\r | |
572 | BuildStackHob (\r | |
573 | IN EFI_PHYSICAL_ADDRESS BaseAddress,\r | |
574 | IN UINT64 Length\r | |
575 | )\r | |
576 | {\r | |
577 | //\r | |
578 | // PEI HOB is read only for DXE phase\r | |
579 | //\r | |
580 | ASSERT (FALSE);\r | |
581 | }\r | |
582 | \r | |
583 | /**\r | |
584 | Builds a HOB for the BSP store.\r | |
585 | \r | |
586 | This function builds a HOB for BSP store.\r | |
587 | It can only be invoked during PEI phase;\r | |
588 | for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.\r | |
3e5c3238 | 589 | \r |
738ec565 | 590 | If there is no additional space for HOB creation, then ASSERT().\r |
591 | \r | |
592 | @param BaseAddress The 64 bit physical address of the BSP.\r | |
593 | @param Length The length of the BSP store in bytes.\r | |
594 | @param MemoryType Type of memory allocated by this HOB.\r | |
595 | \r | |
596 | **/\r | |
597 | VOID\r | |
598 | EFIAPI\r | |
599 | BuildBspStoreHob (\r | |
600 | IN EFI_PHYSICAL_ADDRESS BaseAddress,\r | |
601 | IN UINT64 Length,\r | |
602 | IN EFI_MEMORY_TYPE MemoryType\r | |
603 | )\r | |
604 | {\r | |
605 | //\r | |
606 | // PEI HOB is read only for DXE phase\r | |
607 | //\r | |
608 | ASSERT (FALSE);\r | |
609 | }\r | |
610 | \r | |
611 | /**\r | |
612 | Builds a HOB for the memory allocation.\r | |
613 | \r | |
614 | This function builds a HOB for the memory allocation.\r | |
615 | It can only be invoked during PEI phase;\r | |
616 | for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.\r | |
3e5c3238 | 617 | \r |
738ec565 | 618 | If there is no additional space for HOB creation, then ASSERT().\r |
619 | \r | |
620 | @param BaseAddress The 64 bit physical address of the memory.\r | |
621 | @param Length The length of the memory allocation in bytes.\r | |
622 | @param MemoryType Type of memory allocated by this HOB.\r | |
623 | \r | |
624 | **/\r | |
625 | VOID\r | |
626 | EFIAPI\r | |
627 | BuildMemoryAllocationHob (\r | |
628 | IN EFI_PHYSICAL_ADDRESS BaseAddress,\r | |
629 | IN UINT64 Length,\r | |
630 | IN EFI_MEMORY_TYPE MemoryType\r | |
631 | )\r | |
632 | {\r | |
633 | //\r | |
634 | // PEI HOB is read only for DXE phase\r | |
635 | //\r | |
636 | ASSERT (FALSE);\r | |
637 | }\r |