Changeset 58466 in vbox for trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Include/Library/HobLib.h
- Timestamp:
- Oct 29, 2015 4:30:44 AM (9 years ago)
- Location:
- trunk/src/VBox/Devices/EFI/Firmware
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/Firmware
- Property svn:mergeinfo changed
/vendor/edk2/current merged: 103769-103776
- Property svn:mergeinfo changed
-
trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Include/Library/HobLib.h
r58459 r58466 4 4 5 5 The HOB Library supports the efficient creation and searching of HOBs 6 defined in the PI Specification. 7 A HOB is a Hand-Off Block, defined in the Framework architecture, that 8 allows the PEI phase to pass information to the DXE phase. HOBs are position 6 defined in the PI Specification. 7 A HOB is a Hand-Off Block, defined in the Framework architecture, that 8 allows the PEI phase to pass information to the DXE phase. HOBs are position 9 9 independent and can be relocated easily to different memory memory locations. 10 10 … … 27 27 28 28 This function returns the pointer to first HOB in the list. 29 For PEI phase, the PEI service GetHobList() can be used to retrieve the pointer 29 For PEI phase, the PEI service GetHobList() can be used to retrieve the pointer 30 30 to the HOB list. For the DXE phase, the HOB list pointer can be retrieved through 31 31 the EFI System Table by looking up theHOB list GUID in the System Configuration Table. 32 Since the System Configuration Table does not exist that the time the DXE Core is 33 launched, the DXE Core uses a global variable from the DXE Core Entry Point Library 32 Since the System Configuration Table does not exist that the time the DXE Core is 33 launched, the DXE Core uses a global variable from the DXE Core Entry Point Library 34 34 to manage the pointer to the HOB list. 35 35 36 36 If the pointer to the HOB list is NULL, then ASSERT(). 37 37 38 38 @return The pointer to the HOB list. 39 39 … … 48 48 Returns the next instance of a HOB type from the starting HOB. 49 49 50 This function searches the first instance of a HOB type from the starting HOB pointer. 50 This function searches the first instance of a HOB type from the starting HOB pointer. 51 51 If there does not exist such HOB type from the starting HOB pointer, it will return NULL. 52 52 In contrast with macro GET_NEXT_HOB(), this function does not skip the starting HOB pointer 53 53 unconditionally: it returns HobStart back if HobStart itself meets the requirement; 54 54 caller is required to use GET_NEXT_HOB() if it wishes to skip current HobStart. 55 55 56 56 If HobStart is NULL, then ASSERT(). 57 57 … … 72 72 Returns the first instance of a HOB type among the whole HOB list. 73 73 74 This function searches the first instance of a HOB type among the whole HOB list. 75 If there does not exist such HOB type in the HOB list, it will return NULL. 76 74 This function searches the first instance of a HOB type among the whole HOB list. 75 If there does not exist such HOB type in the HOB list, it will return NULL. 76 77 77 If the pointer to the HOB list is NULL, then ASSERT(). 78 78 … … 90 90 /** 91 91 Returns the next instance of the matched GUID HOB from the starting HOB. 92 93 This function searches the first instance of a HOB from the starting HOB pointer. 94 Such HOB should satisfy two conditions: 95 its HOB type is EFI_HOB_TYPE_GUID_EXTENSION and its GUID Name equals to the input Guid. 96 If there does not exist such HOB from the starting HOB pointer, it will return NULL. 92 93 This function searches the first instance of a HOB from the starting HOB pointer. 94 Such HOB should satisfy two conditions: 95 its HOB type is EFI_HOB_TYPE_GUID_EXTENSION and its GUID Name equals to the input Guid. 96 If there does not exist such HOB from the starting HOB pointer, it will return NULL. 97 97 Caller is required to apply GET_GUID_HOB_DATA () and GET_GUID_HOB_DATA_SIZE () 98 98 to extract the data section and its size info respectively. … … 100 100 unconditionally: it returns HobStart back if HobStart itself meets the requirement; 101 101 caller is required to use GET_NEXT_HOB() if it wishes to skip current HobStart. 102 102 103 103 If Guid is NULL, then ASSERT(). 104 104 If HobStart is NULL, then ASSERT(). … … 119 119 /** 120 120 Returns the first instance of the matched GUID HOB among the whole HOB list. 121 122 This function searches the first instance of a HOB among the whole HOB list. 121 122 This function searches the first instance of a HOB among the whole HOB list. 123 123 Such HOB should satisfy two conditions: 124 124 its HOB type is EFI_HOB_TYPE_GUID_EXTENSION and its GUID Name equals to the input Guid. … … 126 126 Caller is required to apply GET_GUID_HOB_DATA () and GET_GUID_HOB_DATA_SIZE () 127 127 to extract the data section and its size info respectively. 128 128 129 129 If the pointer to the HOB list is NULL, then ASSERT(). 130 130 If Guid is NULL, then ASSERT(). … … 144 144 Get the system boot mode from the HOB list. 145 145 146 This function returns the system boot mode information from the 146 This function returns the system boot mode information from the 147 147 PHIT HOB in HOB list. 148 148 149 149 If the pointer to the HOB list is NULL, then ASSERT(). 150 150 151 151 @param VOID 152 152 … … 166 166 It can only be invoked during PEI phase; 167 167 for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase. 168 168 169 169 If ModuleName is NULL, then ASSERT(). 170 170 If there is no additional space for HOB creation, then ASSERT(). … … 191 191 It can only be invoked during PEI phase; 192 192 for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase. 193 193 194 194 If there is no additional space for HOB creation, then ASSERT(). 195 195 … … 217 217 It can only be invoked during PEI phase; 218 218 for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase. 219 219 220 220 If there is no additional space for HOB creation, then ASSERT(). 221 221 … … 236 236 237 237 /** 238 Builds a customized HOB tagged with a GUID for identification and returns 238 Builds a customized HOB tagged with a GUID for identification and returns 239 239 the start address of GUID HOB data. 240 240 241 This function builds a customized HOB tagged with a GUID for identification 242 and returns the start address of GUID HOB data so that caller can fill the customized data. 241 This function builds a customized HOB tagged with a GUID for identification 242 and returns the start address of GUID HOB data so that caller can fill the customized data. 243 243 The HOB Header and Name field is already stripped. 244 244 It can only be invoked during PEI phase; 245 245 for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase. 246 246 247 247 If Guid is NULL, then ASSERT(). 248 248 If there is no additional space for HOB creation, then ASSERT(). … … 265 265 266 266 /** 267 Builds a customized HOB tagged with a GUID for identification, copies the input data to the HOB 267 Builds a customized HOB tagged with a GUID for identification, copies the input data to the HOB 268 268 data field, and returns the start address of the GUID HOB data. 269 269 270 270 This function builds a customized HOB tagged with a GUID for identification and copies the input 271 data to the HOB data field and returns the start address of the GUID HOB data. It can only be 272 invoked during PEI phase; for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase. 271 data to the HOB data field and returns the start address of the GUID HOB data. It can only be 272 invoked during PEI phase; for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase. 273 273 The HOB Header and Name field is already stripped. 274 274 It can only be invoked during PEI phase; 275 275 for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase. 276 276 277 277 If Guid is NULL, then ASSERT(). 278 278 If Data is NULL and DataLength > 0, then ASSERT(). … … 303 303 It can only be invoked during PEI phase; 304 304 for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase. 305 305 306 306 If there is no additional space for HOB creation, then ASSERT(). 307 307 … … 323 323 It can only be invoked during PEI phase; 324 324 for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase. 325 325 326 326 If there is no additional space for HOB creation, then ASSERT(). 327 327 … … 330 330 @param FvName The name of the Firmware Volume. 331 331 @param FileName The name of the file. 332 332 333 333 **/ 334 334 VOID … … 347 347 It can only be invoked during PEI phase; 348 348 for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase. 349 349 350 350 If the platform does not support Capsule Volume HOBs, then ASSERT(). 351 351 If there is no additional space for HOB creation, then ASSERT(). … … 368 368 It can only be invoked during PEI phase; 369 369 for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase. 370 370 371 371 If there is no additional space for HOB creation, then ASSERT(). 372 372 … … 388 388 It can only be invoked during PEI phase; 389 389 for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase. 390 390 391 391 If there is no additional space for HOB creation, then ASSERT(). 392 392 … … 408 408 It can only be invoked during PEI phase; 409 409 for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase. 410 410 411 411 If there is no additional space for HOB creation, then ASSERT(). 412 412 … … 430 430 It can only be invoked during PEI phase; 431 431 for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase. 432 432 433 433 If there is no additional space for HOB creation, then ASSERT(). 434 434 … … 449 449 Returns the type of a HOB. 450 450 451 This macro returns the HobType field from the HOB header for the 451 This macro returns the HobType field from the HOB header for the 452 452 HOB specified by HobStart. 453 453 454 454 @param HobStart A pointer to a HOB. 455 455 456 456 @return HobType. 457 457 458 458 **/ 459 459 #define GET_HOB_TYPE(HobStart) \ … … 463 463 Returns the length, in bytes, of a HOB. 464 464 465 This macro returns the HobLength field from the HOB header for the 465 This macro returns the HobLength field from the HOB header for the 466 466 HOB specified by HobStart. 467 467 … … 477 477 Returns a pointer to the next HOB in the HOB list. 478 478 479 This macro returns a pointer to HOB that follows the 479 This macro returns a pointer to HOB that follows the 480 480 HOB specified by HobStart in the HOB List. 481 481 … … 490 490 /** 491 491 Determines if a HOB is the last HOB in the HOB list. 492 493 This macro determine if the HOB specified by HobStart is the 494 last HOB in the HOB list. If HobStart is last HOB in the HOB list, 492 493 This macro determine if the HOB specified by HobStart is the 494 last HOB in the HOB list. If HobStart is last HOB in the HOB list, 495 495 then TRUE is returned. Otherwise, FALSE is returned. 496 496 … … 507 507 508 508 This macro returns a pointer to the data buffer in a HOB specified by HobStart. 509 HobStart is assumed to be a HOB of type EFI_HOB_TYPE_GUID_EXTENSION. 509 HobStart is assumed to be a HOB of type EFI_HOB_TYPE_GUID_EXTENSION. 510 510 511 511 @param GuidHob A pointer to a HOB. 512 512 513 513 @return A pointer to the data buffer in a HOB. 514 514 515 515 **/ 516 516 #define GET_GUID_HOB_DATA(HobStart) \
Note:
See TracChangeset
for help on using the changeset viewer.