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