VirtualBox

Ignore:
Timestamp:
Oct 28, 2015 8:17:18 PM (9 years ago)
Author:
vboxsync
Message:

EFI/Firmware: 'svn merge /vendor/edk2/UDK2010.SR1 /vendor/edk2/current .', reverting and removing files+dirs listed in ReadMe.vbox, resolving conflicts with help from ../UDK2014.SP1/. This is a raw untested merge.

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

Legend:

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

  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseLib/BitField.c

    r48674 r58459  
    22  Bit field functions of BaseLib.
    33
    4   Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
     4  Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
    55  This program and the accompanying materials
    66  are licensed and made available under the terms and conditions of the BSD License
     
    5050  preserved. The new value is returned.
    5151
     52  If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
     53
    5254  @param  Operand   Operand on which to perform the bitfield operation.
    5355  @param  StartBit  The ordinal of the least significant bit in the bit field.
     
    6769  )
    6870{
     71  //
     72  // Higher bits in OrData those are not used must be zero.
     73  //
     74  // EndBit - StartBit + 1 might be 32 while the result right shifting 32 on a 32bit integer is undefined,
     75  // So the logic is updated to right shift (EndBit - StartBit) bits and compare the last bit directly.
     76  //
     77  ASSERT ((OrData >> (EndBit - StartBit)) == ((OrData >> (EndBit - StartBit)) & 1));
     78 
    6979  //
    7080  // ~((UINTN)-2 << EndBit) is a mask in which bit[0] thru bit[EndBit]
     
    8292  preserved. The new value is returned.
    8393
     94  If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
     95
    8496  @param  Operand   Operand on which to perform the bitfield operation.
    8597  @param  StartBit  The ordinal of the least significant bit in the bit field.
     
    99111  )
    100112{
     113  //
     114  // Higher bits in AndData those are not used must be zero.
     115  //
     116  // EndBit - StartBit + 1 might be 32 while the result right shifting 32 on a 32bit integer is undefined,
     117  // So the logic is updated to right shift (EndBit - StartBit) bits and compare the last bit directly.
     118  //
     119  ASSERT ((AndData >> (EndBit - StartBit)) == ((AndData >> (EndBit - StartBit)) & 1));
     120
    101121  //
    102122  // ~((UINTN)-2 << EndBit) is a mask in which bit[0] thru bit[EndBit]
     
    149169  If EndBit is greater than 7, then ASSERT().
    150170  If EndBit is less than StartBit, then ASSERT().
     171  If Value is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
    151172
    152173  @param  Operand   Operand on which to perform the bitfield operation.
     
    186207  If EndBit is greater than 7, then ASSERT().
    187208  If EndBit is less than StartBit, then ASSERT().
     209  If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
    188210
    189211  @param  Operand   Operand on which to perform the bitfield operation.
     
    223245  If EndBit is greater than 7, then ASSERT().
    224246  If EndBit is less than StartBit, then ASSERT().
     247  If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
    225248
    226249  @param  Operand   Operand on which to perform the bitfield operation.
     
    261284  If EndBit is greater than 7, then ASSERT().
    262285  If EndBit is less than StartBit, then ASSERT().
     286  If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
     287  If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
    263288
    264289  @param  Operand   Operand on which to perform the bitfield operation.
     
    336361  If EndBit is greater than 15, then ASSERT().
    337362  If EndBit is less than StartBit, then ASSERT().
     363  If Value is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
    338364
    339365  @param  Operand   Operand on which to perform the bitfield operation.
     
    373399  If EndBit is greater than 15, then ASSERT().
    374400  If EndBit is less than StartBit, then ASSERT().
     401  If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
    375402
    376403  @param  Operand   Operand on which to perform the bitfield operation.
     
    410437  If EndBit is greater than 15, then ASSERT().
    411438  If EndBit is less than StartBit, then ASSERT().
     439  If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
    412440
    413441  @param  Operand   Operand on which to perform the bitfield operation.
     
    448476  If EndBit is greater than 15, then ASSERT().
    449477  If EndBit is less than StartBit, then ASSERT().
     478  If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
     479  If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
    450480
    451481  @param  Operand   Operand on which to perform the bitfield operation.
     
    523553  If EndBit is greater than 31, then ASSERT().
    524554  If EndBit is less than StartBit, then ASSERT().
     555  If Value is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
    525556
    526557  @param  Operand   Operand on which to perform the bitfield operation.
     
    560591  If EndBit is greater than 31, then ASSERT().
    561592  If EndBit is less than StartBit, then ASSERT().
     593  If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
    562594
    563595  @param  Operand   Operand on which to perform the bitfield operation.
     
    597629  If EndBit is greater than 31, then ASSERT().
    598630  If EndBit is less than StartBit, then ASSERT().
     631  If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
    599632
    600633  @param  Operand   Operand on which to perform the bitfield operation.
     
    635668  If EndBit is greater than 31, then ASSERT().
    636669  If EndBit is less than StartBit, then ASSERT().
     670  If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
     671  If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
    637672
    638673  @param  Operand   Operand on which to perform the bitfield operation.
     
    710745  If EndBit is greater than 63, then ASSERT().
    711746  If EndBit is less than StartBit, then ASSERT().
     747  If Value is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
    712748
    713749  @param  Operand   Operand on which to perform the bitfield operation.
     
    747783  If EndBit is greater than 63, then ASSERT().
    748784  If EndBit is less than StartBit, then ASSERT().
     785  If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
    749786
    750787  @param  Operand   Operand on which to perform the bitfield operation.
     
    772809  ASSERT (EndBit < 64);
    773810  ASSERT (StartBit <= EndBit);
     811  //
     812  // Higher bits in OrData those are not used must be zero.
     813  //
     814  // EndBit - StartBit + 1 might be 64 while the result right shifting 64 on RShiftU64() API is invalid,
     815  // So the logic is updated to right shift (EndBit - StartBit) bits and compare the last bit directly.
     816  //
     817  ASSERT (RShiftU64 (OrData, EndBit - StartBit) == (RShiftU64 (OrData, EndBit - StartBit) & 1));
    774818
    775819  Value1 = LShiftU64 (OrData, StartBit);
     
    791835  If EndBit is greater than 63, then ASSERT().
    792836  If EndBit is less than StartBit, then ASSERT().
     837  If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
    793838
    794839  @param  Operand   Operand on which to perform the bitfield operation.
     
    816861  ASSERT (EndBit < 64);
    817862  ASSERT (StartBit <= EndBit);
     863  //
     864  // Higher bits in AndData those are not used must be zero.
     865  //
     866  // EndBit - StartBit + 1 might be 64 while the right shifting 64 on RShiftU64() API is invalid,
     867  // So the logic is updated to right shift (EndBit - StartBit) bits and compare the last bit directly.
     868  //
     869  ASSERT (RShiftU64 (AndData, EndBit - StartBit) == (RShiftU64 (AndData, EndBit - StartBit) & 1));
    818870
    819871  Value1 = LShiftU64 (~AndData, StartBit);
     
    836888  If EndBit is greater than 63, then ASSERT().
    837889  If EndBit is less than StartBit, then ASSERT().
     890  If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
     891  If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
    838892
    839893  @param  Operand   Operand on which to perform the bitfield operation.
Note: See TracChangeset for help on using the changeset viewer.

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