Changeset 58466 in vbox for trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkPkg/Library
- Timestamp:
- Oct 29, 2015 4:30:44 AM (9 years ago)
- Location:
- trunk/src/VBox/Devices/EFI/Firmware
- Files:
-
- 18 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/IntelFrameworkPkg/Library/DxeIoLibCpuIo/DxeCpuIoLibInternal.h
r48674 r58466 2 2 Internal include file of DXE CPU IO Library. 3 3 It includes all necessary protocol/library class's header file 4 for implementation of IoLib library instance. It is included 4 for implementation of IoLib library instance. It is included 5 5 all source code of this library instance. 6 6 7 7 Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR> 8 8 This program and the accompanying materials … … 108 108 @param Width The width of the I/O operation. 109 109 @param Data The value to write to the I/O port. 110 110 111 111 @return Data read from registers in the EFI system memory space. 112 112 -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkPkg/Library/DxeIoLibCpuIo/IoLib.c
r48674 r58466 1 1 /** @file 2 2 I/O Library. 3 The implementation of I/O operation for this library instance 3 The implementation of I/O operation for this library instance 4 4 are based on EFI_CPU_IO_PROTOCOL. 5 5 6 6 Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR> 7 7 This program and the accompanying materials … … 154 154 @param Width The width of the I/O operation. 155 155 @param Data The value to write to the I/O port. 156 156 157 157 @return Data read from registers in the EFI system memory space. 158 158 … … 230 230 231 231 If Port is not aligned on a 16-bit boundary, then ASSERT(). 232 232 233 233 If 16-bit I/O port operations are not supported, then ASSERT(). 234 234 … … 288 288 This function must guarantee that all I/O read and write operations are 289 289 serialized. 290 290 291 291 If Port is not aligned on a 32-bit boundary, then ASSERT(). 292 292 … … 379 379 380 380 If Port is not aligned on a 64-bit boundary, then ASSERT(). 381 381 382 382 If 64-bit I/O port operations are not supported, then ASSERT(). 383 383 … … 456 456 457 457 If Address is not aligned on a 16-bit boundary, then ASSERT(). 458 458 459 459 If 16-bit MMIO register operations are not supported, then ASSERT(). 460 460 … … 485 485 486 486 If Address is not aligned on a 16-bit boundary, then ASSERT(). 487 487 488 488 If 16-bit MMIO register operations are not supported, then ASSERT(). 489 489 … … 514 514 515 515 If Address is not aligned on a 32-bit boundary, then ASSERT(). 516 516 517 517 If 32-bit MMIO register operations are not supported, then ASSERT(). 518 518 … … 543 543 544 544 If Address is not aligned on a 32-bit boundary, then ASSERT(). 545 545 546 546 If 32-bit MMIO register operations are not supported, then ASSERT(). 547 547 … … 572 572 573 573 If Address is not aligned on a 64-bit boundary, then ASSERT(). 574 574 575 575 If 64-bit MMIO register operations are not supported, then ASSERT(). 576 576 … … 601 601 602 602 If Address is not aligned on a 64-bit boundary, then ASSERT(). 603 603 604 604 If 64-bit MMIO register operations are not supported, then ASSERT(). 605 605 -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkPkg/Library/DxeIoLibCpuIo/IoLibMmioBuffer.c
r48674 r58466 71 71 72 72 If Length is not aligned on a 16-bit boundary, then ASSERT(). 73 73 74 74 If Buffer is not aligned on a 16-bit boundary, then ASSERT(). 75 75 … … 174 174 175 175 If Length is not aligned on a 64-bit boundary, then ASSERT(). 176 176 177 177 If Buffer is not aligned on a 64-bit boundary, then ASSERT(). 178 178 -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkPkg/Library/DxeSmmDriverEntryPoint/DriverEntryPoint.c
r48674 r58466 137 137 // 138 138 // Call the unload handlers for all the modules. 139 // 140 // Note: All libraries were constructed in SMM space, 141 // therefore we can not destruct them in Unload 139 // 140 // Note: All libraries were constructed in SMM space, 141 // therefore we can not destruct them in Unload 142 142 // handler. 143 143 // -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkPkg/Library/DxeSmmDriverEntryPoint/DxeSmmDriverEntryPoint.inf
r58459 r58466 50 50 gEfiSmmBaseProtocolGuid ## CONSUMES 51 51 gEfiDevicePathProtocolGuid ## CONSUMES 52 52 53 53 [Depex] 54 54 gEfiSmmBaseProtocolGuid -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkPkg/Library/FrameworkUefiLib/Console.c
r58459 r58466 3 3 4 4 Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR> 5 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 9 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. 5 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 9 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. 12 12 13 13 **/ … … 29 29 {(CHAR16)0x1FFF, 1}, 30 30 /* 31 * Merge the blocks and replace them with the above entry as they fall to 31 * Merge the blocks and replace them with the above entry as they fall to 32 32 * the same category and they are all narrow glyph. This will reduce search 33 33 * time and table size. The merge will omit the reserved code. … … 76 76 {(CHAR16)0x2FFF, 1}, 77 77 /* 78 * Merge the blocks and replace them with the above entry as they fall to 78 * Merge the blocks and replace them with the above entry as they fall to 79 79 * the same category and they are all narrow glyph. This will reduce search 80 80 * time and table size. The merge will omit the reserved code. … … 108 108 {(CHAR16)0x33FF, 2}, 109 109 /* 110 * Merge the blocks and replace them with the above entry as they fall to 110 * Merge the blocks and replace them with the above entry as they fall to 111 111 * the same category and they are all wide glyph. This will reduce search 112 112 * time and table size. The merge will omit the reserved code. … … 131 131 {(CHAR16)0x9FFF, 2}, 132 132 /* 133 * Merge the blocks and replace them with the above entry as they fall to 133 * Merge the blocks and replace them with the above entry as they fall to 134 134 * the same category and they are all wide glyph. This will reduce search 135 135 * time and table size. The merge will omit the reserved code. … … 137 137 * Remove the above item if below is un-commented. 138 138 * 139 {(CHAR16)0x4DFF, 0}, // Reserved. 0x3400-0x4DBF as CJK unified ideographs 139 {(CHAR16)0x4DFF, 0}, // Reserved. 0x3400-0x4DBF as CJK unified ideographs 140 140 // extension A in ver3.0. 0x3400-0x4DFF 141 141 {(CHAR16)0x9FFF, 2}, // CJK unified ideographs. 0x4E00-0x9FFF … … 153 153 {(CHAR16)0xD7FF, 2}, 154 154 /* 155 * Merge the blocks and replace them with the above entry as they fall to 155 * Merge the blocks and replace them with the above entry as they fall to 156 156 * the same category and they are all wide glyph. This will reduce search 157 157 * time and table size. The merge will omit the reserved code. … … 216 216 Low = 0; 217 217 High = (sizeof (mUnicodeWidthTable)) / (sizeof (UNICODE_WIDTH_ENTRY)) - 1; 218 while (Low <= High) { 218 while (Low <= High) { 219 219 Index = (Low + High) >> 1; 220 220 Item = &(mUnicodeWidthTable[Index]); … … 254 254 width of String can be computed by summing the display widths of each Unicode character 255 255 in String. Unicode characters that are narrow glyphs have a width of 1, and Unicode 256 characters that are width glyphs have a width of 2. 256 characters that are width glyphs have a width of 2. 257 257 If String is not aligned on a 16-bit boundary, then ASSERT(). 258 258 … … 260 260 261 261 @return The display length of the Null-terminated Unicode string specified by String. 262 262 263 263 **/ 264 264 UINTN … … 290 290 291 291 /** 292 Draws a dialog box to the console output device specified by 292 Draws a dialog box to the console output device specified by 293 293 ConOut defined in the EFI_SYSTEM_TABLE and waits for a keystroke 294 from the console input device specified by ConIn defined in the 294 from the console input device specified by ConIn defined in the 295 295 EFI_SYSTEM_TABLE. 296 296 … … 299 299 300 300 @param[in] Attribute Specifies the foreground and background color of the popup. 301 @param[out] Key A pointer to the EFI_KEY value of the key that was 301 @param[out] Key A pointer to the EFI_KEY value of the key that was 302 302 pressed. This is an optional parameter that may be NULL. 303 303 If it is NULL then no wait for a keypress will be performed. 304 304 @param[in] ... The variable argument list that contains pointers to Null- 305 terminated Unicode strings to display in the dialog box. 305 terminated Unicode strings to display in the dialog box. 306 306 The variable argument list is terminated by a NULL. 307 307 … … 310 310 EFIAPI 311 311 CreatePopUp ( 312 IN UINTN Attribute, 312 IN UINTN Attribute, 313 313 OUT EFI_INPUT_KEY *Key, OPTIONAL 314 314 ... … … 331 331 332 332 // 333 // Determine the length of the longest line in the popup and the the total 333 // Determine the length of the longest line in the popup and the the total 334 334 // number of lines in the popup 335 335 // … … 357 357 // 358 358 ConOut = gST->ConOut; 359 359 360 360 // 361 361 // Save the current console cursor position and attributes … … 397 397 398 398 // 399 // Draw top of popup box 399 // Draw top of popup box 400 400 // 401 401 SetMem16 (Line, (MaxLength + 2) * 2, BOXDRAW_HORIZONTAL); -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkPkg/Library/FrameworkUefiLib/FrameworkUefiLib.inf
r58459 r58466 2 2 # Library to abstract Framework extensions that conflict with UEFI 2.0 Specification. 3 3 # 4 # This library is helpful to port Framework/Tinao code that has conflicts with UEFI 2.0. 4 # This library is helpful to port Framework/Tinao code that has conflicts with UEFI 2.0. 5 5 # It hides the old conflicts with library functions and supporting implementations of 6 6 # the old (EDK/EFI 1.10) and new (EDK II/UEFI 2.0) way. … … 52 52 UefiBootServicesTableLib 53 53 DevicePathLib 54 54 55 55 [Guids] 56 56 gEfiEventReadyToBootGuid ## SOMETIMES_CONSUMES ## Event -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiDriverModel.c
r58459 r58466 8 8 which accompanies this distribution. The full text of the license may be found at 9 9 http://opensource.org/licenses/bsd-license.php 10 10 11 11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 13 14 **/ 14 **/ 15 15 16 16 … … 19 19 /** 20 20 Installs and completes the initialization of a Driver Binding Protocol instance. 21 21 22 22 Installs the Driver Binding Protocol specified by DriverBinding onto the handle 23 23 specified by DriverBindingHandle. If DriverBindingHandle is NULL, then DriverBinding 24 24 is installed onto a newly created handle. DriverBindingHandle is typically the same 25 25 as the driver's ImageHandle, but it can be different if the driver produces multiple 26 Driver Binding Protocols. 27 If DriverBinding is NULL, then ASSERT(). 26 Driver Binding Protocols. 27 If DriverBinding is NULL, then ASSERT(). 28 28 If DriverBinding can not be installed onto a handle, then ASSERT(). 29 29 … … 81 81 then the protocols are installed onto a newly created handle. DriverBindingHandle 82 82 is typically the same as the driver's ImageHandle, but it can be different if the 83 driver produces multiple Driver Binding Protocols. 84 If DriverBinding is NULL, then ASSERT(). 83 driver produces multiple Driver Binding Protocols. 84 If DriverBinding is NULL, then ASSERT(). 85 85 If the installation fails, then ASSERT(). 86 86 87 87 @param ImageHandle The image handle of the driver. 88 88 @param SystemTable The EFI System Table that was passed to the driver's entry point. … … 211 211 DriverBindingHandle. If DriverBindingHandle is NULL, then the protocols are installed 212 212 onto a newly created handle. DriverBindingHandle is typically the same as the driver's 213 ImageHandle, but it can be different if the driver produces multiple Driver Binding Protocols. 214 If DriverBinding is NULL, then ASSERT(). 213 ImageHandle, but it can be different if the driver produces multiple Driver Binding Protocols. 214 If DriverBinding is NULL, then ASSERT(). 215 215 If the installation fails, then ASSERT(). 216 216 … … 300 300 optional Driver Diagnostic, and optional Driver Diagnostic 2 Protocols onto the driver's DriverBindingHandle. 301 301 DriverBindingHandle is typically the same as the driver's ImageHandle, but it can be different if the driver 302 produces multiple Driver Binding Protocols. 303 If DriverBinding is NULL, then ASSERT(). 302 produces multiple Driver Binding Protocols. 303 If DriverBinding is NULL, then ASSERT(). 304 304 If the installation fails, then ASSERT(). 305 305 … … 338 338 EFI_STATUS Status; 339 339 340 ASSERT (DriverBinding != NULL); 340 ASSERT (DriverBinding != NULL); 341 341 342 342 // … … 345 345 DriverBinding->ImageHandle = ImageHandle; 346 346 DriverBinding->DriverBindingHandle = DriverBindingHandle; 347 347 348 348 if (DriverConfiguration2 == NULL) { 349 349 if (DriverConfiguration == NULL) { -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLib.c
r48674 r58466 1 1 /** @file 2 The UEFI Library provides functions and macros that simplify the development of 3 UEFI Drivers and UEFI Applications. These functions and macros help manage EFI 4 events, build simple locks utilizing EFI Task Priority Levels (TPLs), install 5 EFI Driver Model related protocols, manage Unicode string tables for UEFI Drivers, 2 The UEFI Library provides functions and macros that simplify the development of 3 UEFI Drivers and UEFI Applications. These functions and macros help manage EFI 4 events, build simple locks utilizing EFI Task Priority Levels (TPLs), install 5 EFI Driver Model related protocols, manage Unicode string tables for UEFI Drivers, 6 6 and print messages on the console output and standard error devices. 7 7 … … 48 48 Retrieves a pointer to the system configuration table from the EFI System Table 49 49 based on a specified GUID. 50 50 51 51 This function searches the list of configuration tables stored in the EFI System Table 52 52 for a table with a GUID that matches TableGuid. If a match is found, then a pointer to … … 97 97 then the notification function is still executed one time. In addition, every time a protocol 98 98 of type ProtocolGuid instance is installed or reinstalled, the notification function is also 99 executed. This function returns the notification event that was created. 99 executed. This function returns the notification event that was created. 100 100 If ProtocolGuid is NULL, then ASSERT(). 101 101 If NotifyTpl is not a legal TPL value, then ASSERT(). … … 110 110 @param Registration A pointer to a memory location to receive the registration value. 111 111 This value is passed to LocateHandle() to obtain new handles that 112 have been added that support the ProtocolGuid-specified protocol. 112 have been added that support the ProtocolGuid-specified protocol. 113 113 114 114 @return The notification event that was created. … … 171 171 This function creates an event using NotifyTpl, NoifyFunction, and NotifyContext. 172 172 This event is signaled with EfiNamedEventSignal(). This provides the ability for one or more 173 listeners on the same event named by the GUID specified by Name. 173 listeners on the same event named by the GUID specified by Name. 174 174 If Name is NULL, then ASSERT(). 175 175 If NotifyTpl is not a legal TPL value, then ASSERT(). … … 179 179 @param NotifyTpl Supplies the task priority level of the event notifications. 180 180 @param NotifyFunction Supplies the function to notify when the event is signaled. 181 @param NotifyContext The context parameter to pass to NotifyFunction. 181 @param NotifyContext The context parameter to pass to NotifyFunction. 182 182 @param Registration A pointer to a memory location to receive the registration value. 183 183 … … 203 203 ASSERT (NotifyFunction != NULL); 204 204 ASSERT (NotifyTpl <= TPL_HIGH_LEVEL); 205 205 206 206 // 207 207 // Create event … … 283 283 } 284 284 285 /** 285 /** 286 286 Returns the current TPL. 287 287 288 This function returns the current TPL. There is no EFI service to directly 289 retrieve the current TPL. Instead, the RaiseTPL() function is used to raise 290 the TPL to TPL_HIGH_LEVEL. This will return the current TPL. The TPL level 291 can then immediately be restored back to the current TPL level with a call 288 This function returns the current TPL. There is no EFI service to directly 289 retrieve the current TPL. Instead, the RaiseTPL() function is used to raise 290 the TPL to TPL_HIGH_LEVEL. This will return the current TPL. The TPL level 291 can then immediately be restored back to the current TPL level with a call 292 292 to RestoreTPL(). 293 293 … … 313 313 Initializes a basic mutual exclusion lock. 314 314 315 This function initializes a basic mutual exclusion lock to the released state 316 and returns the lock. Each lock provides mutual exclusion access at its task 315 This function initializes a basic mutual exclusion lock to the released state 316 and returns the lock. Each lock provides mutual exclusion access at its task 317 317 priority level. Since there is no preemption or multiprocessor support in EFI, 318 318 acquiring the lock only consists of raising to the locks TPL. … … 345 345 Acquires ownership of a lock. 346 346 347 This function raises the system's current task priority level to the task 348 priority level of the mutual exclusion lock. Then, it places the lock in the 347 This function raises the system's current task priority level to the task 348 priority level of the mutual exclusion lock. Then, it places the lock in the 349 349 acquired state. 350 350 If Lock is NULL, then ASSERT(). … … 411 411 Releases ownership of a lock. 412 412 413 This function transitions a mutual exclusion lock from the acquired state to 414 the released state, and restores the system's task priority level to its 413 This function transitions a mutual exclusion lock from the acquired state to 414 the released state, and restores the system's task priority level to its 415 415 previous level. 416 416 If Lock is NULL, then ASSERT(). … … 446 446 is performed by evaluating if the the protocol specified by ProtocolGuid is 447 447 present on ControllerHandle and is was opened by DriverBindingHandle with an 448 attribute of EFI_OPEN_PROTOCOL_BY_DRIVER. 448 attribute of EFI_OPEN_PROTOCOL_BY_DRIVER. 449 449 If ProtocolGuid is NULL, then ASSERT(). 450 450 … … 509 509 If ProtocolGuid is NULL, then ASSERT(). 510 510 511 @param ControllerHandle A handle for a (parent) controller to test. 511 @param ControllerHandle A handle for a (parent) controller to test. 512 512 @param ChildHandle A child handle to test. 513 513 @param ProtocolGuid Supplies the protocol that the child controller 514 opens on its parent controller. 514 opens on its parent controller. 515 515 516 516 @retval EFI_SUCCESS ChildHandle is a child of the ControllerHandle. … … 571 571 is returned in UnicodeString. 572 572 573 @param Language A pointer to the ISO 639-2 language code for the 573 @param Language A pointer to the ISO 639-2 language code for the 574 574 Unicode string to look up and return. 575 @param SupportedLanguages A pointer to the set of ISO 639-2 language codes 576 that the Unicode string table supports. Language 575 @param SupportedLanguages A pointer to the set of ISO 639-2 language codes 576 that the Unicode string table supports. Language 577 577 must be a member of this set. 578 578 @param UnicodeStringTable A pointer to the table of Unicode strings. … … 580 580 that matches the language specified by Language. 581 581 582 @retval EFI_SUCCESS The Unicode string that matches the language 582 @retval EFI_SUCCESS The Unicode string that matches the language 583 583 specified by Language was found 584 in the table of Unicode strings UnicodeStringTable, 584 in the table of Unicode strings UnicodeStringTable, 585 585 and it was returned in UnicodeString. 586 586 @retval EFI_INVALID_PARAMETER Language is NULL. … … 588 588 @retval EFI_UNSUPPORTED SupportedLanguages is NULL. 589 589 @retval EFI_UNSUPPORTED UnicodeStringTable is NULL. 590 @retval EFI_UNSUPPORTED The language specified by Language is not a 590 @retval EFI_UNSUPPORTED The language specified by Language is not a 591 591 member of SupportedLanguages. 592 @retval EFI_UNSUPPORTED The language specified by Language is not 592 @retval EFI_UNSUPPORTED The language specified by Language is not 593 593 supported by UnicodeStringTable. 594 594 … … 663 663 not assumed to be Null-terminated, and only the first three 664 664 characters are used. If Iso639Language is FALSE, then this ASCII 665 string must be Null-terminated. 665 string must be Null-terminated. 666 666 @param SupportedLanguages A pointer to a Null-terminated ASCII string that contains a 667 667 set of ISO 639-2 or RFC 4646 language codes that the Unicode … … 683 683 was found in the table of Unicode strings UnicodeStringTable, and 684 684 it was returned in UnicodeString. 685 @retval EFI_INVALID_PARAMETER Language is NULL. 686 @retval EFI_INVALID_PARAMETER UnicodeString is NULL. 687 @retval EFI_UNSUPPORTED SupportedLanguages is NULL. 688 @retval EFI_UNSUPPORTED UnicodeStringTable is NULL. 689 @retval EFI_UNSUPPORTED The language specified by Language is not a member of SupportedLanguages. 685 @retval EFI_INVALID_PARAMETER Language is NULL. 686 @retval EFI_INVALID_PARAMETER UnicodeString is NULL. 687 @retval EFI_UNSUPPORTED SupportedLanguages is NULL. 688 @retval EFI_UNSUPPORTED UnicodeStringTable is NULL. 689 @retval EFI_UNSUPPORTED The language specified by Language is not a member of SupportedLanguages. 690 690 @retval EFI_UNSUPPORTED The language specified by Language is not supported by UnicodeStringTable. 691 691 … … 773 773 This function adds a Unicode string to UnicodeStringTable. 774 774 775 If Language is a member of SupportedLanguages then UnicodeString is added to 776 UnicodeStringTable. New buffers are allocated for both Language and 777 UnicodeString. The contents of Language and UnicodeString are copied into 778 these new buffers. These buffers are automatically freed when 775 If Language is a member of SupportedLanguages then UnicodeString is added to 776 UnicodeStringTable. New buffers are allocated for both Language and 777 UnicodeString. The contents of Language and UnicodeString are copied into 778 these new buffers. These buffers are automatically freed when 779 779 FreeUnicodeStringTable() is called. 780 780 781 @param Language A pointer to the ISO 639-2 language code for the Unicode 781 @param Language A pointer to the ISO 639-2 language code for the Unicode 782 782 string to add. 783 783 @param SupportedLanguages A pointer to the set of ISO 639-2 language codes … … 787 787 @param UnicodeString A pointer to the Unicode string to add. 788 788 789 @retval EFI_SUCCESS The Unicode string that matches the language 790 specified by Language was found in the table of 791 Unicode strings UnicodeStringTable, and it was 789 @retval EFI_SUCCESS The Unicode string that matches the language 790 specified by Language was found in the table of 791 Unicode strings UnicodeStringTable, and it was 792 792 returned in UnicodeString. 793 793 @retval EFI_INVALID_PARAMETER Language is NULL. … … 795 795 @retval EFI_INVALID_PARAMETER UnicodeString is an empty string. 796 796 @retval EFI_UNSUPPORTED SupportedLanguages is NULL. 797 @retval EFI_ALREADY_STARTED A Unicode string with language Language is 797 @retval EFI_ALREADY_STARTED A Unicode string with language Language is 798 798 already present in UnicodeStringTable. 799 @retval EFI_OUT_OF_RESOURCES There is not enough memory to add another 799 @retval EFI_OUT_OF_RESOURCES There is not enough memory to add another 800 800 Unicode string to UnicodeStringTable. 801 @retval EFI_UNSUPPORTED The language specified by Language is not a 801 @retval EFI_UNSUPPORTED The language specified by Language is not a 802 802 member of SupportedLanguages. 803 803 … … 962 962 @param UnicodeStringTable A pointer to the table of Unicode strings. Type EFI_UNICODE_STRING_TABLE 963 963 is defined in "Related Definitions". 964 @param UnicodeString A pointer to the Unicode string to add. 964 @param UnicodeString A pointer to the Unicode string to add. 965 965 @param Iso639Language Specifies the supported language code format. If it is TRUE, 966 966 then Language and SupportedLanguages follow ISO 639-2 language code format. … … 969 969 @retval EFI_SUCCESS The Unicode string that matches the language specified by 970 970 Language was found in the table of Unicode strings UnicodeStringTable, 971 and it was returned in UnicodeString. 972 @retval EFI_INVALID_PARAMETER Language is NULL. 973 @retval EFI_INVALID_PARAMETER UnicodeString is NULL. 974 @retval EFI_INVALID_PARAMETER UnicodeString is an empty string. 975 @retval EFI_UNSUPPORTED SupportedLanguages is NULL. 971 and it was returned in UnicodeString. 972 @retval EFI_INVALID_PARAMETER Language is NULL. 973 @retval EFI_INVALID_PARAMETER UnicodeString is NULL. 974 @retval EFI_INVALID_PARAMETER UnicodeString is an empty string. 975 @retval EFI_UNSUPPORTED SupportedLanguages is NULL. 976 976 @retval EFI_ALREADY_STARTED A Unicode string with language Language is already present in 977 UnicodeStringTable. 978 @retval EFI_OUT_OF_RESOURCES There is not enough memory to add another Unicode string UnicodeStringTable. 977 UnicodeStringTable. 978 @retval EFI_OUT_OF_RESOURCES There is not enough memory to add another Unicode string UnicodeStringTable. 979 979 @retval EFI_UNSUPPORTED The language specified by Language is not a member of SupportedLanguages. 980 980 … … 1060 1060 for (Index = 0; LanguageString[Index] != 0 && LanguageString[Index] != ';'; Index++); 1061 1061 1062 if (AsciiStrnCmp (Language, LanguageString, Index) == 0) { 1062 if (AsciiStrnCmp (Language, LanguageString, Index) == 0) { 1063 1063 return EFI_ALREADY_STARTED; 1064 1064 } … … 1142 1142 1143 1143 If UnicodeStringTable is NULL, then EFI_SUCCESS is returned. 1144 Otherwise, each language code, and each Unicode string in the Unicode string 1144 Otherwise, each language code, and each Unicode string in the Unicode string 1145 1145 table are freed, and EFI_SUCCESS is returned. 1146 1146 … … 1192 1192 1193 1193 /** 1194 Returns a pointer to an allocated buffer that contains the contents of a 1195 variable retrieved through the UEFI Runtime Service GetVariable(). The 1194 Returns a pointer to an allocated buffer that contains the contents of a 1195 variable retrieved through the UEFI Runtime Service GetVariable(). The 1196 1196 returned buffer is allocated using AllocatePool(). The caller is responsible 1197 1197 for freeing this buffer with FreePool(). … … 1254 1254 1255 1255 /** 1256 Returns a pointer to an allocated buffer that contains the contents of a 1257 variable retrieved through the UEFI Runtime Service GetVariable(). This 1256 Returns a pointer to an allocated buffer that contains the contents of a 1257 variable retrieved through the UEFI Runtime Service GetVariable(). This 1258 1258 function always uses the EFI_GLOBAL_VARIABLE GUID to retrieve variables. 1259 The returned buffer is allocated using AllocatePool(). The caller is 1259 The returned buffer is allocated using AllocatePool(). The caller is 1260 1260 responsible for freeing this buffer with FreePool(). 1261 1261 … … 1280 1280 1281 1281 /** 1282 Returns a pointer to an allocated buffer that contains the best matching language 1283 from a set of supported languages. 1284 1285 This function supports both ISO 639-2 and RFC 4646 language codes, but language 1286 code types may not be mixed in a single call to this function. The language 1287 code returned is allocated using AllocatePool(). The caller is responsible for 1282 Returns a pointer to an allocated buffer that contains the best matching language 1283 from a set of supported languages. 1284 1285 This function supports both ISO 639-2 and RFC 4646 language codes, but language 1286 code types may not be mixed in a single call to this function. The language 1287 code returned is allocated using AllocatePool(). The caller is responsible for 1288 1288 freeing the allocated buffer using FreePool(). This function supports a variable 1289 argument list that allows the caller to pass in a prioritized list of language 1290 codes to test against all the language codes in SupportedLanguages. 1289 argument list that allows the caller to pass in a prioritized list of language 1290 codes to test against all the language codes in SupportedLanguages. 1291 1291 1292 1292 If SupportedLanguages is NULL, then ASSERT(). 1293 1293 1294 1294 @param[in] SupportedLanguages A pointer to a Null-terminated ASCII string that 1295 contains a set of language codes in the format 1295 contains a set of language codes in the format 1296 1296 specified by Iso639Language. 1297 1297 @param[in] Iso639Language If TRUE, then all language codes are assumed to be 1298 1298 in ISO 639-2 format. If FALSE, then all language 1299 1299 codes are assumed to be in RFC 4646 language format 1300 @param[in] ... A variable argument list that contains pointers to 1300 @param[in] ... A variable argument list that contains pointers to 1301 1301 Null-terminated ASCII strings that contain one or more 1302 1302 language codes in the format specified by Iso639Language. 1303 1303 The first language code from each of these language 1304 1304 code lists is used to determine if it is an exact or 1305 close match to any of the language codes in 1305 close match to any of the language codes in 1306 1306 SupportedLanguages. Close matches only apply to RFC 4646 1307 1307 language codes, and the matching algorithm from RFC 4647 1308 is used to determine if a close match is present. If 1308 is used to determine if a close match is present. If 1309 1309 an exact or close match is found, then the matching 1310 1310 language code from SupportedLanguages is returned. If 1311 1311 no matches are found, then the next variable argument 1312 parameter is evaluated. The variable argument list 1312 parameter is evaluated. The variable argument list 1313 1313 is terminated by a NULL. 1314 1314 1315 1315 @retval NULL The best matching language could not be found in SupportedLanguages. 1316 @retval NULL There are not enough resources available to return the best matching 1316 @retval NULL There are not enough resources available to return the best matching 1317 1317 language. 1318 @retval Other A pointer to a Null-terminated ASCII string that is the best matching 1318 @retval Other A pointer to a Null-terminated ASCII string that is the best matching 1319 1319 language in SupportedLanguages. 1320 1320 … … 1323 1323 EFIAPI 1324 1324 GetBestLanguage ( 1325 IN CONST CHAR8 *SupportedLanguages, 1325 IN CONST CHAR8 *SupportedLanguages, 1326 1326 IN BOOLEAN Iso639Language, 1327 1327 ... … … 1402 1402 } else { 1403 1403 // 1404 // If RFC 4646 mode, then trim Language from the right to the next '-' character 1404 // If RFC 4646 mode, then trim Language from the right to the next '-' character 1405 1405 // 1406 1406 for (LanguageLength--; LanguageLength > 0 && Language[LanguageLength] != '-'; LanguageLength--); … … 1411 1411 1412 1412 // 1413 // No matches were found 1413 // No matches were found 1414 1414 // 1415 1415 return NULL; -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLibPrint.c
r58459 r58466 91 91 } 92 92 93 /** 94 Prints a formatted Unicode string to the console output device specified by 93 /** 94 Prints a formatted Unicode string to the console output device specified by 95 95 ConOut defined in the EFI_SYSTEM_TABLE. 96 96 97 This function prints a formatted Unicode string to the console output device 98 specified by ConOut in EFI_SYSTEM_TABLE and returns the number of Unicode 99 characters that printed to ConOut. If the length of the formatted Unicode 100 string is greater than PcdUefiLibMaxPrintBufferSize, then only the first 97 This function prints a formatted Unicode string to the console output device 98 specified by ConOut in EFI_SYSTEM_TABLE and returns the number of Unicode 99 characters that printed to ConOut. If the length of the formatted Unicode 100 string is greater than PcdUefiLibMaxPrintBufferSize, then only the first 101 101 PcdUefiLibMaxPrintBufferSize characters are sent to ConOut. 102 102 If Format is NULL, then ASSERT(). … … 105 105 106 106 @param Format Null-terminated Unicode format string. 107 @param ... Variable argument list whose contents are accessed based 107 @param ... Variable argument list whose contents are accessed based 108 108 on the format string specified by Format. 109 109 110 110 @return Number of Unicode characters printed to ConOut. 111 111 … … 130 130 } 131 131 132 /** 133 Prints a formatted Unicode string to the console output device specified by 132 /** 133 Prints a formatted Unicode string to the console output device specified by 134 134 StdErr defined in the EFI_SYSTEM_TABLE. 135 135 136 This function prints a formatted Unicode string to the console output device 137 specified by StdErr in EFI_SYSTEM_TABLE and returns the number of Unicode 138 characters that printed to StdErr. If the length of the formatted Unicode 139 string is greater than PcdUefiLibMaxPrintBufferSize, then only the first 136 This function prints a formatted Unicode string to the console output device 137 specified by StdErr in EFI_SYSTEM_TABLE and returns the number of Unicode 138 characters that printed to StdErr. If the length of the formatted Unicode 139 string is greater than PcdUefiLibMaxPrintBufferSize, then only the first 140 140 PcdUefiLibMaxPrintBufferSize characters are sent to StdErr. 141 141 If Format is NULL, then ASSERT(). … … 144 144 145 145 @param Format Null-terminated Unicode format string. 146 @param ... Variable argument list whose contents are accessed based 146 @param ... Variable argument list whose contents are accessed based 147 147 on the format string specified by Format. 148 148 149 149 @return Number of Unicode characters printed to StdErr. 150 150 … … 226 226 } 227 227 228 /** 229 Prints a formatted ASCII string to the console output device specified by 228 /** 229 Prints a formatted ASCII string to the console output device specified by 230 230 ConOut defined in the EFI_SYSTEM_TABLE. 231 231 232 This function prints a formatted ASCII string to the console output device 233 specified by ConOut in EFI_SYSTEM_TABLE and returns the number of ASCII 234 characters that printed to ConOut. If the length of the formatted ASCII 235 string is greater than PcdUefiLibMaxPrintBufferSize, then only the first 232 This function prints a formatted ASCII string to the console output device 233 specified by ConOut in EFI_SYSTEM_TABLE and returns the number of ASCII 234 characters that printed to ConOut. If the length of the formatted ASCII 235 string is greater than PcdUefiLibMaxPrintBufferSize, then only the first 236 236 PcdUefiLibMaxPrintBufferSize characters are sent to ConOut. 237 237 If Format is NULL, then ASSERT(). … … 239 239 240 240 @param Format Null-terminated ASCII format string. 241 @param ... Variable argument list whose contents are accessed based 241 @param ... Variable argument list whose contents are accessed based 242 242 on the format string specified by Format. 243 243 244 244 @return Number of ASCII characters printed to ConOut. 245 245 … … 265 265 } 266 266 267 /** 268 Prints a formatted ASCII string to the console output device specified by 267 /** 268 Prints a formatted ASCII string to the console output device specified by 269 269 StdErr defined in the EFI_SYSTEM_TABLE. 270 270 271 This function prints a formatted ASCII string to the console output device 272 specified by StdErr in EFI_SYSTEM_TABLE and returns the number of ASCII 273 characters that printed to StdErr. If the length of the formatted ASCII 274 string is greater than PcdUefiLibMaxPrintBufferSize, then only the first 271 This function prints a formatted ASCII string to the console output device 272 specified by StdErr in EFI_SYSTEM_TABLE and returns the number of ASCII 273 characters that printed to StdErr. If the length of the formatted ASCII 274 string is greater than PcdUefiLibMaxPrintBufferSize, then only the first 275 275 PcdUefiLibMaxPrintBufferSize characters are sent to StdErr. 276 276 If Format is NULL, then ASSERT(). … … 278 278 279 279 @param Format Null-terminated ASCII format string. 280 @param ... Variable argument list whose contents are accessed based 280 @param ... Variable argument list whose contents are accessed based 281 281 on the format string specified by Format. 282 282 283 283 @return Number of ASCII characters printed to ConErr. 284 284 … … 554 554 555 555 /** 556 Prints a formatted Unicode string to a graphics console device specified by 556 Prints a formatted Unicode string to a graphics console device specified by 557 557 ConsoleOutputHandle defined in the EFI_SYSTEM_TABLE at the given (X,Y) coordinates. 558 558 559 This function prints a formatted Unicode string to the graphics console device 560 specified by ConsoleOutputHandle in EFI_SYSTEM_TABLE and returns the number of 561 Unicode characters displayed, not including partial characters that may be clipped 559 This function prints a formatted Unicode string to the graphics console device 560 specified by ConsoleOutputHandle in EFI_SYSTEM_TABLE and returns the number of 561 Unicode characters displayed, not including partial characters that may be clipped 562 562 by the right edge of the display. If the length of the formatted Unicode string is 563 greater than PcdUefiLibMaxPrintBufferSize, then at most the first 563 greater than PcdUefiLibMaxPrintBufferSize, then at most the first 564 564 PcdUefiLibMaxPrintBufferSize characters are printed.The EFI_HII_FONT_PROTOCOL 565 StringToImage() service is used to convert the string to a bitmap using the glyphs 566 registered with the HII database. No wrapping is performed, so any portions of the 567 string the fall outside the active display region will not be displayed. Please see 565 StringToImage() service is used to convert the string to a bitmap using the glyphs 566 registered with the HII database. No wrapping is performed, so any portions of the 567 string the fall outside the active display region will not be displayed. Please see 568 568 Section 27.2.6 of the UEFI Specification for a description of the supported string 569 569 format including the set of control codes supported by the StringToImage() service. 570 570 571 If a graphics console device is not associated with the ConsoleOutputHandle 571 If a graphics console device is not associated with the ConsoleOutputHandle 572 572 defined in the EFI_SYSTEM_TABLE then no string is printed, and 0 is returned. 573 If the EFI_HII_FONT_PROTOCOL is not present in the handle database, then no 573 If the EFI_HII_FONT_PROTOCOL is not present in the handle database, then no 574 574 string is printed, and 0 is returned. 575 575 If Format is NULL, then ASSERT(). … … 584 584 in the EFI_SYSTEM_TABLE is used. 585 585 @param BackGround The background color of the string being printed. This is 586 an optional parameter that may be NULL. If it is NULL, 586 an optional parameter that may be NULL. If it is NULL, 587 587 then the background color of the current ConOut device 588 588 in the EFI_SYSTEM_TABLE is used. 589 @param Format Null-terminated Unicode format string. See Print Library 589 @param Format Null-terminated Unicode format string. See Print Library 590 590 for the supported format string syntax. 591 @param ... Variable argument list whose contents are accessed based on 592 the format string specified by Format. 591 @param ... Variable argument list whose contents are accessed based on 592 the format string specified by Format. 593 593 594 594 @return The number of Unicode characters printed. … … 634 634 635 635 /** 636 Prints a formatted ASCII string to a graphics console device specified by 636 Prints a formatted ASCII string to a graphics console device specified by 637 637 ConsoleOutputHandle defined in the EFI_SYSTEM_TABLE at the given (X,Y) coordinates. 638 638 639 This function prints a formatted ASCII string to the graphics console device 640 specified by ConsoleOutputHandle in EFI_SYSTEM_TABLE and returns the number of 641 ASCII characters displayed, not including partial characters that may be clipped 639 This function prints a formatted ASCII string to the graphics console device 640 specified by ConsoleOutputHandle in EFI_SYSTEM_TABLE and returns the number of 641 ASCII characters displayed, not including partial characters that may be clipped 642 642 by the right edge of the display. If the length of the formatted ASCII string is 643 greater than PcdUefiLibMaxPrintBufferSize, then at most the first 643 greater than PcdUefiLibMaxPrintBufferSize, then at most the first 644 644 PcdUefiLibMaxPrintBufferSize characters are printed.The EFI_HII_FONT_PROTOCOL 645 StringToImage() service is used to convert the string to a bitmap using the glyphs 646 registered with the HII database. No wrapping is performed, so any portions of the 647 string the fall outside the active display region will not be displayed. Please see 645 StringToImage() service is used to convert the string to a bitmap using the glyphs 646 registered with the HII database. No wrapping is performed, so any portions of the 647 string the fall outside the active display region will not be displayed. Please see 648 648 Section 27.2.6 of the UEFI Specification for a description of the supported string 649 649 format including the set of control codes supported by the StringToImage() service. 650 650 651 If a graphics console device is not associated with the ConsoleOutputHandle 651 If a graphics console device is not associated with the ConsoleOutputHandle 652 652 defined in the EFI_SYSTEM_TABLE then no string is printed, and 0 is returned. 653 If the EFI_HII_FONT_PROTOCOL is not present in the handle database, then no 653 If the EFI_HII_FONT_PROTOCOL is not present in the handle database, then no 654 654 string is printed, and 0 is returned. 655 655 If Format is NULL, then ASSERT(). … … 663 663 in the EFI_SYSTEM_TABLE is used. 664 664 @param BackGround The background color of the string being printed. This is 665 an optional parameter that may be NULL. If it is NULL, 665 an optional parameter that may be NULL. If it is NULL, 666 666 then the background color of the current ConOut device 667 667 in the EFI_SYSTEM_TABLE is used. 668 @param Format Null-terminated ASCII format string. See Print Library 668 @param Format Null-terminated ASCII format string. See Print Library 669 669 for the supported format string syntax. 670 @param ... Variable argument list whose contents are accessed based on 671 the format string specified by Format. 670 @param ... Variable argument list whose contents are accessed based on 671 the format string specified by Format. 672 672 673 673 @return The number of ASCII characters printed. … … 711 711 } 712 712 713 /** 713 /** 714 714 Appends a formatted Unicode string to a Null-terminated Unicode string 715 716 This function appends a formatted Unicode string to the Null-terminated 715 716 This function appends a formatted Unicode string to the Null-terminated 717 717 Unicode string specified by String. String is optional and may be NULL. 718 Storage for the formatted Unicode string returned is allocated using 718 Storage for the formatted Unicode string returned is allocated using 719 719 AllocatePool(). The pointer to the appended string is returned. The caller 720 720 is responsible for freeing the returned string. 721 721 722 722 If String is not NULL and not aligned on a 16-bit boundary, then ASSERT(). 723 723 If FormatString is NULL, then ASSERT(). 724 724 If FormatString is not aligned on a 16-bit boundary, then ASSERT(). 725 725 726 726 @param[in] String A Null-terminated Unicode string. 727 727 @param[in] FormatString A Null-terminated Unicode format string. … … 729 729 730 730 @retval NULL There was not enough available memory. 731 @return Null-terminated Unicode string is that is the formatted 731 @return Null-terminated Unicode string is that is the formatted 732 732 string appended to String. 733 733 **/ … … 772 772 } 773 773 774 /** 774 /** 775 775 Appends a formatted Unicode string to a Null-terminated Unicode string 776 777 This function appends a formatted Unicode string to the Null-terminated 776 777 This function appends a formatted Unicode string to the Null-terminated 778 778 Unicode string specified by String. String is optional and may be NULL. 779 Storage for the formatted Unicode string returned is allocated using 779 Storage for the formatted Unicode string returned is allocated using 780 780 AllocatePool(). The pointer to the appended string is returned. The caller 781 781 is responsible for freeing the returned string. 782 782 783 783 If String is not NULL and not aligned on a 16-bit boundary, then ASSERT(). 784 784 If FormatString is NULL, then ASSERT(). 785 785 If FormatString is not aligned on a 16-bit boundary, then ASSERT(). 786 786 787 787 @param[in] String A Null-terminated Unicode string. 788 788 @param[in] FormatString A Null-terminated Unicode format string. 789 @param[in] ... The variable argument list whose contents are 790 accessed based on the format string specified by 789 @param[in] ... The variable argument list whose contents are 790 accessed based on the format string specified by 791 791 FormatString. 792 792 793 793 @retval NULL There was not enough available memory. 794 @return Null-terminated Unicode string is that is the formatted 794 @return Null-terminated Unicode string is that is the formatted 795 795 string appended to String. 796 796 **/ -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkPkg/Library/FrameworkUefiLib/UefiNotTiano.c
r48674 r58466 27 27 This empty function ensures that EVT_NOTIFY_SIGNAL_ALL is error 28 28 checked correctly since it is now mapped into CreateEventEx() in UEFI 2.0. 29 29 30 30 @param Event Event whose notification function is being invoked. 31 31 @param Context Pointer to the notification function's context, … … 298 298 299 299 // 300 // EFI Specification extension on Media Device Path. MEDIA_FW_VOL_FILEPATH_DEVICE_PATH is adopted by UEFI later and added in UEFI2.10. 300 // EFI Specification extension on Media Device Path. MEDIA_FW_VOL_FILEPATH_DEVICE_PATH is adopted by UEFI later and added in UEFI2.10. 301 301 // In EdkCompatibility Package, we only support MEDIA_FW_VOL_FILEPATH_DEVICE_PATH that complies with 302 302 // EFI 1.10 and UEFI 2.10. … … 336 336 337 337 // 338 // EFI Specification extension on Media Device Path. MEDIA_FW_VOL_FILEPATH_DEVICE_PATH is adopted by UEFI later and added in UEFI2.10. 338 // EFI Specification extension on Media Device Path. MEDIA_FW_VOL_FILEPATH_DEVICE_PATH is adopted by UEFI later and added in UEFI2.10. 339 339 // In EdkCompatibility Package, we only support MEDIA_FW_VOL_FILEPATH_DEVICE_PATH that complies with 340 340 // EFI 1.10 and UEFI 2.10. … … 343 343 FvDevicePathNode->Header.SubType = MEDIA_PIWG_FW_FILE_DP; 344 344 SetDevicePathNodeLength (&FvDevicePathNode->Header, sizeof (MEDIA_FW_VOL_FILEPATH_DEVICE_PATH)); 345 345 346 346 CopyGuid (&FvDevicePathNode->FvFileName, NameGuid); 347 347 } -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkPkg/Library/PeiHobLibFramework/HobLib.c
r58459 r58466 4 4 HOB Library implementation that uses PEI Services to retrieve the HOB List. 5 5 This library instance uses EFI_HOB_TYPE_CV defined in Intel framework HOB specification v0.9 6 to implement HobLib BuildCvHob() API. 6 to implement HobLib BuildCvHob() API. 7 7 8 8 Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR> … … 30 30 31 31 This function returns the pointer to first HOB in the list. 32 For PEI phase, the PEI service GetHobList() can be used to retrieve the pointer 32 For PEI phase, the PEI service GetHobList() can be used to retrieve the pointer 33 33 to the HOB list. For the DXE phase, the HOB list pointer can be retrieved through 34 34 the EFI System Table by looking up theHOB list GUID in the System Configuration Table. 35 Since the System Configuration Table does not exist that the time the DXE Core is 36 launched, the DXE Core uses a global variable from the DXE Core Entry Point Library 35 Since the System Configuration Table does not exist that the time the DXE Core is 36 launched, the DXE Core uses a global variable from the DXE Core Entry Point Library 37 37 to manage the pointer to the HOB list. 38 38 39 39 If the pointer to the HOB list is NULL, then ASSERT(). 40 40 41 41 @return The pointer to the HOB list. 42 42 … … 61 61 Returns the next instance of a HOB type from the starting HOB. 62 62 63 This function searches the first instance of a HOB type from the starting HOB pointer. 63 This function searches the first instance of a HOB type from the starting HOB pointer. 64 64 If there does not exist such HOB type from the starting HOB pointer, it will return NULL. 65 65 In contrast with macro GET_NEXT_HOB(), this function does not skip the starting HOB pointer 66 66 unconditionally: it returns HobStart back if HobStart itself meets the requirement; 67 67 caller is required to use GET_NEXT_HOB() if it wishes to skip current HobStart. 68 68 69 69 If HobStart is NULL, then ASSERT(). 70 70 … … 85 85 86 86 ASSERT (HobStart != NULL); 87 87 88 88 Hob.Raw = (UINT8 *) HobStart; 89 89 // … … 102 102 Returns the first instance of a HOB type among the whole HOB list. 103 103 104 This function searches the first instance of a HOB type among the whole HOB list. 105 If there does not exist such HOB type in the HOB list, it will return NULL. 106 104 This function searches the first instance of a HOB type among the whole HOB list. 105 If there does not exist such HOB type in the HOB list, it will return NULL. 106 107 107 If the pointer to the HOB list is NULL, then ASSERT(). 108 108 … … 126 126 /** 127 127 Returns the next instance of the matched GUID HOB from the starting HOB. 128 129 This function searches the first instance of a HOB from the starting HOB pointer. 130 Such HOB should satisfy two conditions: 131 its HOB type is EFI_HOB_TYPE_GUID_EXTENSION and its GUID Name equals to the input Guid. 132 If there does not exist such HOB from the starting HOB pointer, it will return NULL. 128 129 This function searches the first instance of a HOB from the starting HOB pointer. 130 Such HOB should satisfy two conditions: 131 its HOB type is EFI_HOB_TYPE_GUID_EXTENSION and its GUID Name equals to the input Guid. 132 If there does not exist such HOB from the starting HOB pointer, it will return NULL. 133 133 Caller is required to apply GET_GUID_HOB_DATA () and GET_GUID_HOB_DATA_SIZE () 134 134 to extract the data section and its size info respectively. … … 136 136 unconditionally: it returns HobStart back if HobStart itself meets the requirement; 137 137 caller is required to use GET_NEXT_HOB() if it wishes to skip current HobStart. 138 138 139 139 If Guid is NULL, then ASSERT(). 140 140 If HobStart is NULL, then ASSERT(). … … 167 167 /** 168 168 Returns the first instance of the matched GUID HOB among the whole HOB list. 169 170 This function searches the first instance of a HOB among the whole HOB list. 169 170 This function searches the first instance of a HOB among the whole HOB list. 171 171 Such HOB should satisfy two conditions: 172 172 its HOB type is EFI_HOB_TYPE_GUID_EXTENSION and its GUID Name equals to the input Guid. … … 174 174 Caller is required to apply GET_GUID_HOB_DATA () and GET_GUID_HOB_DATA_SIZE () 175 175 to extract the data section and its size info respectively. 176 176 177 177 If the pointer to the HOB list is NULL, then ASSERT(). 178 178 If Guid is NULL, then ASSERT(). … … 198 198 Get the system boot mode from the HOB list. 199 199 200 This function returns the system boot mode information from the 200 This function returns the system boot mode information from the 201 201 PHIT HOB in HOB list. 202 202 203 203 If the pointer to the HOB list is NULL, then ASSERT(). 204 204 205 205 @param VOID 206 206 … … 262 262 It can only be invoked during PEI phase; 263 263 for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase. 264 264 265 265 If ModuleName is NULL, then ASSERT(). 266 266 If there is no additional space for HOB creation, then ASSERT(). … … 300 300 // 301 301 ZeroMem (Hob->MemoryAllocationHeader.Reserved, sizeof (Hob->MemoryAllocationHeader.Reserved)); 302 302 303 303 CopyGuid (&Hob->ModuleName, ModuleName); 304 304 Hob->EntryPoint = EntryPoint; … … 311 311 It can only be invoked during PEI phase; 312 312 for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase. 313 313 314 314 If there is no additional space for HOB creation, then ASSERT(). 315 315 … … 352 352 It can only be invoked during PEI phase; 353 353 for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase. 354 354 355 355 If there is no additional space for HOB creation, then ASSERT(). 356 356 … … 385 385 386 386 /** 387 Builds a customized HOB tagged with a GUID for identification and returns 387 Builds a customized HOB tagged with a GUID for identification and returns 388 388 the start address of GUID HOB data. 389 389 390 This function builds a customized HOB tagged with a GUID for identification 391 and returns the start address of GUID HOB data so that caller can fill the customized data. 390 This function builds a customized HOB tagged with a GUID for identification 391 and returns the start address of GUID HOB data so that caller can fill the customized data. 392 392 The HOB Header and Name field is already stripped. 393 393 It can only be invoked during PEI phase; 394 394 for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase. 395 395 396 396 If Guid is NULL, then ASSERT(). 397 397 If there is no additional space for HOB creation, then ASSERT(). … … 418 418 // 419 419 ASSERT (Guid != NULL); 420 420 421 421 // 422 422 // Make sure that data length is not too long. … … 433 433 434 434 /** 435 Builds a customized HOB tagged with a GUID for identification, copies the input data to the HOB 435 Builds a customized HOB tagged with a GUID for identification, copies the input data to the HOB 436 436 data field, and returns the start address of the GUID HOB data. 437 437 438 438 This function builds a customized HOB tagged with a GUID for identification and copies the input 439 data to the HOB data field and returns the start address of the GUID HOB data. It can only be 440 invoked during PEI phase; for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase. 439 data to the HOB data field and returns the start address of the GUID HOB data. It can only be 440 invoked during PEI phase; for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase. 441 441 The HOB Header and Name field is already stripped. 442 442 It can only be invoked during PEI phase; 443 443 for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase. 444 444 445 445 If Guid is NULL, then ASSERT(). 446 446 If Data is NULL and DataLength > 0, then ASSERT(). … … 482 482 It can only be invoked during PEI phase; 483 483 for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase. 484 484 485 485 If there is no additional space for HOB creation, then ASSERT(). 486 486 … … 513 513 It can only be invoked during PEI phase; 514 514 for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase. 515 515 516 516 If there is no additional space for HOB creation, then ASSERT(). 517 517 … … 520 520 @param FvName The name of the Firmware Volume. 521 521 @param FileName The name of the file. 522 522 523 523 **/ 524 524 VOID … … 550 550 It can only be invoked during PEI phase; 551 551 for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase. 552 552 553 553 If the platform does not support Capsule Volume HOBs, then ASSERT(). 554 554 If there is no additional space for HOB creation, then ASSERT(). … … 582 582 It can only be invoked during PEI phase; 583 583 for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase. 584 584 585 585 If there is no additional space for HOB creation, then ASSERT(). 586 586 … … 609 609 // Zero the reserved space to match HOB spec 610 610 // 611 ZeroMem (Hob->Reserved, sizeof (Hob->Reserved)); 611 ZeroMem (Hob->Reserved, sizeof (Hob->Reserved)); 612 612 } 613 613 … … 618 618 It can only be invoked during PEI phase; 619 619 for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase. 620 620 621 621 If there is no additional space for HOB creation, then ASSERT(). 622 622 … … 659 659 It can only be invoked during PEI phase; 660 660 for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase. 661 661 662 662 If there is no additional space for HOB creation, then ASSERT(). 663 663 … … 702 702 It can only be invoked during PEI phase; 703 703 for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase. 704 704 705 705 If there is no additional space for HOB creation, then ASSERT(). 706 706 … … 722 722 ASSERT (((BaseAddress & (EFI_PAGE_SIZE - 1)) == 0) && 723 723 ((Length & (EFI_PAGE_SIZE - 1)) == 0)); 724 724 725 725 Hob = InternalPeiCreateHob (EFI_HOB_TYPE_MEMORY_ALLOCATION, (UINT16) sizeof (EFI_HOB_MEMORY_ALLOCATION)); 726 726 if (Hob == NULL) { 727 727 return; 728 728 } 729 729 730 730 ZeroMem (&(Hob->AllocDescriptor.Name), sizeof (EFI_GUID)); 731 731 Hob->AllocDescriptor.MemoryBaseAddress = BaseAddress; -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkPkg/Library/PeiHobLibFramework/PeiHobLibFramework.inf
r58459 r58466 4 4 # HOB Library implementation that uses PEI Services to retrieve the HOB List. 5 5 # This library instance uses EFI_HOB_TYPE_CV defined in Intel framework HOB specification v0.9 6 # to implement HobLib BuildCvHob() API. 6 # to implement HobLib BuildCvHob() API. 7 7 # 8 8 # Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR> … … 55 55 # RESOURCE_DESCRIPTOR ## SOMETIMES_PRODUCES 56 56 # FIRMWARE_VOLUME ## SOMETIMES_PRODUCES 57 # 57 # 58 58 -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkPkg/Library/PeiSmbusLibSmbusPpi/InternalSmbusLib.h
r48674 r58466 3 3 4 4 Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> 5 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 9 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. 5 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 9 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. 12 12 13 13 **/ … … 47 47 48 48 /** 49 Executes an SMBus operation to an SMBus controller. 49 Executes an SMBus operation to an SMBus controller. 50 50 51 51 This function provides a standard way to execute Smbus script -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkPkg/Library/PeiSmbusLibSmbusPpi/PeiSmbusLib.c
r48674 r58466 3 3 4 4 Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> 5 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 9 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. 5 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 9 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. 12 12 13 13 **/ … … 20 20 This internal function retrieves Smbus PPI from PPI database. 21 21 If gEfiPeiSmbusPpiGuid can not be located, then ASSERT() 22 22 23 23 @return The pointer to Smbus PPI. 24 24 … … 27 27 InternalGetSmbusPpi ( 28 28 VOID 29 ) 29 ) 30 30 { 31 31 EFI_STATUS Status; … … 40 40 41 41 /** 42 Executes an SMBus operation to an SMBus controller. 42 Executes an SMBus operation to an SMBus controller. 43 43 44 44 This function provides a standard way to execute Smbus script … … 84 84 SMBUS_LIB_COMMAND (SmBusAddress), 85 85 SmbusOperation, 86 SMBUS_LIB_PEC (SmBusAddress), 86 SMBUS_LIB_PEC (SmBusAddress), 87 87 &Length, 88 88 Buffer -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkPkg/Library/PeiSmbusLibSmbusPpi/PeiSmbusLibSmbusPpi.inf
r58459 r58466 21 21 MODULE_TYPE = PEIM 22 22 VERSION_STRING = 1.0 23 LIBRARY_CLASS = SmbusLib|PEIM 23 LIBRARY_CLASS = SmbusLib|PEIM 24 24 25 25 -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkPkg/Library/PeiSmbusLibSmbusPpi/SmbusLib.c
r48674 r58466 3 3 4 4 Copyright (c) 2006, Intel Corporation. All rights reserved.<BR> 5 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 9 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. 5 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 9 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. 12 12 13 13 … … 190 190 191 191 InternalSmBusExec (EfiSmbusReadByte, SmBusAddress, 1, &Byte, Status); 192 192 193 193 return Byte; 194 194 } … … 229 229 Byte = Value; 230 230 InternalSmBusExec (EfiSmbusWriteByte, SmBusAddress, 1, &Byte, Status); 231 231 232 232 return Value; 233 233 } … … 242 242 If Length in SmBusAddress is not zero, then ASSERT(). 243 243 If any reserved bits of SmBusAddress are set, then ASSERT(). 244 244 245 245 @param SmBusAddress Address that encodes the SMBUS Slave Address, 246 246 SMBUS Command, SMBUS Data Length, and PEC. … … 264 264 265 265 InternalSmBusExec (EfiSmbusReadWord, SmBusAddress, 2, &Word, Status); 266 266 267 267 return Word; 268 268 } … … 339 339 340 340 InternalSmBusExec (EfiSmbusProcessCall, SmBusAddress, 2, &Value, Status); 341 341 342 342 return Value; 343 343 } … … 388 388 Bytes are written to the SMBUS from Buffer. 389 389 The number of bytes written is returned, and will never return a value larger than 32-bytes. 390 If Status is not NULL, then the status of the executed command is returned in Status. 390 If Status is not NULL, then the status of the executed command is returned in Status. 391 391 If Length in SmBusAddress is zero or greater than 32, then ASSERT(). 392 392 If Buffer is NULL, then ASSERT().
Note:
See TracChangeset
for help on using the changeset viewer.