Changeset 58466 in vbox for trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library
- Timestamp:
- Oct 29, 2015 4:30:44 AM (9 years ago)
- svn:sync-xref-src-repo-rev:
- 103777
- Location:
- trunk/src/VBox/Devices/EFI/Firmware
- Files:
-
- 33 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/IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.c
r58459 r58466 1 1 /** @file 2 UEFI and Tiano Custom Decompress Library 2 UEFI and Tiano Custom Decompress Library 3 3 It will do Tiano or UEFI decompress with different verison parameter. 4 4 5 5 Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR> 6 This program and the accompanying materials 7 are licensed and made available under the terms and conditions of the BSD License 8 which accompanies this distribution. The full text of the license may be found at 9 http://opensource.org/licenses/bsd-license.php 10 11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 6 This program and the accompanying materials 7 are licensed and made available under the terms and conditions of the BSD License 8 which accompanies this distribution. The full text of the license may be found at 9 http://opensource.org/licenses/bsd-license.php 10 11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 13 14 14 **/ … … 18 18 /** 19 19 Shift mBitBuf NumOfBits left. Read in NumOfBits of bits from source. 20 20 21 21 @param Sd The global scratch data 22 @param NumOfBits The number of bits to shift and read. 22 @param NumOfBits The number of bits to shift and read. 23 23 **/ 24 24 VOID … … 63 63 // 64 64 Sd->mBitCount = (UINT16) (Sd->mBitCount - NumOfBits); 65 65 66 66 // 67 67 // Copy NumOfBits of bits from mSubBitBuf into mBitBuf … … 73 73 Get NumOfBits of bits out from mBitBuf 74 74 75 Get NumOfBits of bits out from mBitBuf. Fill mBitBuf with subsequent 76 NumOfBits of bits from source. Returns NumOfBits of bits that are 75 Get NumOfBits of bits out from mBitBuf. Fill mBitBuf with subsequent 76 NumOfBits of bits from source. Returns NumOfBits of bits that are 77 77 popped out. 78 78 … … 93 93 // 94 94 // Pop NumOfBits of Bits from Left 95 // 95 // 96 96 OutBits = (UINT32) (Sd->mBitBuf >> (BITBUFSIZ - NumOfBits)); 97 97 … … 107 107 Creates Huffman Code mapping table according to code length array. 108 108 109 Creates Huffman Code mapping table for Extra Set, Char&Len Set 109 Creates Huffman Code mapping table for Extra Set, Char&Len Set 110 110 and Position Set according to code length array. 111 111 If TableBits > 16, then ASSERT (). … … 158 158 Count[BitLen[Index]]++; 159 159 } 160 160 161 161 Start[0] = 0; 162 162 Start[1] = 0; … … 174 174 175 175 JuBits = (UINT16) (16 - TableBits); 176 176 177 177 Weight[0] = 0; 178 178 for (Index = 1; Index <= TableBits; Index++) { … … 183 183 while (Index <= 16) { 184 184 Weight[Index] = (UINT16) (1U << (16 - Index)); 185 Index++; 185 Index++; 186 186 } 187 187 … … 224 224 *Pointer = Avail++; 225 225 } 226 226 227 227 if (*Pointer < (2 * NC - 1)) { 228 228 if ((Index3 & Mask) != 0) { … … 251 251 /** 252 252 Decodes a position value. 253 253 254 254 Get a position value according to Position Huffman Table. 255 255 256 256 @param Sd the global scratch data 257 257 258 258 @return The position value decoded. 259 259 **/ … … 326 326 ASSERT (nn <= NPT); 327 327 // 328 // Read Extra Set Code Length Array size 328 // Read Extra Set Code Length Array size 329 329 // 330 330 Number = (UINT16) GetBits (Sd, nbit); … … 353 353 // 354 354 // If a code length is less than 7, then it is encoded as a 3-bit 355 // value. Or it is encoded as a series of "1"s followed by a 355 // value. Or it is encoded as a series of "1"s followed by a 356 356 // terminating "0". The number of "1"s = Code length - 4. 357 357 // … … 363 363 } 364 364 } 365 365 366 366 FillBuf (Sd, (UINT16) ((CharC < 7) ? 3 : CharC - 3)); 367 367 368 368 Sd->mPTLen[Index++] = (UINT8) CharC; 369 370 // 371 // For Code&Len Set, 369 370 // 371 // For Code&Len Set, 372 372 // After the third length of the code length concatenation, 373 // a 2-bit value is used to indicated the number of consecutive 373 // a 2-bit value is used to indicated the number of consecutive 374 374 // zero lengths after the third length. 375 375 // … … 385 385 Sd->mPTLen[Index++] = 0; 386 386 } 387 387 388 388 return MakeTable (Sd, nn, Sd->mPTLen, 8, Sd->mPTTable); 389 389 } … … 391 391 /** 392 392 Reads code lengths for Char&Len Set. 393 393 394 394 Read in and decode the Char&Len Set Code Length Array, then 395 395 generate the Huffman Code mapping table for the Char&Len Set. … … 478 478 /** 479 479 Decode a character/length value. 480 480 481 481 Read one value from mBitBuf, Get one code from mBitBuf. If it is at block boundary, generates 482 482 Huffman code mapping table for Extra Set, Code&Len Set and … … 500 500 // Starting a new block 501 501 // Read BlockSize from block header 502 // 502 // 503 503 Sd->mBlockSize = (UINT16) GetBits (Sd, 16); 504 504 … … 519 519 520 520 // 521 // Read in the Position Set Code Length Arrary, 521 // Read in the Position Set Code Length Arrary, 522 522 // Generate the Huffman code mapping table for the Position Set. 523 523 // … … 557 557 /** 558 558 Decode the source data and put the resulting data into the destination buffer. 559 559 560 560 @param Sd The global scratch data 561 561 **/ … … 576 576 // 577 577 // Get one code from mBitBuf 578 // 578 // 579 579 CharC = DecodeC (Sd); 580 580 if (Sd->mBadTableFlag != 0) { … … 600 600 // 601 601 CharC = (UINT16) (CharC - (BIT8 - THRESHOLD)); 602 602 603 603 // 604 604 // Get string length … … 631 631 632 632 /** 633 Given a compressed source buffer, this function retrieves the size of 634 the uncompressed buffer and the size of the scratch buffer required 633 Given a compressed source buffer, this function retrieves the size of 634 the uncompressed buffer and the size of the scratch buffer required 635 635 to decompress the compressed source buffer. 636 636 637 Retrieves the size of the uncompressed buffer and the temporary scratch buffer 637 Retrieves the size of the uncompressed buffer and the temporary scratch buffer 638 638 required to decompress the buffer specified by Source and SourceSize. 639 639 If the size of the uncompressed buffer or the size of the scratch buffer cannot 640 be determined from the compressed data specified by Source and SourceData, 640 be determined from the compressed data specified by Source and SourceData, 641 641 then RETURN_INVALID_PARAMETER is returned. Otherwise, the size of the uncompressed 642 642 buffer is returned in DestinationSize, the size of the scratch buffer is returned 643 643 in ScratchSize, and RETURN_SUCCESS is returned. 644 This function does not have scratch buffer available to perform a thorough 644 This function does not have scratch buffer available to perform a thorough 645 645 checking of the validity of the source data. It just retrieves the "Original Size" 646 646 field from the beginning bytes of the source data and output it as DestinationSize. … … 657 657 by Source and SourceSize is decompressed.. 658 658 @param ScratchSize A pointer to the size, in bytes, of the scratch buffer that 659 is required to decompress the compressed buffer specified 659 is required to decompress the compressed buffer specified 660 660 by Source and SourceSize. 661 661 662 @retval RETURN_SUCCESS The size of the uncompressed data was returned 663 in DestinationSize and the size of the scratch 662 @retval RETURN_SUCCESS The size of the uncompressed data was returned 663 in DestinationSize and the size of the scratch 664 664 buffer was returned in ScratchSize. 665 @retval RETURN_INVALID_PARAMETER 666 The size of the uncompressed data or the size of 667 the scratch buffer cannot be determined from 668 the compressed data specified by Source 665 @retval RETURN_INVALID_PARAMETER 666 The size of the uncompressed data or the size of 667 the scratch buffer cannot be determined from 668 the compressed data specified by Source 669 669 and SourceSize. 670 670 **/ … … 705 705 This function is designed so that the decompression algorithm can be implemented 706 706 without using any memory services. As a result, this function is not allowed to 707 call any memory allocation services in its implementation. It is the caller's 707 call any memory allocation services in its implementation. It is the caller's 708 708 responsibility to allocate and free the Destination and Scratch buffers. 709 If the compressed source data specified by Source is successfully decompressed 710 into Destination, then RETURN_SUCCESS is returned. If the compressed source data 709 If the compressed source data specified by Source is successfully decompressed 710 into Destination, then RETURN_SUCCESS is returned. If the compressed source data 711 711 specified by Source is not in a valid compressed data format, 712 712 then RETURN_INVALID_PARAMETER is returned. … … 719 719 @param Destination The destination buffer to store the decompressed data 720 720 @param Scratch A temporary scratch buffer that is used to perform the decompression. 721 This is an optional parameter that may be NULL if the 721 This is an optional parameter that may be NULL if the 722 722 required scratch buffer size is 0. 723 723 @param Version 1 for UEFI Decompress algoruthm, 2 for Tiano Decompess algorithm. 724 724 725 @retval RETURN_SUCCESS Decompression completed successfully, and 725 @retval RETURN_SUCCESS Decompression completed successfully, and 726 726 the uncompressed buffer is returned in Destination. 727 @retval RETURN_INVALID_PARAMETER 728 The source buffer specified by Source is corrupted 727 @retval RETURN_INVALID_PARAMETER 728 The source buffer specified by Source is corrupted 729 729 (not in a valid compressed format). 730 730 **/ … … 816 816 This function is designed so that the decompression algorithm can be implemented 817 817 without using any memory services. As a result, this function is not allowed to 818 call any memory allocation services in its implementation. It is the caller's 818 call any memory allocation services in its implementation. It is the caller's 819 819 responsibility to allocate and free the Destination and Scratch buffers. 820 If the compressed source data specified by Source is successfully decompressed 821 into Destination, then RETURN_SUCCESS is returned. If the compressed source data 820 If the compressed source data specified by Source is successfully decompressed 821 into Destination, then RETURN_SUCCESS is returned. If the compressed source data 822 822 specified by Source is not in a valid compressed data format, 823 823 then RETURN_INVALID_PARAMETER is returned. … … 830 830 @param Destination The destination buffer to store the decompressed data 831 831 @param Scratch A temporary scratch buffer that is used to perform the decompression. 832 This is an optional parameter that may be NULL if the 832 This is an optional parameter that may be NULL if the 833 833 required scratch buffer size is 0. 834 834 835 @retval RETURN_SUCCESS Decompression completed successfully, and 835 @retval RETURN_SUCCESS Decompression completed successfully, and 836 836 the uncompressed buffer is returned in Destination. 837 @retval RETURN_INVALID_PARAMETER 838 The source buffer specified by Source is corrupted 837 @retval RETURN_INVALID_PARAMETER 838 The source buffer specified by Source is corrupted 839 839 (not in a valid compressed format). 840 840 **/ … … 854 854 size of an optional scratch buffer required to actually decode the data in a GUIDed section. 855 855 856 Examines a GUIDed section specified by InputSection. 856 Examines a GUIDed section specified by InputSection. 857 857 If GUID for InputSection does not match the GUID that this handler supports, 858 then RETURN_UNSUPPORTED is returned. 858 then RETURN_UNSUPPORTED is returned. 859 859 If the required information can not be retrieved from InputSection, 860 860 then RETURN_INVALID_PARAMETER is returned. … … 863 863 the size of an optional scratch buffer is returned in ScratchSize, and the Attributes field 864 864 from EFI_GUID_DEFINED_SECTION header of InputSection is returned in SectionAttribute. 865 865 866 866 If InputSection is NULL, then ASSERT(). 867 867 If OutputBufferSize is NULL, then ASSERT(). … … 906 906 } 907 907 // 908 // Get guid attribute of guid section. 908 // Get guid attribute of guid section. 909 909 // 910 910 *SectionAttribute = ((EFI_GUID_DEFINED_SECTION2 *) InputSection)->Attributes; … … 926 926 } 927 927 // 928 // Get guid attribute of guid section. 928 // Get guid attribute of guid section. 929 929 // 930 930 *SectionAttribute = ((EFI_GUID_DEFINED_SECTION *) InputSection)->Attributes; … … 944 944 /** 945 945 Decompress a Tiano compressed GUIDed section into a caller allocated output buffer. 946 947 Decodes the GUIDed section specified by InputSection. 948 If GUID for InputSection does not match the GUID that this handler supports, then RETURN_UNSUPPORTED is returned. 946 947 Decodes the GUIDed section specified by InputSection. 948 If GUID for InputSection does not match the GUID that this handler supports, then RETURN_UNSUPPORTED is returned. 949 949 If the data in InputSection can not be decoded, then RETURN_INVALID_PARAMETER is returned. 950 950 If the GUID of InputSection does match the GUID that this handler supports, then InputSection … … 953 953 data in InputSection, then OutputBuffer is set to point at the data in InputSection. Otherwise, 954 954 the decoded data will be placed in caller allocated buffer specified by OutputBuffer. 955 955 956 956 If InputSection is NULL, then ASSERT(). 957 957 If OutputBuffer is NULL, then ASSERT(). … … 961 961 962 962 @param[in] InputSection A pointer to a GUIDed section of an FFS formatted file. 963 @param[out] OutputBuffer A pointer to a buffer that contains the result of a decode operation. 963 @param[out] OutputBuffer A pointer to a buffer that contains the result of a decode operation. 964 964 @param[in] ScratchBuffer A caller allocated buffer that may be required by this function 965 as a scratch buffer to perform the decode operation. 966 @param[out] AuthenticationStatus 965 as a scratch buffer to perform the decode operation. 966 @param[out] AuthenticationStatus 967 967 A pointer to the authentication status of the decoded output buffer. 968 968 See the definition of authentication status in the EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLibInternals.h
r48674 r58466 116 116 Creates Huffman Code mapping table according to code length array. 117 117 118 Creates Huffman Code mapping table for Extra Set, Char&Len Set 118 Creates Huffman Code mapping table for Extra Set, Char&Len Set 119 119 and Position Set according to code length array. 120 120 … … 142 142 143 143 Get a position value according to Position Huffman Table. 144 144 145 145 @param Sd the global scratch data 146 146 … … 178 178 /** 179 179 Reads code lengths for Char&Len Set. 180 180 181 181 Read in and decode the Char&Len Set Code Length Array, then 182 182 generate the Huffman Code mapping table for the Char&Len Set. … … 192 192 /** 193 193 Decode a character/length value. 194 194 195 195 Read one value from mBitBuf, Get one code from mBitBuf. If it is at block boundary, generates 196 196 Huffman code mapping table for Extra Set, Code&Len Set and -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/DxeCapsuleLib/DxeCapsuleLib.c
r58459 r58466 83 83 if (ItemNum == FmpCapsuleHeader->EmbeddedDriverCount) { 84 84 // 85 // No payload element 85 // No payload element 86 86 // 87 87 if (((UINT8 *)FmpCapsuleHeader + ItemOffsetList[ItemNum - 1]) < EndOfCapsule) { … … 124 124 125 125 /** 126 Process Firmware management protocol data capsule. 126 Process Firmware management protocol data capsule. 127 127 128 128 @param CapsuleHeader Points to a capsule header. … … 188 188 189 189 // 190 // 1. ConnectAll to ensure 191 // All the communication protocol required by driver in capsule installed 190 // 1. ConnectAll to ensure 191 // All the communication protocol required by driver in capsule installed 192 192 // All FMP protocols are installed 193 193 // … … 196 196 197 197 // 198 // 2. Try to load & start all the drivers within capsule 198 // 2. Try to load & start all the drivers within capsule 199 199 // 200 200 SetDevicePathNodeLength (&MemMapNode.Header, sizeof (MemMapNode)); … … 233 233 234 234 Status = gBS->StartImage( 235 ImageHandle, 236 &ExitDataSize, 235 ImageHandle, 236 &ExitDataSize, 237 237 NULL 238 238 ); … … 244 244 245 245 // 246 // Connnect all again to connect drivers within capsule 246 // Connnect all again to connect drivers within capsule 247 247 // 248 248 if (FmpCapsuleHeader->EmbeddedDriverCount > 0) { … … 321 321 for (Index2 = 0; Index2 < FmpImageInfoCount; Index2++) { 322 322 // 323 // Check all the payload entry in capsule payload list 323 // Check all the payload entry in capsule payload list 324 324 // 325 325 for (Index = FmpCapsuleHeader->EmbeddedDriverCount; Index < ItemNum; Index++) { -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/DxeReportStatusCodeLibFramework/ReportStatusCodeLib.c
r48674 r58466 107 107 } 108 108 } 109 109 110 110 // 111 111 // A status code service is present in system, so pass in all the parameters to the service. … … 113 113 return (*mReportStatusCode) (Type, Value, Instance, (EFI_GUID *)CallerId, Data); 114 114 } 115 115 116 116 return EFI_UNSUPPORTED; 117 117 } … … 509 509 Tpl = gBS->RaiseTPL (TPL_HIGH_LEVEL); 510 510 gBS->RestoreTPL (Tpl); 511 511 512 512 StatusCodeData = NULL; 513 513 if (Tpl <= TPL_NOTIFY) { -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c
r58460 r58466 418 418 419 419 FreePool (Buffer); 420 420 421 421 Buffer = NULL; 422 422 … … 579 579 } 580 580 } 581 581 582 582 // 583 583 // Skip Non-Legacy boot option 584 // 584 // 585 585 if (!BdsIsLegacyBootOption (BootOptionVar, &BbsEntry, &BbsIndex)) { 586 586 if (BootOptionVar!= NULL) { … … 789 789 Add the legacy boot options from BBS table if they do not exist. 790 790 791 @retval EFI_SUCCESS The boot options are added successfully 791 @retval EFI_SUCCESS The boot options are added successfully 792 792 or they are already in boot options. 793 793 @retval EFI_NOT_FOUND No legacy boot options is found. … … 939 939 @param BbsCount The BBS Count. 940 940 941 @retval EFI_SUCCES The buffer is created and the EFI variable named 941 @retval EFI_SUCCES The buffer is created and the EFI variable named 942 942 VAR_LEGACY_DEV_ORDER and gEfiLegacyDevOrderVariableGuid is 943 943 set correctly. … … 1030 1030 DevOrderPtr->Length = (UINT16) (sizeof (UINT16) + HDCount * sizeof (UINT16)); 1031 1031 DevOrderPtr = (LEGACY_DEV_ORDER_ENTRY *) BdsFillDevOrderBuf (BbsTable, BBS_HARDDISK, BbsCount, DevOrderPtr->Data); 1032 1032 1033 1033 DevOrderPtr->BbsType = BBS_CDROM; 1034 1034 DevOrderPtr->Length = (UINT16) (sizeof (UINT16) + CDCount * sizeof (UINT16)); 1035 1035 DevOrderPtr = (LEGACY_DEV_ORDER_ENTRY *) BdsFillDevOrderBuf (BbsTable, BBS_CDROM, BbsCount, DevOrderPtr->Data); 1036 1036 1037 1037 DevOrderPtr->BbsType = BBS_EMBED_NETWORK; 1038 1038 DevOrderPtr->Length = (UINT16) (sizeof (UINT16) + NETCount * sizeof (UINT16)); … … 1061 1061 1062 1062 /** 1063 Add the legacy boot devices from BBS table into 1063 Add the legacy boot devices from BBS table into 1064 1064 the legacy device boot order. 1065 1065 … … 1279 1279 } 1280 1280 NewNETPtr = NewPtr->Data; 1281 1281 1282 1282 // 1283 1283 // copy BEV … … 1503 1503 1504 1504 @param Entry The boot option is to be checked for refresh BBS table. 1505 1505 1506 1506 @retval EFI_SUCCESS The boot priority for BBS entries is refreshed successfully. 1507 1507 @retval EFI_NOT_FOUND BBS entries can't be found. … … 1705 1705 TPL_NOTIFY, 1706 1706 WriteBootToOsPerformanceData, 1707 NULL, 1707 NULL, 1708 1708 &LegacyBootEvent 1709 1709 ); … … 2554 2554 EFI_ERROR_CODE | EFI_ERROR_MINOR, 2555 2555 (EFI_SOFTWARE_DXE_BS_DRIVER | EFI_SW_DXE_BS_EC_BOOT_OPTION_LOAD_ERROR) 2556 ); 2556 ); 2557 2557 goto Done; 2558 2558 } -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsConnect.c
r58459 r58466 110 110 } 111 111 CopyOfDevicePath = DevicePath; 112 112 113 113 do { 114 114 // … … 123 123 return EFI_OUT_OF_RESOURCES; 124 124 } 125 125 126 126 Next = Instance; 127 127 while (!IsDevicePathEndType (Next)) { … … 204 204 205 205 /** 206 This function will connect all current system handles recursively. 207 206 This function will connect all current system handles recursively. 207 208 208 gBS->ConnectController() service is invoked for each handle exist in system handler buffer. 209 209 If the handle is bus type handler, all childrens also will be connected recursively … … 248 248 249 249 /** 250 This function will disconnect all current system handles. 251 250 This function will disconnect all current system handles. 251 252 252 gBS->DisconnectController() is invoked for each handle exists in system handle buffer. 253 253 If handle is a bus type handle, all childrens also are disconnected recursively by -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsMisc.c
r58460 r58466 1359 1359 1360 1360 /** 1361 This routine adjust the memory information for different memory type and 1361 This routine adjust the memory information for different memory type and 1362 1362 save them into the variables for next boot. 1363 1363 **/ … … 1571 1571 @param VendorGuid A unique identifier for the vendor. 1572 1572 @param Attributes Attributes bitmask to set for the variable. 1573 @param DataSize The size in bytes of the Data buffer. Unless the EFI_VARIABLE_APPEND_WRITE, 1574 EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS, or 1575 EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS attribute is set, a size of zero 1576 causes the variable to be deleted. When the EFI_VARIABLE_APPEND_WRITE attribute is 1577 set, then a SetVariable() call with a DataSize of zero will not cause any change to 1578 the variable value (the timestamp associated with the variable may be updated however 1579 even if no new data value is provided,see the description of the 1580 EFI_VARIABLE_AUTHENTICATION_2 descriptor below. In this case the DataSize will not 1581 be zero since the EFI_VARIABLE_AUTHENTICATION_2 descriptor will be populated). 1573 @param DataSize The size in bytes of the Data buffer. Unless the EFI_VARIABLE_APPEND_WRITE, 1574 EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS, or 1575 EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS attribute is set, a size of zero 1576 causes the variable to be deleted. When the EFI_VARIABLE_APPEND_WRITE attribute is 1577 set, then a SetVariable() call with a DataSize of zero will not cause any change to 1578 the variable value (the timestamp associated with the variable may be updated however 1579 even if no new data value is provided,see the description of the 1580 EFI_VARIABLE_AUTHENTICATION_2 descriptor below. In this case the DataSize will not 1581 be zero since the EFI_VARIABLE_AUTHENTICATION_2 descriptor will be populated). 1582 1582 @param Data The contents for the variable. 1583 1583 … … 1591 1591 @retval EFI_WRITE_PROTECTED The variable in question is read-only. 1592 1592 @retval EFI_WRITE_PROTECTED The variable in question cannot be deleted. 1593 @retval EFI_SECURITY_VIOLATION The variable could not be written due to EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS 1594 or EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACESS being set, but the AuthInfo 1593 @retval EFI_SECURITY_VIOLATION The variable could not be written due to EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS 1594 or EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACESS being set, but the AuthInfo 1595 1595 does NOT pass the validation check carried out by the firmware. 1596 1596 -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsLib.inf
r58459 r58466 1 1 ## @file 2 2 # General BDS library. 3 # 3 # 4 4 # General BDS defines and produce general interfaces for platform BDS driver including: 5 5 # 1) BDS boot policy interface; 6 6 # 2) BDS boot device connect interface; 7 7 # 3) BDS Misc interfaces for mainting boot variable, ouput string, etc. 8 # 8 # 9 9 # Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR> 10 10 # This program and the accompanying materials … … 12 12 # which accompanies this distribution. The full text of the license may be found at 13 13 # http://opensource.org/licenses/bsd-license.php 14 # 14 # 15 15 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 16 16 # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 17 # 17 # 18 18 ## 19 19 … … 25 25 MODULE_TYPE = DXE_DRIVER 26 26 VERSION_STRING = 1.0 27 LIBRARY_CLASS = GenericBdsLib|DXE_DRIVER DXE_RUNTIME_DRIVER UEFI_APPLICATION 27 LIBRARY_CLASS = GenericBdsLib|DXE_DRIVER DXE_RUNTIME_DRIVER UEFI_APPLICATION 28 28 CONSTRUCTOR = GenericBdsLibConstructor 29 29 … … 45 45 String.c 46 46 GenericBdsStrings.uni 47 47 48 48 [Packages] 49 49 MdePkg/MdePkg.dec … … 77 77 ## SOMETIMES_CONSUMES ## Variable:L"MemoryTypeInformation" 78 78 ## SOMETIMES_PRODUCES ## Variable:L"MemoryTypeInformation" 79 gEfiMemoryTypeInformationGuid 79 gEfiMemoryTypeInformationGuid 80 80 ## SOMETIMES_CONSUMES ## Variable:L"BootXXXX" # Boot option variable 81 81 ## SOMETIMES_PRODUCES ## Variable:L"BootXXXX" # Boot option variable … … 141 141 142 142 # 143 # [BootMode] 143 # [BootMode] 144 144 # RECOVERY_FULL ## SOMETIMES_CONSUMES # Memory Type Information variable 145 145 # -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsStrings.uni
-
Property svn:mime-type
changed from
application/octet-stream
totext/plain;encoding=UTF-16LE
-
Property svn:mime-type
changed from
-
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/GenericBdsLib/InternalBdsLib.h
r58459 r58466 134 134 135 135 /** 136 This routine adjust the memory information for different memory type and 136 This routine adjust the memory information for different memory type and 137 137 save them into the variables for next boot. 138 138 **/ … … 152 152 153 153 **/ 154 BOOLEAN 154 BOOLEAN 155 155 ValidateOption ( 156 156 UINT8 *Variable, … … 167 167 @param VendorGuid A unique identifier for the vendor. 168 168 @param Attributes Attributes bitmask to set for the variable. 169 @param DataSize The size in bytes of the Data buffer. Unless the EFI_VARIABLE_APPEND_WRITE, 170 EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS, or 171 EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS attribute is set, a size of zero 172 causes the variable to be deleted. When the EFI_VARIABLE_APPEND_WRITE attribute is 173 set, then a SetVariable() call with a DataSize of zero will not cause any change to 174 the variable value (the timestamp associated with the variable may be updated however 175 even if no new data value is provided,see the description of the 176 EFI_VARIABLE_AUTHENTICATION_2 descriptor below. In this case the DataSize will not 177 be zero since the EFI_VARIABLE_AUTHENTICATION_2 descriptor will be populated). 169 @param DataSize The size in bytes of the Data buffer. Unless the EFI_VARIABLE_APPEND_WRITE, 170 EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS, or 171 EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS attribute is set, a size of zero 172 causes the variable to be deleted. When the EFI_VARIABLE_APPEND_WRITE attribute is 173 set, then a SetVariable() call with a DataSize of zero will not cause any change to 174 the variable value (the timestamp associated with the variable may be updated however 175 even if no new data value is provided,see the description of the 176 EFI_VARIABLE_AUTHENTICATION_2 descriptor below. In this case the DataSize will not 177 be zero since the EFI_VARIABLE_AUTHENTICATION_2 descriptor will be populated). 178 178 @param Data The contents for the variable. 179 179 … … 187 187 @retval EFI_WRITE_PROTECTED The variable in question is read-only. 188 188 @retval EFI_WRITE_PROTECTED The variable in question cannot be deleted. 189 @retval EFI_SECURITY_VIOLATION The variable could not be written due to EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS 190 or EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACESS being set, but the AuthInfo 189 @retval EFI_SECURITY_VIOLATION The variable could not be written due to EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS 190 or EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACESS being set, but the AuthInfo 191 191 does NOT pass the validation check carried out by the firmware. 192 192 -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/GenericBdsLib/Performance.c
r58459 r58466 188 188 189 189 Freq = GetPerformanceCounterProperties (&StartValue, &EndValue); 190 190 191 191 Freq = DivU64x32 (Freq, 1000); 192 192 … … 252 252 PerfEntriesAsDxeHandle = AllocateZeroPool (NumPerfEntries * sizeof (BOOLEAN)); 253 253 ASSERT (PerfEntriesAsDxeHandle != NULL); 254 254 255 255 // 256 256 // Get DXE drivers performance -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/LzmaCustomDecompressLib/F86GuidedSectionExtraction.c
r58464 r58466 1 1 /** @file 2 LZMA Decompress GUIDed Section Extraction Library, which produces LZMA custom 2 LZMA Decompress GUIDed Section Extraction Library, which produces LZMA custom 3 3 decompression algorithm with the converter for the different arch code. 4 4 It wraps Lzma decompress interfaces to GUIDed Section Extraction interfaces … … 23 23 size of an scratch buffer required to actually decode the data in a GUIDed section. 24 24 25 Examines a GUIDed section specified by InputSection. 25 Examines a GUIDed section specified by InputSection. 26 26 If GUID for InputSection does not match the GUID that this handler supports, 27 then RETURN_UNSUPPORTED is returned. 27 then RETURN_UNSUPPORTED is returned. 28 28 If the required information can not be retrieved from InputSection, 29 29 then RETURN_INVALID_PARAMETER is returned. … … 32 32 the size of an optional scratch buffer is returned in ScratchSize, and the Attributes field 33 33 from EFI_GUID_DEFINED_SECTION header of InputSection is returned in SectionAttribute. 34 34 35 35 If InputSection is NULL, then ASSERT(). 36 36 If OutputBufferSize is NULL, then ASSERT(). … … 101 101 /** 102 102 Decompress a LZAM compressed GUIDed section into a caller allocated output buffer. 103 104 Decodes the GUIDed section specified by InputSection. 105 If GUID for InputSection does not match the GUID that this handler supports, then RETURN_UNSUPPORTED is returned. 103 104 Decodes the GUIDed section specified by InputSection. 105 If GUID for InputSection does not match the GUID that this handler supports, then RETURN_UNSUPPORTED is returned. 106 106 If the data in InputSection can not be decoded, then RETURN_INVALID_PARAMETER is returned. 107 107 If the GUID of InputSection does match the GUID that this handler supports, then InputSection … … 110 110 data in InputSection, then OutputBuffer is set to point at the data in InputSection. Otherwise, 111 111 the decoded data will be placed in caller allocated buffer specified by OutputBuffer. 112 112 113 113 If InputSection is NULL, then ASSERT(). 114 114 If OutputBuffer is NULL, then ASSERT(). … … 118 118 119 119 @param[in] InputSection A pointer to a GUIDed section of an FFS formatted file. 120 @param[out] OutputBuffer A pointer to a buffer that contains the result of a decode operation. 120 @param[out] OutputBuffer A pointer to a buffer that contains the result of a decode operation. 121 121 @param[out] ScratchBuffer A caller allocated buffer that may be required by this function 122 as a scratch buffer to perform the decode operation. 123 @param[out] AuthenticationStatus 122 as a scratch buffer to perform the decode operation. 123 @param[out] AuthenticationStatus 124 124 A pointer to the authentication status of the decoded output buffer. 125 125 See the definition of authentication status in the EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI … … 148 148 UINT32 OutputBufferSize; 149 149 UINT32 ScratchBufferSize; 150 150 151 151 ASSERT (OutputBuffer != NULL); 152 152 ASSERT (InputSection != NULL); … … 179 179 180 180 // 181 // After decompress, the data need to be converted to the raw data. 181 // After decompress, the data need to be converted to the raw data. 182 182 // 183 183 if (!EFI_ERROR (Status)) { … … 188 188 &ScratchBufferSize 189 189 ); 190 190 191 191 if (!EFI_ERROR (Status)) { 192 192 x86_Convert_Init(X86State); … … 194 194 } 195 195 } 196 196 197 197 return Status; 198 198 } -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/LzmaCustomDecompressLib/GuidedSectionExtraction.c
r48674 r58466 21 21 size of an scratch buffer required to actually decode the data in a GUIDed section. 22 22 23 Examines a GUIDed section specified by InputSection. 23 Examines a GUIDed section specified by InputSection. 24 24 If GUID for InputSection does not match the GUID that this handler supports, 25 then RETURN_UNSUPPORTED is returned. 25 then RETURN_UNSUPPORTED is returned. 26 26 If the required information can not be retrieved from InputSection, 27 27 then RETURN_INVALID_PARAMETER is returned. … … 30 30 the size of an optional scratch buffer is returned in ScratchSize, and the Attributes field 31 31 from EFI_GUID_DEFINED_SECTION header of InputSection is returned in SectionAttribute. 32 32 33 33 If InputSection is NULL, then ASSERT(). 34 34 If OutputBufferSize is NULL, then ASSERT(). … … 99 99 /** 100 100 Decompress a LZAM compressed GUIDed section into a caller allocated output buffer. 101 102 Decodes the GUIDed section specified by InputSection. 103 If GUID for InputSection does not match the GUID that this handler supports, then RETURN_UNSUPPORTED is returned. 101 102 Decodes the GUIDed section specified by InputSection. 103 If GUID for InputSection does not match the GUID that this handler supports, then RETURN_UNSUPPORTED is returned. 104 104 If the data in InputSection can not be decoded, then RETURN_INVALID_PARAMETER is returned. 105 105 If the GUID of InputSection does match the GUID that this handler supports, then InputSection … … 108 108 data in InputSection, then OutputBuffer is set to point at the data in InputSection. Otherwise, 109 109 the decoded data will be placed in caller allocated buffer specified by OutputBuffer. 110 110 111 111 If InputSection is NULL, then ASSERT(). 112 112 If OutputBuffer is NULL, then ASSERT(). … … 116 116 117 117 @param[in] InputSection A pointer to a GUIDed section of an FFS formatted file. 118 @param[out] OutputBuffer A pointer to a buffer that contains the result of a decode operation. 118 @param[out] OutputBuffer A pointer to a buffer that contains the result of a decode operation. 119 119 @param[out] ScratchBuffer A caller allocated buffer that may be required by this function 120 as a scratch buffer to perform the decode operation. 121 @param[out] AuthenticationStatus 120 as a scratch buffer to perform the decode operation. 121 @param[out] AuthenticationStatus 122 122 A pointer to the authentication status of the decoded output buffer. 123 123 See the definition of authentication status in the EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI … … 197 197 LzmaGuidedSectionGetInfo, 198 198 LzmaGuidedSectionExtraction 199 ); 199 ); 200 200 } 201 201 -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/LzmaCustomDecompressLib/LzmaArchCustomDecompressLib.inf
r58464 r58466 44 44 Sdk/C/LzHash.h 45 45 Sdk/C/LzmaDec.h 46 Sdk/C/Types.h 46 Sdk/C/Types.h 47 47 UefiLzma.h 48 48 LzmaDecompressLibInternal.h -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf
r58459 r58466 43 43 Sdk/C/LzHash.h 44 44 Sdk/C/LzmaDec.h 45 Sdk/C/Types.h 45 Sdk/C/Types.h 46 46 GuidedSectionExtraction.c 47 47 UefiLzma.h -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/LzmaCustomDecompressLib/LzmaDecompress.c
r48674 r58466 106 106 107 107 /** 108 Given a Lzma compressed source buffer, this function retrieves the size of 109 the uncompressed buffer and the size of the scratch buffer required 108 Given a Lzma compressed source buffer, this function retrieves the size of 109 the uncompressed buffer and the size of the scratch buffer required 110 110 to decompress the compressed source buffer. 111 111 112 Retrieves the size of the uncompressed buffer and the temporary scratch buffer 112 Retrieves the size of the uncompressed buffer and the temporary scratch buffer 113 113 required to decompress the buffer specified by Source and SourceSize. 114 The size of the uncompressed buffer is returned in DestinationSize, 114 The size of the uncompressed buffer is returned in DestinationSize, 115 115 the size of the scratch buffer is returned in ScratchSize, and RETURN_SUCCESS is returned. 116 This function does not have scratch buffer available to perform a thorough 116 This function does not have scratch buffer available to perform a thorough 117 117 checking of the validity of the source data. It just retrieves the "Original Size" 118 118 field from the LZMA_HEADER_SIZE beginning bytes of the source data and output it as DestinationSize. … … 127 127 by Source and SourceSize is decompressed. 128 128 @param ScratchSize A pointer to the size, in bytes, of the scratch buffer that 129 is required to decompress the compressed buffer specified 129 is required to decompress the compressed buffer specified 130 130 by Source and SourceSize. 131 131 132 @retval RETURN_SUCCESS The size of the uncompressed data was returned 133 in DestinationSize and the size of the scratch 132 @retval RETURN_SUCCESS The size of the uncompressed data was returned 133 in DestinationSize and the size of the scratch 134 134 buffer was returned in ScratchSize. 135 135 … … 159 159 160 160 Extracts decompressed data to its original form. 161 If the compressed source data specified by Source is successfully decompressed 162 into Destination, then RETURN_SUCCESS is returned. If the compressed source data 161 If the compressed source data specified by Source is successfully decompressed 162 into Destination, then RETURN_SUCCESS is returned. If the compressed source data 163 163 specified by Source is not in a valid compressed data format, 164 164 then RETURN_INVALID_PARAMETER is returned. … … 168 168 @param Destination The destination buffer to store the decompressed data 169 169 @param Scratch A temporary scratch buffer that is used to perform the decompression. 170 This is an optional parameter that may be NULL if the 170 This is an optional parameter that may be NULL if the 171 171 required scratch buffer size is 0. 172 173 @retval RETURN_SUCCESS Decompression completed successfully, and 172 173 @retval RETURN_SUCCESS Decompression completed successfully, and 174 174 the uncompressed buffer is returned in Destination. 175 @retval RETURN_INVALID_PARAMETER 176 The source buffer specified by Source is corrupted 175 @retval RETURN_INVALID_PARAMETER 176 The source buffer specified by Source is corrupted 177 177 (not in a valid compressed format). 178 178 **/ … … 196 196 AllocFuncs.Buffer = Scratch; 197 197 AllocFuncs.BufferSize = SCRATCH_BUFFER_REQUEST_SIZE; 198 198 199 199 DecodedBufSize = (SizeT)GetDecodedSizeOfBuf((UINT8*)Source); 200 200 EncodedDataSize = (SizeT) (SourceSize - LZMA_HEADER_SIZE); -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/LzmaCustomDecompressLib/LzmaDecompressLibInternal.h
r48674 r58466 24 24 25 25 /** 26 Given a Lzma compressed source buffer, this function retrieves the size of 27 the uncompressed buffer and the size of the scratch buffer required 26 Given a Lzma compressed source buffer, this function retrieves the size of 27 the uncompressed buffer and the size of the scratch buffer required 28 28 to decompress the compressed source buffer. 29 29 30 Retrieves the size of the uncompressed buffer and the temporary scratch buffer 30 Retrieves the size of the uncompressed buffer and the temporary scratch buffer 31 31 required to decompress the buffer specified by Source and SourceSize. 32 The size of the uncompressed buffer is returned in DestinationSize, 32 The size of the uncompressed buffer is returned in DestinationSize, 33 33 the size of the scratch buffer is returned in ScratchSize, and RETURN_SUCCESS is returned. 34 This function does not have scratch buffer available to perform a thorough 34 This function does not have scratch buffer available to perform a thorough 35 35 checking of the validity of the source data. It just retrieves the "Original Size" 36 36 field from the LZMA_HEADER_SIZE beginning bytes of the source data and output it as DestinationSize. … … 45 45 by Source and SourceSize is decompressed. 46 46 @param ScratchSize A pointer to the size, in bytes, of the scratch buffer that 47 is required to decompress the compressed buffer specified 47 is required to decompress the compressed buffer specified 48 48 by Source and SourceSize. 49 49 50 @retval RETURN_SUCCESS The size of the uncompressed data was returned 51 in DestinationSize and the size of the scratch 50 @retval RETURN_SUCCESS The size of the uncompressed data was returned 51 in DestinationSize and the size of the scratch 52 52 buffer was returned in ScratchSize. 53 53 … … 66 66 67 67 Extracts decompressed data to its original form. 68 If the compressed source data specified by Source is successfully decompressed 69 into Destination, then RETURN_SUCCESS is returned. If the compressed source data 68 If the compressed source data specified by Source is successfully decompressed 69 into Destination, then RETURN_SUCCESS is returned. If the compressed source data 70 70 specified by Source is not in a valid compressed data format, 71 71 then RETURN_INVALID_PARAMETER is returned. … … 75 75 @param Destination The destination buffer to store the decompressed data 76 76 @param Scratch A temporary scratch buffer that is used to perform the decompression. 77 This is an optional parameter that may be NULL if the 77 This is an optional parameter that may be NULL if the 78 78 required scratch buffer size is 0. 79 80 @retval RETURN_SUCCESS Decompression completed successfully, and 79 80 @retval RETURN_SUCCESS Decompression completed successfully, and 81 81 the uncompressed buffer is returned in Destination. 82 @retval RETURN_INVALID_PARAMETER 83 The source buffer specified by Source is corrupted 82 @retval RETURN_INVALID_PARAMETER 83 The source buffer specified by Source is corrupted 84 84 (not in a valid compressed format). 85 85 **/ -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/LzmaCustomDecompressLib/Sdk/C/Bra.h
r58464 r58466 10 10 These functions convert relative addresses to absolute addresses 11 11 in CALL instructions to increase the compression ratio. 12 12 13 13 In: 14 14 data - data buffer … … 17 17 state - state variable for x86 converter 18 18 encoding - 0 (for decoding), 1 (for encoding) 19 19 20 20 Out: 21 21 state - state variable for x86 converter … … 24 24 The number of processed bytes. If you call these functions with multiple calls, 25 25 you must start next call with first byte after block of processed bytes. 26 26 27 27 Type Endian Alignment LookAhead 28 28 29 29 x86 little 1 4 30 30 ARMT little 2 2 -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/LzmaCustomDecompressLib/Sdk/C/LzFind.c
r48674 r58466 522 522 delta2 = p->pos - p->hash[hash2Value]; 523 523 curMatch = p->hash[kFix3HashSize + hashValue]; 524 524 525 525 p->hash[hash2Value] = 526 526 p->hash[kFix3HashSize + hashValue] = p->pos; … … 556 556 delta3 = p->pos - p->hash[kFix3HashSize + hash3Value]; 557 557 curMatch = p->hash[kFix4HashSize + hashValue]; 558 558 559 559 p->hash[ hash2Value] = 560 560 p->hash[kFix3HashSize + hash3Value] = -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/LzmaCustomDecompressLib/Sdk/C/LzmaDec.c
r48674 r58466 167 167 SizeT dicBufSize = p->dicBufSize; 168 168 SizeT dicPos = p->dicPos; 169 169 170 170 UInt32 processedPos = p->processedPos; 171 171 UInt32 checkDicSize = p->checkDicSize; … … 351 351 NORMALIZE 352 352 range >>= 1; 353 353 354 354 { 355 355 UInt32 t; … … 749 749 (*srcLen) = 0; 750 750 LzmaDec_WriteRem(p, dicLimit); 751 751 752 752 *status = LZMA_STATUS_NOT_SPECIFIED; 753 753 … … 795 795 if (p->needInitState) 796 796 LzmaDec_InitStateReal(p); 797 797 798 798 if (p->tempBufSize == 0) 799 799 { … … 926 926 UInt32 dicSize; 927 927 Byte d; 928 928 929 929 if (size < LZMA_PROPS_SIZE) 930 930 return SZ_ERROR_UNSUPPORTED; 931 931 else 932 932 dicSize = data[1] | ((UInt32)data[2] << 8) | ((UInt32)data[3] << 16) | ((UInt32)data[4] << 24); 933 933 934 934 if (dicSize < LZMA_DIC_MIN) 935 935 dicSize = LZMA_DIC_MIN; … … 1013 1013 1014 1014 LzmaDec_Init(&p); 1015 1015 1016 1016 *srcLen = inSize; 1017 1017 res = LzmaDec_DecodeToDic(&p, outSize, src, srcLen, finishMode, status); -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/LzmaCustomDecompressLib/Sdk/C/LzmaDec.h
r48674 r58466 127 127 SZ_ERROR_UNSUPPORTED - Unsupported properties 128 128 */ 129 129 130 130 SRes LzmaDec_AllocateProbs(CLzmaDec *p, const Byte *props, unsigned propsSize, ISzAlloc *alloc); 131 131 void LzmaDec_FreeProbs(CLzmaDec *p, ISzAlloc *alloc); … … 156 156 157 157 /* LzmaDec_DecodeToDic 158 158 159 159 The decoding to internal dictionary buffer (CLzmaDec::dic). 160 160 You must manually update CLzmaDec::dicPos, if it reaches CLzmaDec::dicBufSize !!! -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/LzmaCustomDecompressLib/Sdk/history.txt
r48674 r58466 15 15 ------------------------- 16 16 - The bug in ANSI-C LZMA Decoder was fixed: 17 If encoded stream was corrupted, decoder could access memory 17 If encoded stream was corrupted, decoder could access memory 18 18 outside of allocated range. 19 19 - Some changes in ANSI-C 7z Decoder interfaces. … … 29 29 ------------------------- 30 30 - The bug was fixed: 31 LZMA Encoder in fast compression mode could access memory outside of 31 LZMA Encoder in fast compression mode could access memory outside of 32 32 allocated range in some rare cases. 33 33 … … 42 42 4.57 2007-12-12 43 43 ------------------------- 44 - Speed optimizations in Ñ++ LZMA Decoder. 44 - Speed optimizations in Ñ++ LZMA Decoder. 45 45 - Small changes for more compatibility with some C/C++ compilers. 46 46 … … 52 52 - now it supports files larger than 4 GB. 53 53 - now it supports "Last Write Time" field for files. 54 - C++ code for .7z archives compressing/decompressing from 7-zip 54 - C++ code for .7z archives compressing/decompressing from 7-zip 55 55 was included to LZMA SDK. 56 56 57 57 58 58 4.43 2006-06-04 59 59 ------------------------- 60 60 - Small changes for more compatibility with some C/C++ compilers. 61 61 62 62 63 63 4.42 2006-05-15 64 64 ------------------------- 65 65 - Small changes in .h files in ANSI-C version. 66 66 67 67 68 68 4.39 beta 2006-04-14 69 69 ------------------------- 70 70 - The bug in versions 4.33b:4.38b was fixed: 71 C++ version of LZMA encoder could not correctly compress 71 C++ version of LZMA encoder could not correctly compress 72 72 files larger than 2 GB with HC4 match finder (-mfhc4). 73 73 74 74 75 75 4.37 beta 2005-04-06 76 76 ------------------------- 77 - Fixes in C++ code: code could no be compiled if _NO_EXCEPTIONS was defined. 77 - Fixes in C++ code: code could no be compiled if _NO_EXCEPTIONS was defined. 78 78 79 79 … … 81 81 ------------------------- 82 82 - The bug was fixed in C++ version of LZMA Decoder: 83 If encoded stream was corrupted, decoder could access memory 83 If encoded stream was corrupted, decoder could access memory 84 84 outside of allocated range. 85 85 … … 152 152 4.17 2005-04-18 153 153 ------------------------- 154 - New example for RAM->RAM compressing/decompressing: 154 - New example for RAM->RAM compressing/decompressing: 155 155 LZMA + BCJ (filter for x86 code): 156 156 - LzmaRam.h … … 163 163 4.16 2005-03-29 164 164 ------------------------- 165 - The bug was fixed in LzmaDecode.c (ANSI-C LZMA Decoder): 165 - The bug was fixed in LzmaDecode.c (ANSI-C LZMA Decoder): 166 166 If _LZMA_OUT_READ was defined, and if encoded stream was corrupted, 167 167 decoder could access memory outside of allocated range. 168 168 - Speed optimization of ANSI-C LZMA Decoder (now it's about 20% faster). 169 Old version of LZMA Decoder now is in file LzmaDecodeSize.c. 169 Old version of LZMA Decoder now is in file LzmaDecodeSize.c. 170 170 LzmaDecodeSize.c can provide slightly smaller code than LzmaDecode.c 171 171 - Small speed optimization in LZMA C++ code … … 182 182 4.05 2004-08-25 183 183 ------------------------- 184 - Source code of filters for x86, IA-64, ARM, ARM-Thumb 184 - Source code of filters for x86, IA-64, ARM, ARM-Thumb 185 185 and PowerPC code was included to SDK 186 186 - Some internal minor changes … … 194 194 4.03 2004-06-18 195 195 ------------------------- 196 - "Benchmark" command was added. It measures compressing 197 and decompressing speed and shows rating values. 196 - "Benchmark" command was added. It measures compressing 197 and decompressing speed and shows rating values. 198 198 Also it checks hardware errors. 199 199 … … 224 224 HISTORY of the LZMA 225 225 ------------------- 226 2001-2008: Improvements to LZMA compressing/decompressing code, 226 2001-2008: Improvements to LZMA compressing/decompressing code, 227 227 keeping compatibility with original LZMA format 228 228 1996-2001: Development of LZMA compression format … … 232 232 2001-08-30: LZMA compression was added to 7-Zip 233 233 1999-01-02: First version of 7-Zip was released 234 234 235 235 236 236 End of document -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/LzmaCustomDecompressLib/Sdk/lzma.txt
r48674 r58466 2 2 ------------- 3 3 4 LZMA SDK provides the documentation, samples, header files, libraries, 4 LZMA SDK provides the documentation, samples, header files, libraries, 5 5 and tools you need to develop applications that use LZMA compression. 6 6 7 7 LZMA is default and general compression method of 7z format 8 in 7-Zip compression program (www.7-zip.org). LZMA provides high 8 in 7-Zip compression program (www.7-zip.org). LZMA provides high 9 9 compression ratio and very fast decompression. 10 10 11 LZMA is an improved version of famous LZ77 compression algorithm. 11 LZMA is an improved version of famous LZ77 compression algorithm. 12 12 It was improved in way of maximum increasing of compression ratio, 13 keeping high decompression speed and low memory requirements for 13 keeping high decompression speed and low memory requirements for 14 14 decompressing. 15 15 … … 31 31 32 32 33 UNIX/Linux version 33 UNIX/Linux version 34 34 ------------------ 35 35 To compile C++ version of file->file LZMA encoding, go to directory 36 C++/7zip/Compress/LZMA_Alone 36 C++/7zip/Compress/LZMA_Alone 37 37 and call make to recompile it: 38 38 make -f makefile.gcc clean all 39 39 40 40 In some UNIX/Linux versions you must compile LZMA with static libraries. 41 To compile with static libraries, you can use 41 To compile with static libraries, you can use 42 42 LIB = -lm -static 43 43 … … 60 60 Alloc.* - Memory allocation functions 61 61 Bra*.* - Filters for x86, IA-64, ARM, ARM-Thumb, PowerPC and SPARC code 62 LzFind.* - Match finder for LZ (LZMA) encoders 62 LzFind.* - Match finder for LZ (LZMA) encoders 63 63 LzFindMt.* - Match finder for LZ (LZMA) encoders for multithreading encoding 64 64 LzHash.h - Additional file for LZ match finder … … 70 70 71 71 LzmaLib - LZMA Library (.DLL for Windows) 72 72 73 73 LzmaUtil - LZMA Utility (file->file LZMA encoder/decoder). 74 74 … … 99 99 100 100 Bundles - Modules that are bundles of other modules 101 101 102 102 Alone7z - 7zr.exe: Standalone version of 7z.exe that supports only 7z/LZMA/BCJ/BCJ2 103 103 Format7zR - 7zr.dll: Reduced version of 7za.dll: extracting/compressing to 7z/LZMA/BCJ/BCJ2 … … 105 105 106 106 UI - User Interface files 107 107 108 108 Client7z - Test application for 7za.dll, 7zr.dll, 7zxr.dll 109 109 Common - Common UI files … … 140 140 - Variable dictionary size (up to 1 GB) 141 141 - Estimated compressing speed: about 2 MB/s on 2 GHz CPU 142 - Estimated decompressing speed: 142 - Estimated decompressing speed: 143 143 - 20-30 MB/s on 2 GHz Core 2 or AMD Athlon 64 144 144 - 1-2 MB/s on 200 MHz ARM, MIPS, PowerPC or other simple RISC … … 146 146 - Small code size for decompressing: 5-8 KB 147 147 148 LZMA decoder uses only integer operations and can be 148 LZMA decoder uses only integer operations and can be 149 149 implemented in any modern 32-bit CPU (or on 16-bit CPU with some conditions). 150 150 … … 155 155 156 156 The speed of LZMA decompressing mostly depends from CPU speed. 157 Memory speed has no big meaning. But if your CPU has small data cache, 157 Memory speed has no big meaning. But if your CPU has small data cache, 158 158 overall weight of memory speed will slightly increase. 159 159 … … 171 171 d: decode file 172 172 173 b: Benchmark. There are two tests: compressing and decompressing 174 with LZMA method. Benchmark shows rating in MIPS (million 175 instructions per second). Rating value is calculated from 173 b: Benchmark. There are two tests: compressing and decompressing 174 with LZMA method. Benchmark shows rating in MIPS (million 175 instructions per second). Rating value is calculated from 176 176 measured speed and it is normalized with Intel's Core 2 results. 177 Also Benchmark checks possible hardware errors (RAM 177 Also Benchmark checks possible hardware errors (RAM 178 178 errors in most cases). Benchmark uses these settings: 179 (-a1, -d21, -fb32, -mfbt4). You can change only -d parameter. 179 (-a1, -d21, -fb32, -mfbt4). You can change only -d parameter. 180 180 Also you can change the number of iterations. Example for 30 iterations: 181 181 LZMA b 30 … … 183 183 184 184 <Switches> 185 185 186 186 187 187 -a{N}: set compression mode 0 = fast, 1 = normal … … 190 190 d{N}: Sets Dictionary size - [0, 30], default: 23 (8MB) 191 191 The maximum value for dictionary size is 1 GB = 2^30 bytes. 192 Dictionary size is calculated as DictionarySize = 2^N bytes. 193 For decompressing file compressed by LZMA method with dictionary 192 Dictionary size is calculated as DictionarySize = 2^N bytes. 193 For decompressing file compressed by LZMA method with dictionary 194 194 size D = 2^N you need about D bytes of memory (RAM). 195 195 196 196 -fb{N}: set number of fast bytes - [5, 273], default: 128 197 Usually big number gives a little bit better compression ratio 197 Usually big number gives a little bit better compression ratio 198 198 and slower compression process. 199 199 … … 202 202 203 203 -lp{N}: set number of literal pos bits - [0, 4], default: 0 204 lp switch is intended for periodical data when period is 205 equal 2^N. For example, for 32-bit (4 bytes) 206 periodical data you can use lp=2. Often it's better to set lc0, 204 lp switch is intended for periodical data when period is 205 equal 2^N. For example, for 32-bit (4 bytes) 206 periodical data you can use lp=2. Often it's better to set lc0, 207 207 if you change lp switch. 208 208 209 209 -pb{N}: set number of pos bits - [0, 4], default: 2 210 pb switch is intended for periodical data 210 pb switch is intended for periodical data 211 211 when period is equal 2^N. 212 212 213 -mf{MF_ID}: set Match Finder. Default: bt4. 214 Algorithms from hc* group doesn't provide good compression 215 ratio, but they often works pretty fast in combination with 213 -mf{MF_ID}: set Match Finder. Default: bt4. 214 Algorithms from hc* group doesn't provide good compression 215 ratio, but they often works pretty fast in combination with 216 216 fast mode (-a0). 217 217 218 Memory requirements depend from dictionary size 219 (parameter "d" in table below). 218 Memory requirements depend from dictionary size 219 (parameter "d" in table below). 220 220 221 221 MF_ID Memory Description … … 226 226 hc4 d * 7.5 + 4MB Hash Chain with 4 bytes hashing. 227 227 228 -eos: write End Of Stream marker. By default LZMA doesn't write 229 eos marker, since LZMA decoder knows uncompressed size 228 -eos: write End Of Stream marker. By default LZMA doesn't write 229 eos marker, since LZMA decoder knows uncompressed size 230 230 stored in .lzma file header. 231 231 … … 236 236 Examples: 237 237 238 1) LZMA e file.bin file.lzma -d16 -lc0 239 240 compresses file.bin to file.lzma with 64 KB dictionary (2^16=64K) 241 and 0 literal context bits. -lc0 allows to reduce memory requirements 238 1) LZMA e file.bin file.lzma -d16 -lc0 239 240 compresses file.bin to file.lzma with 64 KB dictionary (2^16=64K) 241 and 0 literal context bits. -lc0 allows to reduce memory requirements 242 242 for decompression. 243 243 … … 245 245 2) LZMA e file.bin file.lzma -lc0 -lp2 246 246 247 compresses file.bin to file.lzma with settings suitable 247 compresses file.bin to file.lzma with settings suitable 248 248 for 32-bit periodical data (for example, ARM or MIPS code). 249 249 … … 259 259 --------------- 260 260 261 To increase the compression ratio for LZMA compressing it's desirable 261 To increase the compression ratio for LZMA compressing it's desirable 262 262 to have aligned data (if it's possible) and also it's desirable to locate 263 data in such order, where code is grouped in one place and data is 263 data in such order, where code is grouped in one place and data is 264 264 grouped in other place (it's better than such mixing: code, data, code, 265 265 data, ...). … … 269 269 ------- 270 270 You can increase the compression ratio for some data types, using 271 special filters before compressing. For example, it's possible to 272 increase the compression ratio on 5-10% for code for those CPU ISAs: 271 special filters before compressing. For example, it's possible to 272 increase the compression ratio on 5-10% for code for those CPU ISAs: 273 273 x86, IA-64, ARM, ARM-Thumb, PowerPC, SPARC. 274 274 275 275 You can find C source code of such filters in C/Bra*.* files 276 276 277 You can check the compression ratio gain of these filters with such 277 You can check the compression ratio gain of these filters with such 278 278 7-Zip commands (example for ARM code): 279 279 No filter: … … 281 281 282 282 With filter for little-endian ARM code: 283 7z a a2.7z a.bin -m0=arm -m1=lzma 283 7z a a2.7z a.bin -m0=arm -m1=lzma 284 284 285 285 It works in such manner: … … 289 289 Compressing and decompressing speed of such filters is very high, 290 290 so it will not increase decompressing time too much. 291 Moreover, it reduces decompression time for LZMA_decoding, 291 Moreover, it reduces decompression time for LZMA_decoding, 292 292 since compression ratio with filtering is higher. 293 293 294 These filters convert CALL (calling procedure) instructions 295 from relative offsets to absolute addresses, so such data becomes more 294 These filters convert CALL (calling procedure) instructions 295 from relative offsets to absolute addresses, so such data becomes more 296 296 compressible. 297 297 … … 323 323 ------------------------------------- 324 324 325 Stack usage of LZMA decoding function for local variables is not 325 Stack usage of LZMA decoding function for local variables is not 326 326 larger than 200-400 bytes. 327 327 … … 356 356 - Input buffer: compressed size 357 357 - Output buffer: uncompressed size 358 - LZMA Internal Structures: state_size (16 KB for default settings) 358 - LZMA Internal Structures: state_size (16 KB for default settings) 359 359 360 360 Interface: 361 361 int LzmaDecode(Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, 362 const Byte *propData, unsigned propSize, ELzmaFinishMode finishMode, 362 const Byte *propData, unsigned propSize, ELzmaFinishMode finishMode, 363 363 ELzmaStatus *status, ISzAlloc *alloc); 364 In: 364 In: 365 365 dest - output data 366 366 destLen - output data size … … 372 372 LZMA_FINISH_ANY - Decode just destLen bytes. 373 373 LZMA_FINISH_END - Stream must be finished after (*destLen). 374 You can use LZMA_FINISH_END, when you know that 375 current output buffer covers last bytes of stream. 374 You can use LZMA_FINISH_END, when you know that 375 current output buffer covers last bytes of stream. 376 376 alloc - Memory allocator. 377 377 378 Out: 379 destLen - processed output size 380 srcLen - processed input size 378 Out: 379 destLen - processed output size 380 srcLen - processed input size 381 381 382 382 Output: … … 384 384 status: 385 385 LZMA_STATUS_FINISHED_WITH_MARK 386 LZMA_STATUS_NOT_FINISHED 386 LZMA_STATUS_NOT_FINISHED 387 387 LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK 388 388 SZ_ERROR_DATA - Data error … … 397 397 1) Check Result and "status" variable. 398 398 2) Check that output(destLen) = uncompressedSize, if you know real uncompressedSize. 399 3) Check that output(srcLen) = compressedSize, if you know real compressedSize. 400 You must use correct finish mode in that case. */ 399 3) Check that output(srcLen) = compressedSize, if you know real compressedSize. 400 You must use correct finish mode in that case. */ 401 401 402 402 … … 404 404 ---------------------------------------------------- 405 405 406 When to use: file->file decompressing 406 When to use: file->file decompressing 407 407 Compile files: LzmaDec.h + LzmaDec.c + Types.h 408 408 … … 410 410 - Buffer for input stream: any size (for example, 16 KB) 411 411 - Buffer for output stream: any size (for example, 16 KB) 412 - LZMA Internal Structures: state_size (16 KB for default settings) 412 - LZMA Internal Structures: state_size (16 KB for default settings) 413 413 - LZMA dictionary (dictionary size is encoded in LZMA properties header) 414 414 … … 430 430 for (;;) 431 431 { 432 ... 433 int res = LzmaDec_DecodeToBuf(CLzmaDec *p, Byte *dest, SizeT *destLen, 432 ... 433 int res = LzmaDec_DecodeToBuf(CLzmaDec *p, Byte *dest, SizeT *destLen, 434 434 const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode); 435 435 ... … … 456 456 2) allocBig - for big arrays. 457 457 458 For example, you can use Large RAM Pages (2 MB) in allocBig allocator for 459 better compression speed. Note that Windows has bad implementation for 460 Large RAM Pages. 458 For example, you can use Large RAM Pages (2 MB) in allocBig allocator for 459 better compression speed. Note that Windows has bad implementation for 460 Large RAM Pages. 461 461 It's OK to use same allocator for alloc and allocBig. 462 462 … … 465 465 -------------------------------------- 466 466 467 Check C/LzmaUtil/LzmaUtil.c as example, 468 469 When to use: file->file decompressing 467 Check C/LzmaUtil/LzmaUtil.c as example, 468 469 When to use: file->file decompressing 470 470 471 471 1) you must implement callback structures for interfaces: … … 521 521 522 522 6) Call encoding function: 523 res = LzmaEnc_Encode(enc, &outStream.funcTable, &inStream.funcTable, 523 res = LzmaEnc_Encode(enc, &outStream.funcTable, &inStream.funcTable, 524 524 NULL, &g_Alloc, &g_Alloc); 525 525 … … 538 538 539 539 HRes LzmaEncode(Byte *dest, SizeT *destLen, const Byte *src, SizeT srcLen, 540 CLzmaEncProps *props, Byte *propsEncoded, SizeT *propsSize, int writeEndMark, 540 CLzmaEncProps *props, Byte *propsEncoded, SizeT *propsSize, int writeEndMark, 541 541 ICompressProgress *progress, ISzAlloc *alloc, ISzAlloc *allocBig); 542 542 543 543 Return code: 544 544 SZ_OK - OK 545 SZ_ERROR_MEM - Memory allocation error 545 SZ_ERROR_MEM - Memory allocation error 546 546 SZ_ERROR_PARAM - Incorrect paramater 547 547 SZ_ERROR_OUTPUT_EOF - output buffer overflow … … 555 555 _LZMA_SIZE_OPT - Enable some optimizations in LZMA Decoder to get smaller executable code. 556 556 557 _LZMA_PROB32 - It can increase the speed on some 32-bit CPUs, but memory usage for 557 _LZMA_PROB32 - It can increase the speed on some 32-bit CPUs, but memory usage for 558 558 some structures will be doubled in that case. 559 559 … … 563 563 564 564 565 C++ LZMA Encoder/Decoder 565 C++ LZMA Encoder/Decoder 566 566 ~~~~~~~~~~~~~~~~~~~~~~~~ 567 C++ LZMA code use COM-like interfaces. So if you want to use it, 567 C++ LZMA code use COM-like interfaces. So if you want to use it, 568 568 you can study basics of COM/OLE. 569 569 C++ LZMA code is just wrapper over ANSI-C code. … … 583 583 return p; 584 584 } 585 If you use MSCV that throws exception for "new" operator, you can compile without 586 "NewHandler.cpp". So standard exception will be used. Actually some code of 585 If you use MSCV that throws exception for "new" operator, you can compile without 586 "NewHandler.cpp". So standard exception will be used. Actually some code of 587 587 7-Zip catches any exception in internal code and converts it to HRESULT code. 588 588 So you don't need to catch CNewException, if you call COM interfaces of 7-Zip. -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/PeiDxeDebugLibReportStatusCode/DebugLib.c
r58459 r58466 31 31 Prints a debug message to the debug output device if the specified error level is enabled. 32 32 33 If any bit in ErrorLevel is also set in DebugPrintErrorLevelLib function 34 GetDebugPrintErrorLevel (), then print the message specified by Format and the 33 If any bit in ErrorLevel is also set in DebugPrintErrorLevelLib function 34 GetDebugPrintErrorLevel (), then print the message specified by Format and the 35 35 associated variable argument list to the debug output device. 36 36 … … 42 42 @param ErrorLevel The error level of the debug message. 43 43 @param Format Format string for the debug message to print. 44 @param ... Variable argument list whose contents are accessed 44 @param ... Variable argument list whose contents are accessed 45 45 based on the format string specified by Format. 46 46 … … 76 76 // 77 77 // Compute the total size of the record. 78 // Note that the passing-in format string and variable parameters will be constructed to 78 // Note that the passing-in format string and variable parameters will be constructed to 79 79 // the following layout: 80 80 // … … 166 166 // 167 167 // Make no output if Format string terminates unexpectedly when 168 // looking up for flag, width, precision and type. 168 // looking up for flag, width, precision and type. 169 169 // 170 170 Format--; … … 176 176 break; 177 177 } 178 178 179 179 // 180 180 // Pack variable arguments into the storage area following EFI_DEBUG_INFO. … … 199 199 // 200 200 // If the converted BASE_LIST is larger than the 12 * sizeof (UINT64) allocated bytes, then ASSERT() 201 // This indicates that the DEBUG() macro is passing in more argument than can be handled by 201 // This indicates that the DEBUG() macro is passing in more argument than can be handled by 202 202 // the EFI_DEBUG_INFO record 203 203 // … … 229 229 230 230 /** 231 Prints an assert message containing a filename, line number, and description. 231 Prints an assert message containing a filename, line number, and description. 232 232 This may be followed by a breakpoint or a dead loop. 233 233 234 234 Print a message of the form "ASSERT <FileName>(<LineNumber>): <Description>\n" 235 to the debug output device. If DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED bit of 236 PcdDebugProperyMask is set then CpuBreakpoint() is called. Otherwise, if 237 DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED bit of PcdDebugProperyMask is set then 238 CpuDeadLoop() is called. If neither of these bits are set, then this function 235 to the debug output device. If DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED bit of 236 PcdDebugProperyMask is set then CpuBreakpoint() is called. Otherwise, if 237 DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED bit of PcdDebugProperyMask is set then 238 CpuDeadLoop() is called. If neither of these bits are set, then this function 239 239 returns immediately after the message is printed to the debug output device. 240 240 DebugAssert() must actively prevent recursion. If DebugAssert() is called while … … 277 277 if (HeaderSize + FileNameSize + DescriptionSize > sizeof (Buffer)) { 278 278 // 279 // FileName + Description is too long to be filled into buffer. 279 // FileName + Description is too long to be filled into buffer. 280 280 // 281 281 if (HeaderSize + FileNameSize < sizeof (Buffer)) { 282 282 // 283 // Description has enough buffer to be truncated. 283 // Description has enough buffer to be truncated. 284 284 // 285 285 DescriptionSize = sizeof (Buffer) - HeaderSize - FileNameSize; … … 293 293 } 294 294 } 295 295 296 296 // 297 297 // Fill in EFI_DEBUG_ASSERT_DATA … … 339 339 Fills a target buffer with PcdDebugClearMemoryValue, and returns the target buffer. 340 340 341 This function fills Length bytes of Buffer with the value specified by 341 This function fills Length bytes of Buffer with the value specified by 342 342 PcdDebugClearMemoryValue, and returns Buffer. 343 343 344 344 If Buffer is NULL, then ASSERT(). 345 If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). 345 If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). 346 346 347 347 @param Buffer Pointer to the target buffer to be filled with PcdDebugClearMemoryValue. 348 @param Length Number of bytes in Buffer to fill with zeros PcdDebugClearMemoryValue. 348 @param Length Number of bytes in Buffer to fill with zeros PcdDebugClearMemoryValue. 349 349 350 350 @return Buffer Pointer to the target buffer filled with PcdDebugClearMemoryValue. … … 367 367 Returns TRUE if ASSERT() macros are enabled. 368 368 369 This function returns TRUE if the DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit of 369 This function returns TRUE if the DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit of 370 370 PcdDebugProperyMask is set. Otherwise FALSE is returned. 371 371 … … 384 384 385 385 386 /** 386 /** 387 387 Returns TRUE if DEBUG() macros are enabled. 388 388 389 This function returns TRUE if the DEBUG_PROPERTY_DEBUG_PRINT_ENABLED bit of 389 This function returns TRUE if the DEBUG_PROPERTY_DEBUG_PRINT_ENABLED bit of 390 390 PcdDebugProperyMask is set. Otherwise FALSE is returned. 391 391 … … 404 404 405 405 406 /** 406 /** 407 407 Returns TRUE if DEBUG_CODE() macros are enabled. 408 408 409 This function returns TRUE if the DEBUG_PROPERTY_DEBUG_CODE_ENABLED bit of 409 This function returns TRUE if the DEBUG_PROPERTY_DEBUG_CODE_ENABLED bit of 410 410 PcdDebugProperyMask is set. Otherwise FALSE is returned. 411 411 … … 424 424 425 425 426 /** 426 /** 427 427 Returns TRUE if DEBUG_CLEAR_MEMORY() macro is enabled. 428 428 429 This function returns TRUE if the DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of 429 This function returns TRUE if the DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of 430 430 PcdDebugProperyMask is set. Otherwise FALSE is returned. 431 431 -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebugLibReportStatusCode.inf
r58459 r58466 37 37 MdePkg/MdePkg.dec 38 38 MdeModulePkg/MdeModulePkg.dec 39 39 40 40 [LibraryClasses] 41 41 PcdLib -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/PeiRecoveryLib/PeiRecoveryLib.c
r48674 r58466 4 4 This library instance is no longer used and module using this library 5 5 class should update to directly locate EFI_PEI_RECOVERY_MODULE_PPI defined 6 in PI 1.2 specification. 6 in PI 1.2 specification. 7 7 8 8 Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR> … … 25 25 /** 26 26 Calling this function causes the system do recovery. 27 27 28 28 @retval EFI_SUCESS Sucess to do recovery. 29 29 @retval Others Fail to do recovery. … … 37 37 EFI_STATUS Status; 38 38 EFI_PEI_RECOVERY_MODULE_PPI *PeiRecovery; 39 39 40 40 Status = PeiServicesLocatePpi ( 41 41 &gEfiPeiRecoveryModulePpiGuid, -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/PeiRecoveryLib/PeiRecoveryLib.inf
r58459 r58466 4 4 # This library instance is no longer used and module using this library 5 5 # class should update to directly locate EFI_PEI_RECOVERY_MODULE_PPI defined 6 # in PI 1.2 specification. 6 # in PI 1.2 specification. 7 7 # 8 8 # Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR> … … 47 47 [Ppis] 48 48 gEfiPeiRecoveryModulePpiGuid ## CONSUMES 49 49 50 50 -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/PeiS3Lib/PeiS3Lib.c
r48674 r58466 1 1 /** @file 2 This library provides API to invoke the S3 resume vector in the APCI Table in S3 resume mode. 2 This library provides API to invoke the S3 resume vector in the APCI Table in S3 resume mode. 3 3 4 4 This library instance is no longer used and module using this library 5 5 class should update to directly locate EFI_PEI_S3_RESUME_PPI defined 6 in PI 1.2 specification. 6 in PI 1.2 specification. 7 7 8 8 Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> … … 26 26 /** 27 27 This function is responsible for calling the S3 resume vector in the ACPI Tables. 28 28 29 29 @retval EFI_SUCESS Success to restore config from S3. 30 30 @retval Others Fail to restore config from S3. … … 38 38 EFI_STATUS Status; 39 39 EFI_PEI_S3_RESUME_PPI *S3Resume; 40 40 41 41 Status = PeiServicesLocatePpi ( 42 42 &gEfiPeiS3ResumePpiGuid, … … 47 47 ASSERT_EFI_ERROR (Status); 48 48 49 return S3Resume->S3RestoreConfig ((EFI_PEI_SERVICES **) GetPeiServicesTablePointer()); 49 return S3Resume->S3RestoreConfig ((EFI_PEI_SERVICES **) GetPeiServicesTablePointer()); 50 50 } 51 51 -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/PeiS3Lib/PeiS3Lib.inf
r58459 r58466 4 4 # This library instance is no longer used and module using this library 5 5 # class should update to directly locate EFI_PEI_S3_RESUME_PPI defined 6 # in PI 1.2 specification. 6 # in PI 1.2 specification. 7 7 # 8 8 # Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR> -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/PlatformBdsLibNull/PlatformBdsLibNull.inf
r58459 r58466 1 1 ## @file 2 2 # NULL implementation for PlatformBdsLib library class interfaces. 3 # 3 # 4 4 # Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR> 5 5 # This program and the accompanying materials … … 7 7 # which accompanies this distribution. The full text of the license may be found at 8 8 # http://opensource.org/licenses/bsd-license.php 9 # 9 # 10 10 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 11 # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 # 12 # 13 13 ## 14 14 … … 20 20 MODULE_TYPE = DXE_DRIVER 21 21 VERSION_STRING = 1.0 22 LIBRARY_CLASS = PlatformBdsLib|DXE_DRIVER 22 LIBRARY_CLASS = PlatformBdsLib|DXE_DRIVER 23 23 24 24 # … … 37 37 MdeModulePkg/MdeModulePkg.dec 38 38 IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec 39 39 40 40 [LibraryClasses] 41 41 BaseLib -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/SmmRuntimeDxeReportStatusCodeLibFramework/SmmRuntimeDxeReportStatusCodeLibFramework.inf
r58459 r58466 26 26 VERSION_STRING = 1.0 27 27 LIBRARY_CLASS = ReportStatusCodeLib|DXE_RUNTIME_DRIVER DXE_SMM_DRIVER 28 28 29 29 CONSTRUCTOR = ReportStatusCodeLibConstruct 30 30 DESTRUCTOR = ReportStatusCodeLibDestruct -
trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/SmmRuntimeDxeReportStatusCodeLibFramework/SmmRuntimeDxeSupport.c
r48674 r58466 27 27 /** 28 28 Locates and caches SMM Status Code Protocol. 29 29 30 30 **/ 31 31 VOID … … 44 44 /** 45 45 Report status code via SMM Status Code Protocol. 46 46 47 47 @param Type Indicates the type of status code being reported. 48 @param Value Describes the current status of a hardware or software entity. 49 This included information about the class and subclass that is used to classify the entity 50 as well as an operation. For progress codes, the operation is the current activity. 51 For error codes, it is the exception. For debug codes, it is not defined at this time. 52 @param Instance The enumeration of a hardware or software entity within the system. 53 A system may contain multiple entities that match a class/subclass pairing. 54 The instance differentiates between them. An instance of 0 indicates that instance information is unavailable, 48 @param Value Describes the current status of a hardware or software entity. 49 This included information about the class and subclass that is used to classify the entity 50 as well as an operation. For progress codes, the operation is the current activity. 51 For error codes, it is the exception. For debug codes, it is not defined at this time. 52 @param Instance The enumeration of a hardware or software entity within the system. 53 A system may contain multiple entities that match a class/subclass pairing. 54 The instance differentiates between them. An instance of 0 indicates that instance information is unavailable, 55 55 not meaningful, or not relevant. Valid instance numbers start with 1. 56 @param CallerId This optional parameter may be used to identify the caller. 57 This parameter allows the status code driver to apply different rules to different callers. 56 @param CallerId This optional parameter may be used to identify the caller. 57 This parameter allows the status code driver to apply different rules to different callers. 58 58 @param Data This optional parameter may be used to pass additional data 59 59 60 60 @retval EFI_SUCCESS Always return EFI_SUCCESS. 61 61 … … 157 157 } 158 158 } 159 159 160 160 // 161 161 // A status code service is present in system, so pass in all the parameters to the service. … … 163 163 return (*mReportStatusCode) (Type, Value, Instance, (EFI_GUID *)CallerId, Data); 164 164 } 165 165 166 166 return EFI_UNSUPPORTED; 167 167 } … … 221 221 @param ImageHandle The firmware allocated handle for the EFI image. 222 222 @param SystemTable A pointer to the EFI System Table. 223 223 224 224 @retval EFI_SUCCESS The constructor always returns EFI_SUCCESS. 225 225 … … 243 243 Status = mSmmBase->SmmAllocatePool ( 244 244 mSmmBase, 245 EfiRuntimeServicesData, 246 sizeof (EFI_STATUS_CODE_DATA) + EFI_STATUS_CODE_DATA_MAX_SIZE, 245 EfiRuntimeServicesData, 246 sizeof (EFI_STATUS_CODE_DATA) + EFI_STATUS_CODE_DATA_MAX_SIZE, 247 247 (VOID **) &mStatusCodeData 248 248 ); … … 258 258 // 259 259 // Library should not use the gRT directly, for it may be converted by other library instance. 260 // 260 // 261 261 mInternalRT = gRT; 262 262 mInSmm = FALSE; … … 266 266 // 267 267 // Cache the report status code service 268 // 268 // 269 269 mReportStatusCode = InternalGetReportStatusCode (); 270 270 271 271 // 272 272 // Register notify function for EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE 273 // 273 // 274 274 Status = gBS->CreateEventEx ( 275 275 EVT_NOTIFY_SIGNAL, … … 284 284 // 285 285 // Register notify function for EVT_SIGNAL_EXIT_BOOT_SERVICES 286 // 286 // 287 287 Status = gBS->CreateEventEx ( 288 288 EVT_NOTIFY_SIGNAL, … … 300 300 /** 301 301 The destructor function of SMM Runtime DXE Report Status Code Lib. 302 302 303 303 The destructor function frees memory allocated by constructor, and closes related events. 304 It will ASSERT() if that related operation fails and it will always return EFI_SUCCESS. 304 It will ASSERT() if that related operation fails and it will always return EFI_SUCCESS. 305 305 306 306 @param ImageHandle The firmware allocated handle for the EFI image. 307 307 @param SystemTable A pointer to the EFI System Table. 308 308 309 309 @retval EFI_SUCCESS The constructor always returns EFI_SUCCESS. 310 310
Note:
See TracChangeset
for help on using the changeset viewer.