VirtualBox

Ignore:
Timestamp:
Oct 29, 2015 4:30:44 AM (9 years ago)
Author:
vboxsync
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:
2 edited

Legend:

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

  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/PeiIoLibCpuIo/IoLibMmioBuffer.c

    r48674 r58466  
    2525  Copy data from MMIO region to system memory by using 8-bit access.
    2626
    27   Copy data from MMIO region specified by starting address StartAddress 
    28   to system memory specified by Buffer by using 8-bit access. The total 
     27  Copy data from MMIO region specified by starting address StartAddress
     28  to system memory specified by Buffer by using 8-bit access. The total
    2929  number of byte to be copied is specified by Length. Buffer is returned.
    30  
    31   If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT(). 
     30
     31  If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
    3232  If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
    3333
     
    5252  ASSERT ((Length - 1) <=  (MAX_ADDRESS - StartAddress));
    5353  ASSERT ((Length - 1) <=  (MAX_ADDRESS - (UINTN) Buffer));
    54  
     54
    5555  ReturnBuffer = Buffer;
    56  
     56
    5757  while (Length-- != 0) {
    5858    *(Buffer++) = MmioRead8 (StartAddress++);
     
    6565  Copy data from MMIO region to system memory by using 16-bit access.
    6666
    67   Copy data from MMIO region specified by starting address StartAddress 
    68   to system memory specified by Buffer by using 16-bit access. The total 
     67  Copy data from MMIO region specified by starting address StartAddress
     68  to system memory specified by Buffer by using 16-bit access. The total
    6969  number of byte to be copied is specified by Length. Buffer is returned.
    70  
     70
    7171  If StartAddress is not aligned on a 16-bit boundary, then ASSERT().
    7272
    73   If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT(). 
     73  If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
    7474  If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
    7575
     
    9595
    9696  ASSERT ((StartAddress & (sizeof (UINT16) - 1)) == 0);
    97  
     97
    9898  ASSERT ((Length - 1) <=  (MAX_ADDRESS - StartAddress));
    9999  ASSERT ((Length - 1) <=  (MAX_ADDRESS - (UINTN) Buffer));
     
    101101  ASSERT ((Length & (sizeof (UINT16) - 1)) == 0);
    102102  ASSERT (((UINTN) Buffer & (sizeof (UINT16) - 1)) == 0);
    103  
     103
    104104  ReturnBuffer = Buffer;
    105  
     105
    106106  while (Length != 0) {
    107107    *(Buffer++) = MmioRead16 (StartAddress);
     
    116116  Copy data from MMIO region to system memory by using 32-bit access.
    117117
    118   Copy data from MMIO region specified by starting address StartAddress 
    119   to system memory specified by Buffer by using 32-bit access. The total 
     118  Copy data from MMIO region specified by starting address StartAddress
     119  to system memory specified by Buffer by using 32-bit access. The total
    120120  number of byte to be copied is specified by Length. Buffer is returned.
    121  
     121
    122122  If StartAddress is not aligned on a 32-bit boundary, then ASSERT().
    123123
    124   If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT(). 
     124  If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
    125125  If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
    126126
     
    146146
    147147  ASSERT ((StartAddress & (sizeof (UINT32) - 1)) == 0);
    148  
     148
    149149  ASSERT ((Length - 1) <=  (MAX_ADDRESS - StartAddress));
    150150  ASSERT ((Length - 1) <=  (MAX_ADDRESS - (UINTN) Buffer));
     
    152152  ASSERT ((Length & (sizeof (UINT32) - 1)) == 0);
    153153  ASSERT (((UINTN) Buffer & (sizeof (UINT32) - 1)) == 0);
    154  
     154
    155155  ReturnBuffer = Buffer;
    156  
     156
    157157  while (Length != 0) {
    158158    *(Buffer++) = MmioRead32 (StartAddress);
     
    167167  Copy data from MMIO region to system memory by using 64-bit access.
    168168
    169   Copy data from MMIO region specified by starting address StartAddress 
    170   to system memory specified by Buffer by using 64-bit access. The total 
     169  Copy data from MMIO region specified by starting address StartAddress
     170  to system memory specified by Buffer by using 64-bit access. The total
    171171  number of byte to be copied is specified by Length. Buffer is returned.
    172  
     172
    173173  If StartAddress is not aligned on a 64-bit boundary, then ASSERT().
    174174
    175   If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT(). 
     175  If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
    176176  If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
    177177
     
    197197
    198198  ASSERT ((StartAddress & (sizeof (UINT64) - 1)) == 0);
    199  
     199
    200200  ASSERT ((Length - 1) <=  (MAX_ADDRESS - StartAddress));
    201201  ASSERT ((Length - 1) <=  (MAX_ADDRESS - (UINTN) Buffer));
     
    203203  ASSERT ((Length & (sizeof (UINT64) - 1)) == 0);
    204204  ASSERT (((UINTN) Buffer & (sizeof (UINT64) - 1)) == 0);
    205  
     205
    206206  ReturnBuffer = Buffer;
    207  
     207
    208208  while (Length != 0) {
    209209    *(Buffer++) = MmioRead64 (StartAddress);
     
    219219  Copy data from system memory to MMIO region by using 8-bit access.
    220220
    221   Copy data from system memory specified by Buffer to MMIO region specified 
    222   by starting address StartAddress by using 8-bit access. The total number 
     221  Copy data from system memory specified by Buffer to MMIO region specified
     222  by starting address StartAddress by using 8-bit access. The total number
    223223  of byte to be copied is specified by Length. Buffer is returned.
    224  
    225   If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT(). 
     224
     225  If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
    226226  If Length is greater than (MAX_ADDRESS -Buffer + 1), then ASSERT().
    227227
     
    246246  ASSERT ((Length - 1) <=  (MAX_ADDRESS - StartAddress));
    247247  ASSERT ((Length - 1) <=  (MAX_ADDRESS - (UINTN) Buffer));
    248  
     248
    249249  ReturnBuffer = (UINT8 *) Buffer;
    250  
     250
    251251  while (Length-- != 0) {
    252252     MmioWrite8 (StartAddress++, *(Buffer++));
     
    254254
    255255  return ReturnBuffer;
    256  
     256
    257257}
    258258
     
    260260  Copy data from system memory to MMIO region by using 16-bit access.
    261261
    262   Copy data from system memory specified by Buffer to MMIO region specified 
    263   by starting address StartAddress by using 16-bit access. The total number 
     262  Copy data from system memory specified by Buffer to MMIO region specified
     263  by starting address StartAddress by using 16-bit access. The total number
    264264  of byte to be copied is specified by Length. Buffer is returned.
    265  
     265
    266266  If StartAddress is not aligned on a 16-bit boundary, then ASSERT().
    267267
    268   If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT(). 
     268  If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
    269269  If Length is greater than (MAX_ADDRESS -Buffer + 1), then ASSERT().
    270270
     
    291291
    292292  ASSERT ((StartAddress & (sizeof (UINT16) - 1)) == 0);
    293  
     293
    294294  ASSERT ((Length - 1) <=  (MAX_ADDRESS - StartAddress));
    295295  ASSERT ((Length - 1) <=  (MAX_ADDRESS - (UINTN) Buffer));
     
    299299
    300300  ReturnBuffer = (UINT16 *) Buffer;
    301  
     301
    302302  while (Length != 0) {
    303303    MmioWrite16 (StartAddress, *(Buffer++));
    304    
     304
    305305    StartAddress += sizeof (UINT16);
    306306    Length -= sizeof (UINT16);
     
    314314  Copy data from system memory to MMIO region by using 32-bit access.
    315315
    316   Copy data from system memory specified by Buffer to MMIO region specified 
    317   by starting address StartAddress by using 32-bit access. The total number 
     316  Copy data from system memory specified by Buffer to MMIO region specified
     317  by starting address StartAddress by using 32-bit access. The total number
    318318  of byte to be copied is specified by Length. Buffer is returned.
    319  
     319
    320320  If StartAddress is not aligned on a 32-bit boundary, then ASSERT().
    321321
    322   If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT(). 
     322  If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
    323323  If Length is greater than (MAX_ADDRESS -Buffer + 1), then ASSERT().
    324324
     
    345345
    346346  ASSERT ((StartAddress & (sizeof (UINT32) - 1)) == 0);
    347  
     347
    348348  ASSERT ((Length - 1) <=  (MAX_ADDRESS - StartAddress));
    349349  ASSERT ((Length - 1) <=  (MAX_ADDRESS - (UINTN) Buffer));
     
    353353
    354354  ReturnBuffer = (UINT32 *) Buffer;
    355  
     355
    356356  while (Length != 0) {
    357357    MmioWrite32 (StartAddress, *(Buffer++));
    358    
     358
    359359    StartAddress += sizeof (UINT32);
    360360    Length -= sizeof (UINT32);
     
    367367  Copy data from system memory to MMIO region by using 64-bit access.
    368368
    369   Copy data from system memory specified by Buffer to MMIO region specified 
    370   by starting address StartAddress by using 64-bit access. The total number 
     369  Copy data from system memory specified by Buffer to MMIO region specified
     370  by starting address StartAddress by using 64-bit access. The total number
    371371  of byte to be copied is specified by Length. Buffer is returned.
    372  
     372
    373373  If StartAddress is not aligned on a 64-bit boundary, then ASSERT().
    374374
    375   If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT(). 
     375  If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
    376376  If Length is greater than (MAX_ADDRESS -Buffer + 1), then ASSERT().
    377377
     
    398398
    399399  ASSERT ((StartAddress & (sizeof (UINT64) - 1)) == 0);
    400  
     400
    401401  ASSERT ((Length - 1) <=  (MAX_ADDRESS - StartAddress));
    402402  ASSERT ((Length - 1) <=  (MAX_ADDRESS - (UINTN) Buffer));
     
    406406
    407407  ReturnBuffer = (UINT64 *) Buffer;
    408  
     408
    409409  while (Length != 0) {
    410410    MmioWrite64 (StartAddress, *(Buffer++));
    411    
     411
    412412    StartAddress += sizeof (UINT64);
    413413    Length -= sizeof (UINT64);
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