VirtualBox

Ignore:
Timestamp:
Oct 29, 2015 4:30:44 AM (9 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
103777
Message:

EFI/Firmware: Merged in the svn:eol-style, svn:mime-type and trailing whitespace cleanup that was done after the initial UDK2014.SP1 import: svn merge /vendor/edk2/UDK2014.SP1 /vendor/edk2/current .

Location:
trunk/src/VBox/Devices/EFI/Firmware
Files:
33 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/EFI/Firmware

  • trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.c

    r58459 r58466  
    11/** @file
    2   UEFI and Tiano Custom Decompress Library 
     2  UEFI and Tiano Custom Decompress Library
    33  It will do Tiano or UEFI decompress with different verison parameter.
    4  
     4
    55Copyright (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.             
     6This program and the accompanying materials
     7are licensed and made available under the terms and conditions of the BSD License
     8which accompanies this distribution.  The full text of the license may be found at
     9http://opensource.org/licenses/bsd-license.php
     10
     11THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
     12WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
    1313
    1414**/
     
    1818/**
    1919  Shift mBitBuf NumOfBits left. Read in NumOfBits of bits from source.
    20  
     20
    2121  @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.
    2323**/
    2424VOID
     
    6363  //
    6464  Sd->mBitCount = (UINT16) (Sd->mBitCount - NumOfBits);
    65  
     65
    6666  //
    6767  // Copy NumOfBits of bits from mSubBitBuf into mBitBuf
     
    7373  Get NumOfBits of bits out from mBitBuf
    7474
    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
    7777  popped out.
    7878
     
    9393  //
    9494  // Pop NumOfBits of Bits from Left
    95   // 
     95  //
    9696  OutBits = (UINT32) (Sd->mBitBuf >> (BITBUFSIZ - NumOfBits));
    9797
     
    107107  Creates Huffman Code mapping table according to code length array.
    108108
    109   Creates Huffman Code mapping table for Extra Set, Char&Len Set 
     109  Creates Huffman Code mapping table for Extra Set, Char&Len Set
    110110  and Position Set according to code length array.
    111111  If TableBits > 16, then ASSERT ().
     
    158158    Count[BitLen[Index]]++;
    159159  }
    160  
     160
    161161  Start[0] = 0;
    162162  Start[1] = 0;
     
    174174
    175175  JuBits = (UINT16) (16 - TableBits);
    176  
     176
    177177  Weight[0] = 0;
    178178  for (Index = 1; Index <= TableBits; Index++) {
     
    183183  while (Index <= 16) {
    184184    Weight[Index] = (UINT16) (1U << (16 - Index));
    185     Index++;   
     185    Index++;
    186186  }
    187187
     
    224224          *Pointer = Avail++;
    225225        }
    226        
     226
    227227        if (*Pointer < (2 * NC - 1)) {
    228228          if ((Index3 & Mask) != 0) {
     
    251251/**
    252252  Decodes a position value.
    253  
     253
    254254  Get a position value according to Position Huffman Table.
    255255
    256256  @param Sd      the global scratch data
    257  
     257
    258258  @return The position value decoded.
    259259**/
     
    326326  ASSERT (nn <= NPT);
    327327  //
    328   // Read Extra Set Code Length Array size 
     328  // Read Extra Set Code Length Array size
    329329  //
    330330  Number = (UINT16) GetBits (Sd, nbit);
     
    353353    //
    354354    // 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
    356356    // terminating "0". The number of "1"s = Code length - 4.
    357357    //
     
    363363      }
    364364    }
    365    
     365
    366366    FillBuf (Sd, (UINT16) ((CharC < 7) ? 3 : CharC - 3));
    367367
    368368    Sd->mPTLen[Index++] = (UINT8) CharC;
    369  
    370     //
    371     // For Code&Len Set, 
     369
     370    //
     371    // For Code&Len Set,
    372372    // 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
    374374    // zero lengths after the third length.
    375375    //
     
    385385    Sd->mPTLen[Index++] = 0;
    386386  }
    387  
     387
    388388  return MakeTable (Sd, nn, Sd->mPTLen, 8, Sd->mPTTable);
    389389}
     
    391391/**
    392392  Reads code lengths for Char&Len Set.
    393  
     393
    394394  Read in and decode the Char&Len Set Code Length Array, then
    395395  generate the Huffman Code mapping table for the Char&Len Set.
     
    478478/**
    479479  Decode a character/length value.
    480  
     480
    481481  Read one value from mBitBuf, Get one code from mBitBuf. If it is at block boundary, generates
    482482  Huffman code mapping table for Extra Set, Code&Len Set and
     
    500500    // Starting a new block
    501501    // Read BlockSize from block header
    502     // 
     502    //
    503503    Sd->mBlockSize    = (UINT16) GetBits (Sd, 16);
    504504
     
    519519
    520520    //
    521     // Read in the Position Set Code Length Arrary, 
     521    // Read in the Position Set Code Length Arrary,
    522522    // Generate the Huffman code mapping table for the Position Set.
    523523    //
     
    557557/**
    558558  Decode the source data and put the resulting data into the destination buffer.
    559  
     559
    560560  @param  Sd The global scratch data
    561561**/
     
    576576    //
    577577    // Get one code from mBitBuf
    578     // 
     578    //
    579579    CharC = DecodeC (Sd);
    580580    if (Sd->mBadTableFlag != 0) {
     
    600600      //
    601601      CharC       = (UINT16) (CharC - (BIT8 - THRESHOLD));
    602  
     602
    603603      //
    604604      // Get string length
     
    631631
    632632/**
    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
    635635  to decompress the compressed source buffer.
    636636
    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
    638638  required to decompress the buffer specified by Source and SourceSize.
    639639  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,
    641641  then RETURN_INVALID_PARAMETER is returned.  Otherwise, the size of the uncompressed
    642642  buffer is returned in DestinationSize, the size of the scratch buffer is returned
    643643  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
    645645  checking of the validity of the source data.  It just retrieves the "Original Size"
    646646  field from the beginning bytes of the source data and output it as DestinationSize.
     
    657657                          by Source and SourceSize is decompressed..
    658658  @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
    660660                          by Source and SourceSize.
    661661
    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
    664664                          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
    669669                          and SourceSize.
    670670**/
     
    705705  This function is designed so that the decompression algorithm can be implemented
    706706  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
    708708  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
    711711  specified by Source is not in a valid compressed data format,
    712712  then RETURN_INVALID_PARAMETER is returned.
     
    719719  @param  Destination The destination buffer to store the decompressed data
    720720  @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
    722722                      required scratch buffer size is 0.
    723723  @param  Version     1 for UEFI Decompress algoruthm, 2 for Tiano Decompess algorithm.
    724724
    725   @retval  RETURN_SUCCESS Decompression completed successfully, and 
     725  @retval  RETURN_SUCCESS Decompression completed successfully, and
    726726                          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
    729729                          (not in a valid compressed format).
    730730**/
     
    816816  This function is designed so that the decompression algorithm can be implemented
    817817  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
    819819  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
    822822  specified by Source is not in a valid compressed data format,
    823823  then RETURN_INVALID_PARAMETER is returned.
     
    830830  @param  Destination The destination buffer to store the decompressed data
    831831  @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
    833833                      required scratch buffer size is 0.
    834834
    835   @retval  RETURN_SUCCESS Decompression completed successfully, and 
     835  @retval  RETURN_SUCCESS Decompression completed successfully, and
    836836                          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
    839839                          (not in a valid compressed format).
    840840**/
     
    854854  size of an optional scratch buffer required to actually decode the data in a GUIDed section.
    855855
    856   Examines a GUIDed section specified by InputSection. 
     856  Examines a GUIDed section specified by InputSection.
    857857  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.
    859859  If the required information can not be retrieved from InputSection,
    860860  then RETURN_INVALID_PARAMETER is returned.
     
    863863  the size of an optional scratch buffer is returned in ScratchSize, and the Attributes field
    864864  from EFI_GUID_DEFINED_SECTION header of InputSection is returned in SectionAttribute.
    865  
     865
    866866  If InputSection is NULL, then ASSERT().
    867867  If OutputBufferSize is NULL, then ASSERT().
     
    906906    }
    907907    //
    908     // Get guid attribute of guid section. 
     908    // Get guid attribute of guid section.
    909909    //
    910910    *SectionAttribute = ((EFI_GUID_DEFINED_SECTION2 *) InputSection)->Attributes;
     
    926926    }
    927927    //
    928     // Get guid attribute of guid section. 
     928    // Get guid attribute of guid section.
    929929    //
    930930    *SectionAttribute = ((EFI_GUID_DEFINED_SECTION *) InputSection)->Attributes;
     
    944944/**
    945945  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.
    949949  If the data in InputSection can not be decoded, then RETURN_INVALID_PARAMETER is returned.
    950950  If the GUID of InputSection does match the GUID that this handler supports, then InputSection
     
    953953  data in InputSection, then OutputBuffer is set to point at the data in InputSection.  Otherwise,
    954954  the decoded data will be placed in caller allocated buffer specified by OutputBuffer.
    955  
     955
    956956  If InputSection is NULL, then ASSERT().
    957957  If OutputBuffer is NULL, then ASSERT().
     
    961961
    962962  @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.
    964964  @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
    967967                            A pointer to the authentication status of the decoded output buffer.
    968968                            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  
    116116  Creates Huffman Code mapping table according to code length array.
    117117
    118   Creates Huffman Code mapping table for Extra Set, Char&Len Set 
     118  Creates Huffman Code mapping table for Extra Set, Char&Len Set
    119119  and Position Set according to code length array.
    120120
     
    142142
    143143  Get a position value according to Position Huffman Table.
    144  
     144
    145145  @param  Sd the global scratch data
    146146
     
    178178/**
    179179  Reads code lengths for Char&Len Set.
    180  
     180
    181181  Read in and decode the Char&Len Set Code Length Array, then
    182182  generate the Huffman Code mapping table for the Char&Len Set.
     
    192192/**
    193193  Decode a character/length value.
    194  
     194
    195195  Read one value from mBitBuf, Get one code from mBitBuf. If it is at block boundary, generates
    196196  Huffman code mapping table for Extra Set, Code&Len Set and
  • trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/DxeCapsuleLib/DxeCapsuleLib.c

    r58459 r58466  
    8383  if (ItemNum == FmpCapsuleHeader->EmbeddedDriverCount) {
    8484    //
    85     // No payload element 
     85    // No payload element
    8686    //
    8787    if (((UINT8 *)FmpCapsuleHeader + ItemOffsetList[ItemNum - 1]) < EndOfCapsule) {
     
    124124
    125125/**
    126   Process Firmware management protocol data capsule. 
     126  Process Firmware management protocol data capsule.
    127127
    128128  @param  CapsuleHeader         Points to a capsule header.
     
    188188
    189189  //
    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
    192192  //    All FMP protocols are installed
    193193  //
     
    196196
    197197  //
    198   // 2. Try to load & start all the drivers within capsule 
     198  // 2. Try to load & start all the drivers within capsule
    199199  //
    200200  SetDevicePathNodeLength (&MemMapNode.Header, sizeof (MemMapNode));
     
    233233
    234234    Status = gBS->StartImage(
    235                     ImageHandle, 
    236                     &ExitDataSize, 
     235                    ImageHandle,
     236                    &ExitDataSize,
    237237                    NULL
    238238                    );
     
    244244
    245245  //
    246   // Connnect all again to connect drivers within capsule 
     246  // Connnect all again to connect drivers within capsule
    247247  //
    248248  if (FmpCapsuleHeader->EmbeddedDriverCount > 0) {
     
    321321      for (Index2 = 0; Index2 < FmpImageInfoCount; Index2++) {
    322322        //
    323         // Check all the payload entry in capsule payload list 
     323        // Check all the payload entry in capsule payload list
    324324        //
    325325        for (Index = FmpCapsuleHeader->EmbeddedDriverCount; Index < ItemNum; Index++) {
  • trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/DxeReportStatusCodeLibFramework/ReportStatusCodeLib.c

    r48674 r58466  
    107107      }
    108108    }
    109  
     109
    110110    //
    111111    // A status code service is present in system, so pass in all the parameters to the service.
     
    113113    return (*mReportStatusCode) (Type, Value, Instance, (EFI_GUID *)CallerId, Data);
    114114  }
    115  
     115
    116116  return EFI_UNSUPPORTED;
    117117}
     
    509509  Tpl = gBS->RaiseTPL (TPL_HIGH_LEVEL);
    510510  gBS->RestoreTPL (Tpl);
    511  
     511
    512512  StatusCodeData = NULL;
    513513  if (Tpl <= TPL_NOTIFY) {
  • trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c

    r58460 r58466  
    418418
    419419  FreePool (Buffer);
    420  
     420
    421421  Buffer = NULL;
    422422
     
    579579      }
    580580    }
    581  
     581
    582582    //
    583583    // Skip Non-Legacy boot option
    584     // 
     584    //
    585585    if (!BdsIsLegacyBootOption (BootOptionVar, &BbsEntry, &BbsIndex)) {
    586586      if (BootOptionVar!= NULL) {
     
    789789  Add the legacy boot options from BBS table if they do not exist.
    790790
    791   @retval EFI_SUCCESS          The boot options are added successfully 
     791  @retval EFI_SUCCESS          The boot options are added successfully
    792792                               or they are already in boot options.
    793793  @retval EFI_NOT_FOUND        No legacy boot options is found.
     
    939939  @param BbsCount        The BBS Count.
    940940
    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
    942942                                 VAR_LEGACY_DEV_ORDER and gEfiLegacyDevOrderVariableGuid is
    943943                                 set correctly.
     
    10301030  DevOrderPtr->Length  = (UINT16) (sizeof (UINT16) + HDCount * sizeof (UINT16));
    10311031  DevOrderPtr          = (LEGACY_DEV_ORDER_ENTRY *) BdsFillDevOrderBuf (BbsTable, BBS_HARDDISK, BbsCount, DevOrderPtr->Data);
    1032  
     1032
    10331033  DevOrderPtr->BbsType = BBS_CDROM;
    10341034  DevOrderPtr->Length  = (UINT16) (sizeof (UINT16) + CDCount * sizeof (UINT16));
    10351035  DevOrderPtr          = (LEGACY_DEV_ORDER_ENTRY *) BdsFillDevOrderBuf (BbsTable, BBS_CDROM, BbsCount, DevOrderPtr->Data);
    1036  
     1036
    10371037  DevOrderPtr->BbsType = BBS_EMBED_NETWORK;
    10381038  DevOrderPtr->Length  = (UINT16) (sizeof (UINT16) + NETCount * sizeof (UINT16));
     
    10611061
    10621062/**
    1063   Add the legacy boot devices from BBS table into 
     1063  Add the legacy boot devices from BBS table into
    10641064  the legacy device boot order.
    10651065
     
    12791279  }
    12801280  NewNETPtr = NewPtr->Data;
    1281  
     1281
    12821282  //
    12831283  // copy BEV
     
    15031503
    15041504  @param  Entry             The boot option is to be checked for refresh BBS table.
    1505  
     1505
    15061506  @retval EFI_SUCCESS           The boot priority for BBS entries is refreshed successfully.
    15071507  @retval EFI_NOT_FOUND         BBS entries can't be found.
     
    17051705               TPL_NOTIFY,
    17061706               WriteBootToOsPerformanceData,
    1707                NULL, 
     1707               NULL,
    17081708               &LegacyBootEvent
    17091709               );
     
    25542554      EFI_ERROR_CODE | EFI_ERROR_MINOR,
    25552555      (EFI_SOFTWARE_DXE_BS_DRIVER | EFI_SW_DXE_BS_EC_BOOT_OPTION_LOAD_ERROR)
    2556       );   
     2556      );
    25572557    goto Done;
    25582558  }
  • trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsConnect.c

    r58459 r58466  
    110110  }
    111111  CopyOfDevicePath  = DevicePath;
    112  
     112
    113113  do {
    114114    //
     
    123123      return EFI_OUT_OF_RESOURCES;
    124124    }
    125    
     125
    126126    Next      = Instance;
    127127    while (!IsDevicePathEndType (Next)) {
     
    204204
    205205/**
    206   This function will connect all current system handles recursively. 
    207  
     206  This function will connect all current system handles recursively.
     207
    208208  gBS->ConnectController() service is invoked for each handle exist in system handler buffer.
    209209  If the handle is bus type handler, all childrens also will be connected recursively
     
    248248
    249249/**
    250   This function will disconnect all current system handles. 
    251  
     250  This function will disconnect all current system handles.
     251
    252252  gBS->DisconnectController() is invoked for each handle exists in system handle buffer.
    253253  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  
    13591359
    13601360/**
    1361   This routine adjust the memory information for different memory type and 
     1361  This routine adjust the memory information for different memory type and
    13621362  save them into the variables for next boot.
    13631363**/
     
    15711571  @param  VendorGuid             A unique identifier for the vendor.
    15721572  @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).
    15821582  @param  Data                   The contents for the variable.
    15831583
     
    15911591  @retval EFI_WRITE_PROTECTED    The variable in question is read-only.
    15921592  @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
    15951595                                 does NOT pass the validation check carried out by the firmware.
    15961596
  • trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsLib.inf

    r58459 r58466  
    11## @file
    22#  General BDS library.
    3 # 
     3#
    44#  General BDS defines and produce general interfaces for platform BDS driver including:
    55#  1) BDS boot policy interface;
    66#  2) BDS boot device connect interface;
    77#  3) BDS Misc interfaces for mainting boot variable, ouput string, etc.
    8 # 
     8#
    99#  Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
    1010#  This program and the accompanying materials
     
    1212#  which accompanies this distribution.  The full text of the license may be found at
    1313#  http://opensource.org/licenses/bsd-license.php
    14 # 
     14#
    1515#  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
    1616#  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
    17 # 
     17#
    1818##
    1919
     
    2525  MODULE_TYPE                    = DXE_DRIVER
    2626  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
    2828  CONSTRUCTOR                    = GenericBdsLibConstructor
    2929
     
    4545  String.c
    4646  GenericBdsStrings.uni
    47  
     47
    4848[Packages]
    4949  MdePkg/MdePkg.dec
     
    7777  ## SOMETIMES_CONSUMES ## Variable:L"MemoryTypeInformation"
    7878  ## SOMETIMES_PRODUCES ## Variable:L"MemoryTypeInformation"
    79   gEfiMemoryTypeInformationGuid                 
     79  gEfiMemoryTypeInformationGuid
    8080  ## SOMETIMES_CONSUMES ## Variable:L"BootXXXX"    # Boot option variable
    8181  ## SOMETIMES_PRODUCES ## Variable:L"BootXXXX"    # Boot option variable
     
    141141
    142142#
    143 # [BootMode] 
     143# [BootMode]
    144144#   RECOVERY_FULL    ## SOMETIMES_CONSUMES # Memory Type Information variable
    145145#
  • trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsStrings.uni

    • Property svn:mime-type changed from application/octet-stream to text/plain;encoding=UTF-16LE
  • trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/GenericBdsLib/InternalBdsLib.h

    r58459 r58466  
    134134
    135135/**
    136   This routine adjust the memory information for different memory type and 
     136  This routine adjust the memory information for different memory type and
    137137  save them into the variables for next boot.
    138138**/
     
    152152
    153153**/
    154 BOOLEAN 
     154BOOLEAN
    155155ValidateOption (
    156156  UINT8                     *Variable,
     
    167167  @param  VendorGuid             A unique identifier for the vendor.
    168168  @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).
    178178  @param  Data                   The contents for the variable.
    179179
     
    187187  @retval EFI_WRITE_PROTECTED    The variable in question is read-only.
    188188  @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
    191191                                 does NOT pass the validation check carried out by the firmware.
    192192
  • trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/GenericBdsLib/Performance.c

    r58459 r58466  
    188188
    189189  Freq    = GetPerformanceCounterProperties (&StartValue, &EndValue);
    190  
     190
    191191  Freq    = DivU64x32 (Freq, 1000);
    192192
     
    252252  PerfEntriesAsDxeHandle = AllocateZeroPool (NumPerfEntries * sizeof (BOOLEAN));
    253253  ASSERT (PerfEntriesAsDxeHandle != NULL);
    254  
     254
    255255  //
    256256  // Get DXE drivers performance
  • trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/LzmaCustomDecompressLib/F86GuidedSectionExtraction.c

    r58464 r58466  
    11/** @file
    2   LZMA Decompress GUIDed Section Extraction Library, which produces LZMA custom 
     2  LZMA Decompress GUIDed Section Extraction Library, which produces LZMA custom
    33  decompression algorithm with the converter for the different arch code.
    44  It wraps Lzma decompress interfaces to GUIDed Section Extraction interfaces
     
    2323  size of an scratch buffer required to actually decode the data in a GUIDed section.
    2424
    25   Examines a GUIDed section specified by InputSection. 
     25  Examines a GUIDed section specified by InputSection.
    2626  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.
    2828  If the required information can not be retrieved from InputSection,
    2929  then RETURN_INVALID_PARAMETER is returned.
     
    3232  the size of an optional scratch buffer is returned in ScratchSize, and the Attributes field
    3333  from EFI_GUID_DEFINED_SECTION header of InputSection is returned in SectionAttribute.
    34  
     34
    3535  If InputSection is NULL, then ASSERT().
    3636  If OutputBufferSize is NULL, then ASSERT().
     
    101101/**
    102102  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.
    106106  If the data in InputSection can not be decoded, then RETURN_INVALID_PARAMETER is returned.
    107107  If the GUID of InputSection does match the GUID that this handler supports, then InputSection
     
    110110  data in InputSection, then OutputBuffer is set to point at the data in InputSection.  Otherwise,
    111111  the decoded data will be placed in caller allocated buffer specified by OutputBuffer.
    112  
     112
    113113  If InputSection is NULL, then ASSERT().
    114114  If OutputBuffer is NULL, then ASSERT().
     
    118118
    119119  @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.
    121121  @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
    124124                            A pointer to the authentication status of the decoded output buffer.
    125125                            See the definition of authentication status in the EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI
     
    148148  UINT32            OutputBufferSize;
    149149  UINT32            ScratchBufferSize;
    150  
     150
    151151  ASSERT (OutputBuffer != NULL);
    152152  ASSERT (InputSection != NULL);
     
    179179
    180180  //
    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.
    182182  //
    183183  if (!EFI_ERROR (Status)) {
     
    188188             &ScratchBufferSize
    189189             );
    190    
     190
    191191    if (!EFI_ERROR (Status)) {
    192192      x86_Convert_Init(X86State);
     
    194194    }
    195195  }
    196  
     196
    197197  return Status;
    198198}
  • trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/LzmaCustomDecompressLib/GuidedSectionExtraction.c

    r48674 r58466  
    2121  size of an scratch buffer required to actually decode the data in a GUIDed section.
    2222
    23   Examines a GUIDed section specified by InputSection. 
     23  Examines a GUIDed section specified by InputSection.
    2424  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.
    2626  If the required information can not be retrieved from InputSection,
    2727  then RETURN_INVALID_PARAMETER is returned.
     
    3030  the size of an optional scratch buffer is returned in ScratchSize, and the Attributes field
    3131  from EFI_GUID_DEFINED_SECTION header of InputSection is returned in SectionAttribute.
    32  
     32
    3333  If InputSection is NULL, then ASSERT().
    3434  If OutputBufferSize is NULL, then ASSERT().
     
    9999/**
    100100  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.
    104104  If the data in InputSection can not be decoded, then RETURN_INVALID_PARAMETER is returned.
    105105  If the GUID of InputSection does match the GUID that this handler supports, then InputSection
     
    108108  data in InputSection, then OutputBuffer is set to point at the data in InputSection.  Otherwise,
    109109  the decoded data will be placed in caller allocated buffer specified by OutputBuffer.
    110  
     110
    111111  If InputSection is NULL, then ASSERT().
    112112  If OutputBuffer is NULL, then ASSERT().
     
    116116
    117117  @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.
    119119  @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
    122122                            A pointer to the authentication status of the decoded output buffer.
    123123                            See the definition of authentication status in the EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI
     
    197197          LzmaGuidedSectionGetInfo,
    198198          LzmaGuidedSectionExtraction
    199           );     
     199          );
    200200}
    201201
  • trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/LzmaCustomDecompressLib/LzmaArchCustomDecompressLib.inf

    r58464 r58466  
    4444  Sdk/C/LzHash.h
    4545  Sdk/C/LzmaDec.h
    46   Sdk/C/Types.h 
     46  Sdk/C/Types.h
    4747  UefiLzma.h
    4848  LzmaDecompressLibInternal.h
  • trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf

    r58459 r58466  
    4343  Sdk/C/LzHash.h
    4444  Sdk/C/LzmaDec.h
    45   Sdk/C/Types.h 
     45  Sdk/C/Types.h
    4646  GuidedSectionExtraction.c
    4747  UefiLzma.h
  • trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/LzmaCustomDecompressLib/LzmaDecompress.c

    r48674 r58466  
    106106
    107107/**
    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
    110110  to decompress the compressed source buffer.
    111111
    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
    113113  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,
    115115  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
    117117  checking of the validity of the source data. It just retrieves the "Original Size"
    118118  field from the LZMA_HEADER_SIZE beginning bytes of the source data and output it as DestinationSize.
     
    127127                          by Source and SourceSize is decompressed.
    128128  @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
    130130                          by Source and SourceSize.
    131131
    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
    134134                          buffer was returned in ScratchSize.
    135135
     
    159159
    160160  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
    163163  specified by Source is not in a valid compressed data format,
    164164  then RETURN_INVALID_PARAMETER is returned.
     
    168168  @param  Destination The destination buffer to store the decompressed data
    169169  @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
    171171                      required scratch buffer size is 0.
    172                      
    173   @retval  RETURN_SUCCESS Decompression completed successfully, and 
     172
     173  @retval  RETURN_SUCCESS Decompression completed successfully, and
    174174                          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
    177177                          (not in a valid compressed format).
    178178**/
     
    196196  AllocFuncs.Buffer           = Scratch;
    197197  AllocFuncs.BufferSize       = SCRATCH_BUFFER_REQUEST_SIZE;
    198  
     198
    199199  DecodedBufSize = (SizeT)GetDecodedSizeOfBuf((UINT8*)Source);
    200200  EncodedDataSize = (SizeT) (SourceSize - LZMA_HEADER_SIZE);
  • trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/LzmaCustomDecompressLib/LzmaDecompressLibInternal.h

    r48674 r58466  
    2424
    2525/**
    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
    2828  to decompress the compressed source buffer.
    2929
    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
    3131  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,
    3333  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
    3535  checking of the validity of the source data. It just retrieves the "Original Size"
    3636  field from the LZMA_HEADER_SIZE beginning bytes of the source data and output it as DestinationSize.
     
    4545                          by Source and SourceSize is decompressed.
    4646  @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
    4848                          by Source and SourceSize.
    4949
    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
    5252                          buffer was returned in ScratchSize.
    5353
     
    6666
    6767  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
    7070  specified by Source is not in a valid compressed data format,
    7171  then RETURN_INVALID_PARAMETER is returned.
     
    7575  @param  Destination The destination buffer to store the decompressed data
    7676  @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
    7878                      required scratch buffer size is 0.
    79                      
    80   @retval  RETURN_SUCCESS Decompression completed successfully, and 
     79
     80  @retval  RETURN_SUCCESS Decompression completed successfully, and
    8181                          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
    8484                          (not in a valid compressed format).
    8585**/
  • trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/LzmaCustomDecompressLib/Sdk/C/Bra.h

    r58464 r58466  
    1010These functions convert relative addresses to absolute addresses
    1111in CALL instructions to increase the compression ratio.
    12  
     12
    1313  In:
    1414    data     - data buffer
     
    1717    state    - state variable for x86 converter
    1818    encoding - 0 (for decoding), 1 (for encoding)
    19  
     19
    2020  Out:
    2121    state    - state variable for x86 converter
     
    2424    The number of processed bytes. If you call these functions with multiple calls,
    2525    you must start next call with first byte after block of processed bytes.
    26  
     26
    2727  Type   Endian  Alignment  LookAhead
    28  
     28
    2929  x86    little      1          4
    3030  ARMT   little      2          2
  • trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/LzmaCustomDecompressLib/Sdk/C/LzFind.c

    r48674 r58466  
    522522  delta2 = p->pos - p->hash[hash2Value];
    523523  curMatch = p->hash[kFix3HashSize + hashValue];
    524  
     524
    525525  p->hash[hash2Value] =
    526526  p->hash[kFix3HashSize + hashValue] = p->pos;
     
    556556  delta3 = p->pos - p->hash[kFix3HashSize + hash3Value];
    557557  curMatch = p->hash[kFix4HashSize + hashValue];
    558  
     558
    559559  p->hash[                hash2Value] =
    560560  p->hash[kFix3HashSize + hash3Value] =
  • trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/LzmaCustomDecompressLib/Sdk/C/LzmaDec.c

    r48674 r58466  
    167167  SizeT dicBufSize = p->dicBufSize;
    168168  SizeT dicPos = p->dicPos;
    169  
     169
    170170  UInt32 processedPos = p->processedPos;
    171171  UInt32 checkDicSize = p->checkDicSize;
     
    351351              NORMALIZE
    352352              range >>= 1;
    353              
     353
    354354              {
    355355                UInt32 t;
     
    749749  (*srcLen) = 0;
    750750  LzmaDec_WriteRem(p, dicLimit);
    751  
     751
    752752  *status = LZMA_STATUS_NOT_SPECIFIED;
    753753
     
    795795      if (p->needInitState)
    796796        LzmaDec_InitStateReal(p);
    797  
     797
    798798      if (p->tempBufSize == 0)
    799799      {
     
    926926  UInt32 dicSize;
    927927  Byte d;
    928  
     928
    929929  if (size < LZMA_PROPS_SIZE)
    930930    return SZ_ERROR_UNSUPPORTED;
    931931  else
    932932    dicSize = data[1] | ((UInt32)data[2] << 8) | ((UInt32)data[3] << 16) | ((UInt32)data[4] << 24);
    933  
     933
    934934  if (dicSize < LZMA_DIC_MIN)
    935935    dicSize = LZMA_DIC_MIN;
     
    10131013
    10141014  LzmaDec_Init(&p);
    1015  
     1015
    10161016  *srcLen = inSize;
    10171017  res = LzmaDec_DecodeToDic(&p, outSize, src, srcLen, finishMode, status);
  • trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/LzmaCustomDecompressLib/Sdk/C/LzmaDec.h

    r48674 r58466  
    127127  SZ_ERROR_UNSUPPORTED - Unsupported properties
    128128*/
    129    
     129
    130130SRes LzmaDec_AllocateProbs(CLzmaDec *p, const Byte *props, unsigned propsSize, ISzAlloc *alloc);
    131131void LzmaDec_FreeProbs(CLzmaDec *p, ISzAlloc *alloc);
     
    156156
    157157/* LzmaDec_DecodeToDic
    158    
     158
    159159   The decoding to internal dictionary buffer (CLzmaDec::dic).
    160160   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  
    1515-------------------------
    1616- 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
    1818    outside of allocated range.
    1919- Some changes in ANSI-C 7z Decoder interfaces.
     
    2929-------------------------
    3030- 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
    3232    allocated range in some rare cases.
    3333
     
    42424.57           2007-12-12
    4343-------------------------
    44 - Speed optimizations in Ñ++ LZMA Decoder. 
     44- Speed optimizations in Ñ++ LZMA Decoder.
    4545- Small changes for more compatibility with some C/C++ compilers.
    4646
     
    5252     - now it supports files larger than 4 GB.
    5353     - 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
    5555  was included to LZMA SDK.
    56  
     56
    5757
    58584.43           2006-06-04
    5959-------------------------
    6060- Small changes for more compatibility with some C/C++ compilers.
    61  
     61
    6262
    63634.42           2006-05-15
    6464-------------------------
    6565- Small changes in .h files in ANSI-C version.
    66  
     66
    6767
    68684.39 beta      2006-04-14
    6969-------------------------
    7070- 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
    7272  files larger than 2 GB with HC4 match finder (-mfhc4).
    73  
     73
    7474
    75754.37 beta      2005-04-06
    7676-------------------------
    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.
    7878
    7979
     
    8181-------------------------
    8282- 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
    8484    outside of allocated range.
    8585
     
    1521524.17           2005-04-18
    153153-------------------------
    154 - New example for RAM->RAM compressing/decompressing: 
     154- New example for RAM->RAM compressing/decompressing:
    155155  LZMA + BCJ (filter for x86 code):
    156156    - LzmaRam.h
     
    1631634.16           2005-03-29
    164164-------------------------
    165 - The bug was fixed in LzmaDecode.c (ANSI-C LZMA Decoder): 
     165- The bug was fixed in LzmaDecode.c (ANSI-C LZMA Decoder):
    166166   If _LZMA_OUT_READ was defined, and if encoded stream was corrupted,
    167167   decoder could access memory outside of allocated range.
    168168- 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.
    170170  LzmaDecodeSize.c can provide slightly smaller code than LzmaDecode.c
    171171- Small speed optimization in LZMA C++ code
     
    1821824.05           2004-08-25
    183183-------------------------
    184 - Source code of filters for x86, IA-64, ARM, ARM-Thumb 
     184- Source code of filters for x86, IA-64, ARM, ARM-Thumb
    185185  and PowerPC code was included to SDK
    186186- Some internal minor changes
     
    1941944.03           2004-06-18
    195195-------------------------
    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.
    198198  Also it checks hardware errors.
    199199
     
    224224HISTORY of the LZMA
    225225-------------------
    226   2001-2008:  Improvements to LZMA compressing/decompressing code, 
     226  2001-2008:  Improvements to LZMA compressing/decompressing code,
    227227              keeping compatibility with original LZMA format
    228228  1996-2001:  Development of LZMA compression format
     
    232232  2001-08-30: LZMA compression was added to 7-Zip
    233233  1999-01-02: First version of 7-Zip was released
    234  
     234
    235235
    236236End of document
  • trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/LzmaCustomDecompressLib/Sdk/lzma.txt

    r48674 r58466  
    22-------------
    33
    4 LZMA SDK provides the documentation, samples, header files, libraries, 
     4LZMA SDK provides the documentation, samples, header files, libraries,
    55and tools you need to develop applications that use LZMA compression.
    66
    77LZMA is default and general compression method of 7z format
    8 in 7-Zip compression program (www.7-zip.org). LZMA provides high 
     8in 7-Zip compression program (www.7-zip.org). LZMA provides high
    99compression ratio and very fast decompression.
    1010
    11 LZMA is an improved version of famous LZ77 compression algorithm. 
     11LZMA is an improved version of famous LZ77 compression algorithm.
    1212It was improved in way of maximum increasing of compression ratio,
    13 keeping high decompression speed and low memory requirements for 
     13keeping high decompression speed and low memory requirements for
    1414decompressing.
    1515
     
    3131
    3232
    33 UNIX/Linux version 
     33UNIX/Linux version
    3434------------------
    3535To compile C++ version of file->file LZMA encoding, go to directory
    36 C++/7zip/Compress/LZMA_Alone 
     36C++/7zip/Compress/LZMA_Alone
    3737and call make to recompile it:
    3838  make -f makefile.gcc clean all
    3939
    4040In some UNIX/Linux versions you must compile LZMA with static libraries.
    41 To compile with static libraries, you can use 
     41To compile with static libraries, you can use
    4242LIB = -lm -static
    4343
     
    6060        Alloc.*    - Memory allocation functions
    6161        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
    6363        LzFindMt.* - Match finder for LZ (LZMA) encoders for multithreading encoding
    6464        LzHash.h   - Additional file for LZ match finder
     
    7070
    7171    LzmaLib  - LZMA Library (.DLL for Windows)
    72    
     72
    7373    LzmaUtil - LZMA Utility (file->file LZMA encoder/decoder).
    7474
     
    9999
    100100    Bundles    - Modules that are bundles of other modules
    101  
     101
    102102      Alone7z           - 7zr.exe: Standalone version of 7z.exe that supports only 7z/LZMA/BCJ/BCJ2
    103103      Format7zR         - 7zr.dll: Reduced version of 7za.dll: extracting/compressing to 7z/LZMA/BCJ/BCJ2
     
    105105
    106106    UI        - User Interface files
    107          
     107
    108108      Client7z - Test application for 7za.dll,  7zr.dll, 7zxr.dll
    109109      Common   - Common UI files
     
    140140  - Variable dictionary size (up to 1 GB)
    141141  - Estimated compressing speed: about 2 MB/s on 2 GHz CPU
    142   - Estimated decompressing speed: 
     142  - Estimated decompressing speed:
    143143      - 20-30 MB/s on 2 GHz Core 2 or AMD Athlon 64
    144144      - 1-2 MB/s on 200 MHz ARM, MIPS, PowerPC or other simple RISC
     
    146146  - Small code size for decompressing: 5-8 KB
    147147
    148 LZMA decoder uses only integer operations and can be 
     148LZMA decoder uses only integer operations and can be
    149149implemented in any modern 32-bit CPU (or on 16-bit CPU with some conditions).
    150150
     
    155155
    156156The speed of LZMA decompressing mostly depends from CPU speed.
    157 Memory speed has no big meaning. But if your CPU has small data cache, 
     157Memory speed has no big meaning. But if your CPU has small data cache,
    158158overall weight of memory speed will slightly increase.
    159159
     
    171171  d: decode file
    172172
    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
    176176     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
    178178     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.
    180180     Also you can change the number of iterations. Example for 30 iterations:
    181181       LZMA b 30
     
    183183
    184184<Switches>
    185  
     185
    186186
    187187  -a{N}:  set compression mode 0 = fast, 1 = normal
     
    190190  d{N}:   Sets Dictionary size - [0, 30], default: 23 (8MB)
    191191          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
    194194          size D = 2^N you need about D bytes of memory (RAM).
    195195
    196196  -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
    198198          and slower compression process.
    199199
     
    202202
    203203  -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,
    207207          if you change lp switch.
    208208
    209209  -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
    211211          when period is equal 2^N.
    212212
    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
    216216              fast mode (-a0).
    217217
    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).
    220220
    221221               MF_ID     Memory                   Description
     
    226226                hc4    d *  7.5 + 4MB  Hash Chain with 4 bytes hashing.
    227227
    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
    230230          stored in .lzma file header.
    231231
     
    236236Examples:
    237237
    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 
     2381) LZMA e file.bin file.lzma -d16 -lc0
     239
     240compresses file.bin to file.lzma with 64 KB dictionary (2^16=64K)
     241and 0 literal context bits. -lc0 allows to reduce memory requirements
    242242for decompression.
    243243
     
    2452452) LZMA e file.bin file.lzma -lc0 -lp2
    246246
    247 compresses file.bin to file.lzma with settings suitable 
     247compresses file.bin to file.lzma with settings suitable
    248248for 32-bit periodical data (for example, ARM or MIPS code).
    249249
     
    259259---------------
    260260
    261 To increase the compression ratio for LZMA compressing it's desirable 
     261To increase the compression ratio for LZMA compressing it's desirable
    262262to 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 
     263data in such order, where code is grouped in one place and data is
    264264grouped in other place (it's better than such mixing: code, data, code,
    265265data, ...).
     
    269269-------
    270270You 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: 
     271special filters before compressing. For example, it's possible to
     272increase the compression ratio on 5-10% for code for those CPU ISAs:
    273273x86, IA-64, ARM, ARM-Thumb, PowerPC, SPARC.
    274274
    275275You can find C source code of such filters in C/Bra*.* files
    276276
    277 You can check the compression ratio gain of these filters with such 
     277You can check the compression ratio gain of these filters with such
    2782787-Zip commands (example for ARM code):
    279279No filter:
     
    281281
    282282With 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
    284284
    285285It works in such manner:
     
    289289Compressing and decompressing speed of such filters is very high,
    290290so it will not increase decompressing time too much.
    291 Moreover, it reduces decompression time for LZMA_decoding, 
     291Moreover, it reduces decompression time for LZMA_decoding,
    292292since compression ratio with filtering is higher.
    293293
    294 These filters convert CALL (calling procedure) instructions 
    295 from relative offsets to absolute addresses, so such data becomes more 
     294These filters convert CALL (calling procedure) instructions
     295from relative offsets to absolute addresses, so such data becomes more
    296296compressible.
    297297
     
    323323-------------------------------------
    324324
    325 Stack usage of LZMA decoding function for local variables is not 
     325Stack usage of LZMA decoding function for local variables is not
    326326larger than 200-400 bytes.
    327327
     
    356356  - Input buffer: compressed size
    357357  - 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)
    359359
    360360Interface:
    361361  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,
    363363      ELzmaStatus *status, ISzAlloc *alloc);
    364   In: 
     364  In:
    365365    dest     - output data
    366366    destLen  - output data size
     
    372372         LZMA_FINISH_ANY - Decode just destLen bytes.
    373373         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.
    376376    alloc    - Memory allocator.
    377377
    378   Out: 
    379     destLen  - processed output size 
    380     srcLen   - processed input size 
     378  Out:
     379    destLen  - processed output size
     380    srcLen   - processed input size
    381381
    382382  Output:
     
    384384      status:
    385385        LZMA_STATUS_FINISHED_WITH_MARK
    386         LZMA_STATUS_NOT_FINISHED 
     386        LZMA_STATUS_NOT_FINISHED
    387387        LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK
    388388    SZ_ERROR_DATA - Data error
     
    397397    1) Check Result and "status" variable.
    398398    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. */
    401401
    402402
     
    404404----------------------------------------------------
    405405
    406 When to use: file->file decompressing 
     406When to use: file->file decompressing
    407407Compile files: LzmaDec.h + LzmaDec.c + Types.h
    408408
     
    410410 - Buffer for input stream: any size (for example, 16 KB)
    411411 - 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)
    413413 - LZMA dictionary (dictionary size is encoded in LZMA properties header)
    414414
     
    430430  for (;;)
    431431  {
    432     ... 
    433     int res = LzmaDec_DecodeToBuf(CLzmaDec *p, Byte *dest, SizeT *destLen, 
     432    ...
     433    int res = LzmaDec_DecodeToBuf(CLzmaDec *p, Byte *dest, SizeT *destLen,
    434434        const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode);
    435435    ...
     
    4564562) allocBig - for big arrays.
    457457
    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. 
     458For example, you can use Large RAM Pages (2 MB) in allocBig allocator for
     459better compression speed. Note that Windows has bad implementation for
     460Large RAM Pages.
    461461It's OK to use same allocator for alloc and allocBig.
    462462
     
    465465--------------------------------------
    466466
    467 Check C/LzmaUtil/LzmaUtil.c as example, 
    468 
    469 When to use: file->file decompressing 
     467Check C/LzmaUtil/LzmaUtil.c as example,
     468
     469When to use: file->file decompressing
    470470
    4714711) you must implement callback structures for interfaces:
     
    521521
    5225226) Call encoding function:
    523       res = LzmaEnc_Encode(enc, &outStream.funcTable, &inStream.funcTable, 
     523      res = LzmaEnc_Encode(enc, &outStream.funcTable, &inStream.funcTable,
    524524        NULL, &g_Alloc, &g_Alloc);
    525525
     
    538538
    539539HRes 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,
    541541    ICompressProgress *progress, ISzAlloc *alloc, ISzAlloc *allocBig);
    542542
    543543Return code:
    544544  SZ_OK               - OK
    545   SZ_ERROR_MEM        - Memory allocation error 
     545  SZ_ERROR_MEM        - Memory allocation error
    546546  SZ_ERROR_PARAM      - Incorrect paramater
    547547  SZ_ERROR_OUTPUT_EOF - output buffer overflow
     
    555555_LZMA_SIZE_OPT - Enable some optimizations in LZMA Decoder to get smaller executable code.
    556556
    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
    558558                 some structures will be doubled in that case.
    559559
     
    563563
    564564
    565 C++ LZMA Encoder/Decoder 
     565C++ LZMA Encoder/Decoder
    566566~~~~~~~~~~~~~~~~~~~~~~~~
    567 C++ LZMA code use COM-like interfaces. So if you want to use it, 
     567C++ LZMA code use COM-like interfaces. So if you want to use it,
    568568you can study basics of COM/OLE.
    569569C++ LZMA code is just wrapper over ANSI-C code.
     
    583583  return p;
    584584}
    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 
     585If 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
    5875877-Zip catches any exception in internal code and converts it to HRESULT code.
    588588So 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  
    3131  Prints a debug message to the debug output device if the specified error level is enabled.
    3232
    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
    3535  associated variable argument list to the debug output device.
    3636
     
    4242  @param  ErrorLevel  The error level of the debug message.
    4343  @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
    4545                      based on the format string specified by Format.
    4646
     
    7676  //
    7777  // 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
    7979  // the following layout:
    8080  //
     
    166166        //
    167167        // 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.
    169169        //
    170170        Format--;
     
    176176      break;
    177177    }
    178    
     178
    179179    //
    180180    // Pack variable arguments into the storage area following EFI_DEBUG_INFO.
     
    199199    //
    200200    // 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
    202202    // the EFI_DEBUG_INFO record
    203203    //
     
    229229
    230230/**
    231   Prints an assert message containing a filename, line number, and description. 
     231  Prints an assert message containing a filename, line number, and description.
    232232  This may be followed by a breakpoint or a dead loop.
    233233
    234234  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
    239239  returns immediately after the message is printed to the debug output device.
    240240  DebugAssert() must actively prevent recursion.  If DebugAssert() is called while
     
    277277  if (HeaderSize + FileNameSize + DescriptionSize > sizeof (Buffer)) {
    278278    //
    279     // FileName + Description is too long to be filled into buffer. 
     279    // FileName + Description is too long to be filled into buffer.
    280280    //
    281281    if (HeaderSize + FileNameSize < sizeof (Buffer)) {
    282282      //
    283       // Description has enough buffer to be truncated. 
     283      // Description has enough buffer to be truncated.
    284284      //
    285285      DescriptionSize = sizeof (Buffer) - HeaderSize - FileNameSize;
     
    293293    }
    294294  }
    295  
     295
    296296  //
    297297  // Fill in EFI_DEBUG_ASSERT_DATA
     
    339339  Fills a target buffer with PcdDebugClearMemoryValue, and returns the target buffer.
    340340
    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
    342342  PcdDebugClearMemoryValue, and returns Buffer.
    343343
    344344  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().
    346346
    347347  @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.
    349349
    350350  @return  Buffer  Pointer to the target buffer filled with PcdDebugClearMemoryValue.
     
    367367  Returns TRUE if ASSERT() macros are enabled.
    368368
    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
    370370  PcdDebugProperyMask is set.  Otherwise FALSE is returned.
    371371
     
    384384
    385385
    386 /** 
     386/**
    387387  Returns TRUE if DEBUG() macros are enabled.
    388388
    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
    390390  PcdDebugProperyMask is set.  Otherwise FALSE is returned.
    391391
     
    404404
    405405
    406 /** 
     406/**
    407407  Returns TRUE if DEBUG_CODE() macros are enabled.
    408408
    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
    410410  PcdDebugProperyMask is set.  Otherwise FALSE is returned.
    411411
     
    424424
    425425
    426 /** 
     426/**
    427427  Returns TRUE if DEBUG_CLEAR_MEMORY() macro is enabled.
    428428
    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
    430430  PcdDebugProperyMask is set.  Otherwise FALSE is returned.
    431431
  • trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebugLibReportStatusCode.inf

    r58459 r58466  
    3737  MdePkg/MdePkg.dec
    3838  MdeModulePkg/MdeModulePkg.dec
    39  
     39
    4040[LibraryClasses]
    4141  PcdLib
  • trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/PeiRecoveryLib/PeiRecoveryLib.c

    r48674 r58466  
    44  This library instance is no longer used and module using this library
    55  class should update to directly locate EFI_PEI_RECOVERY_MODULE_PPI defined
    6   in PI 1.2 specification. 
     6  in PI 1.2 specification.
    77
    88Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
     
    2525/**
    2626  Calling this function causes the system do recovery.
    27  
     27
    2828  @retval EFI_SUCESS   Sucess to do recovery.
    2929  @retval Others       Fail to do recovery.
     
    3737  EFI_STATUS                      Status;
    3838  EFI_PEI_RECOVERY_MODULE_PPI     *PeiRecovery;
    39  
     39
    4040  Status = PeiServicesLocatePpi (
    4141             &gEfiPeiRecoveryModulePpiGuid,
  • trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/PeiRecoveryLib/PeiRecoveryLib.inf

    r58459 r58466  
    44#  This library instance is no longer used and module using this library
    55#  class should update to directly locate EFI_PEI_RECOVERY_MODULE_PPI defined
    6 #  in PI 1.2 specification. 
     6#  in PI 1.2 specification.
    77#
    88#  Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
     
    4747[Ppis]
    4848  gEfiPeiRecoveryModulePpiGuid            ## CONSUMES
     49
    4950 
    50  
  • trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/PeiS3Lib/PeiS3Lib.c

    r48674 r58466  
    11/** @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.
    33
    44  This library instance is no longer used and module using this library
    55  class should update to directly locate EFI_PEI_S3_RESUME_PPI defined
    6   in PI 1.2 specification. 
     6  in PI 1.2 specification.
    77
    88Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
     
    2626/**
    2727  This function is responsible for calling the S3 resume vector in the ACPI Tables.
    28  
     28
    2929  @retval EFI_SUCESS   Success to restore config from S3.
    3030  @retval Others       Fail to restore config from S3.
     
    3838  EFI_STATUS              Status;
    3939  EFI_PEI_S3_RESUME_PPI   *S3Resume;
    40  
     40
    4141  Status = PeiServicesLocatePpi (
    4242             &gEfiPeiS3ResumePpiGuid,
     
    4747  ASSERT_EFI_ERROR (Status);
    4848
    49   return S3Resume->S3RestoreConfig ((EFI_PEI_SERVICES  **) GetPeiServicesTablePointer()); 
     49  return S3Resume->S3RestoreConfig ((EFI_PEI_SERVICES  **) GetPeiServicesTablePointer());
    5050}
    5151
  • trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/PeiS3Lib/PeiS3Lib.inf

    r58459 r58466  
    44#  This library instance is no longer used and module using this library
    55#  class should update to directly locate EFI_PEI_S3_RESUME_PPI defined
    6 #  in PI 1.2 specification. 
     6#  in PI 1.2 specification.
    77#
    88#  Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
  • trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/PlatformBdsLibNull/PlatformBdsLibNull.inf

    r58459 r58466  
    11## @file
    22#  NULL implementation for PlatformBdsLib library class interfaces.
    3 # 
     3#
    44#  Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
    55#  This program and the accompanying materials
     
    77#  which accompanies this distribution.  The full text of the license may be found at
    88#  http://opensource.org/licenses/bsd-license.php
    9 # 
     9#
    1010#  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
    1111#  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
    12 # 
     12#
    1313##
    1414
     
    2020  MODULE_TYPE                    = DXE_DRIVER
    2121  VERSION_STRING                 = 1.0
    22   LIBRARY_CLASS                  = PlatformBdsLib|DXE_DRIVER   
     22  LIBRARY_CLASS                  = PlatformBdsLib|DXE_DRIVER
    2323
    2424#
     
    3737  MdeModulePkg/MdeModulePkg.dec
    3838  IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec
    39  
     39
    4040[LibraryClasses]
    4141  BaseLib
  • trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/SmmRuntimeDxeReportStatusCodeLibFramework/SmmRuntimeDxeReportStatusCodeLibFramework.inf

    r58459 r58466  
    2626  VERSION_STRING                 = 1.0
    2727  LIBRARY_CLASS                  = ReportStatusCodeLib|DXE_RUNTIME_DRIVER DXE_SMM_DRIVER
    28  
     28
    2929  CONSTRUCTOR                    = ReportStatusCodeLibConstruct
    3030  DESTRUCTOR                     = ReportStatusCodeLibDestruct
  • trunk/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg/Library/SmmRuntimeDxeReportStatusCodeLibFramework/SmmRuntimeDxeSupport.c

    r48674 r58466  
    2727/**
    2828  Locates and caches SMM Status Code Protocol.
    29  
     29
    3030**/
    3131VOID
     
    4444/**
    4545  Report status code via SMM Status Code Protocol.
    46  
     46
    4747  @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,
    5555                        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.
    5858  @param  Data          This optional parameter may be used to pass additional data
    59  
     59
    6060  @retval EFI_SUCCESS   Always return EFI_SUCCESS.
    6161
     
    157157      }
    158158    }
    159  
     159
    160160    //
    161161    // A status code service is present in system, so pass in all the parameters to the service.
     
    163163    return (*mReportStatusCode) (Type, Value, Instance, (EFI_GUID *)CallerId, Data);
    164164  }
    165  
     165
    166166  return EFI_UNSUPPORTED;
    167167}
     
    221221  @param  ImageHandle   The firmware allocated handle for the EFI image.
    222222  @param  SystemTable   A pointer to the EFI System Table.
    223  
     223
    224224  @retval EFI_SUCCESS   The constructor always returns EFI_SUCCESS.
    225225
     
    243243      Status = mSmmBase->SmmAllocatePool (
    244244                           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,
    247247                           (VOID **) &mStatusCodeData
    248248                           );
     
    258258  //
    259259  // Library should not use the gRT directly, for it may be converted by other library instance.
    260   // 
     260  //
    261261  mInternalRT = gRT;
    262262  mInSmm      = FALSE;
     
    266266  //
    267267  // Cache the report status code service
    268   // 
     268  //
    269269  mReportStatusCode = InternalGetReportStatusCode ();
    270270
    271271  //
    272272  // Register notify function for EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE
    273   // 
     273  //
    274274  Status = gBS->CreateEventEx (
    275275                  EVT_NOTIFY_SIGNAL,
     
    284284  //
    285285  // Register notify function for EVT_SIGNAL_EXIT_BOOT_SERVICES
    286   // 
     286  //
    287287  Status = gBS->CreateEventEx (
    288288                  EVT_NOTIFY_SIGNAL,
     
    300300/**
    301301  The destructor function of SMM Runtime DXE Report Status Code Lib.
    302  
     302
    303303  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.
    305305
    306306  @param  ImageHandle   The firmware allocated handle for the EFI image.
    307307  @param  SystemTable   A pointer to the EFI System Table.
    308  
     308
    309309  @retval EFI_SUCCESS   The constructor always returns EFI_SUCCESS.
    310310
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette