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