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:
347 edited

Legend:

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

  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseCacheMaintenanceLib/ArmCache.c

    r48674 r58466  
    11/** @file
    2   Cache Maintenance Functions. These functions vary by ARM architecture so the MdePkg 
    3   versions are null functions used to make sure things will compile. 
     2  Cache Maintenance Functions. These functions vary by ARM architecture so the MdePkg
     3  versions are null functions used to make sure things will compile.
    44
    55  Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseCacheMaintenanceLib/BaseCacheMaintenanceLib.inf

    r58459 r58466  
    2525  MODULE_TYPE                    = BASE
    2626  VERSION_STRING                 = 1.0
    27   LIBRARY_CLASS                  = CacheMaintenanceLib 
     27  LIBRARY_CLASS                  = CacheMaintenanceLib
    2828
    2929
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseCacheMaintenanceLib/IpfCache.c

    r48674 r58466  
    195195{
    196196  //
    197   // Invalidation of the entire data cache without writing back is not supported 
     197  // Invalidation of the entire data cache without writing back is not supported
    198198  // on IPF architecture, so a write back and invalidate operation is performed.
    199199  //
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseCacheMaintenanceLib/X86Cache.c

    r58459 r58466  
    141141  //
    142142  // Calculate the cache line alignment
    143   // 
     143  //
    144144  End = (Start + Length + (CACHE_LINE_SIZE - 1)) & ~(CACHE_LINE_SIZE - 1);
    145145  Start &= ~((UINTN) CACHE_LINE_SIZE - 1);
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseCpuLib/Arm/CpuFlushTlb.S

    r48674 r58466  
    1 #------------------------------------------------------------------------------ 
     1#------------------------------------------------------------------------------
    22#
    33# CpuFlushTlb() for ARM
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseCpuLib/Arm/CpuFlushTlb.asm

    r48674 r58466  
    1 ;------------------------------------------------------------------------------ 
     1;------------------------------------------------------------------------------
    22;
    33; CpuFlushTlb() for ARM
     
    3030;  );
    3131;
    32 CpuFlushTlb 
     32CpuFlushTlb
    3333    MOV r0,#0
    3434    MCR p15,0,r0,c8,c5,0        ;Invalidate all the unlocked entried in TLB
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseCpuLib/Arm/CpuSleep.S

    r48674 r58466  
    1 #------------------------------------------------------------------------------ 
     1#------------------------------------------------------------------------------
    22#
    33# CpuSleep() for ARMv7
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseCpuLib/Arm/CpuSleep.asm

    r48674 r58466  
    1 ;------------------------------------------------------------------------------ 
     1;------------------------------------------------------------------------------
    22;
    33; CpuSleep() for ARMv7
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseCpuLib/BaseCpuLib.inf

    r58459 r58466  
    2626  MODULE_TYPE                    = BASE
    2727  VERSION_STRING                 = 1.0
    28   LIBRARY_CLASS                  = CpuLib 
     28  LIBRARY_CLASS                  = CpuLib
    2929
    3030
     
    3434
    3535[Sources.IA32]
    36   Ia32/CpuSleep.c | MSFT 
    37   Ia32/CpuFlushTlb.c | MSFT 
     36  Ia32/CpuSleep.c | MSFT
     37  Ia32/CpuFlushTlb.c | MSFT
    3838
    39   Ia32/CpuSleep.asm | INTEL 
    40   Ia32/CpuFlushTlb.asm | INTEL 
     39  Ia32/CpuSleep.asm | INTEL
     40  Ia32/CpuFlushTlb.asm | INTEL
    4141
    42   Ia32/CpuSleepGcc.c | GCC 
    43   Ia32/CpuFlushTlbGcc.c | GCC 
     42  Ia32/CpuSleepGcc.c | GCC
     43  Ia32/CpuFlushTlbGcc.c | GCC
    4444
    4545[Sources.X64]
    46   X64/CpuFlushTlb.asm 
     46  X64/CpuFlushTlb.asm
    4747  X64/CpuSleep.asm
    4848
    49   X64/CpuSleep.S | GCC 
    50   X64/CpuFlushTlb.S | GCC 
     49  X64/CpuSleep.S | GCC
     50  X64/CpuFlushTlb.S | GCC
    5151
    5252[Sources.IPF]
     
    5959[Sources.ARM]
    6060  Arm/CpuFlushTlb.asm | RVCT
    61   Arm/CpuSleep.asm    | RVCT 
     61  Arm/CpuSleep.asm    | RVCT
    6262  Arm/CpuFlushTlb.S   | GCC
    63   Arm/CpuSleep.S      | GCC 
     63  Arm/CpuSleep.S      | GCC
    6464
    6565[Sources.AARCH64]
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseCpuLib/X64/CpuFlushTlb.S

    r48674 r58466  
    1 #------------------------------------------------------------------------------ 
     1#------------------------------------------------------------------------------
    22# Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
    33# This program and the accompanying materials
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf

    r58459 r58466  
    2121  MODULE_TYPE                    = BASE
    2222  VERSION_STRING                 = 1.0
    23   LIBRARY_CLASS                  = DebugLib 
     23  LIBRARY_CLASS                  = DebugLib
    2424
    2525
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseDebugLibNull/DebugLib.c

    r58459 r58466  
    1919  Prints a debug message to the debug output device if the specified error level is enabled.
    2020
    21   If any bit in ErrorLevel is also set in DebugPrintErrorLevelLib function 
    22   GetDebugPrintErrorLevel (), then print the message specified by Format and the 
     21  If any bit in ErrorLevel is also set in DebugPrintErrorLevelLib function
     22  GetDebugPrintErrorLevel (), then print the message specified by Format and the
    2323  associated variable argument list to the debug output device.
    2424
     
    2727  @param  ErrorLevel  The error level of the debug message.
    2828  @param  Format      Format string for the debug message to print.
    29   @param  ...         Variable argument list whose contents are accessed 
     29  @param  ...         Variable argument list whose contents are accessed
    3030                      based on the format string specified by Format.
    3131
     
    4343
    4444/**
    45   Prints an assert message containing a filename, line number, and description. 
     45  Prints an assert message containing a filename, line number, and description.
    4646  This may be followed by a breakpoint or a dead loop.
    4747
    4848  Print a message of the form "ASSERT <FileName>(<LineNumber>): <Description>\n"
    49   to the debug output device.  If DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED bit of 
    50   PcdDebugProperyMask is set then CpuBreakpoint() is called. Otherwise, if 
    51   DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED bit of PcdDebugProperyMask is set then 
    52   CpuDeadLoop() is called.  If neither of these bits are set, then this function 
     49  to the debug output device.  If DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED bit of
     50  PcdDebugProperyMask is set then CpuBreakpoint() is called. Otherwise, if
     51  DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED bit of PcdDebugProperyMask is set then
     52  CpuDeadLoop() is called.  If neither of these bits are set, then this function
    5353  returns immediately after the message is printed to the debug output device.
    5454  DebugAssert() must actively prevent recursion.  If DebugAssert() is called while
     
    7777  Fills a target buffer with PcdDebugClearMemoryValue, and returns the target buffer.
    7878
    79   This function fills Length bytes of Buffer with the value specified by 
     79  This function fills Length bytes of Buffer with the value specified by
    8080  PcdDebugClearMemoryValue, and returns Buffer.
    8181
    8282  If Buffer is NULL, then ASSERT().
    83   If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). 
     83  If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
    8484
    8585  @param   Buffer  The pointer to the target buffer to be filled with PcdDebugClearMemoryValue.
    86   @param   Length  The number of bytes in Buffer to fill with zeros PcdDebugClearMemoryValue. 
     86  @param   Length  The number of bytes in Buffer to fill with zeros PcdDebugClearMemoryValue.
    8787
    8888  @return  Buffer  The pointer to the target buffer filled with PcdDebugClearMemoryValue.
     
    103103  Returns TRUE if ASSERT() macros are enabled.
    104104
    105   This function returns TRUE if the DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit of 
     105  This function returns TRUE if the DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit of
    106106  PcdDebugProperyMask is set.  Otherwise FALSE is returned.
    107107
     
    120120
    121121
    122 /** 
     122/**
    123123  Returns TRUE if DEBUG() macros are enabled.
    124124
    125   This function returns TRUE if the DEBUG_PROPERTY_DEBUG_PRINT_ENABLED bit of 
     125  This function returns TRUE if the DEBUG_PROPERTY_DEBUG_PRINT_ENABLED bit of
    126126  PcdDebugProperyMask is set.  Otherwise FALSE is returned.
    127127
     
    140140
    141141
    142 /** 
     142/**
    143143  Returns TRUE if DEBUG_CODE() macros are enabled.
    144144
    145   This function returns TRUE if the DEBUG_PROPERTY_DEBUG_CODE_ENABLED bit of 
     145  This function returns TRUE if the DEBUG_PROPERTY_DEBUG_CODE_ENABLED bit of
    146146  PcdDebugProperyMask is set.  Otherwise FALSE is returned.
    147147
     
    160160
    161161
    162 /** 
     162/**
    163163  Returns TRUE if DEBUG_CLEAR_MEMORY() macro is enabled.
    164164
    165   This function returns TRUE if the DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of 
     165  This function returns TRUE if the DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of
    166166  PcdDebugProperyMask is set.  Otherwise FALSE is returned.
    167167
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf

    r58459 r58466  
    2222  MODULE_TYPE                    = BASE
    2323  VERSION_STRING                 = 1.0
    24   LIBRARY_CLASS                  = DebugLib 
     24  LIBRARY_CLASS                  = DebugLib
    2525  CONSTRUCTOR                    = BaseDebugLibSerialPortConstructor
    2626
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseDebugLibSerialPort/DebugLib.c

    r58459 r58466  
    22  Base Debug library instance base on Serial Port library.
    33  It uses PrintLib to send debug messages to serial port device.
    4  
    5   NOTE: If the Serial Port library enables hardware flow control, then a call 
    6   to DebugPrint() or DebugAssert() may hang if writes to the serial port are 
     4
     5  NOTE: If the Serial Port library enables hardware flow control, then a call
     6  to DebugPrint() or DebugAssert() may hang if writes to the serial port are
    77  being blocked.  This may occur if a key(s) are pressed in a terminal emulator
    8   used to monitor the DEBUG() and ASSERT() messages. 
     8  used to monitor the DEBUG() and ASSERT() messages.
    99
    1010  Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
    11   This program and the accompanying materials                         
    12   are licensed and made available under the terms and conditions of the BSD License         
    13   which accompanies this distribution.  The full text of the license may be found at       
    14   http://opensource.org/licenses/bsd-license.php.                                           
    15 
    16   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     
    17   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             
     11  This program and the accompanying materials
     12  are licensed and made available under the terms and conditions of the BSD License
     13  which accompanies this distribution.  The full text of the license may be found at
     14  http://opensource.org/licenses/bsd-license.php.
     15
     16  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
     17  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
    1818
    1919**/
     
    2929
    3030//
    31 // Define the maximum debug and assert message length that this library supports 
     31// Define the maximum debug and assert message length that this library supports
    3232//
    3333#define MAX_DEBUG_MESSAGE_LENGTH  0x100
     
    5151  Prints a debug message to the debug output device if the specified error level is enabled.
    5252
    53   If any bit in ErrorLevel is also set in DebugPrintErrorLevelLib function 
    54   GetDebugPrintErrorLevel (), then print the message specified by Format and the 
     53  If any bit in ErrorLevel is also set in DebugPrintErrorLevelLib function
     54  GetDebugPrintErrorLevel (), then print the message specified by Format and the
    5555  associated variable argument list to the debug output device.
    5656
     
    5959  @param  ErrorLevel  The error level of the debug message.
    6060  @param  Format      Format string for the debug message to print.
    61   @param  ...         Variable argument list whose contents are accessed 
     61  @param  ...         Variable argument list whose contents are accessed
    6262                      based on the format string specified by Format.
    6363
     
    9494
    9595  //
    96   // Send the print string to a Serial Port 
     96  // Send the print string to a Serial Port
    9797  //
    9898  SerialPortWrite ((UINT8 *)Buffer, AsciiStrLen (Buffer));
     
    101101
    102102/**
    103   Prints an assert message containing a filename, line number, and description. 
     103  Prints an assert message containing a filename, line number, and description.
    104104  This may be followed by a breakpoint or a dead loop.
    105105
    106106  Print a message of the form "ASSERT <FileName>(<LineNumber>): <Description>\n"
    107   to the debug output device.  If DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED bit of 
    108   PcdDebugProperyMask is set then CpuBreakpoint() is called. Otherwise, if 
    109   DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED bit of PcdDebugProperyMask is set then 
    110   CpuDeadLoop() is called.  If neither of these bits are set, then this function 
     107  to the debug output device.  If DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED bit of
     108  PcdDebugProperyMask is set then CpuBreakpoint() is called. Otherwise, if
     109  DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED bit of PcdDebugProperyMask is set then
     110  CpuDeadLoop() is called.  If neither of these bits are set, then this function
    111111  returns immediately after the message is printed to the debug output device.
    112112  DebugAssert() must actively prevent recursion.  If DebugAssert() is called while
     
    155155  Fills a target buffer with PcdDebugClearMemoryValue, and returns the target buffer.
    156156
    157   This function fills Length bytes of Buffer with the value specified by 
     157  This function fills Length bytes of Buffer with the value specified by
    158158  PcdDebugClearMemoryValue, and returns Buffer.
    159159
    160160  If Buffer is NULL, then ASSERT().
    161   If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). 
     161  If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
    162162
    163163  @param   Buffer  The pointer to the target buffer to be filled with PcdDebugClearMemoryValue.
    164   @param   Length  The number of bytes in Buffer to fill with zeros PcdDebugClearMemoryValue. 
     164  @param   Length  The number of bytes in Buffer to fill with zeros PcdDebugClearMemoryValue.
    165165
    166166  @return  Buffer  The pointer to the target buffer filled with PcdDebugClearMemoryValue.
     
    189189  Returns TRUE if ASSERT() macros are enabled.
    190190
    191   This function returns TRUE if the DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit of 
     191  This function returns TRUE if the DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit of
    192192  PcdDebugProperyMask is set.  Otherwise FALSE is returned.
    193193
     
    206206
    207207
    208 /** 
     208/**
    209209  Returns TRUE if DEBUG() macros are enabled.
    210210
    211   This function returns TRUE if the DEBUG_PROPERTY_DEBUG_PRINT_ENABLED bit of 
     211  This function returns TRUE if the DEBUG_PROPERTY_DEBUG_PRINT_ENABLED bit of
    212212  PcdDebugProperyMask is set.  Otherwise FALSE is returned.
    213213
     
    226226
    227227
    228 /** 
     228/**
    229229  Returns TRUE if DEBUG_CODE() macros are enabled.
    230230
    231   This function returns TRUE if the DEBUG_PROPERTY_DEBUG_CODE_ENABLED bit of 
     231  This function returns TRUE if the DEBUG_PROPERTY_DEBUG_CODE_ENABLED bit of
    232232  PcdDebugProperyMask is set.  Otherwise FALSE is returned.
    233233
     
    246246
    247247
    248 /** 
     248/**
    249249  Returns TRUE if DEBUG_CLEAR_MEMORY() macro is enabled.
    250250
    251   This function returns TRUE if the DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of 
     251  This function returns TRUE if the DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of
    252252  PcdDebugProperyMask is set.  Otherwise FALSE is returned.
    253253
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.c

    r48674 r58466  
    11/** @file
    2   Debug Print Error Level library instance that retrieves the current error 
    3   level from PcdDebugPrintErrorLevel.  This generic library instance does not 
     2  Debug Print Error Level library instance that retrieves the current error
     3  level from PcdDebugPrintErrorLevel.  This generic library instance does not
    44  support the setting of the global debug print error level mask for the platform.
    55
     
    3939/**
    4040  Sets the global debug print error level mask fpr the entire platform.
    41  
     41
    4242  @param   ErrorLevel     Global debug print error level.
    43  
     43
    4444  @retval  TRUE           The debug print error level mask was sucessfully set.
    4545  @retval  FALSE          The debug print error level mask could not be set.
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf

    r58459 r58466  
    11## @file
    22#  Debug Print Error Level library instance based on PcdDebugPrintErrorLevel.
    3 #  It retrieves the current error level from PcdDebugPrintErrorLevel. 
     3#  It retrieves the current error level from PcdDebugPrintErrorLevel.
    44#
    55#  Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>
     
    3535[LibraryClasses]
    3636  PcdLib
    37  
     37
    3838[Pcd]
    3939  gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel  ## CONSUMES
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseExtractGuidedSectionLib/BaseExtractGuidedSectionLib.c

    r48674 r58466  
    3131
    3232/**
    33   HandlerInfo table address is set by PcdGuidedExtractHandlerTableAddress, which is used to store 
    34   the registered guid and Handler list. When it is initialized, it will be directly returned. 
     33  HandlerInfo table address is set by PcdGuidedExtractHandlerTableAddress, which is used to store
     34  the registered guid and Handler list. When it is initialized, it will be directly returned.
    3535  Or, HandlerInfo table will be initialized in this function.
    3636
     
    4646{
    4747  EXTRACT_GUIDED_SECTION_HANDLER_INFO *HandlerInfo;
    48  
     48
    4949  //
    5050  // Set the available memory address to handler info.
     
    8585  HandlerInfo->ExtractHandlerGuidTable    = (GUID *) (HandlerInfo + 1);
    8686  HandlerInfo->ExtractDecodeHandlerTable  = (EXTRACT_GUIDED_SECTION_DECODE_HANDLER *) (
    87                                               (UINT8 *)HandlerInfo->ExtractHandlerGuidTable + 
     87                                              (UINT8 *)HandlerInfo->ExtractHandlerGuidTable +
    8888                                              PcdGet32 (PcdMaximumGuidedExtractHandler) * sizeof (GUID)
    8989                                             );
    9090  HandlerInfo->ExtractGetInfoHandlerTable = (EXTRACT_GUIDED_SECTION_GET_INFO_HANDLER *) (
    91                                               (UINT8 *)HandlerInfo->ExtractDecodeHandlerTable + 
    92                                               PcdGet32 (PcdMaximumGuidedExtractHandler) * 
     91                                              (UINT8 *)HandlerInfo->ExtractDecodeHandlerTable +
     92                                              PcdGet32 (PcdMaximumGuidedExtractHandler) *
    9393                                              sizeof (EXTRACT_GUIDED_SECTION_DECODE_HANDLER)
    9494                                             );
     
    102102  Sets ExtractHandlerGuidTable so it points at a callee allocated array of registered GUIDs.
    103103  The total number of GUIDs in the array are returned. Since the array of GUIDs is callee allocated
    104   and caller must treat this array of GUIDs as read-only data. 
     104  and caller must treat this array of GUIDs as read-only data.
    105105  If ExtractHandlerGuidTable is NULL, then ASSERT().
    106106
     
    146146  If the GUID value specified by SectionGuid has already been registered, then return RETURN_ALREADY_STARTED.
    147147  If there are not enough resources available to register the handlers  then RETURN_OUT_OF_RESOURCES is returned.
    148  
     148
    149149  If SectionGuid is NULL, then ASSERT().
    150150  If GetInfoHandler is NULL, then ASSERT().
     
    157157                             required to actually decode the data in a GUIDed section.
    158158  @param[in]  DecodeHandler  The pointer to a function that decodes a GUIDed section into a caller
    159                              allocated output buffer. 
     159                             allocated output buffer.
    160160
    161161  @retval  RETURN_SUCCESS           The handlers were registered.
     
    211211    return RETURN_OUT_OF_RESOURCES;
    212212  }
    213  
     213
    214214  //
    215215  // Register new Handler and guid value.
     
    228228  optional scratch buffer required to actually decode the data in a GUIDed section.
    229229
    230   Examines a GUIDed section specified by InputSection. 
     230  Examines a GUIDed section specified by InputSection.
    231231  If GUID for InputSection does not match any of the GUIDs registered through ExtractGuidedSectionRegisterHandlers(),
    232   then RETURN_UNSUPPORTED is returned. 
    233   If the GUID of InputSection does match the GUID that this handler supports, then the the associated handler 
     232  then RETURN_UNSUPPORTED is returned.
     233  If the GUID of InputSection does match the GUID that this handler supports, then the the associated handler
    234234  of type EXTRACT_GUIDED_SECTION_GET_INFO_HANDLER that was registered with ExtractGuidedSectionRegisterHandlers()
    235235  is used to retrieve the OututBufferSize, ScratchSize, and Attributes values. The return status from the handler of
    236236  type EXTRACT_GUIDED_SECTION_GET_INFO_HANDLER is returned.
    237  
     237
    238238  If InputSection is NULL, then ASSERT().
    239239  If OutputBufferSize is NULL, then ASSERT().
     
    262262  OUT       UINT32  *OutputBufferSize,
    263263  OUT       UINT32  *ScratchBufferSize,
    264   OUT       UINT16  *SectionAttribute   
     264  OUT       UINT16  *SectionAttribute
    265265  )
    266266{
     
    269269  EXTRACT_GUIDED_SECTION_HANDLER_INFO *HandlerInfo;
    270270  EFI_GUID                            *SectionDefinitionGuid;
    271  
     271
    272272  //
    273273  // Check input paramter
     
    311311
    312312  //
    313   // Not found, the input guided section is not supported. 
     313  // Not found, the input guided section is not supported.
    314314  //
    315315  return RETURN_UNSUPPORTED;
     
    322322  allocated output buffer.
    323323
    324   Decodes the GUIDed section specified by InputSection. 
     324  Decodes the GUIDed section specified by InputSection.
    325325  If GUID for InputSection does not match any of the GUIDs registered through ExtractGuidedSectionRegisterHandlers(),
    326   then RETURN_UNSUPPORTED is returned. 
     326  then RETURN_UNSUPPORTED is returned.
    327327  If the GUID of InputSection does match the GUID that this handler supports, then the the associated handler
    328328  of type EXTRACT_GUIDED_SECTION_DECODE_HANDLER that was registered with ExtractGuidedSectionRegisterHandlers()
     
    331331  then OutputBuffer is set to point at the data in InputSection.  Otherwise, the decoded data will be placed in a caller
    332332  allocated buffer specified by OutputBuffer.    This function is responsible for computing the  EFI_AUTH_STATUS_PLATFORM_OVERRIDE
    333   bit of in AuthenticationStatus.  The return status from the handler of type EXTRACT_GUIDED_SECTION_DECODE_HANDLER is returned. 
    334    
     333  bit of in AuthenticationStatus.  The return status from the handler of type EXTRACT_GUIDED_SECTION_DECODE_HANDLER is returned.
     334
    335335  If InputSection is NULL, then ASSERT().
    336336  If OutputBuffer is NULL, then ASSERT().
    337337  If ScratchBuffer is NULL and this decode operation requires a scratch buffer, then ASSERT().
    338   If AuthenticationStatus is NULL, then ASSERT(). 
     338  If AuthenticationStatus is NULL, then ASSERT().
    339339
    340340  @param[in]  InputSection   A pointer to a GUIDed section of an FFS formatted file.
    341   @param[out] OutputBuffer   A pointer to a buffer that contains the result of a decode operation. 
    342   @param[in]  ScratchBuffer  A caller allocated buffer that may be required by this function as a scratch buffer to perform the decode operation. 
    343   @param[out] AuthenticationStatus 
     341  @param[out] OutputBuffer   A pointer to a buffer that contains the result of a decode operation.
     342  @param[in]  ScratchBuffer  A caller allocated buffer that may be required by this function as a scratch buffer to perform the decode operation.
     343  @param[out] AuthenticationStatus
    344344                             A pointer to the authentication status of the decoded output buffer. See the definition
    345345                             of authentication status in the EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI section of the PI
     
    357357  OUT       VOID    **OutputBuffer,
    358358  IN        VOID    *ScratchBuffer,        OPTIONAL
    359   OUT       UINT32  *AuthenticationStatus 
     359  OUT       UINT32  *AuthenticationStatus
    360360  )
    361361{
     
    364364  EXTRACT_GUIDED_SECTION_HANDLER_INFO *HandlerInfo;
    365365  EFI_GUID                            *SectionDefinitionGuid;
    366  
     366
    367367  //
    368368  // Check input parameter
     
    374374  //
    375375  // Get all registered handler information.
    376   // 
     376  //
    377377  Status = GetExtractGuidedSectionHandlerInfo (&HandlerInfo);
    378378  if (RETURN_ERROR (Status)) {
     
    405405
    406406  //
    407   // Not found, the input guided section is not supported. 
     407  // Not found, the input guided section is not supported.
    408408  //
    409409  return RETURN_UNSUPPORTED;
     
    411411
    412412/**
    413   Retrieves handlers of type EXTRACT_GUIDED_SECTION_GET_INFO_HANDLER and 
     413  Retrieves handlers of type EXTRACT_GUIDED_SECTION_GET_INFO_HANDLER and
    414414  EXTRACT_GUIDED_SECTION_DECODE_HANDLER for a specific GUID section type.
    415  
    416   Retrieves the handlers associated with SectionGuid and returns them in 
     415
     416  Retrieves the handlers associated with SectionGuid and returns them in
    417417  GetInfoHandler and DecodeHandler.
    418418
    419   If the GUID value specified by SectionGuid has not been registered, then 
     419  If the GUID value specified by SectionGuid has not been registered, then
    420420  return RETURN_NOT_FOUND.
    421  
     421
    422422  If SectionGuid is NULL, then ASSERT().
    423423
    424   @param[in]  SectionGuid    A pointer to the GUID associated with the handlersof the GUIDed 
     424  @param[in]  SectionGuid    A pointer to the GUID associated with the handlersof the GUIDed
    425425                             section type being retrieved.
    426   @param[out] GetInfoHandler Pointer to a function that examines a GUIDed section and returns 
    427                              the size of the decoded buffer and the size of an optional scratch 
    428                              buffer required to actually decode the data in a GUIDed section. 
    429                              This is an optional parameter that may be NULL. If it is NULL, then 
     426  @param[out] GetInfoHandler Pointer to a function that examines a GUIDed section and returns
     427                             the size of the decoded buffer and the size of an optional scratch
     428                             buffer required to actually decode the data in a GUIDed section.
     429                             This is an optional parameter that may be NULL. If it is NULL, then
    430430                             the previously registered handler is not returned.
    431431  @param[out] DecodeHandler  Pointer to a function that decodes a GUIDed section into a caller
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseExtractGuidedSectionLib/BaseExtractGuidedSectionLib.inf

    r58459 r58466  
    22#  Base ExtractGuidedSection Library.
    33#  This instance can also be used in SEC phase only when the memory is ready in SEC phase.
    4 #  PCD PcdGuidedExtractHandlerTableAddress points to the available pysical memory space 
     4#  PCD PcdGuidedExtractHandlerTableAddress points to the available pysical memory space
    55#  that is used to store Guided Extract Handlers.
    6 #  Note: A driver of type DXE_RUNTIME_DRIVER can use this ExtractGuidedSectionLib 
    7 #  in their initialization without any issues. They only have to be careful in 
    8 #  the implementation of runtime services, because this BASE library instance doesn't 
     6#  Note: A driver of type DXE_RUNTIME_DRIVER can use this ExtractGuidedSectionLib
     7#  in their initialization without any issues. They only have to be careful in
     8#  the implementation of runtime services, because this BASE library instance doesn't
    99#  convert the address pointed by PcdGuidedExtractHandlerTableAddress to the virtual address.
    10 # 
     10#
    1111#  Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
    1212#
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf

    r58459 r58466  
    2626  MODULE_TYPE                    = BASE
    2727  VERSION_STRING                 = 1.0
    28   LIBRARY_CLASS                  = IoLib 
     28  LIBRARY_CLASS                  = IoLib
    2929
    3030
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseIoLibIntrinsic/IoHighLevel.c

    r58459 r58466  
    8181
    8282/**
    83   Reads an 8-bit I/O port, performs a bitwise AND followed by a bitwise 
     83  Reads an 8-bit I/O port, performs a bitwise AND followed by a bitwise
    8484  OR, and writes the result back to the 8-bit I/O port.
    8585
     
    147147  Writes Value to the bit field of the I/O register. The bit field is specified
    148148  by the StartBit and the EndBit. All other bits in the destination I/O
    149   register are preserved. The value written to the I/O port is returned. 
     149  register are preserved. The value written to the I/O port is returned.
    150150
    151151  If 8-bit I/O port operations are not supported, then ASSERT().
     
    349349  If 16-bit I/O port operations are not supported, then ASSERT().
    350350  If Port is not aligned on a 16-bit boundary, then ASSERT().
    351  
     351
    352352  @param  Port    The I/O port to write.
    353353  @param  AndData The value to AND with the read value from the I/O port.
     
    367367
    368368/**
    369   Reads a 16-bit I/O port, performs a bitwise AND followed by a bitwise 
     369  Reads a 16-bit I/O port, performs a bitwise AND followed by a bitwise
    370370  OR, and writes the result back to the 16-bit I/O port.
    371371
     
    379379  If 16-bit I/O port operations are not supported, then ASSERT().
    380380  If Port is not aligned on a 16-bit boundary, then ASSERT().
    381  
     381
    382382  @param  Port    The I/O port to write.
    383383  @param  AndData The value to AND with the read value from the I/O port.
     
    660660
    661661/**
    662   Reads a 32-bit I/O port, performs a bitwise AND followed by a bitwise 
     662  Reads a 32-bit I/O port, performs a bitwise AND followed by a bitwise
    663663  OR, and writes the result back to the 32-bit I/O port.
    664664
     
    953953
    954954/**
    955   Reads a 64-bit I/O port, performs a bitwise AND followed by a bitwise 
     955  Reads a 64-bit I/O port, performs a bitwise AND followed by a bitwise
    956956  OR, and writes the result back to the 64-bit I/O port.
    957957
     
    11911191  result back to the 8-bit MMIO register.
    11921192
    1193   Reads the 8-bit MMIO register specified by Address, performs a bitwise 
     1193  Reads the 8-bit MMIO register specified by Address, performs a bitwise
    11941194  OR between the read result and the value specified by OrData, and
    11951195  writes the result to the 8-bit MMIO register specified by Address. The value
     
    12441244
    12451245/**
    1246   Reads an 8-bit MMIO register, performs a bitwise AND followed by a bitwise 
     1246  Reads an 8-bit MMIO register, performs a bitwise AND followed by a bitwise
    12471247  OR, and writes the result back to the 8-bit MMIO register.
    12481248
     
    13481348  writes the result back to the bit field in the 8-bit MMIO register.
    13491349
    1350   Reads the 8-bit MMIO register specified by Address, performs a bitwise 
     1350  Reads the 8-bit MMIO register specified by Address, performs a bitwise
    13511351  OR between the read result and the value specified by OrData, and
    13521352  writes the result to the 8-bit MMIO register specified by Address. The value
     
    14781478  result back to the 16-bit MMIO register.
    14791479
    1480   Reads the 16-bit MMIO register specified by Address, performs a bitwise 
     1480  Reads the 16-bit MMIO register specified by Address, performs a bitwise
    14811481  OR between the read result and the value specified by OrData, and
    14821482  writes the result to the 16-bit MMIO register specified by Address. The value
     
    15331533
    15341534/**
    1535   Reads a 16-bit MMIO register, performs a bitwise AND followed by a bitwise 
     1535  Reads a 16-bit MMIO register, performs a bitwise AND followed by a bitwise
    15361536  OR, and writes the result back to the 16-bit MMIO register.
    15371537
     
    16391639  writes the result back to the bit field in the 16-bit MMIO register.
    16401640
    1641   Reads the 16-bit MMIO register specified by Address, performs a bitwise 
     1641  Reads the 16-bit MMIO register specified by Address, performs a bitwise
    16421642  OR between the read result and the value specified by OrData, and
    16431643  writes the result to the 16-bit MMIO register specified by Address. The value
     
    17721772  result back to the 32-bit MMIO register.
    17731773
    1774   Reads the 32-bit MMIO register specified by Address, performs a bitwise 
     1774  Reads the 32-bit MMIO register specified by Address, performs a bitwise
    17751775  OR between the read result and the value specified by OrData, and
    17761776  writes the result to the 32-bit MMIO register specified by Address. The value
     
    18271827
    18281828/**
    1829   Reads a 32-bit MMIO register, performs a bitwise AND followed by a bitwise 
     1829  Reads a 32-bit MMIO register, performs a bitwise AND followed by a bitwise
    18301830  OR, and writes the result back to the 32-bit MMIO register.
    18311831
     
    19331933  writes the result back to the bit field in the 32-bit MMIO register.
    19341934
    1935   Reads the 32-bit MMIO register specified by Address, performs a bitwise 
     1935  Reads the 32-bit MMIO register specified by Address, performs a bitwise
    19361936  OR between the read result and the value specified by OrData, and
    19371937  writes the result to the 32-bit MMIO register specified by Address. The value
     
    20662066  result back to the 64-bit MMIO register.
    20672067
    2068   Reads the 64-bit MMIO register specified by Address, performs a bitwise 
     2068  Reads the 64-bit MMIO register specified by Address, performs a bitwise
    20692069  OR between the read result and the value specified by OrData, and
    20702070  writes the result to the 64-bit MMIO register specified by Address. The value
     
    21212121
    21222122/**
    2123   Reads a 64-bit MMIO register, performs a bitwise AND followed by a bitwise 
     2123  Reads a 64-bit MMIO register, performs a bitwise AND followed by a bitwise
    21242124  OR, and writes the result back to the 64-bit MMIO register.
    21252125
     
    22272227  writes the result back to the bit field in the 64-bit MMIO register.
    22282228
    2229   Reads the 64-bit MMIO register specified by Address, performs a bitwise 
     2229  Reads the 64-bit MMIO register specified by Address, performs a bitwise
    22302230  OR between the read result and the value specified by OrData, and
    22312231  writes the result to the 64-bit MMIO register specified by Address. The value
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseIoLibIntrinsic/IoLib.c

    r48674 r58466  
    108108  @param  Address The MMIO register to write.
    109109  @param  Value   The value to write to the MMIO register.
    110  
     110
    111111  @return Value.
    112112
     
    170170  @param  Address The MMIO register to write.
    171171  @param  Value   The value to write to the MMIO register.
    172  
     172
    173173  @return Value.
    174174
     
    186186  *(volatile UINT16*)Address = Value;
    187187  MemoryFence ();
    188  
     188
    189189  return Value;
    190190}
     
    214214
    215215  ASSERT ((Address & 3) == 0);
    216  
     216
    217217  MemoryFence ();
    218218  Value = *(volatile UINT32*)Address;
    219219  MemoryFence ();
    220  
     220
    221221  return Value;
    222222}
     
    234234  @param  Address The MMIO register to write.
    235235  @param  Value   The value to write to the MMIO register.
    236  
     236
    237237  @return Value.
    238238
     
    246246{
    247247  ASSERT ((Address & 3) == 0);
    248  
     248
    249249  MemoryFence ();
    250250  *(volatile UINT32*)Address = Value;
    251251  MemoryFence ();
    252  
     252
    253253  return Value;
    254254}
     
    278278
    279279  ASSERT ((Address & 7) == 0);
    280  
     280
    281281  MemoryFence ();
    282282  Value = *(volatile UINT64*)Address;
     
    308308{
    309309  ASSERT ((Address & 7) == 0);
    310  
     310
    311311  MemoryFence ();
    312312  *(volatile UINT64*)Address = Value;
    313313  MemoryFence ();
    314  
    315   return Value;
    316 }
    317 
     314
     315  return Value;
     316}
     317
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseIoLibIntrinsic/IoLibArm.c

    r48674 r58466  
    11/** @file
    2   I/O Library for ARM. 
     2  I/O Library for ARM.
    33
    44  Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseIoLibIntrinsic/IoLibIcc.c

    r48674 r58466  
    7474    out dx, al
    7575  }
    76   return Value; 
     76  return Value;
    7777}
    7878
     
    120120  If 16-bit I/O port operations are not supported, then ASSERT().
    121121  If Port is not aligned on a 16-bit boundary, then ASSERT().
    122  
     122
    123123  @param  Port  The I/O port to write.
    124124  @param  Value The value to write to the I/O port.
     
    154154  If 32-bit I/O port operations are not supported, then ASSERT().
    155155  If Port is not aligned on a 32-bit boundary, then ASSERT().
    156  
     156
    157157  @param  Port  The I/O port to read.
    158158
     
    175175    mov dword ptr [Data], eax
    176176  }
    177  
     177
    178178  return Data;
    179179}
     
    188188  If 32-bit I/O port operations are not supported, then ASSERT().
    189189  If Port is not aligned on a 32-bit boundary, then ASSERT().
    190  
     190
    191191  @param  Port  The I/O port to write.
    192192  @param  Value The value to write to the I/O port.
     
    203203{
    204204  ASSERT ((Port & 3) == 0);
    205  
     205
    206206  __asm {
    207207    mov eax, dword ptr [Value]
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseIoLibIntrinsic/IoLibIpf.c

    r48674 r58466  
    2525  This function translates I/O port address to memory address by adding the 64MB
    2626  aligned I/O Port space to the I/O address.
    27   If I/O Port space base is not 64MB aligned, then ASSERT (). 
     27  If I/O Port space base is not 64MB aligned, then ASSERT ().
    2828
    2929  @param  Port  The I/O port to read.
     
    4545  //
    4646  // Make sure that the I/O Port space base is 64MB aligned.
    47   // 
     47  //
    4848  ASSERT ((IoBlockBaseAddress & 0x3ffffff) == 0);
    4949  Address += IoBlockBaseAddress;
     
    108108  If 32-bit I/O port operations are not supported, then ASSERT().
    109109  If Port is not aligned on a 32-bit boundary, then ASSERT().
    110  
     110
    111111  @param  Port  The I/O port to read.
    112112
     
    182182  If 16-bit I/O port operations are not supported, then ASSERT().
    183183  If Port is not aligned on a 16-bit boundary, then ASSERT().
    184  
     184
    185185  @param  Port  The I/O port to write.
    186186  @param  Value The value to write to the I/O port.
     
    208208  If 32-bit I/O port operations are not supported, then ASSERT().
    209209  If Port is not aligned on a 32-bit boundary, then ASSERT().
    210  
     210
    211211  @param  Port  The I/O port to write.
    212212  @param  Value The value to write to the I/O port.
     
    308308  //
    309309  // Make sure that Address is 16-bit aligned.
    310   // 
     310  //
    311311  ASSERT ((Address & 1) == 0);
    312312
     
    345345  //
    346346  // Make sure that Address is 32-bit aligned.
    347   // 
     347  //
    348348  ASSERT ((Address & 3) == 0);
    349349
     
    382382  //
    383383  // Make sure that Address is 64-bit aligned.
    384   // 
     384  //
    385385  ASSERT ((Address & 7) == 0);
    386386
     
    406406  @param  Address The MMIO register to write.
    407407  @param  Value   The value to write to the MMIO register.
    408  
     408
    409409  @return Value.
    410410
     
    438438  @param  Address The MMIO register to write.
    439439  @param  Value   The value to write to the MMIO register.
    440  
     440
    441441  @return Value.
    442442
     
    451451  //
    452452  // Make sure that Address is 16-bit aligned.
    453   // 
     453  //
    454454  ASSERT ((Address & 1) == 0);
    455455
     
    475475  @param  Address The MMIO register to write.
    476476  @param  Value   The value to write to the MMIO register.
    477  
     477
    478478  @return Value.
    479479
     
    488488  //
    489489  // Make sure that Address is 32-bit aligned.
    490   // 
     490  //
    491491  ASSERT ((Address & 3) == 0);
    492492
     
    523523  //
    524524  // Make sure that Address is 64-bit aligned.
    525   // 
     525  //
    526526  ASSERT ((Address & 7) == 0);
    527527
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseIoLibIntrinsic/IoLibMmioBuffer.c

    r48674 r58466  
    1818  Copy data from the MMIO region to system memory by using 8-bit access.
    1919
    20   Copy data from the MMIO region specified by starting address StartAddress 
    21   to system memory specified by Buffer by using 8-bit access. The total 
     20  Copy data from the MMIO region specified by starting address StartAddress
     21  to system memory specified by Buffer by using 8-bit access. The total
    2222  number of byte to be copied is specified by Length. Buffer is returned.
    23  
    24   If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT(). 
     23
     24  If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
    2525  If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
    2626
     
    4545  ASSERT ((Length - 1) <=  (MAX_ADDRESS - StartAddress));
    4646  ASSERT ((Length - 1) <=  (MAX_ADDRESS - (UINTN) Buffer));
    47  
     47
    4848  ReturnBuffer = Buffer;
    49  
     49
    5050  while (Length-- != 0) {
    5151    *(Buffer++) = MmioRead8 (StartAddress++);
     
    5858  Copy data from the MMIO region to system memory by using 16-bit access.
    5959
    60   Copy data from the MMIO region specified by starting address StartAddress 
    61   to system memory specified by Buffer by using 16-bit access. The total 
     60  Copy data from the MMIO region specified by starting address StartAddress
     61  to system memory specified by Buffer by using 16-bit access. The total
    6262  number of byte to be copied is specified by Length. Buffer is returned.
    63  
     63
    6464  If StartAddress is not aligned on a 16-bit boundary, then ASSERT().
    6565
    66   If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT(). 
     66  If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
    6767  If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
    6868
     
    8888
    8989  ASSERT ((StartAddress & (sizeof (UINT16) - 1)) == 0);
    90  
     90
    9191  ASSERT ((Length - 1) <=  (MAX_ADDRESS - StartAddress));
    9292  ASSERT ((Length - 1) <=  (MAX_ADDRESS - (UINTN) Buffer));
     
    9494  ASSERT ((Length & (sizeof (UINT16) - 1)) == 0);
    9595  ASSERT (((UINTN) Buffer & (sizeof (UINT16) - 1)) == 0);
    96  
     96
    9797  ReturnBuffer = Buffer;
    98  
     98
    9999  while (Length != 0) {
    100100    *(Buffer++) = MmioRead16 (StartAddress);
     
    109109  Copy data from the MMIO region to system memory by using 32-bit access.
    110110
    111   Copy data from the MMIO region specified by starting address StartAddress 
    112   to system memory specified by Buffer by using 32-bit access. The total 
     111  Copy data from the MMIO region specified by starting address StartAddress
     112  to system memory specified by Buffer by using 32-bit access. The total
    113113  number of byte to be copied is specified by Length. Buffer is returned.
    114  
     114
    115115  If StartAddress is not aligned on a 32-bit boundary, then ASSERT().
    116116
    117   If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT(). 
     117  If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
    118118  If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
    119119
     
    139139
    140140  ASSERT ((StartAddress & (sizeof (UINT32) - 1)) == 0);
    141  
     141
    142142  ASSERT ((Length - 1) <=  (MAX_ADDRESS - StartAddress));
    143143  ASSERT ((Length - 1) <=  (MAX_ADDRESS - (UINTN) Buffer));
     
    145145  ASSERT ((Length & (sizeof (UINT32) - 1)) == 0);
    146146  ASSERT (((UINTN) Buffer & (sizeof (UINT32) - 1)) == 0);
    147  
     147
    148148  ReturnBuffer = Buffer;
    149  
     149
    150150  while (Length != 0) {
    151151    *(Buffer++) = MmioRead32 (StartAddress);
     
    160160  Copy data from the MMIO region to system memory by using 64-bit access.
    161161
    162   Copy data from the MMIO region specified by starting address StartAddress 
    163   to system memory specified by Buffer by using 64-bit access. The total 
     162  Copy data from the MMIO region specified by starting address StartAddress
     163  to system memory specified by Buffer by using 64-bit access. The total
    164164  number of byte to be copied is specified by Length. Buffer is returned.
    165  
     165
    166166  If StartAddress is not aligned on a 64-bit boundary, then ASSERT().
    167167
    168   If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT(). 
     168  If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
    169169  If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
    170170
     
    190190
    191191  ASSERT ((StartAddress & (sizeof (UINT64) - 1)) == 0);
    192  
     192
    193193  ASSERT ((Length - 1) <=  (MAX_ADDRESS - StartAddress));
    194194  ASSERT ((Length - 1) <=  (MAX_ADDRESS - (UINTN) Buffer));
     
    196196  ASSERT ((Length & (sizeof (UINT64) - 1)) == 0);
    197197  ASSERT (((UINTN) Buffer & (sizeof (UINT64) - 1)) == 0);
    198  
     198
    199199  ReturnBuffer = Buffer;
    200  
     200
    201201  while (Length != 0) {
    202202    *(Buffer++) = MmioRead64 (StartAddress);
     
    212212  Copy data from system memory to the MMIO region by using 8-bit access.
    213213
    214   Copy data from system memory specified by Buffer to the MMIO region specified 
    215   by starting address StartAddress by using 8-bit access. The total number 
     214  Copy data from system memory specified by Buffer to the MMIO region specified
     215  by starting address StartAddress by using 8-bit access. The total number
    216216  of byte to be copied is specified by Length. Buffer is returned.
    217  
    218   If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT(). 
     217
     218  If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
    219219  If Length is greater than (MAX_ADDRESS -Buffer + 1), then ASSERT().
    220220
     
    239239  ASSERT ((Length - 1) <=  (MAX_ADDRESS - StartAddress));
    240240  ASSERT ((Length - 1) <=  (MAX_ADDRESS - (UINTN) Buffer));
    241  
     241
    242242  ReturnBuffer = (UINT8 *) Buffer;
    243  
     243
    244244  while (Length-- != 0) {
    245245     MmioWrite8 (StartAddress++, *(Buffer++));
     
    247247
    248248  return ReturnBuffer;
    249  
     249
    250250}
    251251
     
    253253  Copy data from system memory to the MMIO region by using 16-bit access.
    254254
    255   Copy data from system memory specified by Buffer to the MMIO region specified 
    256   by starting address StartAddress by using 16-bit access. The total number 
     255  Copy data from system memory specified by Buffer to the MMIO region specified
     256  by starting address StartAddress by using 16-bit access. The total number
    257257  of byte to be copied is specified by Length. Buffer is returned.
    258  
     258
    259259  If StartAddress is not aligned on a 16-bit boundary, then ASSERT().
    260260
    261   If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT(). 
     261  If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
    262262  If Length is greater than (MAX_ADDRESS -Buffer + 1), then ASSERT().
    263263
     
    284284
    285285  ASSERT ((StartAddress & (sizeof (UINT16) - 1)) == 0);
    286  
     286
    287287  ASSERT ((Length - 1) <=  (MAX_ADDRESS - StartAddress));
    288288  ASSERT ((Length - 1) <=  (MAX_ADDRESS - (UINTN) Buffer));
     
    292292
    293293  ReturnBuffer = (UINT16 *) Buffer;
    294  
     294
    295295  while (Length != 0) {
    296296    MmioWrite16 (StartAddress, *(Buffer++));
    297    
     297
    298298    StartAddress += sizeof (UINT16);
    299299    Length -= sizeof (UINT16);
     
    307307  Copy data from system memory to the MMIO region by using 32-bit access.
    308308
    309   Copy data from system memory specified by Buffer to the MMIO region specified 
    310   by starting address StartAddress by using 32-bit access. The total number 
     309  Copy data from system memory specified by Buffer to the MMIO region specified
     310  by starting address StartAddress by using 32-bit access. The total number
    311311  of byte to be copied is specified by Length. Buffer is returned.
    312  
     312
    313313  If StartAddress is not aligned on a 32-bit boundary, then ASSERT().
    314314
    315   If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT(). 
     315  If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
    316316  If Length is greater than (MAX_ADDRESS -Buffer + 1), then ASSERT().
    317317
     
    338338
    339339  ASSERT ((StartAddress & (sizeof (UINT32) - 1)) == 0);
    340  
     340
    341341  ASSERT ((Length - 1) <=  (MAX_ADDRESS - StartAddress));
    342342  ASSERT ((Length - 1) <=  (MAX_ADDRESS - (UINTN) Buffer));
     
    346346
    347347  ReturnBuffer = (UINT32 *) Buffer;
    348  
     348
    349349  while (Length != 0) {
    350350    MmioWrite32 (StartAddress, *(Buffer++));
    351    
     351
    352352    StartAddress += sizeof (UINT32);
    353353    Length -= sizeof (UINT32);
     
    360360  Copy data from system memory to the MMIO region by using 64-bit access.
    361361
    362   Copy data from system memory specified by Buffer to the MMIO region specified 
    363   by starting address StartAddress by using 64-bit access. The total number 
     362  Copy data from system memory specified by Buffer to the MMIO region specified
     363  by starting address StartAddress by using 64-bit access. The total number
    364364  of byte to be copied is specified by Length. Buffer is returned.
    365  
     365
    366366  If StartAddress is not aligned on a 64-bit boundary, then ASSERT().
    367367
    368   If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT(). 
     368  If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
    369369  If Length is greater than (MAX_ADDRESS -Buffer + 1), then ASSERT().
    370370
     
    391391
    392392  ASSERT ((StartAddress & (sizeof (UINT64) - 1)) == 0);
    393  
     393
    394394  ASSERT ((Length - 1) <=  (MAX_ADDRESS - StartAddress));
    395395  ASSERT ((Length - 1) <=  (MAX_ADDRESS - (UINTN) Buffer));
     
    399399
    400400  ReturnBuffer = (UINT64 *) Buffer;
    401  
     401
    402402  while (Length != 0) {
    403403    MmioWrite64 (StartAddress, *(Buffer++));
    404    
     404
    405405    StartAddress += sizeof (UINT64);
    406406    Length -= sizeof (UINT64);
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseIoLibIntrinsic/IoLibMsc.c

    r48674 r58466  
    147147  If 16-bit I/O port operations are not supported, then ASSERT().
    148148  If Port is not aligned on a 16-bit boundary, then ASSERT().
    149  
     149
    150150  @param  Port  The I/O port to write.
    151151  @param  Value The value to write to the I/O port.
     
    177177  If 32-bit I/O port operations are not supported, then ASSERT().
    178178  If Port is not aligned on a 32-bit boundary, then ASSERT().
    179  
     179
    180180  @param  Port  The I/O port to read.
    181181
     
    207207  If 32-bit I/O port operations are not supported, then ASSERT().
    208208  If Port is not aligned on a 32-bit boundary, then ASSERT().
    209  
     209
    210210  @param  Port  The I/O port to write.
    211211  @param  Value The value to write to the I/O port.
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseLib/Arm/CpuBreakpoint.S

    r48674 r58466  
    1 #------------------------------------------------------------------------------ 
     1#------------------------------------------------------------------------------
    22#
    33# CpuBreakpoint() for ARM
     
    3333#
    3434ASM_PFX(CpuBreakpoint):
    35     swi  0xdbdbdb 
     35    swi  0xdbdbdb
    3636    bx   lr
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseLib/Arm/CpuBreakpoint.asm

    r48674 r58466  
    1 ;------------------------------------------------------------------------------ 
     1;------------------------------------------------------------------------------
    22;
    33; CpuBreakpoint() for ARM
     
    3535    swi   0xdbdbdb
    3636    bx    lr
    37    
     37
    3838  END
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseLib/Arm/CpuPause.asm

    r48674 r58466  
    1 ;------------------------------------------------------------------------------ 
     1;------------------------------------------------------------------------------
    22;
    33; CpuPause() for ARM
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseLib/Arm/DisableInterrupts.S

    r48674 r58466  
    1 #------------------------------------------------------------------------------ 
     1#------------------------------------------------------------------------------
    22#
    33# DisableInterrupts() for ARM
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseLib/Arm/DisableInterrupts.asm

    r48674 r58466  
    1 ;------------------------------------------------------------------------------ 
     1;------------------------------------------------------------------------------
    22;
    33; DisableInterrupts() for ARM
     
    3434    MSR     CPSR_c,R0
    3535    BX      LR
    36    
     36
    3737    END
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseLib/Arm/EnableInterrupts.S

    r48674 r58466  
    1 #------------------------------------------------------------------------------ 
     1#------------------------------------------------------------------------------
    22#
    33# EnableInterrupts() for ARM
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseLib/Arm/EnableInterrupts.asm

    r48674 r58466  
    1 ;------------------------------------------------------------------------------ 
     1;------------------------------------------------------------------------------
    22;
    33; EnableInterrupts() for ARM
     
    3434    MSR     CPSR_c,R0
    3535    BX      LR
    36    
     36
    3737    END
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseLib/Arm/GetInterruptsState.S

    r48674 r58466  
    1 #------------------------------------------------------------------------------ 
     1#------------------------------------------------------------------------------
    22#
    33# GetInterruptState() function for ARM
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseLib/Arm/GetInterruptsState.asm

    r48674 r58466  
    1 ;------------------------------------------------------------------------------ 
     1;------------------------------------------------------------------------------
    22;
    33; GetInterruptState() function for ARM
     
    4242    MOVNE   R0, #0
    4343    BX      LR
    44    
     44
    4545    END
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseLib/Arm/InternalSwitchStack.c

    r48674 r58466  
    4040  );
    4141
    42  
     42
    4343/**
    4444  Transfers control to a function starting with a new stack.
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseLib/Arm/Math64.S

    r48674 r58466  
    1 #------------------------------------------------------------------------------ 
    2 #
    3 # Replacement for Math64.c that is coded to use older GCC intrinsics. 
     1#------------------------------------------------------------------------------
     2#
     3# Replacement for Math64.c that is coded to use older GCC intrinsics.
    44# Doing this reduces the number of intrinsics that are required when
    5 # you port to a new version of gcc. 
     5# you port to a new version of gcc.
    66#
    77# Need to split this into multple files to size optimize the image.
     
    160160        bl      ASM_PFX(__udivdi3)
    161161        ldmfd   sp!, {r7, pc}
    162        
    163        
     162
     163
    164164        .align 2
    165165        GCC_ASM_EXPORT(InternalMathModU64x32)
     
    171171        bl      ASM_PFX(__umoddi3)
    172172        ldmfd   sp!, {r7, pc}
    173        
    174        
     173
     174
    175175        .align 2
    176176        GCC_ASM_EXPORT(InternalMathDivRemU64x32)
     
    199199        ldmfd   sp!, {r10, r11}
    200200        ldmfd   sp!, {r4, r5, r6, r7, pc}
    201        
    202        
     201
     202
    203203        .align 2
    204204        GCC_ASM_EXPORT(InternalMathDivRemU64x64)
     
    225225        ldmfd   sp!, {r10, r11}
    226226        ldmfd   sp!, {r4, r5, r6, r7, pc}
    227        
    228        
     227
     228
    229229        .align 2
    230230        GCC_ASM_EXPORT(InternalMathDivRemS64x64)
     
    251251        ldmfd   sp!, {r10, r11}
    252252        ldmfd   sp!, {r4, r5, r6, r7, pc}
    253        
    254        
     253
     254
    255255        .align 2
    256256        GCC_ASM_EXPORT(InternalMathSwapBytes64)
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseLib/Arm/SetJumpLongJump.S

    r48674 r58466  
    1 #------------------------------------------------------------------------------ 
     1#------------------------------------------------------------------------------
    22#
    33# Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseLib/Arm/SetJumpLongJump.asm

    r48674 r58466  
    1 ;------------------------------------------------------------------------------ 
     1;------------------------------------------------------------------------------
    22;
    33; Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseLib/Arm/SwitchStack.S

    r48674 r58466  
    1 //------------------------------------------------------------------------------ 
     1//------------------------------------------------------------------------------
    22//
    33// Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
     
    1313//
    1414//------------------------------------------------------------------------------
    15  
     15
    1616.text
    1717.align 5
    1818
    1919GCC_ASM_EXPORT(InternalSwitchStackAsm)
    20 GCC_ASM_EXPORT(CpuPause)           
    21  
     20GCC_ASM_EXPORT(CpuPause)
     21
    2222/**
    2323//
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseLib/Arm/SwitchStack.asm

    r48674 r58466  
    1 ;------------------------------------------------------------------------------ 
     1;------------------------------------------------------------------------------
    22;
    33; Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
     
    1212;
    1313;------------------------------------------------------------------------------
    14  
     14
    1515    EXPORT InternalSwitchStackAsm
    16            
     16
    1717    AREA   Switch_Stack, CODE, READONLY
    18  
     18
    1919;/**
    2020;  This allows the caller to switch the stack and goes to the new entry point
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseLib/Arm/Unaligned.c

    r48674 r58466  
    11/** @file
    22  Unaligned access functions of BaseLib for ARM.
    3  
     3
    44  volatile was added to work around optimization issues.
    55
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseLib/BaseLib.inf

    r58459 r58466  
    2323  MODULE_TYPE                    = BASE
    2424  VERSION_STRING                 = 1.0
    25   LIBRARY_CLASS                  = BaseLib 
     25  LIBRARY_CLASS                  = BaseLib
    2626
    2727#
     
    6767
    6868[Sources.Ia32]
    69   Ia32/Wbinvd.c | MSFT 
    70   Ia32/WriteMm7.c | MSFT 
    71   Ia32/WriteMm6.c | MSFT 
    72   Ia32/WriteMm5.c | MSFT 
    73   Ia32/WriteMm4.c | MSFT 
    74   Ia32/WriteMm3.c | MSFT 
    75   Ia32/WriteMm2.c | MSFT 
    76   Ia32/WriteMm1.c | MSFT 
    77   Ia32/WriteMm0.c | MSFT 
    78   Ia32/WriteLdtr.c | MSFT 
    79   Ia32/WriteIdtr.c | MSFT 
    80   Ia32/WriteGdtr.c | MSFT 
    81   Ia32/WriteDr7.c | MSFT 
    82   Ia32/WriteDr6.c | MSFT 
    83   Ia32/WriteDr5.c | MSFT 
    84   Ia32/WriteDr4.c | MSFT 
    85   Ia32/WriteDr3.c | MSFT 
    86   Ia32/WriteDr2.c | MSFT 
    87   Ia32/WriteDr1.c | MSFT 
    88   Ia32/WriteDr0.c | MSFT 
    89   Ia32/WriteCr4.c | MSFT 
    90   Ia32/WriteCr3.c | MSFT 
    91   Ia32/WriteCr2.c | MSFT 
    92   Ia32/WriteCr0.c | MSFT 
    93   Ia32/WriteMsr64.c | MSFT 
    94   Ia32/SwapBytes64.c | MSFT 
    95   Ia32/SetJump.c | MSFT 
    96   Ia32/RRotU64.c | MSFT 
    97   Ia32/RShiftU64.c | MSFT 
    98   Ia32/ReadPmc.c | MSFT 
    99   Ia32/ReadTsc.c | MSFT 
    100   Ia32/ReadLdtr.c | MSFT 
    101   Ia32/ReadIdtr.c | MSFT 
    102   Ia32/ReadGdtr.c | MSFT 
    103   Ia32/ReadTr.c | MSFT 
    104   Ia32/ReadSs.c | MSFT 
    105   Ia32/ReadGs.c | MSFT 
    106   Ia32/ReadFs.c | MSFT 
    107   Ia32/ReadEs.c | MSFT 
    108   Ia32/ReadDs.c | MSFT 
    109   Ia32/ReadCs.c | MSFT 
    110   Ia32/ReadMsr64.c | MSFT 
    111   Ia32/ReadMm7.c | MSFT 
    112   Ia32/ReadMm6.c | MSFT 
    113   Ia32/ReadMm5.c | MSFT 
    114   Ia32/ReadMm4.c | MSFT 
    115   Ia32/ReadMm3.c | MSFT 
    116   Ia32/ReadMm2.c | MSFT 
    117   Ia32/ReadMm1.c | MSFT 
    118   Ia32/ReadMm0.c | MSFT 
    119   Ia32/ReadEflags.c | MSFT 
    120   Ia32/ReadDr7.c | MSFT 
    121   Ia32/ReadDr6.c | MSFT 
    122   Ia32/ReadDr5.c | MSFT 
    123   Ia32/ReadDr4.c | MSFT 
    124   Ia32/ReadDr3.c | MSFT 
    125   Ia32/ReadDr2.c | MSFT 
    126   Ia32/ReadDr1.c | MSFT 
    127   Ia32/ReadDr0.c | MSFT 
    128   Ia32/ReadCr4.c | MSFT 
    129   Ia32/ReadCr3.c | MSFT 
    130   Ia32/ReadCr2.c | MSFT 
    131   Ia32/ReadCr0.c | MSFT 
    132   Ia32/Mwait.c | MSFT 
    133   Ia32/Monitor.c | MSFT 
    134   Ia32/ModU64x32.c | MSFT 
    135   Ia32/MultU64x64.c | MSFT 
    136   Ia32/MultU64x32.c | MSFT 
    137   Ia32/LShiftU64.c | MSFT 
    138   Ia32/LRotU64.c | MSFT 
    139   Ia32/LongJump.c | MSFT 
    140   Ia32/Invd.c | MSFT 
    141   Ia32/FxRestore.c | MSFT 
    142   Ia32/FxSave.c | MSFT 
    143   Ia32/FlushCacheLine.c | MSFT 
    144   Ia32/EnablePaging32.c | MSFT 
    145   Ia32/EnableInterrupts.c | MSFT 
    146   Ia32/EnableDisableInterrupts.c | MSFT 
    147   Ia32/DivU64x64Remainder.asm | MSFT 
    148   Ia32/DivU64x32Remainder.c | MSFT 
    149   Ia32/DivU64x32.c | MSFT 
    150   Ia32/DisablePaging32.c | MSFT 
    151   Ia32/DisableInterrupts.c | MSFT 
    152   Ia32/CpuPause.c | MSFT 
    153   Ia32/CpuIdEx.c | MSFT 
    154   Ia32/CpuId.c | MSFT 
    155   Ia32/CpuBreakpoint.c | MSFT 
    156   Ia32/ARShiftU64.c | MSFT 
     69  Ia32/Wbinvd.c | MSFT
     70  Ia32/WriteMm7.c | MSFT
     71  Ia32/WriteMm6.c | MSFT
     72  Ia32/WriteMm5.c | MSFT
     73  Ia32/WriteMm4.c | MSFT
     74  Ia32/WriteMm3.c | MSFT
     75  Ia32/WriteMm2.c | MSFT
     76  Ia32/WriteMm1.c | MSFT
     77  Ia32/WriteMm0.c | MSFT
     78  Ia32/WriteLdtr.c | MSFT
     79  Ia32/WriteIdtr.c | MSFT
     80  Ia32/WriteGdtr.c | MSFT
     81  Ia32/WriteDr7.c | MSFT
     82  Ia32/WriteDr6.c | MSFT
     83  Ia32/WriteDr5.c | MSFT
     84  Ia32/WriteDr4.c | MSFT
     85  Ia32/WriteDr3.c | MSFT
     86  Ia32/WriteDr2.c | MSFT
     87  Ia32/WriteDr1.c | MSFT
     88  Ia32/WriteDr0.c | MSFT
     89  Ia32/WriteCr4.c | MSFT
     90  Ia32/WriteCr3.c | MSFT
     91  Ia32/WriteCr2.c | MSFT
     92  Ia32/WriteCr0.c | MSFT
     93  Ia32/WriteMsr64.c | MSFT
     94  Ia32/SwapBytes64.c | MSFT
     95  Ia32/SetJump.c | MSFT
     96  Ia32/RRotU64.c | MSFT
     97  Ia32/RShiftU64.c | MSFT
     98  Ia32/ReadPmc.c | MSFT
     99  Ia32/ReadTsc.c | MSFT
     100  Ia32/ReadLdtr.c | MSFT
     101  Ia32/ReadIdtr.c | MSFT
     102  Ia32/ReadGdtr.c | MSFT
     103  Ia32/ReadTr.c | MSFT
     104  Ia32/ReadSs.c | MSFT
     105  Ia32/ReadGs.c | MSFT
     106  Ia32/ReadFs.c | MSFT
     107  Ia32/ReadEs.c | MSFT
     108  Ia32/ReadDs.c | MSFT
     109  Ia32/ReadCs.c | MSFT
     110  Ia32/ReadMsr64.c | MSFT
     111  Ia32/ReadMm7.c | MSFT
     112  Ia32/ReadMm6.c | MSFT
     113  Ia32/ReadMm5.c | MSFT
     114  Ia32/ReadMm4.c | MSFT
     115  Ia32/ReadMm3.c | MSFT
     116  Ia32/ReadMm2.c | MSFT
     117  Ia32/ReadMm1.c | MSFT
     118  Ia32/ReadMm0.c | MSFT
     119  Ia32/ReadEflags.c | MSFT
     120  Ia32/ReadDr7.c | MSFT
     121  Ia32/ReadDr6.c | MSFT
     122  Ia32/ReadDr5.c | MSFT
     123  Ia32/ReadDr4.c | MSFT
     124  Ia32/ReadDr3.c | MSFT
     125  Ia32/ReadDr2.c | MSFT
     126  Ia32/ReadDr1.c | MSFT
     127  Ia32/ReadDr0.c | MSFT
     128  Ia32/ReadCr4.c | MSFT
     129  Ia32/ReadCr3.c | MSFT
     130  Ia32/ReadCr2.c | MSFT
     131  Ia32/ReadCr0.c | MSFT
     132  Ia32/Mwait.c | MSFT
     133  Ia32/Monitor.c | MSFT
     134  Ia32/ModU64x32.c | MSFT
     135  Ia32/MultU64x64.c | MSFT
     136  Ia32/MultU64x32.c | MSFT
     137  Ia32/LShiftU64.c | MSFT
     138  Ia32/LRotU64.c | MSFT
     139  Ia32/LongJump.c | MSFT
     140  Ia32/Invd.c | MSFT
     141  Ia32/FxRestore.c | MSFT
     142  Ia32/FxSave.c | MSFT
     143  Ia32/FlushCacheLine.c | MSFT
     144  Ia32/EnablePaging32.c | MSFT
     145  Ia32/EnableInterrupts.c | MSFT
     146  Ia32/EnableDisableInterrupts.c | MSFT
     147  Ia32/DivU64x64Remainder.asm | MSFT
     148  Ia32/DivU64x32Remainder.c | MSFT
     149  Ia32/DivU64x32.c | MSFT
     150  Ia32/DisablePaging32.c | MSFT
     151  Ia32/DisableInterrupts.c | MSFT
     152  Ia32/CpuPause.c | MSFT
     153  Ia32/CpuIdEx.c | MSFT
     154  Ia32/CpuId.c | MSFT
     155  Ia32/CpuBreakpoint.c | MSFT
     156  Ia32/ARShiftU64.c | MSFT
    157157  Ia32/Thunk16.asm | MSFT
    158158  Ia32/EnablePaging64.asm | MSFT
     
    160160  Ia32/DisableCache.c | MSFT
    161161
    162   Ia32/Wbinvd.asm | INTEL 
    163   Ia32/WriteMm7.asm | INTEL 
    164   Ia32/WriteMm6.asm | INTEL 
    165   Ia32/WriteMm5.asm | INTEL 
    166   Ia32/WriteMm4.asm | INTEL 
    167   Ia32/WriteMm3.asm | INTEL 
    168   Ia32/WriteMm2.asm | INTEL 
    169   Ia32/WriteMm1.asm | INTEL 
    170   Ia32/WriteMm0.asm | INTEL 
    171   Ia32/WriteLdtr.asm | INTEL 
    172   Ia32/WriteIdtr.asm | INTEL 
    173   Ia32/WriteGdtr.asm | INTEL 
    174   Ia32/WriteDr7.asm | INTEL 
    175   Ia32/WriteDr6.asm | INTEL 
    176   Ia32/WriteDr5.asm | INTEL 
    177   Ia32/WriteDr4.asm | INTEL 
    178   Ia32/WriteDr3.asm | INTEL 
    179   Ia32/WriteDr2.asm | INTEL 
    180   Ia32/WriteDr1.asm | INTEL 
    181   Ia32/WriteDr0.asm | INTEL 
    182   Ia32/WriteCr4.asm | INTEL 
    183   Ia32/WriteCr3.asm | INTEL 
    184   Ia32/WriteCr2.asm | INTEL 
    185   Ia32/WriteCr0.asm | INTEL 
    186   Ia32/WriteMsr64.asm | INTEL 
    187   Ia32/SwapBytes64.asm | INTEL 
    188   Ia32/SetJump.asm | INTEL 
    189   Ia32/RRotU64.asm | INTEL 
    190   Ia32/RShiftU64.asm | INTEL 
    191   Ia32/ReadPmc.asm | INTEL 
    192   Ia32/ReadTsc.asm | INTEL 
    193   Ia32/ReadLdtr.asm | INTEL 
    194   Ia32/ReadIdtr.asm | INTEL 
    195   Ia32/ReadGdtr.asm | INTEL 
    196   Ia32/ReadTr.asm | INTEL 
    197   Ia32/ReadSs.asm | INTEL 
    198   Ia32/ReadGs.asm | INTEL 
    199   Ia32/ReadFs.asm | INTEL 
    200   Ia32/ReadEs.asm | INTEL 
    201   Ia32/ReadDs.asm | INTEL 
    202   Ia32/ReadCs.asm | INTEL 
    203   Ia32/ReadMsr64.asm | INTEL 
    204   Ia32/ReadMm7.asm | INTEL 
    205   Ia32/ReadMm6.asm | INTEL 
    206   Ia32/ReadMm5.asm | INTEL 
    207   Ia32/ReadMm4.asm | INTEL 
    208   Ia32/ReadMm3.asm | INTEL 
    209   Ia32/ReadMm2.asm | INTEL 
    210   Ia32/ReadMm1.asm | INTEL 
    211   Ia32/ReadMm0.asm | INTEL 
    212   Ia32/ReadEflags.asm | INTEL 
    213   Ia32/ReadDr7.asm | INTEL 
    214   Ia32/ReadDr6.asm | INTEL 
    215   Ia32/ReadDr5.asm | INTEL 
    216   Ia32/ReadDr4.asm | INTEL 
    217   Ia32/ReadDr3.asm | INTEL 
    218   Ia32/ReadDr2.asm | INTEL 
    219   Ia32/ReadDr1.asm | INTEL 
    220   Ia32/ReadDr0.asm | INTEL 
    221   Ia32/ReadCr4.asm | INTEL 
    222   Ia32/ReadCr3.asm | INTEL 
    223   Ia32/ReadCr2.asm | INTEL 
    224   Ia32/ReadCr0.asm | INTEL 
    225   Ia32/Mwait.asm | INTEL 
    226   Ia32/Monitor.asm | INTEL 
    227   Ia32/ModU64x32.asm | INTEL 
    228   Ia32/MultU64x64.asm | INTEL 
    229   Ia32/MultU64x32.asm | INTEL 
    230   Ia32/LShiftU64.asm | INTEL 
    231   Ia32/LRotU64.asm | INTEL 
    232   Ia32/LongJump.asm | INTEL 
    233   Ia32/Invd.asm | INTEL 
    234   Ia32/FxRestore.asm | INTEL 
    235   Ia32/FxSave.asm | INTEL 
    236   Ia32/FlushCacheLine.asm | INTEL 
    237   Ia32/EnablePaging32.asm | INTEL 
    238   Ia32/EnableInterrupts.asm | INTEL 
    239   Ia32/EnableDisableInterrupts.asm | INTEL 
    240   Ia32/DivU64x64Remainder.asm | INTEL 
    241   Ia32/DivU64x32Remainder.asm | INTEL 
    242   Ia32/DivU64x32.asm | INTEL 
    243   Ia32/DisablePaging32.asm | INTEL 
    244   Ia32/DisableInterrupts.asm | INTEL 
    245   Ia32/CpuPause.asm | INTEL 
    246   Ia32/CpuIdEx.asm | INTEL 
    247   Ia32/CpuId.asm | INTEL 
    248   Ia32/CpuBreakpoint.asm | INTEL 
    249   Ia32/ARShiftU64.asm | INTEL 
     162  Ia32/Wbinvd.asm | INTEL
     163  Ia32/WriteMm7.asm | INTEL
     164  Ia32/WriteMm6.asm | INTEL
     165  Ia32/WriteMm5.asm | INTEL
     166  Ia32/WriteMm4.asm | INTEL
     167  Ia32/WriteMm3.asm | INTEL
     168  Ia32/WriteMm2.asm | INTEL
     169  Ia32/WriteMm1.asm | INTEL
     170  Ia32/WriteMm0.asm | INTEL
     171  Ia32/WriteLdtr.asm | INTEL
     172  Ia32/WriteIdtr.asm | INTEL
     173  Ia32/WriteGdtr.asm | INTEL
     174  Ia32/WriteDr7.asm | INTEL
     175  Ia32/WriteDr6.asm | INTEL
     176  Ia32/WriteDr5.asm | INTEL
     177  Ia32/WriteDr4.asm | INTEL
     178  Ia32/WriteDr3.asm | INTEL
     179  Ia32/WriteDr2.asm | INTEL
     180  Ia32/WriteDr1.asm | INTEL
     181  Ia32/WriteDr0.asm | INTEL
     182  Ia32/WriteCr4.asm | INTEL
     183  Ia32/WriteCr3.asm | INTEL
     184  Ia32/WriteCr2.asm | INTEL
     185  Ia32/WriteCr0.asm | INTEL
     186  Ia32/WriteMsr64.asm | INTEL
     187  Ia32/SwapBytes64.asm | INTEL
     188  Ia32/SetJump.asm | INTEL
     189  Ia32/RRotU64.asm | INTEL
     190  Ia32/RShiftU64.asm | INTEL
     191  Ia32/ReadPmc.asm | INTEL
     192  Ia32/ReadTsc.asm | INTEL
     193  Ia32/ReadLdtr.asm | INTEL
     194  Ia32/ReadIdtr.asm | INTEL
     195  Ia32/ReadGdtr.asm | INTEL
     196  Ia32/ReadTr.asm | INTEL
     197  Ia32/ReadSs.asm | INTEL
     198  Ia32/ReadGs.asm | INTEL
     199  Ia32/ReadFs.asm | INTEL
     200  Ia32/ReadEs.asm | INTEL
     201  Ia32/ReadDs.asm | INTEL
     202  Ia32/ReadCs.asm | INTEL
     203  Ia32/ReadMsr64.asm | INTEL
     204  Ia32/ReadMm7.asm | INTEL
     205  Ia32/ReadMm6.asm | INTEL
     206  Ia32/ReadMm5.asm | INTEL
     207  Ia32/ReadMm4.asm | INTEL
     208  Ia32/ReadMm3.asm | INTEL
     209  Ia32/ReadMm2.asm | INTEL
     210  Ia32/ReadMm1.asm | INTEL
     211  Ia32/ReadMm0.asm | INTEL
     212  Ia32/ReadEflags.asm | INTEL
     213  Ia32/ReadDr7.asm | INTEL
     214  Ia32/ReadDr6.asm | INTEL
     215  Ia32/ReadDr5.asm | INTEL
     216  Ia32/ReadDr4.asm | INTEL
     217  Ia32/ReadDr3.asm | INTEL
     218  Ia32/ReadDr2.asm | INTEL
     219  Ia32/ReadDr1.asm | INTEL
     220  Ia32/ReadDr0.asm | INTEL
     221  Ia32/ReadCr4.asm | INTEL
     222  Ia32/ReadCr3.asm | INTEL
     223  Ia32/ReadCr2.asm | INTEL
     224  Ia32/ReadCr0.asm | INTEL
     225  Ia32/Mwait.asm | INTEL
     226  Ia32/Monitor.asm | INTEL
     227  Ia32/ModU64x32.asm | INTEL
     228  Ia32/MultU64x64.asm | INTEL
     229  Ia32/MultU64x32.asm | INTEL
     230  Ia32/LShiftU64.asm | INTEL
     231  Ia32/LRotU64.asm | INTEL
     232  Ia32/LongJump.asm | INTEL
     233  Ia32/Invd.asm | INTEL
     234  Ia32/FxRestore.asm | INTEL
     235  Ia32/FxSave.asm | INTEL
     236  Ia32/FlushCacheLine.asm | INTEL
     237  Ia32/EnablePaging32.asm | INTEL
     238  Ia32/EnableInterrupts.asm | INTEL
     239  Ia32/EnableDisableInterrupts.asm | INTEL
     240  Ia32/DivU64x64Remainder.asm | INTEL
     241  Ia32/DivU64x32Remainder.asm | INTEL
     242  Ia32/DivU64x32.asm | INTEL
     243  Ia32/DisablePaging32.asm | INTEL
     244  Ia32/DisableInterrupts.asm | INTEL
     245  Ia32/CpuPause.asm | INTEL
     246  Ia32/CpuIdEx.asm | INTEL
     247  Ia32/CpuId.asm | INTEL
     248  Ia32/CpuBreakpoint.asm | INTEL
     249  Ia32/ARShiftU64.asm | INTEL
    250250  Ia32/Thunk16.asm | INTEL
    251251  Ia32/EnablePaging64.asm | INTEL
     
    254254
    255255  Ia32/GccInline.c | GCC
     256<<<<<<< .working
    256257# VBox begin (yasm doesn't like the nasm variant) - original:
    257258#  Ia32/Thunk16.nasm | GCC
     
    280281  Ia32/RShiftU64.S | GCC
    281282  Ia32/LShiftU64.S | GCC
     283||||||| .merge-left.r103776
     284  Ia32/Thunk16.nasm | GCC
     285  Ia32/EnableDisableInterrupts.S | GCC
     286  Ia32/EnablePaging64.S | GCC
     287  Ia32/DisablePaging32.S | GCC
     288  Ia32/EnablePaging32.S | GCC
     289  Ia32/Mwait.S | GCC
     290  Ia32/Monitor.S | GCC
     291  Ia32/CpuIdEx.S | GCC
     292  Ia32/CpuId.S | GCC
     293  Ia32/LongJump.S | GCC
     294  Ia32/SetJump.S | GCC
     295  Ia32/SwapBytes64.S | GCC
     296  Ia32/DivU64x64Remainder.S | GCC
     297  Ia32/DivU64x32Remainder.S | GCC
     298  Ia32/ModU64x32.S | GCC
     299  Ia32/DivU64x32.S | GCC
     300  Ia32/MultU64x64.S | GCC
     301  Ia32/MultU64x32.S | GCC
     302  Ia32/RRotU64.S | GCC
     303  Ia32/LRotU64.S | GCC
     304  Ia32/ARShiftU64.S | GCC
     305  Ia32/RShiftU64.S | GCC
     306  Ia32/LShiftU64.S | GCC
     307=======
     308  Ia32/Thunk16.nasm | GCC
     309  Ia32/EnableDisableInterrupts.S | GCC
     310  Ia32/EnablePaging64.S | GCC
     311  Ia32/DisablePaging32.S | GCC
     312  Ia32/EnablePaging32.S | GCC
     313  Ia32/Mwait.S | GCC
     314  Ia32/Monitor.S | GCC
     315  Ia32/CpuIdEx.S | GCC
     316  Ia32/CpuId.S | GCC
     317  Ia32/LongJump.S | GCC
     318  Ia32/SetJump.S | GCC
     319  Ia32/SwapBytes64.S | GCC
     320  Ia32/DivU64x64Remainder.S | GCC
     321  Ia32/DivU64x32Remainder.S | GCC
     322  Ia32/ModU64x32.S | GCC
     323  Ia32/DivU64x32.S | GCC
     324  Ia32/MultU64x64.S | GCC
     325  Ia32/MultU64x32.S | GCC
     326  Ia32/RRotU64.S | GCC
     327  Ia32/LRotU64.S | GCC
     328  Ia32/ARShiftU64.S | GCC
     329  Ia32/RShiftU64.S | GCC
     330  Ia32/LShiftU64.S | GCC
     331>>>>>>> .merge-right.r103776
    282332  Ia32/EnableCache.S | GCC
    283333  Ia32/DisableCache.S | GCC
     
    396446  X64/DisableCache.asm
    397447
    398   X64/CpuBreakpoint.c | MSFT 
    399   X64/WriteMsr64.c | MSFT 
    400   X64/ReadMsr64.c | MSFT 
    401 
    402   X64/CpuBreakpoint.asm | INTEL 
    403   X64/WriteMsr64.asm | INTEL 
    404   X64/ReadMsr64.asm | INTEL 
     448  X64/CpuBreakpoint.c | MSFT
     449  X64/WriteMsr64.c | MSFT
     450  X64/ReadMsr64.c | MSFT
     451
     452  X64/CpuBreakpoint.asm | INTEL
     453  X64/WriteMsr64.asm | INTEL
     454  X64/ReadMsr64.asm | INTEL
    405455
    406456  X64/Non-existing.c
     
    424474  X64/GccInline.c | GCC
    425475# VBox begin (yasm doesn't like the nasm variant) - original:
    426 #  Ia32/Thunk16.nasm | GCC 
     476#  Ia32/Thunk16.nasm | GCC
    427477  Ia32/Thunk16.asm | GCC
    428478# VBox end
    429   X64/SwitchStack.S | GCC 
    430   X64/SetJump.S | GCC 
    431   X64/LongJump.S | GCC 
    432   X64/EnableDisableInterrupts.S | GCC 
    433   X64/DisablePaging64.S | GCC 
    434   X64/CpuId.S | GCC 
    435   X64/CpuIdEx.S | GCC 
     479  X64/SwitchStack.S | GCC
     480  X64/SetJump.S | GCC
     481  X64/LongJump.S | GCC
     482  X64/EnableDisableInterrupts.S | GCC
     483  X64/DisablePaging64.S | GCC
     484  X64/CpuId.S | GCC
     485  X64/CpuIdEx.S | GCC
    436486  X64/EnableCache.S | GCC
    437487  X64/DisableCache.S | GCC
    438   ChkStkGcc.c  | GCC 
     488  ChkStkGcc.c  | GCC
    439489
    440490[Sources.IPF]
     
    481531  Arm/InternalSwitchStack.c
    482532  Arm/Unaligned.c
    483   Math64.c                   | RVCT 
    484    
     533  Math64.c                   | RVCT
     534
    485535  Arm/SwitchStack.asm        | RVCT
    486536  Arm/SetJumpLongJump.asm    | RVCT
     
    491541  Arm/CpuBreakpoint.asm      | RVCT
    492542  Arm/MemoryFence.asm        | RVCT
    493  
     543
    494544  Arm/Math64.S                  | GCC
    495545  Arm/SwitchStack.S             | GCC
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseLib/BitField.c

    r58459 r58466  
    7070{
    7171  //
    72   // Higher bits in OrData those are not used must be zero. 
     72  // Higher bits in OrData those are not used must be zero.
    7373  //
    7474  // EndBit - StartBit + 1 might be 32 while the result right shifting 32 on a 32bit integer is undefined,
     
    7676  //
    7777  ASSERT ((OrData >> (EndBit - StartBit)) == ((OrData >> (EndBit - StartBit)) & 1));
    78  
     78
    7979  //
    8080  // ~((UINTN)-2 << EndBit) is a mask in which bit[0] thru bit[EndBit]
     
    112112{
    113113  //
    114   // Higher bits in AndData those are not used must be zero. 
     114  // Higher bits in AndData those are not used must be zero.
    115115  //
    116116  // EndBit - StartBit + 1 might be 32 while the result right shifting 32 on a 32bit integer is undefined,
     
    276276
    277277  Performs a bitwise AND between the bit field specified by StartBit and EndBit
    278   in Operand and the value specified by AndData, followed by a bitwise 
     278  in Operand and the value specified by AndData, followed by a bitwise
    279279  OR with value specified by OrData. All other bits in Operand are
    280280  preserved. The new 8-bit value is returned.
     
    468468
    469469  Performs a bitwise AND between the bit field specified by StartBit and EndBit
    470   in Operand and the value specified by AndData, followed by a bitwise 
     470  in Operand and the value specified by AndData, followed by a bitwise
    471471  OR with value specified by OrData. All other bits in Operand are
    472472  preserved. The new 16-bit value is returned.
     
    660660
    661661  Performs a bitwise AND between the bit field specified by StartBit and EndBit
    662   in Operand and the value specified by AndData, followed by a bitwise 
     662  in Operand and the value specified by AndData, followed by a bitwise
    663663  OR with value specified by OrData. All other bits in Operand are
    664664  preserved. The new 32-bit value is returned.
     
    810810  ASSERT (StartBit <= EndBit);
    811811  //
    812   // Higher bits in OrData those are not used must be zero. 
     812  // Higher bits in OrData those are not used must be zero.
    813813  //
    814814  // EndBit - StartBit + 1 might be 64 while the result right shifting 64 on RShiftU64() API is invalid,
     
    858858  UINT64  Value1;
    859859  UINT64  Value2;
    860  
     860
    861861  ASSERT (EndBit < 64);
    862862  ASSERT (StartBit <= EndBit);
    863863  //
    864   // Higher bits in AndData those are not used must be zero. 
     864  // Higher bits in AndData those are not used must be zero.
    865865  //
    866866  // EndBit - StartBit + 1 might be 64 while the right shifting 64 on RShiftU64() API is invalid,
     
    880880
    881881  Performs a bitwise AND between the bit field specified by StartBit and EndBit
    882   in Operand and the value specified by AndData, followed by a bitwise 
     882  in Operand and the value specified by AndData, followed by a bitwise
    883883  OR with value specified by OrData. All other bits in Operand are
    884884  preserved. The new 64-bit value is returned.
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseLib/CheckSum.c

    r48674 r58466  
    5050    Sum = (UINT8) (Sum + *(Buffer + Count));
    5151  }
    52  
     52
    5353  return Sum;
    5454}
     
    129129    Sum = (UINT16) (Sum + *(Buffer + Count));
    130130  }
    131  
     131
    132132  return Sum;
    133133}
     
    211211    Sum = Sum + *(Buffer + Count);
    212212  }
    213  
     213
    214214  return Sum;
    215215}
     
    293293    Sum = Sum + *(Buffer + Count);
    294294  }
    295  
     295
    296296  return Sum;
    297297}
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseLib/ChkStkGcc.c

    r48674 r58466  
    1818  Hack function for passing GCC build.
    1919**/
    20 VOID 
    21 __chkstk() 
     20VOID
     21__chkstk()
    2222{
    2323}
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseLib/DivS64x64Remainder.c

    r48674 r58466  
    2828
    2929  It is the caller's responsibility to not call this function with a Divisor of 0.
    30   If Divisor is 0, then the quotient and remainder should be assumed to be 
     30  If Divisor is 0, then the quotient and remainder should be assumed to be
    3131  the largest negative integer.
    3232
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseLib/Ia32/DivU64x64Remainder.S

    r58459 r58466  
    5858    jnz     L2
    5959    divl    %ebx
    60     movl    %eax, %ebx                  # ebx <- quotient                     
    61     movl    28(%esp), %ecx              # ecx <- high dword of divisor       
     60    movl    %eax, %ebx                  # ebx <- quotient
     61    movl    28(%esp), %ecx              # ecx <- high dword of divisor
    6262    mull    24(%esp)                    # edx:eax <- quotient * divisor[0..31]
    63     imull   %ebx, %ecx                  # ecx <- quotient * divisor[32..63]   
    64     addl    %ecx, %edx                  # edx <- (quotient * divisor)[32..63] 
    65     mov     32(%esp), %ecx              # ecx <- addr for Remainder           
    66     jc      TooLarge                    # product > 2^64                     
    67     cmpl    %edx, %edi                  # compare high 32 bits               
    68     ja      Correct                                                           
    69     jb      TooLarge                    # product > dividend                 
    70     cmpl    %eax, %esi                                                       
    71     jae     Correct                     # product <= dividend                 
     63    imull   %ebx, %ecx                  # ecx <- quotient * divisor[32..63]
     64    addl    %ecx, %edx                  # edx <- (quotient * divisor)[32..63]
     65    mov     32(%esp), %ecx              # ecx <- addr for Remainder
     66    jc      TooLarge                    # product > 2^64
     67    cmpl    %edx, %edi                  # compare high 32 bits
     68    ja      Correct
     69    jb      TooLarge                    # product > dividend
     70    cmpl    %eax, %esi
     71    jae     Correct                     # product <= dividend
    7272TooLarge:
    73     decl    %ebx                        # adjust quotient by -1             
    74     jecxz   Return                      # return if Remainder == NULL       
    75     sub     24(%esp), %eax                                                   
     73    decl    %ebx                        # adjust quotient by -1
     74    jecxz   Return                      # return if Remainder == NULL
     75    sub     24(%esp), %eax
    7676    sbb     28(%esp), %edx              # edx:eax <- (quotient - 1) * divisor
    7777Correct:
     
    8282    movl    %edi, 4(%ecx)
    8383Return:
    84     movl    %ebx, %eax                  # eax <- quotient         
     84    movl    %ebx, %eax                  # eax <- quotient
    8585    xorl    %edx, %edx                  # quotient is 32 bits long
    8686    pop     %edi
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseLib/Ia32/EnableCache.S

    r48674 r58466  
    1616# Abstract:
    1717#
    18 #   Flush all caches with a WBINVD instruction, clear the CD bit of CR0 to 0, and clear 
     18#   Flush all caches with a WBINVD instruction, clear the CD bit of CR0 to 0, and clear
    1919#   the NW bit of CR0 to 0
    2020#
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseLib/Ia32/EnableCache.asm

    r48674 r58466  
    1616; Abstract:
    1717;
    18 ;  Flush all caches with a WBINVD instruction, clear the CD bit of CR0 to 0, and clear 
     18;  Flush all caches with a WBINVD instruction, clear the CD bit of CR0 to 0, and clear
    1919;  the NW bit of CR0 to 0
    2020;
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseLib/Ia32/GccInline.c

    r48674 r58466  
    11/** @file
    22  GCC inline implementation of BaseLib processor specific functions.
    3  
     3
    44  Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
    55  Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
     
    3333{
    3434  // This is a little bit of overkill and it is more about the compiler that it is
    35   // actually processor synchronization. This is like the _ReadWriteBarrier 
     35  // actually processor synchronization. This is like the _ReadWriteBarrier
    3636  // Microsoft specific intrinsic
    3737  __asm__ __volatile__ ("":::"memory");
     
    6666  VOID
    6767  )
    68 { 
     68{
    6969  __asm__ __volatile__ ("cli"::: "memory");
    7070}
     
    129129{
    130130  UINT64 Data;
    131  
     131
    132132  __asm__ __volatile__ (
    133133    "rdmsr"
     
    135135    : "c"  (Index)  // %1
    136136    );
    137    
     137
    138138  return Data;
    139139}
     
    169169      "A" (Value)
    170170    );
    171    
     171
    172172  return Value;
    173173}
     
    192192{
    193193  UINTN Eflags;
    194  
     194
    195195  __asm__ __volatile__ (
    196196    "pushfl     \n\t"
     
    198198    : "=r" (Eflags)
    199199    );
    200    
     200
    201201  return Eflags;
    202202}
     
    221221{
    222222  UINTN   Data;
    223  
    224   __asm__ __volatile__ (
    225     "movl %%cr0,%0" 
     223
     224  __asm__ __volatile__ (
     225    "movl %%cr0,%0"
    226226    : "=a" (Data)
    227227    );
    228  
     228
    229229  return Data;
    230230}
     
    248248{
    249249  UINTN Data;
    250  
    251   __asm__ __volatile__ (
    252     "movl %%cr2, %0" 
     250
     251  __asm__ __volatile__ (
     252    "movl %%cr2, %0"
    253253    : "=r" (Data)
    254254    );
    255  
     255
    256256  return Data;
    257257}
     
    274274{
    275275  UINTN Data;
    276  
     276
    277277  __asm__ __volatile__ (
    278278    "movl %%cr3, %0"
    279279    : "=r" (Data)
    280280    );
    281  
     281
    282282  return Data;
    283283}
     
    301301{
    302302  UINTN Data;
    303  
     303
    304304  __asm__ __volatile__ (
    305305    "movl %%cr4, %0"
    306306    : "=a" (Data)
    307307    );
    308  
     308
    309309  return Data;
    310310}
     
    432432{
    433433  UINTN Data;
    434  
     434
    435435  __asm__ __volatile__ (
    436436    "movl %%dr0, %0"
    437437    : "=r" (Data)
    438438    );
    439  
     439
    440440  return Data;
    441441}
     
    459459{
    460460  UINTN Data;
    461  
     461
    462462  __asm__ __volatile__ (
    463463    "movl %%dr1, %0"
    464464    : "=r" (Data)
    465465    );
    466  
     466
    467467  return Data;
    468468}
     
    486486{
    487487  UINTN Data;
    488  
     488
    489489  __asm__ __volatile__ (
    490490    "movl %%dr2, %0"
    491491    : "=r" (Data)
    492492    );
    493  
     493
    494494  return Data;
    495495}
     
    513513{
    514514  UINTN Data;
    515  
     515
    516516  __asm__ __volatile__ (
    517517    "movl %%dr3, %0"
    518518    : "=r" (Data)
    519519    );
    520  
     520
    521521  return Data;
    522522}
     
    540540{
    541541  UINTN Data;
    542  
     542
    543543  __asm__ __volatile__ (
    544544    "movl %%dr4, %0"
    545545    : "=r" (Data)
    546546    );
    547  
     547
    548548  return Data;
    549549}
     
    567567{
    568568  UINTN Data;
    569  
     569
    570570  __asm__ __volatile__ (
    571571    "movl %%dr5, %0"
    572572    : "=r" (Data)
    573573    );
    574  
     574
    575575  return Data;
    576576}
     
    594594{
    595595  UINTN Data;
    596  
     596
    597597  __asm__ __volatile__ (
    598598    "movl %%dr6, %0"
    599599    : "=r" (Data)
    600600    );
    601  
     601
    602602  return Data;
    603603}
     
    621621{
    622622  UINTN Data;
    623  
     623
    624624  __asm__ __volatile__ (
    625625    "movl %%dr7, %0"
    626626    : "=r" (Data)
    627627    );
    628  
     628
    629629  return Data;
    630630}
     
    855855{
    856856  UINT16  Data;
    857  
     857
    858858  __asm__ __volatile__ (
    859859    "mov   %%cs, %0"
    860860    :"=a" (Data)
    861861    );
    862    
     862
    863863  return Data;
    864864}
     
    881881{
    882882  UINT16  Data;
    883  
     883
    884884  __asm__ __volatile__ (
    885885    "mov  %%ds, %0"
    886886    :"=a" (Data)
    887887    );
    888    
     888
    889889  return Data;
    890890}
     
    907907{
    908908  UINT16  Data;
    909  
     909
    910910  __asm__ __volatile__ (
    911911    "mov  %%es, %0"
    912912    :"=a" (Data)
    913913    );
    914    
     914
    915915  return Data;
    916916}
     
    933933{
    934934  UINT16  Data;
    935  
     935
    936936  __asm__ __volatile__ (
    937937    "mov  %%fs, %0"
    938938    :"=a" (Data)
    939939    );
    940    
     940
    941941  return Data;
    942942}
     
    959959{
    960960  UINT16  Data;
    961  
     961
    962962  __asm__ __volatile__ (
    963963    "mov  %%gs, %0"
    964964    :"=a" (Data)
    965965    );
    966    
     966
    967967  return Data;
    968968}
     
    985985{
    986986  UINT16  Data;
    987  
     987
    988988  __asm__ __volatile__ (
    989989    "mov  %%ds, %0"
    990990    :"=a" (Data)
    991991    );
    992    
     992
    993993  return Data;
    994994}
     
    10111011{
    10121012  UINT16  Data;
    1013  
     1013
    10141014  __asm__ __volatile__ (
    10151015    "str  %0"
    10161016    : "=a" (Data)
    10171017    );
    1018    
     1018
    10191019  return Data;
    10201020}
     
    10631063    : "m" (*Gdtr)
    10641064    );
    1065    
     1065
    10661066}
    10671067
     
    11281128{
    11291129  UINT16  Data;
    1130  
     1130
    11311131  __asm__ __volatile__ (
    11321132    "sldt  %0"
    11331133    : "=g" (Data)   // %0
    11341134    );
    1135    
     1135
    11361136  return Data;
    11371137}
     
    11811181    :
    11821182    : "m" (*Buffer)  // %0
    1183     );   
     1183    );
    11841184}
    11851185
     
    12341234    : "=A"  (Data)       // %0
    12351235    );
    1236    
     1236
    12371237  return Data;
    12381238}
     
    12641264    : "=A"  (Data)       // %0
    12651265    );
    1266    
     1266
    12671267  return Data;
    12681268}
     
    12941294    : "=A"  (Data)       // %0
    12951295    );
    1296    
     1296
    12971297  return Data;
    12981298}
     
    13241324    : "=A"  (Data)       // %0
    13251325    );
    1326    
     1326
    13271327  return Data;
    13281328}
     
    13541354    : "=A"  (Data)       // %0
    13551355    );
    1356    
     1356
    13571357  return Data;
    13581358}
     
    13841384    : "=A"  (Data)       // %0
    13851385    );
    1386    
     1386
    13871387  return Data;
    13881388}
     
    14141414    : "=A"  (Data)       // %0
    14151415    );
    1416    
     1416
    14171417  return Data;
    14181418}
     
    14441444    : "=A"  (Data)       // %0
    14451445    );
    1446    
     1446
    14471447  return Data;
    14481448}
     
    14661466  __asm__ __volatile__ (
    14671467    "movq %0, %%mm0"  // %0
    1468     : 
     1468    :
    14691469    : "m" (Value)
    14701470    );
     
    14891489  __asm__ __volatile__ (
    14901490    "movq %0, %%mm1"  // %0
    1491     : 
     1491    :
    14921492    : "m" (Value)
    14931493    );
     
    15121512  __asm__ __volatile__ (
    15131513    "movq %0, %%mm2"  // %0
    1514     : 
     1514    :
    15151515    : "m" (Value)
    15161516    );
     
    15351535  __asm__ __volatile__ (
    15361536    "movq %0, %%mm3"  // %0
    1537     : 
     1537    :
    15381538    : "m" (Value)
    15391539    );
     
    15581558  __asm__ __volatile__ (
    15591559    "movq %0, %%mm4"  // %0
    1560     : 
     1560    :
    15611561    : "m" (Value)
    15621562    );
     
    15811581  __asm__ __volatile__ (
    15821582    "movq %0, %%mm5"  // %0
    1583     : 
     1583    :
    15841584    : "m" (Value)
    15851585    );
     
    16041604  __asm__ __volatile__ (
    16051605    "movq %0, %%mm6"  // %0
    1606     : 
     1606    :
    16071607    : "m" (Value)
    16081608    );
     
    16271627  __asm__ __volatile__ (
    16281628    "movq %0, %%mm7"  // %0
    1629     : 
     1629    :
    16301630    : "m" (Value)
    16311631    );
     
    16491649{
    16501650  UINT64  Data;
    1651  
     1651
    16521652  __asm__ __volatile__ (
    16531653    "rdtsc"
    16541654    : "=A" (Data)
    16551655    );
    1656  
    1657   return Data; 
     1656
     1657  return Data;
    16581658}
    16591659
     
    16771677{
    16781678  UINT64  Data;
    1679  
     1679
    16801680  __asm__ __volatile__ (
    16811681    "rdpmc"
     
    16831683    : "c"  (Index)
    16841684    );
    1685  
    1686   return Data; 
     1685
     1686  return Data;
    16871687}
    16881688
     
    17211721{
    17221722  __asm__ __volatile__ ("invd":::"memory");
    1723    
     1723
    17241724}
    17251725
     
    17481748  __asm__ __volatile__ (
    17491749    "clflush (%0)"
    1750     : "+a" (LinearAddress) 
    1751     : 
     1750    : "+a" (LinearAddress)
     1751    :
    17521752    : "memory"
    17531753    );
    1754    
     1754
    17551755    return LinearAddress;
    17561756}
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseLib/Ia32/InternalSwitchStack.S

    r48674 r58466  
    4545        movl    %eax, (%esp)
    4646        pushl $0                  # keeps gdb from unwinding stack
    47         jmp   *8(%ebp)            # call and never return 
     47        jmp   *8(%ebp)            # call and never return
    4848
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseLib/Ia32/MultU64x64.S

    r48674 r58466  
    3131#------------------------------------------------------------------------------
    3232ASM_PFX(InternalMathMultU64x64):
    33     push    %ebx                                     
    34     movl    8(%esp), %ebx             # ebx <- M1[0..31]               
    35     movl    16(%esp), %edx            # edx <- M2[0..31]                                   
    36     movl    %ebx, %ecx                                                 
    37     movl    %edx, %eax               
    38     imull   20(%esp), %ebx            # ebx <- M1[0..31] * M2[32..63]   
    39     imull   12(%esp), %edx            # edx <- M1[32..63] * M2[0..31]   
    40     addl    %edx, %ebx                # carries are abandoned           
     33    push    %ebx
     34    movl    8(%esp), %ebx             # ebx <- M1[0..31]
     35    movl    16(%esp), %edx            # edx <- M2[0..31]
     36    movl    %ebx, %ecx
     37    movl    %edx, %eax
     38    imull   20(%esp), %ebx            # ebx <- M1[0..31] * M2[32..63]
     39    imull   12(%esp), %edx            # edx <- M1[32..63] * M2[0..31]
     40    addl    %edx, %ebx                # carries are abandoned
    4141    mull    %ecx                      # edx:eax <- M1[0..31] * M2[0..31]
    42     addl    %ebx, %edx                # carries are abandoned           
     42    addl    %ebx, %edx                # carries are abandoned
    4343    pop     %ebx
    4444    ret
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseLib/Ipf/AccessMsrDb.s

    r48674 r58466  
    11/// @file
    2 ///  IPF specific Machine Specific Registers accessing functions. 
    3 ///  This implementation uses raw data to prepresent the assembly instruction of 
     2///  IPF specific Machine Specific Registers accessing functions.
     3///  This implementation uses raw data to prepresent the assembly instruction of
    44/// mov msr[]= and mov =msr[].
    55///
     
    4444AsmReadMsr::
    4545//
    46 // The follow 16 bytes stand for the bundle of 
     46// The follow 16 bytes stand for the bundle of
    4747//   mov    r8=msr[in0];;
    4848// since MSFT tool chain does not support mov =msr[] instruction
     
    9595AsmWriteMsr::
    9696//
    97 // The follow 16 bytes stand for the bundle of 
     97// The follow 16 bytes stand for the bundle of
    9898//  mov             msr[in0] = in1
    9999//  mov             r8 = in1;;
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseLib/Ipf/Asm.h

    r48674 r58466  
    1 /** @file 
     1/** @file
    22
    33    This module contains generic macros for an assembly writer.
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseLib/Ipf/AsmCpuMisc.s

    r48674 r58466  
    3535        // do we need the mf.a also here?
    3636        mf.a    // wait for any IO to complete?
    37        
     37
    3838        // not sure if we need serialization here, just put it, in case...
    39        
     39
    4040        srlz.d;;
    4141        srlz.i;;
    42        
     42
    4343        br.ret.dpnt    b0;;
    4444.endp MemoryFence
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseLib/Ipf/FlushCacheRange.c

    r48674 r58466  
    2020  CPU.
    2121
    22   Flushes the cache lines specified by Address and Length.  If Address is not aligned 
    23   on a cache line boundary, then entire cache line containing Address is flushed. 
    24   If Address + Length is not aligned on a cache line boundary, then the entire cache 
    25   line containing Address + Length - 1 is flushed.  This function may choose to flush 
    26   the entire cache if that is more efficient than flushing the specified range.  If 
    27   Length is 0, the no cache lines are flushed.  Address is returned.   
     22  Flushes the cache lines specified by Address and Length.  If Address is not aligned
     23  on a cache line boundary, then entire cache line containing Address is flushed.
     24  If Address + Length is not aligned on a cache line boundary, then the entire cache
     25  line containing Address + Length - 1 is flushed.  This function may choose to flush
     26  the entire cache if that is more efficient than flushing the specified range.  If
     27  Length is 0, the no cache lines are flushed.  Address is returned.
    2828  This function is only available on IPF.
    2929
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseLib/Ipf/Ia64gen.h

    r48674 r58466  
    1 /** @file 
     1/** @file
    22
    33    Register Definition for IPF.
    4  
     4
    55Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
    66This program and the accompanying materials
     
    1010
    1111THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
    12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             
    13  
     12WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
     13
    1414**/
    1515#ifndef _IA64GEN_H_
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseLib/Ipf/InternalFlushCacheRange.s

    r48674 r58466  
    11//++
    22// Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
    3 // This program and the accompanying materials                         
    4 // are licensed and made available under the terms and conditions of the BSD License         
    5 // which accompanies this distribution.  The full text of the license may be found at       
    6 // http://opensource.org/licenses/bsd-license.php.                                           
    7 //                                                                                           
    8 // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     
    9 // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             
    10 // 
     3// This program and the accompanying materials
     4// are licensed and made available under the terms and conditions of the BSD License
     5// which accompanies this distribution.  The full text of the license may be found at
     6// http://opensource.org/licenses/bsd-license.php.
     7//
     8// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
     9// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
     10//
    1111//  Module Name:
    12 //    InternalFlushCacheRange.s 
     12//    InternalFlushCacheRange.s
    1313//
    1414//  Abstract:
    15 //    Assemble routine to flush cache lines 
     15//    Assemble routine to flush cache lines
    1616//
    1717// Revision History:
     
    4444//
    4545//  @return Address
    46 // 
     46//
    4747//  VOID *
    4848//  EFIAPI
     
    5555
    5656      NESTED_SETUP (5,8,0,0)
    57            
     57
    5858      mov         loc2 = ar.lc
    59      
     59
    6060      mov         loc3 = in0                  // Start address.
    6161      mov         loc4 = in1;;                // Length in bytes.
    62      
     62
    6363      cmp.eq  p6,p7 = loc4, r0;;               // If Length is zero then don't flush any cache
    64       (p6)  br.spnt.many DoneFlushingC;;         
    65      
    66       add         loc4 = loc4,loc3 
     64      (p6)  br.spnt.many DoneFlushingC;;
     65
     66      add         loc4 = loc4,loc3
    6767      mov         loc5 = 1;;
    6868      sub         loc4 = loc4, loc5 ;; // the End address to flush
    69                                          
    70       dep         loc3 = r0,loc3,0,5         
    71       dep         loc4 = r0,loc4,0,5;;         
    72       shr         loc3 = loc3,5             
     69
     70      dep         loc3 = r0,loc3,0,5
     71      dep         loc4 = r0,loc4,0,5;;
     72      shr         loc3 = loc3,5
    7373      shr         loc4 = loc4,5;;    // 32 byte cache line
    74      
    75       sub         loc4 = loc4,loc3;; // total flush count, It should be add 1 but 
    76                                      // the br.cloop will first execute one time 
    77       mov         loc3 = in0                 
    78       mov         loc5 = 32     
     74
     75      sub         loc4 = loc4,loc3;; // total flush count, It should be add 1 but
     76                                     // the br.cloop will first execute one time
     77      mov         loc3 = in0
     78      mov         loc5 = 32
    7979      mov         ar.lc = loc4;;
    8080
    8181StillFlushingC:
    82       fc          loc3;; 
     82      fc          loc3;;
    8383      sync.i;;
    8484      srlz.i;;
     
    8686      br.cloop.sptk.few StillFlushingC;;
    8787
    88 DoneFlushingC:     
    89       mov         ar.lc = loc2     
     88DoneFlushingC:
     89      mov         ar.lc = loc2
    9090      mov          r8   = in0       // return *Address
    9191      NESTED_RETURN
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseLib/Ipf/ReadCr.s

    r48674 r58466  
    9494  (p49)  mov  ret0=cr.lrr0      // cr80
    9595  (p50)  mov  ret0=cr.lrr1      // cr81
    96  
     96
    9797  //
    9898  // Restore predicates and return.
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseLib/Ipf/SwitchStack.s

    r48674 r58466  
    2828        mov                 r18 = in2
    2929        and                 r2  = r14, r2
    30        
     30
    3131        flushrs
    32        
     32
    3333        mov                 ar.rsc = r2
    3434        mov                 sp  = in3
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseLib/LinkedList.c

    r58459 r58466  
    2525  If List->backLink is NULL, then ASSERT().
    2626  If Node is NULL, then ASSERT().
    27   If PcdVerifyNodeInList is TRUE and DoMembershipCheck is TRUE and Node 
     27  If PcdVerifyNodeInList is TRUE and DoMembershipCheck is TRUE and Node
    2828  is in not a member of List, then return FALSE
    2929  If PcdMaximumLinkedListLength is not zero, and List contains more than
     
    3232  @param  List              A pointer to a node in a linked list.
    3333  @param  Node              A pointer to a node in a linked list.
    34   @param  VerifyNodeInList  TRUE if a check should be made to see if Node is a 
    35                             member of List.  FALSE if no membership test should 
     34  @param  VerifyNodeInList  TRUE if a check should be made to see if Node is a
     35                            member of List.  FALSE if no membership test should
    3636                            be performed.
    3737
    3838  @retval   TRUE if PcdVerifyNodeInList is FALSE
    3939  @retval   TRUE if DoMembershipCheck is FALSE
    40   @retval   TRUE if PcdVerifyNodeInList is TRUE and DoMembershipCheck is TRUE 
     40  @retval   TRUE if PcdVerifyNodeInList is TRUE and DoMembershipCheck is TRUE
    4141            and Node is a member of List.
    42   @retval   FALSE if PcdVerifyNodeInList is TRUE and DoMembershipCheck is TRUE 
     42  @retval   FALSE if PcdVerifyNodeInList is TRUE and DoMembershipCheck is TRUE
    4343            and Node is in not a member of List.
    4444
     
    6868  if (FeaturePcdGet (PcdVerifyNodeInList) && VerifyNodeInList) {
    6969    //
    70     // Check to see if Node is a member of List. 
     70    // Check to see if Node is a member of List.
    7171    // Exit early if the number of nodes in List >= PcdMaximumLinkedListLength
    7272    //
     
    8787        }
    8888      }
    89     } while ((Ptr != List) && (Ptr != Node)); 
     89    } while ((Ptr != List) && (Ptr != Node));
    9090
    9191    if (Ptr != Node) {
     
    176176  //
    177177  ASSERT (InternalBaseLibIsNodeInList (ListHead, Entry, FALSE));
    178  
     178
    179179  Entry->ForwardLink = ListHead->ForwardLink;
    180180  Entry->BackLink = ListHead;
     
    193193  If ListHead is NULL, then ASSERT().
    194194  If Entry is NULL, then ASSERT().
    195   If ListHead was not initialized with INTIALIZE_LIST_HEAD_VARIABLE() or 
     195  If ListHead was not initialized with INTIALIZE_LIST_HEAD_VARIABLE() or
    196196  InitializeListHead(), then ASSERT().
    197197  If PcdMaximumLinkedListLength is not zero, and prior to insertion the number
     
    217217  //
    218218  ASSERT (InternalBaseLibIsNodeInList (ListHead, Entry, FALSE));
    219  
     219
    220220  Entry->ForwardLink = ListHead;
    221221  Entry->BackLink = ListHead->BackLink;
     
    228228  Retrieves the first node of a doubly-linked list.
    229229
    230   Returns the first node of a doubly-linked list.  List must have been 
     230  Returns the first node of a doubly-linked list.  List must have been
    231231  initialized with INTIALIZE_LIST_HEAD_VARIABLE() or InitializeListHead().
    232232  If List is empty, then List is returned.
    233233
    234234  If List is NULL, then ASSERT().
    235   If List was not initialized with INTIALIZE_LIST_HEAD_VARIABLE() or 
     235  If List was not initialized with INTIALIZE_LIST_HEAD_VARIABLE() or
    236236  InitializeListHead(), then ASSERT().
    237237  If PcdMaximumLinkedListLength is not zero, and the number of nodes
     
    262262  Retrieves the next node of a doubly-linked list.
    263263
    264   Returns the node of a doubly-linked list that follows Node. 
     264  Returns the node of a doubly-linked list that follows Node.
    265265  List must have been initialized with INTIALIZE_LIST_HEAD_VARIABLE()
    266266  or InitializeListHead().  If List is empty, then List is returned.
     
    268268  If List is NULL, then ASSERT().
    269269  If Node is NULL, then ASSERT().
    270   If List was not initialized with INTIALIZE_LIST_HEAD_VARIABLE() or 
     270  If List was not initialized with INTIALIZE_LIST_HEAD_VARIABLE() or
    271271  InitializeListHead(), then ASSERT().
    272272  If PcdMaximumLinkedListLength is not zero, and List contains more than
     
    297297/**
    298298  Retrieves the previous node of a doubly-linked list.
    299  
    300   Returns the node of a doubly-linked list that precedes Node. 
     299
     300  Returns the node of a doubly-linked list that precedes Node.
    301301  List must have been initialized with INTIALIZE_LIST_HEAD_VARIABLE()
    302302  or InitializeListHead().  If List is empty, then List is returned.
    303  
     303
    304304  If List is NULL, then ASSERT().
    305305  If Node is NULL, then ASSERT().
    306   If List was not initialized with INTIALIZE_LIST_HEAD_VARIABLE() or 
     306  If List was not initialized with INTIALIZE_LIST_HEAD_VARIABLE() or
    307307  InitializeListHead(), then ASSERT().
    308308  If PcdMaximumLinkedListLength is not zero, and List contains more than
    309309  PcdMaximumLinkedListLength nodes, then ASSERT().
    310310  If PcdVerifyNodeInList is TRUE and Node is not a node in List, then ASSERT().
    311  
     311
    312312  @param  List  A pointer to the head node of a doubly-linked list.
    313313  @param  Node  A pointer to a node in the doubly-linked list.
    314  
     314
    315315  @return A pointer to the previous node if one exists. Otherwise List is returned.
    316  
     316
    317317**/
    318318LIST_ENTRY *
     
    327327  //
    328328  ASSERT (InternalBaseLibIsNodeInList (List, Node, TRUE));
    329  
     329
    330330  return Node->BackLink;
    331331}
     
    338338
    339339  If ListHead is NULL, then ASSERT().
    340   If ListHead was not initialized with INTIALIZE_LIST_HEAD_VARIABLE() or 
     340  If ListHead was not initialized with INTIALIZE_LIST_HEAD_VARIABLE() or
    341341  InitializeListHead(), then ASSERT().
    342342  If PcdMaximumLinkedListLength is not zero, and the number of nodes
     
    360360  //
    361361  ASSERT (InternalBaseLibIsNodeInList (ListHead, ListHead, FALSE));
    362  
     362
    363363  return (BOOLEAN)(ListHead->ForwardLink == ListHead);
    364364}
     
    375375  If List is NULL, then ASSERT().
    376376  If Node is NULL, then ASSERT().
    377   If List was not initialized with INTIALIZE_LIST_HEAD_VARIABLE() or InitializeListHead(), 
     377  If List was not initialized with INTIALIZE_LIST_HEAD_VARIABLE() or InitializeListHead(),
    378378  then ASSERT().
    379379  If PcdMaximumLinkedListLength is not zero, and the number of nodes
    380380  in List, including the List node, is greater than or equal to
    381381  PcdMaximumLinkedListLength, then ASSERT().
    382   If PcdVerifyNodeInList is TRUE and Node is not a node in List and Node is not 
     382  If PcdVerifyNodeInList is TRUE and Node is not a node in List and Node is not
    383383  equal to List, then ASSERT().
    384384
     
    401401  //
    402402  ASSERT (InternalBaseLibIsNodeInList (List, Node, TRUE));
    403  
     403
    404404  return (BOOLEAN)(Node == List);
    405405}
     
    439439  //
    440440  ASSERT (InternalBaseLibIsNodeInList (List, Node, TRUE));
    441  
     441
    442442  return (BOOLEAN)(!IsNull (List, Node) && List->BackLink == Node);
    443443}
     
    451451  of the SecondEntry node in a doubly-linked list. SecondEntry must be in the
    452452  same double linked list as FirstEntry and that double linked list must have
    453   been initialized with INTIALIZE_LIST_HEAD_VARIABLE() or InitializeListHead(). 
     453  been initialized with INTIALIZE_LIST_HEAD_VARIABLE() or InitializeListHead().
    454454  SecondEntry is returned after the nodes are swapped.
    455455
    456456  If FirstEntry is NULL, then ASSERT().
    457457  If SecondEntry is NULL, then ASSERT().
    458   If PcdVerifyNodeInList is TRUE and SecondEntry and FirstEntry are not in the 
     458  If PcdVerifyNodeInList is TRUE and SecondEntry and FirstEntry are not in the
    459459  same linked list, then ASSERT().
    460460  If PcdMaximumLinkedListLength is not zero, and the number of nodes in the
     
    465465  @param  FirstEntry  A pointer to a node in a linked list.
    466466  @param  SecondEntry A pointer to another node in the same linked list.
    467  
     467
    468468  @return SecondEntry.
    469469
     
    486486  //
    487487  ASSERT (InternalBaseLibIsNodeInList (FirstEntry, SecondEntry, TRUE));
    488  
     488
    489489  //
    490490  // Ptr is the node pointed to by FirstEntry->ForwardLink
     
    544544{
    545545  ASSERT (!IsListEmpty (Entry));
    546  
     546
    547547  Entry->ForwardLink->BackLink = Entry->BackLink;
    548548  Entry->BackLink->ForwardLink = Entry->ForwardLink;
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseLib/SafeString.c

    r58464 r58466  
    165165                                   If Source is NULL.
    166166                                   If PcdMaximumUnicodeStringLength is not zero,
    167                                     and DestMax is greater than 
     167                                    and DestMax is greater than
    168168                                    PcdMaximumUnicodeStringLength.
    169169                                   If DestMax is 0.
     
    179179{
    180180  UINTN            SourceLen;
    181  
     181
    182182  ASSERT (((UINTN) Destination & BIT0) == 0);
    183183  ASSERT (((UINTN) Source & BIT0) == 0);
     
    239239
    240240  @retval RETURN_SUCCESS           String is copied.
    241   @retval RETURN_BUFFER_TOO_SMALL  If DestMax is NOT greater than 
     241  @retval RETURN_BUFFER_TOO_SMALL  If DestMax is NOT greater than
    242242                                   MIN(StrLen(Source), Length).
    243243  @retval RETURN_INVALID_PARAMETER If Destination is NULL.
    244244                                   If Source is NULL.
    245245                                   If PcdMaximumUnicodeStringLength is not zero,
    246                                     and DestMax is greater than 
     246                                    and DestMax is greater than
    247247                                    PcdMaximumUnicodeStringLength.
    248248                                   If DestMax is 0.
     
    326326
    327327  @retval RETURN_SUCCESS           String is appended.
    328   @retval RETURN_BAD_BUFFER_SIZE   If DestMax is NOT greater than 
     328  @retval RETURN_BAD_BUFFER_SIZE   If DestMax is NOT greater than
    329329                                   StrLen(Destination).
    330330  @retval RETURN_BUFFER_TOO_SMALL  If (DestMax - StrLen(Destination)) is NOT
     
    333333                                   If Source is NULL.
    334334                                   If PcdMaximumUnicodeStringLength is not zero,
    335                                     and DestMax is greater than 
     335                                    and DestMax is greater than
    336336                                    PcdMaximumUnicodeStringLength.
    337337                                   If DestMax is 0.
     
    349349  UINTN               CopyLen;
    350350  UINTN               SourceLen;
    351  
     351
    352352  ASSERT (((UINTN) Destination & BIT0) == 0);
    353353  ASSERT (((UINTN) Source & BIT0) == 0);
     
    430430                                   If Source is NULL.
    431431                                   If PcdMaximumUnicodeStringLength is not zero,
    432                                     and DestMax is greater than 
     432                                    and DestMax is greater than
    433433                                    PcdMaximumUnicodeStringLength.
    434434                                   If DestMax is 0.
     
    447447  UINTN               CopyLen;
    448448  UINTN               SourceLen;
    449  
     449
    450450  ASSERT (((UINTN) Destination & BIT0) == 0);
    451451  ASSERT (((UINTN) Source & BIT0) == 0);
     
    568568                                   If Source is NULL.
    569569                                   If PcdMaximumAsciiStringLength is not zero,
    570                                     and DestMax is greater than 
     570                                    and DestMax is greater than
    571571                                    PcdMaximumAsciiStringLength.
    572572                                   If DestMax is 0.
     
    582582{
    583583  UINTN            SourceLen;
    584  
     584
    585585  //
    586586  // 1. Neither Destination nor Source shall be a null pointer.
     
    636636
    637637  @retval RETURN_SUCCESS           String is copied.
    638   @retval RETURN_BUFFER_TOO_SMALL  If DestMax is NOT greater than 
     638  @retval RETURN_BUFFER_TOO_SMALL  If DestMax is NOT greater than
    639639                                   MIN(StrLen(Source), Length).
    640640  @retval RETURN_INVALID_PARAMETER If Destination is NULL.
    641641                                   If Source is NULL.
    642642                                   If PcdMaximumAsciiStringLength is not zero,
    643                                     and DestMax is greater than 
     643                                    and DestMax is greater than
    644644                                    PcdMaximumAsciiStringLength.
    645645                                   If DestMax is 0.
     
    717717
    718718  @retval RETURN_SUCCESS           String is appended.
    719   @retval RETURN_BAD_BUFFER_SIZE   If DestMax is NOT greater than 
     719  @retval RETURN_BAD_BUFFER_SIZE   If DestMax is NOT greater than
    720720                                   StrLen(Destination).
    721721  @retval RETURN_BUFFER_TOO_SMALL  If (DestMax - StrLen(Destination)) is NOT
     
    724724                                   If Source is NULL.
    725725                                   If PcdMaximumAsciiStringLength is not zero,
    726                                     and DestMax is greater than 
     726                                    and DestMax is greater than
    727727                                    PcdMaximumAsciiStringLength.
    728728                                   If DestMax is 0.
     
    740740  UINTN               CopyLen;
    741741  UINTN               SourceLen;
    742  
     742
    743743  //
    744744  // Let CopyLen denote the value DestMax - AsciiStrnLenS(Destination, DestMax) upon entry to AsciiStrCatS.
     
    815815                                   If Source is NULL.
    816816                                   If PcdMaximumAsciiStringLength is not zero,
    817                                     and DestMax is greater than 
     817                                    and DestMax is greater than
    818818                                    PcdMaximumAsciiStringLength.
    819819                                   If DestMax is 0.
     
    832832  UINTN               CopyLen;
    833833  UINTN               SourceLen;
    834  
     834
    835835  //
    836836  // Let CopyLen denote the value DestMax - AsciiStrnLenS(Destination, DestMax) upon entry to AsciiStrnCatS.
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseLib/String.c

    r58459 r58466  
    7474  [ATTENTION] This function will be deprecated for security reason.
    7575
    76   Copies up to a specified length from one Null-terminated Unicode string  to 
     76  Copies up to a specified length from one Null-terminated Unicode string  to
    7777  another Null-terminated Unicode string and returns the new Unicode string.
    7878
     
    9090  If Length > 0 and Source is not aligned on a 16-bit boundary, then ASSERT().
    9191  If Source and Destination overlap, then ASSERT().
    92   If PcdMaximumUnicodeStringLength is not zero, and Length is greater than 
     92  If PcdMaximumUnicodeStringLength is not zero, and Length is greater than
    9393  PcdMaximumUnicodeStringLength, then ASSERT().
    9494  If PcdMaximumUnicodeStringLength is not zero, and Source contains more than
     
    189189  Null terminator.
    190190
    191   This function returns the size, in bytes, of the Null-terminated Unicode string 
     191  This function returns the size, in bytes, of the Null-terminated Unicode string
    192192  specified by String.
    193193
     
    263263  Compares up to a specified length the contents of two Null-terminated Unicode strings,
    264264  and returns the difference between the first mismatched Unicode characters.
    265  
     265
    266266  This function compares the Null-terminated Unicode string FirstString to the
    267267  Null-terminated Unicode string SecondString. At most, Length Unicode
     
    382382  [ATTENTION] This function will be deprecated for security reason.
    383383
    384   Concatenates up to a specified length one Null-terminated Unicode to the end 
    385   of another Null-terminated Unicode string, and returns the concatenated 
     384  Concatenates up to a specified length one Null-terminated Unicode to the end
     385  of another Null-terminated Unicode string, and returns the concatenated
    386386  Unicode string.
    387387
     
    399399  If Length > 0 and Source is not aligned on a 16-bit boundary, then ASSERT().
    400400  If Source and Destination overlap, then ASSERT().
    401   If PcdMaximumUnicodeStringLength is not zero, and Length is greater than 
     401  If PcdMaximumUnicodeStringLength is not zero, and Length is greater than
    402402  PcdMaximumUnicodeStringLength, then ASSERT().
    403403  If PcdMaximumUnicodeStringLength is not zero, and Destination contains more
     
    492492    SearchStringTmp = SearchString;
    493493    FirstMatch = String;
    494    
    495     while ((*String == *SearchStringTmp) 
     494
     495    while ((*String == *SearchStringTmp)
    496496            && (*String != L'\0')) {
    497497      String++;
    498498      SearchStringTmp++;
    499     } 
    500    
     499    }
     500
    501501    if (*SearchStringTmp == L'\0') {
    502502      return (CHAR16 *) FirstMatch;
     
    516516  Check if a Unicode character is a decimal character.
    517517
    518   This internal function checks if a Unicode character is a 
     518  This internal function checks if a Unicode character is a
    519519  decimal character. The valid decimal character is from
    520520  L'0' to L'9'.
     
    536536
    537537/**
    538   Convert a Unicode character to upper case only if 
     538  Convert a Unicode character to upper case only if
    539539  it maps to a valid small-case ASCII character.
    540540
     
    568568  This internal function only deal with Unicode character
    569569  which maps to a valid hexadecimal ASII character, i.e.
    570   L'0' to L'9', L'a' to L'f' or L'A' to L'F'. For other 
     570  L'0' to L'9', L'a' to L'f' or L'A' to L'F'. For other
    571571  Unicode character, the value returned does not make sense.
    572572
     
    592592  Check if a Unicode character is a hexadecimal character.
    593593
    594   This internal function checks if a Unicode character is a 
    595   decimal character.  The valid hexadecimal character is 
     594  This internal function checks if a Unicode character is a
     595  decimal character.  The valid hexadecimal character is
    596596  L'0' to L'9', L'a' to L'f', or L'A' to L'F'.
    597597
     
    656656{
    657657  UINTN     Result;
    658  
     658
    659659  //
    660660  // ASSERT String is less long than PcdMaximumUnicodeStringLength.
     
    681681  while (InternalIsDecimalDigitCharacter (*String)) {
    682682    //
    683     // If the number represented by String overflows according 
     683    // If the number represented by String overflows according
    684684    // to the range defined by UINTN, then ASSERT().
    685685    //
     
    689689    String++;
    690690  }
    691  
     691
    692692  return Result;
    693693}
     
    735735{
    736736  UINT64     Result;
    737  
     737
    738738  //
    739739  // ASSERT String is less long than PcdMaximumUnicodeStringLength.
     
    760760  while (InternalIsDecimalDigitCharacter (*String)) {
    761761    //
    762     // If the number represented by String overflows according 
     762    // If the number represented by String overflows according
    763763    // to the range defined by UINTN, then ASSERT().
    764764    //
     
    768768    String++;
    769769  }
    770  
     770
    771771  return Result;
    772772}
     
    820820  //
    821821  ASSERT (StrSize (String) != 0);
    822  
    823   //
    824   // Ignore the pad spaces (space or tab) 
     822
     823  //
     824  // Ignore the pad spaces (space or tab)
    825825  //
    826826  while ((*String == L' ') || (*String == L'\t')) {
     
    846846
    847847  Result = 0;
    848  
     848
    849849  while (InternalIsHexaDecimalDigitCharacter (*String)) {
    850850    //
    851     // If the Hex Number represented by String overflows according 
     851    // If the Hex Number represented by String overflows according
    852852    // to the range defined by UINTN, then ASSERT().
    853853    //
     
    910910  //
    911911  ASSERT (StrSize (String) != 0);
    912  
    913   //
    914   // Ignore the pad spaces (space or tab) 
     912
     913  //
     914  // Ignore the pad spaces (space or tab)
    915915  //
    916916  while ((*String == L' ') || (*String == L'\t')) {
     
    937937
    938938  Result = 0;
    939  
     939
    940940  while (InternalIsHexaDecimalDigitCharacter (*String)) {
    941941    //
    942     // If the Hex Number represented by String overflows according 
     942    // If the Hex Number represented by String overflows according
    943943    // to the range defined by UINTN, then ASSERT().
    944944    //
     
    956956  Check if a ASCII character is a decimal character.
    957957
    958   This internal function checks if a Unicode character is a 
     958  This internal function checks if a Unicode character is a
    959959  decimal character. The valid decimal character is from
    960960  '0' to '9'.
     
    978978  Check if a ASCII character is a hexadecimal character.
    979979
    980   This internal function checks if a ASCII character is a 
    981   decimal character.  The valid hexadecimal character is 
     980  This internal function checks if a ASCII character is a
     981  decimal character.  The valid hexadecimal character is
    982982  L'0' to L'9', L'a' to L'f', or L'A' to L'F'.
    983983
     
    10611061  while (*Source != '\0') {
    10621062    //
    1063     // If any Unicode characters in Source contain 
     1063    // If any Unicode characters in Source contain
    10641064    // non-zero value in the upper 8 bits, then ASSERT().
    10651065    //
     
    11351135  [ATTENTION] This function will be deprecated for security reason.
    11361136
    1137   Copies up to a specified length one Null-terminated ASCII string to another 
     1137  Copies up to a specified length one Null-terminated ASCII string to another
    11381138  Null-terminated ASCII string and returns the new ASCII string.
    11391139
     
    11481148  If Source is NULL, then ASSERT().
    11491149  If Source and Destination overlap, then ASSERT().
    1150   If PcdMaximumAsciiStringLength is not zero, and Length is greater than 
     1150  If PcdMaximumAsciiStringLength is not zero, and Length is greater than
    11511151  PcdMaximumAsciiStringLength, then ASSERT().
    11521152  If PcdMaximumAsciiStringLength is not zero, and Source contains more than
     
    13241324  @param  Chr   one Ascii character
    13251325
    1326   @return The uppercase value of Ascii character 
     1326  @return The uppercase value of Ascii character
    13271327
    13281328**/
     
    13411341  This internal function only deal with Unicode character
    13421342  which maps to a valid hexadecimal ASII character, i.e.
    1343   '0' to '9', 'a' to 'f' or 'A' to 'F'. For other 
     1343  '0' to '9', 'a' to 'f' or 'A' to 'F'. For other
    13441344  ASCII character, the value returned does not make sense.
    13451345
     
    14331433  If Length > 0 and FirstString is NULL, then ASSERT().
    14341434  If Length > 0 and SecondString is NULL, then ASSERT().
    1435   If PcdMaximumAsciiStringLength is not zero, and Length is greater than 
     1435  If PcdMaximumAsciiStringLength is not zero, and Length is greater than
    14361436  PcdMaximumAsciiStringLength, then ASSERT().
    14371437  If PcdMaximumAsciiStringLength is not zero, and FirstString contains more than
     
    14451445  @param  SecondString  A pointer to a Null-terminated ASCII string.
    14461446  @param  Length        The maximum number of ASCII characters for compare.
    1447  
     1447
    14481448  @retval ==0       FirstString is identical to SecondString.
    14491449  @retval !=0       FirstString is not identical to SecondString.
     
    15331533  [ATTENTION] This function will be deprecated for security reason.
    15341534
    1535   Concatenates up to a specified length one Null-terminated ASCII string to 
    1536   the end of another Null-terminated ASCII string, and returns the 
     1535  Concatenates up to a specified length one Null-terminated ASCII string to
     1536  the end of another Null-terminated ASCII string, and returns the
    15371537  concatenated ASCII string.
    15381538
     
    16381638    SearchStringTmp = SearchString;
    16391639    FirstMatch = String;
    1640    
    1641     while ((*String == *SearchStringTmp) 
     1640
     1641    while ((*String == *SearchStringTmp)
    16421642            && (*String != '\0')) {
    16431643      String++;
    16441644      SearchStringTmp++;
    1645     } 
    1646    
     1645    }
     1646
    16471647    if (*SearchStringTmp == '\0') {
    16481648      return (CHAR8 *) FirstMatch;
     
    16961696{
    16971697  UINTN     Result;
    1698  
     1698
    16991699  //
    17001700  // ASSERT Strings is less long than PcdMaximumAsciiStringLength
     
    17201720  while (InternalAsciiIsDecimalDigitCharacter (*String)) {
    17211721    //
    1722     // If the number represented by String overflows according 
     1722    // If the number represented by String overflows according
    17231723    // to the range defined by UINTN, then ASSERT().
    17241724    //
     
    17281728    String++;
    17291729  }
    1730  
     1730
    17311731  return Result;
    17321732}
     
    17701770{
    17711771  UINT64     Result;
    1772  
     1772
    17731773  //
    17741774  // ASSERT Strings is less long than PcdMaximumAsciiStringLength
     
    17941794  while (InternalAsciiIsDecimalDigitCharacter (*String)) {
    17951795    //
    1796     // If the number represented by String overflows according 
     1796    // If the number represented by String overflows according
    17971797    // to the range defined by UINTN, then ASSERT().
    17981798    //
     
    18021802    String++;
    18031803  }
    1804  
     1804
    18051805  return Result;
    18061806}
     
    18521852  //
    18531853  ASSERT (AsciiStrSize (String) != 0);
    1854  
    1855   //
    1856   // Ignore the pad spaces (space or tab) 
     1854
     1855  //
     1856  // Ignore the pad spaces (space or tab)
    18571857  //
    18581858  while ((*String == ' ') || (*String == '\t' )) {
     
    18791879
    18801880  Result = 0;
    1881  
     1881
    18821882  while (InternalAsciiIsHexaDecimalDigitCharacter (*String)) {
    18831883    //
    1884     // If the Hex Number represented by String overflows according 
     1884    // If the Hex Number represented by String overflows according
    18851885    // to the range defined by UINTN, then ASSERT().
    18861886    //
     
    19411941  //
    19421942  ASSERT (AsciiStrSize (String) != 0);
    1943  
     1943
    19441944  //
    19451945  // Ignore the pad spaces (space or tab) and leading Zeros
    19461946  //
    19471947  //
    1948   // Ignore the pad spaces (space or tab) 
     1948  // Ignore the pad spaces (space or tab)
    19491949  //
    19501950  while ((*String == ' ') || (*String == '\t' )) {
     
    19711971
    19721972  Result = 0;
    1973  
     1973
    19741974  while (InternalAsciiIsHexaDecimalDigitCharacter (*String)) {
    19751975    //
    1976     // If the Hex Number represented by String overflows according 
     1976    // If the Hex Number represented by String overflows according
    19771977    // to the range defined by UINTN, then ASSERT().
    19781978    //
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseLib/SwitchStack.c

    r48674 r58466  
    3737  @param  NewStack    A pointer to the new stack to use for the EntryPoint
    3838                      function.
    39   @param  ...         This variable argument list is ignored for IA32, x64, and EBC. 
    40                       For IPF, this variable argument list is expected to contain 
    41                       a single parameter of type VOID * that specifies the new backing 
     39  @param  ...         This variable argument list is ignored for IA32, x64, and EBC.
     40                      For IPF, this variable argument list is expected to contain
     41                      a single parameter of type VOID * that specifies the new backing
    4242                      store pointer.
    4343
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseLib/X64/CpuIdEx.S

    r48674 r58466  
    4545    jz      L1
    4646    mov     %ecx,(%r10)
    47 L1: 
     47L1:
    4848    mov     %r8, %rcx
    4949    jrcxz   L2
    5050    movl    %eax,(%rcx)
    51 L2: 
     51L2:
    5252    mov     %r9, %rcx
    5353    jrcxz   L3
    5454    mov     %ebx, (%rcx)
    55 L3: 
     55L3:
    5656    mov     0x40(%rsp), %rcx
    5757    jrcxz   L4
    5858    mov     %edx, (%rcx)
    59 L4: 
     59L4:
    6060    pop     %rax                  # restore Index to rax as return value
    6161    pop     %rbx
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseLib/X64/DisablePaging64.S

    r48674 r58466  
    2222#------------------------------------------------------------------------------
    2323
    24    
     24
    2525
    2626#------------------------------------------------------------------------------
     
    3838ASM_GLOBAL ASM_PFX(InternalX86DisablePaging64)
    3939ASM_PFX(InternalX86DisablePaging64):
    40     cli   
     40    cli
    4141    lea    L1(%rip), %rsi                 # rsi <- The start address of transition code
    4242    mov    0x28(%rsp), %edi               # rdi <- New stack
     
    4545    add    $4, %rax                       # round rax up to the next 4 byte boundary
    4646    and    $0xfc, %al
    47     sub    %rax, %rdi                     # rdi <- use stack to hold transition code 
     47    sub    %rax, %rdi                     # rdi <- use stack to hold transition code
    4848    mov    %edi, %r10d                    # r10 <- The start address of transicition code below 4G
    4949    push   %rcx                           # save rcx to stack
     
    5252    movsb                                 # copy transition code to (new stack - 64byte) below 4G
    5353    pop    %rcx                           # restore rcx
    54    
    55     mov    %r8d, %esi 
    56     mov    %r9d, %edi 
     54
     55    mov    %r8d, %esi
     56    mov    %r9d, %edi
    5757    mov    %r10d, %eax
    5858    sub    $4, %eax
    5959    push   %rcx                           # push Cs to stack
    60     push   %r10                           # push address of transition code on stack 
     60    push   %r10                           # push address of transition code on stack
    6161    .byte  0x48, 0xcb                     # retq: Use far return to load CS register from stack
    62                                           # (Use raw byte code since some GNU assemblers generates incorrect code for "retq") 
     62                                          # (Use raw byte code since some GNU assemblers generates incorrect code for "retq")
    6363L1:
    6464    mov    %eax,%esp                      # set up new stack
     
    6969    mov    %edx,%ebx                      # save EntryPoint to ebx, for rdmsr will overwrite edx
    7070    mov    $0xc0000080,%ecx
    71     rdmsr 
     71    rdmsr
    7272    and    $0xfe,%ah                      # clear LME
    73     wrmsr 
     73    wrmsr
    7474    mov    %cr4,%rax
    7575    and    $0xdf,%al                      # clear PAE
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseLib/X64/DisablePaging64.asm

    r48674 r58466  
    4040    mov     edi, [rsp + 28h]            ; rdi <- New stack
    4141    lea     rax, mTransitionEnd         ; rax <- end of transition code
    42     sub     rax, rsi                    ; rax <- The size of transition piece code 
     42    sub     rax, rsi                    ; rax <- The size of transition piece code
    4343    add     rax, 4                      ; Round RAX up to the next 4 byte boundary
    4444    and     al, 0fch
     
    4949    rep     movsb                       ; copy transition code to top of new stack which must be below 4GB
    5050    pop     rcx                         ; restore rcx
    51    
     51
    5252    mov     esi, r8d
    5353    mov     edi, r9d
     
    6565    btr     eax, 31                     ; Clear CR0.PG
    6666    mov     cr0, rax                    ; disable paging and caches
    67    
     67
    6868    mov     ebx, edx                    ; save EntryPoint to rbx, for rdmsr will overwrite rdx
    6969    mov     ecx, 0c0000080h
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseLib/X64/EnableCache.S

    r48674 r58466  
    1616# Abstract:
    1717#
    18 #   Flush all caches with a WBINVD instruction, clear the CD bit of CR0 to 0, and clear 
     18#   Flush all caches with a WBINVD instruction, clear the CD bit of CR0 to 0, and clear
    1919#   the NW bit of CR0 to 0
    2020#
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseLib/X64/EnableCache.asm

    r48674 r58466  
    1616; Abstract:
    1717;
    18 ;  Flush all caches with a WBINVD instruction, clear the CD bit of CR0 to 0, and clear 
     18;  Flush all caches with a WBINVD instruction, clear the CD bit of CR0 to 0, and clear
    1919;  the NW bit of CR0 to 0
    2020;
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseLib/X64/FlushCacheLine.asm

    r48674 r58466  
    2626;------------------------------------------------------------------------------
    2727; VOID *
    28 ; EFIAPI 
     28; EFIAPI
    2929; AsmFlushCacheLine (
    3030;   IN      VOID                      *LinearAddress
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseLib/X64/GccInline.c

    r48674 r58466  
    11/** @file
    22  GCC inline implementation of BaseLib processor specific functions.
    3  
     3
    44  Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
    5   Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR> 
     5  Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
    66  This program and the accompanying materials
    77  are licensed and made available under the terms and conditions of the BSD License
     
    3434{
    3535  // This is a little bit of overkill and it is more about the compiler that it is
    36   // actually processor synchronization. This is like the _ReadWriteBarrier 
     36  // actually processor synchronization. This is like the _ReadWriteBarrier
    3737  // Microsoft specific intrinsic
    3838  __asm__ __volatile__ ("":::"memory");
     
    6767  VOID
    6868  )
    69 { 
     69{
    7070  __asm__ __volatile__ ("cli"::: "memory");
    7171}
     
    131131  UINT32 LowData;
    132132  UINT32 HighData;
    133  
     133
    134134  __asm__ __volatile__ (
    135135    "rdmsr"
     
    138138    : "c"  (Index)      // %2
    139139    );
    140    
     140
    141141  return (((UINT64)HighData) << 32) | LowData;
    142142}
     
    171171  LowData  = (UINT32)(Value);
    172172  HighData = (UINT32)(Value >> 32);
    173  
     173
    174174  __asm__ __volatile__ (
    175175    "wrmsr"
     
    179179      "d" (HighData)
    180180    );
    181    
     181
    182182  return Value;
    183183}
     
    202202{
    203203  UINTN Eflags;
    204  
     204
    205205  __asm__ __volatile__ (
    206206    "pushfq         \n\t"
     
    208208    : "=r" (Eflags)       // %0
    209209    );
    210    
     210
    211211  return Eflags;
    212212}
     
    231231{
    232232  UINTN   Data;
    233  
    234   __asm__ __volatile__ (
    235     "mov  %%cr0,%0" 
     233
     234  __asm__ __volatile__ (
     235    "mov  %%cr0,%0"
    236236    : "=r" (Data)           // %0
    237237    );
    238  
     238
    239239  return Data;
    240240}
     
    258258{
    259259  UINTN Data;
    260  
    261   __asm__ __volatile__ (
    262     "mov  %%cr2,  %0" 
     260
     261  __asm__ __volatile__ (
     262    "mov  %%cr2,  %0"
    263263    : "=r" (Data)           // %0
    264264    );
    265  
     265
    266266  return Data;
    267267}
     
    284284{
    285285  UINTN Data;
    286  
    287   __asm__ __volatile__ (
    288     "mov  %%cr3,  %0" 
     286
     287  __asm__ __volatile__ (
     288    "mov  %%cr3,  %0"
    289289    : "=r" (Data)           // %0
    290290    );
    291  
     291
    292292  return Data;
    293293}
     
    311311{
    312312  UINTN Data;
    313  
    314   __asm__ __volatile__ (
    315     "mov  %%cr4,  %0" 
     313
     314  __asm__ __volatile__ (
     315    "mov  %%cr4,  %0"
    316316    : "=r" (Data)           // %0
    317317    );
    318  
     318
    319319  return Data;
    320320}
     
    442442{
    443443  UINTN Data;
    444  
     444
    445445  __asm__ __volatile__ (
    446446    "mov  %%dr0, %0"
    447447    : "=r" (Data)
    448448    );
    449  
     449
    450450  return Data;
    451451}
     
    469469{
    470470  UINTN Data;
    471  
     471
    472472  __asm__ __volatile__ (
    473473    "mov  %%dr1, %0"
    474474    : "=r" (Data)
    475475    );
    476  
     476
    477477  return Data;
    478478}
     
    496496{
    497497  UINTN Data;
    498  
     498
    499499  __asm__ __volatile__ (
    500500    "mov  %%dr2, %0"
    501501    : "=r" (Data)
    502502    );
    503  
     503
    504504  return Data;
    505505}
     
    523523{
    524524  UINTN Data;
    525  
     525
    526526  __asm__ __volatile__ (
    527527    "mov  %%dr3, %0"
    528528    : "=r" (Data)
    529529    );
    530  
     530
    531531  return Data;
    532532}
     
    550550{
    551551  UINTN Data;
    552  
     552
    553553  __asm__ __volatile__ (
    554554    "mov  %%dr4, %0"
    555555    : "=r" (Data)
    556556    );
    557  
     557
    558558  return Data;
    559559}
     
    577577{
    578578  UINTN Data;
    579  
     579
    580580  __asm__ __volatile__ (
    581581    "mov  %%dr5, %0"
    582582    : "=r" (Data)
    583583    );
    584  
     584
    585585  return Data;
    586586}
     
    604604{
    605605  UINTN Data;
    606  
     606
    607607  __asm__ __volatile__ (
    608608    "mov  %%dr6, %0"
    609609    : "=r" (Data)
    610610    );
    611  
     611
    612612  return Data;
    613613}
     
    631631{
    632632  UINTN Data;
    633  
     633
    634634  __asm__ __volatile__ (
    635635    "mov  %%dr7, %0"
    636636    : "=r" (Data)
    637637    );
    638  
     638
    639639  return Data;
    640640}
     
    865865{
    866866  UINT16  Data;
    867  
     867
    868868  __asm__ __volatile__ (
    869869    "mov   %%cs, %0"
    870870    :"=a" (Data)
    871871    );
    872    
     872
    873873  return Data;
    874874}
     
    891891{
    892892  UINT16  Data;
    893  
     893
    894894  __asm__ __volatile__ (
    895895    "mov  %%ds, %0"
    896896    :"=a" (Data)
    897897    );
    898    
     898
    899899  return Data;
    900900}
     
    917917{
    918918  UINT16  Data;
    919  
     919
    920920  __asm__ __volatile__ (
    921921    "mov  %%es, %0"
    922922    :"=a" (Data)
    923923    );
    924    
     924
    925925  return Data;
    926926}
     
    943943{
    944944  UINT16  Data;
    945  
     945
    946946  __asm__ __volatile__ (
    947947    "mov  %%fs, %0"
    948948    :"=a" (Data)
    949949    );
    950    
     950
    951951  return Data;
    952952}
     
    969969{
    970970  UINT16  Data;
    971  
     971
    972972  __asm__ __volatile__ (
    973973    "mov  %%gs, %0"
    974974    :"=a" (Data)
    975975    );
    976    
     976
    977977  return Data;
    978978}
     
    995995{
    996996  UINT16  Data;
    997  
     997
    998998  __asm__ __volatile__ (
    999999    "mov  %%ds, %0"
    10001000    :"=a" (Data)
    10011001    );
    1002    
     1002
    10031003  return Data;
    10041004}
     
    10211021{
    10221022  UINT16  Data;
    1023  
     1023
    10241024  __asm__ __volatile__ (
    10251025    "str  %0"
    10261026    : "=r" (Data)
    10271027    );
    1028    
     1028
    10291029  return Data;
    10301030}
     
    10731073    : "m" (*Gdtr)
    10741074    );
    1075    
     1075
    10761076}
    10771077
     
    11381138{
    11391139  UINT16  Data;
    1140  
     1140
    11411141  __asm__ __volatile__ (
    11421142    "sldt  %0"
    11431143    : "=g" (Data)   // %0
    11441144    );
    1145    
     1145
    11461146  return Data;
    11471147}
     
    11911191    :
    11921192    : "m" (*Buffer)  // %0
    1193     );   
     1193    );
    11941194}
    11951195
     
    12401240    : "=r"  (Data)       // %0
    12411241    );
    1242    
     1242
    12431243  return Data;
    12441244}
     
    12661266    : "=r"  (Data)       // %0
    12671267    );
    1268    
     1268
    12691269  return Data;
    12701270}
     
    12921292    : "=r"  (Data)       // %0
    12931293    );
    1294    
     1294
    12951295  return Data;
    12961296}
     
    13181318    : "=r"  (Data)       // %0
    13191319    );
    1320    
     1320
    13211321  return Data;
    13221322}
     
    13441344    : "=r"  (Data)       // %0
    13451345    );
    1346    
     1346
    13471347  return Data;
    13481348}
     
    13701370    : "=r"  (Data)       // %0
    13711371    );
    1372    
     1372
    13731373  return Data;
    13741374}
     
    13961396    : "=r"  (Data)       // %0
    13971397    );
    1398    
     1398
    13991399  return Data;
    14001400}
     
    14221422    : "=r"  (Data)       // %0
    14231423    );
    1424    
     1424
    14251425  return Data;
    14261426}
     
    14441444  __asm__ __volatile__ (
    14451445    "movd  %0, %%mm0"  // %0
    1446     : 
     1446    :
    14471447    : "m" (Value)
    14481448    );
     
    14671467  __asm__ __volatile__ (
    14681468    "movd  %0, %%mm1"  // %0
    1469     : 
     1469    :
    14701470    : "m" (Value)
    14711471    );
     
    14901490  __asm__ __volatile__ (
    14911491    "movd  %0, %%mm2"  // %0
    1492     : 
     1492    :
    14931493    : "m" (Value)
    14941494    );
     
    15131513  __asm__ __volatile__ (
    15141514    "movd  %0, %%mm3"  // %0
    1515     : 
     1515    :
    15161516    : "m" (Value)
    15171517    );
     
    15361536  __asm__ __volatile__ (
    15371537    "movd  %0, %%mm4"  // %0
    1538     : 
     1538    :
    15391539    : "m" (Value)
    15401540    );
     
    15591559  __asm__ __volatile__ (
    15601560    "movd  %0, %%mm5"  // %0
    1561     : 
     1561    :
    15621562    : "m" (Value)
    15631563    );
     
    15821582  __asm__ __volatile__ (
    15831583    "movd  %0, %%mm6"  // %0
    1584     : 
     1584    :
    15851585    : "m" (Value)
    15861586    );
     
    16051605  __asm__ __volatile__ (
    16061606    "movd  %0, %%mm7"  // %0
    1607     : 
     1607    :
    16081608    : "m" (Value)
    16091609    );
     
    16281628  UINT32  LowData;
    16291629  UINT32  HiData;
    1630  
     1630
    16311631  __asm__ __volatile__ (
    16321632    "rdtsc"
     
    16341634      "=d" (HiData)
    16351635    );
    1636  
    1637   return (((UINT64)HiData) << 32) | LowData; 
     1636
     1637  return (((UINT64)HiData) << 32) | LowData;
    16381638}
    16391639
     
    16581658  UINT32  LowData;
    16591659  UINT32  HiData;
    1660  
     1660
    16611661  __asm__ __volatile__ (
    16621662    "rdpmc"
     
    16651665    : "c"  (Index)
    16661666    );
    1667  
    1668   return (((UINT64)HiData) << 32) | LowData; 
     1667
     1668  return (((UINT64)HiData) << 32) | LowData;
    16691669}
    16701670
     
    17011701      "d" (Edx)
    17021702    );
    1703    
     1703
    17041704  return Eax;
    17051705}
     
    17291729  __asm__ __volatile__ (
    17301730    "mwait"
    1731     : 
     1731    :
    17321732    : "a"  (Eax),
    17331733      "c"  (Ecx)
    17341734    );
    1735    
    1736   return Eax;   
     1735
     1736  return Eax;
    17371737}
    17381738
     
    17691769{
    17701770  __asm__ __volatile__ ("invd":::"memory");
    1771    
     1771
    17721772}
    17731773
     
    17971797    "clflush (%0)"
    17981798    :
    1799     : "r" (LinearAddress) 
     1799    : "r" (LinearAddress)
    18001800    : "memory"
    18011801    );
    1802    
     1802
    18031803    return LinearAddress;
    18041804}
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseLib/X64/LongJump.S

    r48674 r58466  
    5050    movdqu  0xC8(%rcx), %xmm13
    5151    movdqu  0xD8(%rcx), %xmm14
    52     movdqu  0xE8(%rcx), %xmm15 
     52    movdqu  0xE8(%rcx), %xmm15
    5353    mov     %rdx, %rax          # set return value
    5454    jmp     *0x48(%rcx)
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseLib/X64/SetJump.S

    r48674 r58466  
    4040    # save non-volatile fp registers
    4141    stmxcsr 0x50(%rcx)
    42     movdqu  %xmm6, 0x58(%rcx) 
     42    movdqu  %xmm6, 0x58(%rcx)
    4343    movdqu  %xmm7, 0x68(%rcx)
    4444    movdqu  %xmm8, 0x78(%rcx)
     
    4949    movdqu  %xmm13, 0xC8(%rcx)
    5050    movdqu  %xmm14, 0xD8(%rcx)
    51     movdqu  %xmm15, 0xE8(%rcx)     
     51    movdqu  %xmm15, 0xE8(%rcx)
    5252    xor    %rax,%rax
    5353    jmpq   *%rdx
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseLib/X64/SwitchStack.S

    r48674 r58466  
    3838ASM_GLOBAL ASM_PFX(InternalSwitchStack)
    3939ASM_PFX(InternalSwitchStack):
    40           pushq   %rbp           
     40          pushq   %rbp
    4141        movq    %rsp, %rbp
    42    
     42
    4343    mov     %rcx, %rax  // Shift registers for new call
    4444    mov     %rdx, %rcx
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseLib/X64/Thunk16.S

    r58459 r58466  
    5050
    5151    .data
    52    
     52
    5353.set Lm16Size, ASM_PFX(InternalAsmThunk16) - ASM_PFX(m16Start)
    5454ASM_PFX(m16Size):         .word      Lm16Size
     
    8686    .byte 0x66
    8787    call    L_Base                       # push eip
    88 L_Base: 
     88L_Base:
    8989    .byte 0x66
    9090    pushq   $0                          # reserved high order 32 bits of EFlags
     
    103103    cli                                 # disable interrupts
    104104    jnc     L_2
    105 L_1: 
     105L_1:
    106106    testb   $THUNK_ATTRIBUTE_DISABLE_A20_MASK_KBD_CTRL, %dl
    107107    jz      L_2
     
    109109    orb     $2,%al
    110110    outb    %al, $0x92                   # deactivate A20M#
    111 L_2: 
     111L_2:
    112112    xorw    %ax, %ax                     # xor eax, eax
    113113    movl    %ss, %eax                    # mov ax, ss
     
    181181    .byte 0x66                          # make the following call 32-bit
    182182    call    L_Base1                       # push eip
    183 L_Base1: 
     183L_Base1:
    184184    popw    %bp                         # ebp <- address of L_Base1
    185185    pushq   (IA32_REGS_SIZE + 2)(%esp)
     
    187187    pushq   %rax
    188188    lret                                # execution begins at next instruction
    189 L_RealMode: 
     189L_RealMode:
    190190    .byte 0x66,0x2e                     # CS and operand size override
    191191    lidt    (_16Idtr - L_Base1)(%rsi)
     
    244244    pushq   %rsi
    245245    pushq   %rdi
    246    
     246
    247247    movl    %ds, %ebx
    248248    pushq   %rbx      # Save ds segment register on the stack
     
    258258    movl    _ESP(%rsi), %edi
    259259    lea     -(IA32_REGS_SIZE + 4)(%edi), %rdi
    260     imul    $16, %r8d, %eax 
     260    imul    $16, %r8d, %eax
    261261    movl    %edi,%ebx                   # ebx <- stack for 16-bit code
    262262    pushq   $(IA32_REGS_SIZE / 4)
     
    269269    andl    $0xf,%edx
    270270    shll    $12,%eax                    # segment address in high order 16 bits
    271     .set LBackFromUserCodeDelta, ASM_PFX(BackFromUserCode) - ASM_PFX(m16Start) 
     271    .set LBackFromUserCodeDelta, ASM_PFX(BackFromUserCode) - ASM_PFX(m16Start)
    272272    lea     (LBackFromUserCodeDelta)(%rdx), %ax
    273273    stosl                               # [edi] <- return address of user code
    274274    sgdt    0x60(%rsp)                  # save GDT stack in argument space
    275     movzwq  0x60(%rsp), %r10            # r10 <- GDT limit 
    276     lea     ((ASM_PFX(InternalAsmThunk16) - L_SavedCr4) + 0xf)(%rcx), %r11 
    277     andq    $0xfffffffffffffff0, %r11   # r11 <- 16-byte aligned shadowed GDT table in real mode buffer     
    278    
     275    movzwq  0x60(%rsp), %r10            # r10 <- GDT limit
     276    lea     ((ASM_PFX(InternalAsmThunk16) - L_SavedCr4) + 0xf)(%rcx), %r11
     277    andq    $0xfffffffffffffff0, %r11   # r11 <- 16-byte aligned shadowed GDT table in real mode buffer
     278
    279279    movw    %r10w, (SavedGdt - L_SavedCr4)(%rcx)       # save the limit of shadowed GDT table
    280280    movq    %r11, (SavedGdt - L_SavedCr4 + 0x2)(%rcx)  # save the base address of shadowed GDT table
    281    
     281
    282282    movq    0x62(%rsp) ,%rsi            # rsi <- the original GDT base address
    283     xchg   %r10, %rcx                   # save rcx to r10 and initialize rcx to be the limit of GDT table 
     283    xchg   %r10, %rcx                   # save rcx to r10 and initialize rcx to be the limit of GDT table
    284284    incq   %rcx                         # rcx <- the size of memory to copy
    285285    xchg   %r11, %rdi                   # save rdi to r11 and initialize rdi to the base address of shadowed GDT table
     
    288288    movq   %r10, %rcx                   # restore the orignal rcx before memory copy
    289289    movq   %r11, %rdi                   # restore the original rdi before memory copy
    290        
     290
    291291    sidt    0x50(%rsp)
    292292    movq    %cr0, %rax
     
    312312    .set    Ltemp1, _EntryPoint - L_SavedCr4
    313313    .byte   Ltemp1
    314 L_RetFromRealMode: 
     314L_RetFromRealMode:
    315315    popfq
    316316    lgdt    0x60(%rsp)                  # restore protected mode GDTR
     
    319319    .byte 0x0f, 0xa9                    # pop gs
    320320    .byte 0x0f, 0xa1                    # pop fs
    321    
     321
    322322    popq     %rbx
    323323    movl     %ebx, %ss
     
    326326    popq     %rbx
    327327    movl     %ebx, %ds
    328    
     328
    329329    popq    %rdi
    330330    popq    %rsi
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseLib/X64/Thunk16.asm

    r58459 r58466  
    142142SavedCs     DW      ?
    143143@64BitCode:
    144     db      090h 
     144    db      090h
    145145    db      048h, 0bch                 ; mov rsp, imm64
    146146SavedSp     DQ   ?                     ; restore stack
     
    241241    mov     rbx, ss
    242242    push    rbx          ; Save ss segment register on the stack
    243    
     243
    244244    push    fs
    245245    push    gs
     
    260260    lea     ax, [rdx + (_BackFromUserCode - m16Start)]  ; offset address
    261261    stosd                               ; [edi] <- return address of user code
    262  
     262
    263263    sgdt    fword ptr [rsp + 60h]       ; save GDT stack in argument space
    264     movzx   r10, word ptr [rsp + 60h]   ; r10 <- GDT limit 
     264    movzx   r10, word ptr [rsp + 60h]   ; r10 <- GDT limit
    265265    lea     r11, [rcx + (InternalAsmThunk16 - SavedCr4) + 0xf]
    266266    and     r11, 0xfffffff0             ; r11 <- 16-byte aligned shadowed GDT table in real mode buffer
    267    
     267
    268268    mov     word ptr [rcx + (SavedGdt - SavedCr4)], r10w      ; save the limit of shadowed GDT table
    269269    mov     qword ptr [rcx + (SavedGdt - SavedCr4) + 2], r11  ; save the base address of shadowed GDT table
    270    
     270
    271271    mov     rsi, qword ptr [rsp + 62h]  ; rsi <- the original GDT base address
    272272    xchg    rcx, r10                    ; save rcx to r10 and initialize rcx to be the limit of GDT table
     
    276276    mov     rcx, r10                    ; restore the orignal rcx before memory copy
    277277    mov     rdi, r11                    ; restore the original rdi before memory copy
    278    
     278
    279279    sidt    fword ptr [rsp + 50h]       ; save IDT stack in argument space
    280280    mov     rax, cr0
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseLib/X64/Thunk16.nasm

    r58464 r58466  
    241241    push    rsi
    242242    push    rdi
    243    
     243
    244244    mov     ebx, ds
    245245    push    rbx          ; Save ds segment register on the stack
     
    248248    mov     ebx, ss
    249249    push    rbx          ; Save ss segment register on the stack
    250    
     250
    251251    push    fs
    252252    push    gs
     
    267267    lea     ax, [rdx + (_BackFromUserCode - ASM_PFX(m16Start))]  ; offset address
    268268    stosd                               ; [edi] <- return address of user code
    269  
     269
    270270    sgdt    [rsp + 60h]       ; save GDT stack in argument space
    271     movzx   r10, word [rsp + 60h]   ; r10 <- GDT limit 
     271    movzx   r10, word [rsp + 60h]   ; r10 <- GDT limit
    272272    lea     r11, [rcx + (ASM_PFX(InternalAsmThunk16) - _BackFromUserCode.SavedCr4End) + 0xf]
    273273    and     r11, ~0xf            ; r11 <- 16-byte aligned shadowed GDT table in real mode buffer
    274    
     274
    275275    mov     [rcx + (SavedGdt - _BackFromUserCode.SavedCr4End)], r10w      ; save the limit of shadowed GDT table
    276276    mov     [rcx + (SavedGdt - _BackFromUserCode.SavedCr4End) + 2], r11  ; save the base address of shadowed GDT table
    277    
     277
    278278    mov     rsi, [rsp + 62h]  ; rsi <- the original GDT base address
    279279    xchg    rcx, r10                    ; save rcx to r10 and initialize rcx to be the limit of GDT table
     
    283283    mov     rcx, r10                    ; restore the orignal rcx before memory copy
    284284    mov     rdi, r11                    ; restore the original rdi before memory copy
    285    
     285
    286286    sidt    [rsp + 50h]       ; save IDT stack in argument space
    287287    mov     rax, cr0
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseLib/X86Msr.c

    r58459 r58466  
    197197  field is specified by the StartBit and the EndBit. All other bits in the
    198198  destination MSR are preserved. The lower 32-bits of the MSR written is
    199   returned. The caller must either guarantee that Index and the data written 
    200   is valid, or the caller must set up exception handlers to catch the exceptions. 
     199  returned. The caller must either guarantee that Index and the data written
     200  is valid, or the caller must set up exception handlers to catch the exceptions.
    201201  This function is only available on IA-32 and x64.
    202202
     
    421421
    422422/**
    423   Reads a 64-bit MSR, performs a bitwise AND followed by a bitwise 
     423  Reads a 64-bit MSR, performs a bitwise AND followed by a bitwise
    424424  OR, and writes the result back to the 64-bit MSR.
    425425
     
    490490  Writes Value to a bit field in a 64-bit MSR. The bit field is specified by
    491491  the StartBit and the EndBit. All other bits in the destination MSR are
    492   preserved. The MSR written is returned. The caller must either guarantee 
    493   that Index and the data written is valid, or the caller must set up exception 
     492  preserved. The MSR written is returned. The caller must either guarantee
     493  that Index and the data written is valid, or the caller must set up exception
    494494  handlers to catch the exceptions. This function is only available on IA-32 and x64.
    495495
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseLib/X86Thunk.c

    r58459 r58466  
    8787
    8888  Prepares all structures and code required to use AsmThunk16().
    89  
     89
    9090  This interface is limited to be used in either physical mode or virtual modes with paging enabled where the
    9191  virtual to physical mappings for ThunkContext.RealModeBuffer is mapped 1:1.
     
    169169  This function must be called with interrupts disabled.
    170170
    171   The register state from the RealModeState field of ThunkContext is restored just prior 
    172   to calling the 16-bit real mode entry point.  This includes the EFLAGS field of RealModeState, 
     171  The register state from the RealModeState field of ThunkContext is restored just prior
     172  to calling the 16-bit real mode entry point.  This includes the EFLAGS field of RealModeState,
    173173  which is used to set the interrupt state when a 16-bit real mode entry point is called.
    174174  Control is transferred to the 16-bit real mode entry point specified by the CS and Eip fields of RealModeState.
    175   The stack is initialized to the SS and ESP fields of RealModeState.  Any parameters passed to 
    176   the 16-bit real mode code must be populated by the caller at SS:ESP prior to calling this function. 
     175  The stack is initialized to the SS and ESP fields of RealModeState.  Any parameters passed to
     176  the 16-bit real mode code must be populated by the caller at SS:ESP prior to calling this function.
    177177  The 16-bit real mode entry point is invoked with a 16-bit CALL FAR instruction,
    178   so when accessing stack contents, the 16-bit real mode code must account for the 16-bit segment 
    179   and 16-bit offset of the return address that were pushed onto the stack. The 16-bit real mode entry 
    180   point must exit with a RETF instruction. The register state is captured into RealModeState immediately 
     178  so when accessing stack contents, the 16-bit real mode code must account for the 16-bit segment
     179  and 16-bit offset of the return address that were pushed onto the stack. The 16-bit real mode entry
     180  point must exit with a RETF instruction. The register state is captured into RealModeState immediately
    181181  after the RETF instruction is executed.
    182  
    183   If EFLAGS specifies interrupts enabled, or any of the 16-bit real mode code enables interrupts, 
    184   or any of the 16-bit real mode code makes a SW interrupt, then the caller is responsible for making sure 
    185   the IDT at address 0 is initialized to handle any HW or SW interrupts that may occur while in 16-bit real mode. 
    186  
    187   If EFLAGS specifies interrupts enabled, or any of the 16-bit real mode code enables interrupts, 
    188   then the caller is responsible for making sure the 8259 PIC is in a state compatible with 16-bit real mode. 
     182
     183  If EFLAGS specifies interrupts enabled, or any of the 16-bit real mode code enables interrupts,
     184  or any of the 16-bit real mode code makes a SW interrupt, then the caller is responsible for making sure
     185  the IDT at address 0 is initialized to handle any HW or SW interrupts that may occur while in 16-bit real mode.
     186
     187  If EFLAGS specifies interrupts enabled, or any of the 16-bit real mode code enables interrupts,
     188  then the caller is responsible for making sure the 8259 PIC is in a state compatible with 16-bit real mode.
    189189  This includes the base vectors, the interrupt masks, and the edge/level trigger mode.
    190  
    191   If THUNK_ATTRIBUTE_BIG_REAL_MODE is set in the ThunkAttributes field of ThunkContext, then the user code 
     190
     191  If THUNK_ATTRIBUTE_BIG_REAL_MODE is set in the ThunkAttributes field of ThunkContext, then the user code
    192192  is invoked in big real mode.  Otherwise, the user code is invoked in 16-bit real mode with 64KB segment limits.
    193  
    194   If neither THUNK_ATTRIBUTE_DISABLE_A20_MASK_INT_15 nor THUNK_ATTRIBUTE_DISABLE_A20_MASK_KBD_CTRL are set in 
    195   ThunkAttributes, then it is assumed that the user code did not enable the A20 mask, and no attempt is made to 
     193
     194  If neither THUNK_ATTRIBUTE_DISABLE_A20_MASK_INT_15 nor THUNK_ATTRIBUTE_DISABLE_A20_MASK_KBD_CTRL are set in
     195  ThunkAttributes, then it is assumed that the user code did not enable the A20 mask, and no attempt is made to
    196196  disable the A20 mask.
    197  
    198   If THUNK_ATTRIBUTE_DISABLE_A20_MASK_INT_15 is set and THUNK_ATTRIBUTE_DISABLE_A20_MASK_KBD_CTRL is clear in 
    199   ThunkAttributes, then attempt to use the INT 15 service to disable the A20 mask.  If this INT 15 call fails, 
     197
     198  If THUNK_ATTRIBUTE_DISABLE_A20_MASK_INT_15 is set and THUNK_ATTRIBUTE_DISABLE_A20_MASK_KBD_CTRL is clear in
     199  ThunkAttributes, then attempt to use the INT 15 service to disable the A20 mask.  If this INT 15 call fails,
    200200  then attempt to disable the A20 mask by directly accessing the 8042 keyboard controller I/O ports.
    201  
    202   If THUNK_ATTRIBUTE_DISABLE_A20_MASK_INT_15 is clear and THUNK_ATTRIBUTE_DISABLE_A20_MASK_KBD_CTRL is set in 
     201
     202  If THUNK_ATTRIBUTE_DISABLE_A20_MASK_INT_15 is clear and THUNK_ATTRIBUTE_DISABLE_A20_MASK_KBD_CTRL is set in
    203203  ThunkAttributes, then attempt to disable the A20 mask by directly accessing the 8042 keyboard controller I/O ports.
    204    
     204
    205205  If ThunkContext is NULL, then ASSERT().
    206206  If AsmPrepareThunk16() was not previously called with ThunkContext, then ASSERT().
    207   If both THUNK_ATTRIBUTE_DISABLE_A20_MASK_INT_15 and THUNK_ATTRIBUTE_DISABLE_A20_MASK_KBD_CTRL are set in 
     207  If both THUNK_ATTRIBUTE_DISABLE_A20_MASK_INT_15 and THUNK_ATTRIBUTE_DISABLE_A20_MASK_KBD_CTRL are set in
    208208  ThunkAttributes, then ASSERT().
    209209
    210210  This interface is limited to be used in either physical mode or virtual modes with paging enabled where the
    211211  virtual to physical mappings for ThunkContext.RealModeBuffer is mapped 1:1.
    212  
     212
    213213  @param  ThunkContext  A pointer to the context structure that describes the
    214214                        16-bit real mode code to call.
     
    229229  ASSERT (((ThunkContext->ThunkAttributes & (THUNK_ATTRIBUTE_DISABLE_A20_MASK_INT_15 | THUNK_ATTRIBUTE_DISABLE_A20_MASK_KBD_CTRL)) != \
    230230           (THUNK_ATTRIBUTE_DISABLE_A20_MASK_INT_15 | THUNK_ATTRIBUTE_DISABLE_A20_MASK_KBD_CTRL)));
    231            
     231
    232232  UpdatedRegs = InternalAsmThunk16 (
    233233                  ThunkContext->RealModeState,
     
    251251  This interface is limited to be used in either physical mode or virtual modes with paging enabled where the
    252252  virtual to physical mappings for ThunkContext.RealModeBuffer is mapped 1:1.
    253  
     253
    254254  See AsmPrepareThunk16() and AsmThunk16() for the detailed description and ASSERT() conditions.
    255255
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf

    r58459 r58466  
    2323  MODULE_TYPE                    = BASE
    2424  VERSION_STRING                 = 1.0
    25   LIBRARY_CLASS                  = BaseMemoryLib 
     25  LIBRARY_CLASS                  = BaseMemoryLib
    2626
    2727
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLib/CompareMemWrapper.c

    r48674 r58466  
    3232  value returned is the first mismatched byte in SourceBuffer subtracted from the first
    3333  mismatched byte in DestinationBuffer.
    34  
     34
    3535  If Length > 0 and DestinationBuffer is NULL, then ASSERT().
    3636  If Length > 0 and SourceBuffer is NULL, then ASSERT().
     
    4545  @retval Non-zero          The first mismatched byte in SourceBuffer subtracted from the first
    4646                            mismatched byte in DestinationBuffer.
    47                            
     47
    4848**/
    4949INTN
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLib/CopyMemWrapper.c

    r48674 r58466  
    33
    44  The following BaseMemoryLib instances contain the same copy of this file:
    5  
     5
    66    BaseMemoryLib
    77    BaseMemoryLibMmx
     
    3232  DestinationBuffer.  The implementation must be reentrant, and it must handle the case
    3333  where SourceBuffer overlaps DestinationBuffer.
    34  
     34
    3535  If Length is greater than (MAX_ADDRESS - DestinationBuffer + 1), then ASSERT().
    3636  If Length is greater than (MAX_ADDRESS - SourceBuffer + 1), then ASSERT().
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLib/MemLibGuid.c

    r48674 r58466  
    33
    44  The following BaseMemoryLib instances contain the same copy of this file:
    5  
     5
    66    BaseMemoryLib
    77    BaseMemoryLibMmx
     
    3131  This function copies the contents of the 128-bit GUID specified by SourceGuid to
    3232  DestinationGuid, and returns DestinationGuid.
    33  
     33
    3434  If DestinationGuid is NULL, then ASSERT().
    3535  If SourceGuid is NULL, then ASSERT().
     
    6464  This function compares Guid1 to Guid2.  If the GUIDs are identical then TRUE is returned.
    6565  If there are any bit differences in the two GUIDs, then FALSE is returned.
    66  
     66
    6767  If Guid1 is NULL, then ASSERT().
    6868  If Guid2 is NULL, then ASSERT().
     
    104104  GUID in the target buffer is returned.  If no match is found, then NULL is returned.
    105105  If Length is 0, then NULL is returned.
    106  
     106
    107107  If Length > 0 and Buffer is NULL, then ASSERT().
    108108  If Buffer is not aligned on a 32-bit boundary, then ASSERT().
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLib/ScanMem16Wrapper.c

    r48674 r58466  
    3434  then a pointer to the matching byte in the target buffer is returned.  If no match is found,
    3535  then NULL is returned.  If Length is 0, then NULL is returned.
    36  
     36
    3737  If Length > 0 and Buffer is NULL, then ASSERT().
    3838  If Buffer is not aligned on a 16-bit boundary, then ASSERT().
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLib/ScanMem32Wrapper.c

    r48674 r58466  
    3333  then a pointer to the matching byte in the target buffer is returned.  If no match is found,
    3434  then NULL is returned.  If Length is 0, then NULL is returned.
    35  
     35
    3636  If Length > 0 and Buffer is NULL, then ASSERT().
    3737  If Buffer is not aligned on a 32-bit boundary, then ASSERT().
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLib/ScanMem64Wrapper.c

    r48674 r58466  
    3434  then a pointer to the matching byte in the target buffer is returned.  If no match is found,
    3535  then NULL is returned.  If Length is 0, then NULL is returned.
    36  
     36
    3737  If Length > 0 and Buffer is NULL, then ASSERT().
    3838  If Buffer is not aligned on a 64-bit boundary, then ASSERT().
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLib/ScanMem8Wrapper.c

    r48674 r58466  
    3434  then a pointer to the matching byte in the target buffer is returned.  If no match is found,
    3535  then NULL is returned.  If Length is 0, then NULL is returned.
    36  
     36
    3737  If Length > 0 and Buffer is NULL, then ASSERT().
    3838  If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
     
    5858  ASSERT (Buffer != NULL);
    5959  ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer));
    60  
     60
    6161  return (VOID*)InternalMemScanMem8 (Buffer, Length, Value);
    6262}
    6363
    6464/**
    65   Scans a target buffer for a UINTN sized value, and returns a pointer to the matching 
     65  Scans a target buffer for a UINTN sized value, and returns a pointer to the matching
    6666  UINTN sized value in the target buffer.
    6767
     
    7070  then a pointer to the matching byte in the target buffer is returned.  If no match is found,
    7171  then NULL is returned.  If Length is 0, then NULL is returned.
    72  
     72
    7373  If Length > 0 and Buffer is NULL, then ASSERT().
    7474  If Buffer is not aligned on a UINTN boundary, then ASSERT().
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLib/SetMemWrapper.c

    r48674 r58466  
    3030
    3131  This function fills Length bytes of Buffer with Value, and returns Buffer.
    32  
     32
    3333  If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
    3434
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLib/ZeroMemWrapper.c

    r48674 r58466  
    1212    PeiMemoryLib
    1313    UefiMemoryLib
    14    
     14
    1515  Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
    1616  This program and the accompanying materials
     
    3030
    3131  This function fills Length bytes of Buffer with zeros, and returns Buffer.
    32  
     32
    3333  If Length > 0 and Buffer is NULL, then ASSERT().
    3434  If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibMmx/BaseMemoryLibMmx.inf

    r58459 r58466  
    2424  MODULE_TYPE                    = BASE
    2525  VERSION_STRING                 = 1.0
    26   LIBRARY_CLASS                  = BaseMemoryLib 
     26  LIBRARY_CLASS                  = BaseMemoryLib
    2727
    2828
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibMmx/CompareMemWrapper.c

    r48674 r58466  
    3232  value returned is the first mismatched byte in SourceBuffer subtracted from the first
    3333  mismatched byte in DestinationBuffer.
    34  
     34
    3535  If Length > 0 and DestinationBuffer is NULL, then ASSERT().
    3636  If Length > 0 and SourceBuffer is NULL, then ASSERT().
     
    4545  @retval Non-zero          The first mismatched byte in SourceBuffer subtracted from the first
    4646                            mismatched byte in DestinationBuffer.
    47                            
     47
    4848**/
    4949INTN
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibMmx/CopyMemWrapper.c

    r48674 r58466  
    33
    44  The following BaseMemoryLib instances contain the same copy of this file:
    5  
     5
    66    BaseMemoryLib
    77    BaseMemoryLibMmx
     
    3232  DestinationBuffer.  The implementation must be reentrant, and it must handle the case
    3333  where SourceBuffer overlaps DestinationBuffer.
    34  
     34
    3535  If Length is greater than (MAX_ADDRESS - DestinationBuffer + 1), then ASSERT().
    3636  If Length is greater than (MAX_ADDRESS - SourceBuffer + 1), then ASSERT().
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibMmx/MemLibGuid.c

    r48674 r58466  
    33
    44  The following BaseMemoryLib instances contain the same copy of this file:
    5  
     5
    66    BaseMemoryLib
    77    BaseMemoryLibMmx
     
    3131  This function copies the contents of the 128-bit GUID specified by SourceGuid to
    3232  DestinationGuid, and returns DestinationGuid.
    33  
     33
    3434  If DestinationGuid is NULL, then ASSERT().
    3535  If SourceGuid is NULL, then ASSERT().
     
    6464  This function compares Guid1 to Guid2.  If the GUIDs are identical then TRUE is returned.
    6565  If there are any bit differences in the two GUIDs, then FALSE is returned.
    66  
     66
    6767  If Guid1 is NULL, then ASSERT().
    6868  If Guid2 is NULL, then ASSERT().
     
    104104  GUID in the target buffer is returned.  If no match is found, then NULL is returned.
    105105  If Length is 0, then NULL is returned.
    106  
     106
    107107  If Length > 0 and Buffer is NULL, then ASSERT().
    108108  If Buffer is not aligned on a 32-bit boundary, then ASSERT().
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibMmx/ScanMem16Wrapper.c

    r48674 r58466  
    3434  then a pointer to the matching byte in the target buffer is returned.  If no match is found,
    3535  then NULL is returned.  If Length is 0, then NULL is returned.
    36  
     36
    3737  If Length > 0 and Buffer is NULL, then ASSERT().
    3838  If Buffer is not aligned on a 16-bit boundary, then ASSERT().
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibMmx/ScanMem32Wrapper.c

    r48674 r58466  
    3333  then a pointer to the matching byte in the target buffer is returned.  If no match is found,
    3434  then NULL is returned.  If Length is 0, then NULL is returned.
    35  
     35
    3636  If Length > 0 and Buffer is NULL, then ASSERT().
    3737  If Buffer is not aligned on a 32-bit boundary, then ASSERT().
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibMmx/ScanMem64Wrapper.c

    r48674 r58466  
    3434  then a pointer to the matching byte in the target buffer is returned.  If no match is found,
    3535  then NULL is returned.  If Length is 0, then NULL is returned.
    36  
     36
    3737  If Length > 0 and Buffer is NULL, then ASSERT().
    3838  If Buffer is not aligned on a 64-bit boundary, then ASSERT().
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibMmx/ScanMem8Wrapper.c

    r48674 r58466  
    3434  then a pointer to the matching byte in the target buffer is returned.  If no match is found,
    3535  then NULL is returned.  If Length is 0, then NULL is returned.
    36  
     36
    3737  If Length > 0 and Buffer is NULL, then ASSERT().
    3838  If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
     
    5858  ASSERT (Buffer != NULL);
    5959  ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer));
    60  
     60
    6161  return (VOID*)InternalMemScanMem8 (Buffer, Length, Value);
    6262}
    6363
    6464/**
    65   Scans a target buffer for a UINTN sized value, and returns a pointer to the matching 
     65  Scans a target buffer for a UINTN sized value, and returns a pointer to the matching
    6666  UINTN sized value in the target buffer.
    6767
     
    7070  then a pointer to the matching byte in the target buffer is returned.  If no match is found,
    7171  then NULL is returned.  If Length is 0, then NULL is returned.
    72  
     72
    7373  If Length > 0 and Buffer is NULL, then ASSERT().
    7474  If Buffer is not aligned on a UINTN boundary, then ASSERT().
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibMmx/SetMemWrapper.c

    r48674 r58466  
    3030
    3131  This function fills Length bytes of Buffer with Value, and returns Buffer.
    32  
     32
    3333  If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
    3434
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibMmx/X64/CompareMem.S

    r48674 r58466  
    4747    pushq   %rsi
    4848    pushq   %rdi
    49     movq    %rcx, %rsi 
    50     movq    %rdx, %rdi 
    51     movq    %r8, %rcx 
     49    movq    %rcx, %rsi
     50    movq    %rdx, %rdi
     51    movq    %r8, %rcx
    5252    repe    cmpsb
    5353    movzbq  -1(%rsi), %rax
    5454    movzbq  -1(%rdi), %rdx
    55     subq    %rdx, %rax 
     55    subq    %rdx, %rax
    5656    popq    %rdi
    5757    popq    %rsi
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibMmx/X64/CopyMem.S

    r48674 r58466  
    4141    movq    %rdx, %rsi                  # rsi <- Source
    4242    movq    %rcx, %rdi                  # rdi <- Destination
    43     leaq    -1(%rsi, %r8,), %r9         # r9 <- End of Source         
    44     cmpq    %rdi, %rsi 
     43    leaq    -1(%rsi, %r8,), %r9         # r9 <- End of Source
     44    cmpq    %rdi, %rsi
    4545    movq    %rdi, %rax                  # rax <- Destination as return value
    4646    jae     L0
     
    4848    jae     L_CopyBackward              # Copy backward if overlapped
    4949L0:
    50     movq    %r8, %rcx 
     50    movq    %r8, %rcx
    5151    andq    $7, %r8
    5252    shrq    $3, %rcx                    # rcx <- # of Qwords to copy
     
    5656    movq    (%rsi), %mm0
    5757    movntq  %mm0, (%rdi)
    58     addq    $8, %rsi 
     58    addq    $8, %rsi
    5959    addq    $8, %rdi
    6060    loop    L1
     
    6767    std                                 # set direction flag
    6868L_CopyBytes:
    69     movq    %r8, %rcx 
     69    movq    %r8, %rcx
    7070    rep     movsb                       # Copy bytes backward
    7171    cld
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem16.S

    r48674 r58466  
    4646ASM_PFX(InternalMemScanMem16):
    4747    pushq   %rdi
    48     movq    %rcx, %rdi 
    49     movq    %r8, %rax 
    50     movq    %rdx, %rcx 
     48    movq    %rcx, %rdi
     49    movq    %r8, %rax
     50    movq    %rdx, %rcx
    5151    repne   scasw
    5252    leaq    -2(%rdi), %rax
    53     cmovnz  %rcx, %rax 
     53    cmovnz  %rcx, %rax
    5454    popq    %rdi
    5555    ret
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem32.S

    r48674 r58466  
    4646ASM_PFX(InternalMemScanMem32):
    4747    pushq    %rdi
    48     movq     %rcx, %rdi 
    49     movq     %r8, %rax 
    50     movq     %rdx, %rcx 
     48    movq     %rcx, %rdi
     49    movq     %r8, %rax
     50    movq     %rdx, %rcx
    5151    repne    scasl
    5252    leaq     -4(%rdi), %rax
    53     cmovnz   %rcx, %rax 
     53    cmovnz   %rcx, %rax
    5454    popq     %rdi
    5555    ret
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem64.S

    r48674 r58466  
    4646ASM_PFX(InternalMemScanMem64):
    4747    pushq    %rdi
    48     movq     %rcx, %rdi 
    49     movq     %r8, %rax 
    50     movq     %rdx, %rcx 
     48    movq     %rcx, %rdi
     49    movq     %r8, %rax
     50    movq     %rdx, %rcx
    5151    repne    scasq
    5252    leaq     -8(%rdi), %rax
    53     cmovnz   %rcx, %rax 
     53    cmovnz   %rcx, %rax
    5454    popq     %rdi
    5555    ret
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibMmx/X64/ScanMem8.S

    r48674 r58466  
    4646ASM_PFX(InternalMemScanMem8):
    4747    pushq    %rdi
    48     movq     %rcx, %rdi 
    49     movq     %rdx, %rcx 
    50     movq     %r8,   %rax 
     48    movq     %rcx, %rdi
     49    movq     %rdx, %rcx
     50    movq     %r8,   %rax
    5151    repne    scasb
    5252    leaq     -1(%rdi), %rax
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem.S

    r48674 r58466  
    4444    movq    %r8, %rdi                     # rdi <- Buffer
    4545    movq    %rdx, %rcx
    46     andq    $7, %rdx 
     46    andq    $7, %rdx
    4747    shrq    $3, %rcx
    4848    jz      L_SetBytes
    4949    .byte   0x0f, 0x70, 0x0C0, 0x00
    5050L0:
    51     movntq  %mm0, (%rdi) 
     51    movntq  %mm0, (%rdi)
    5252    addq    $8, %rdi
    5353    loop    L0
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem16.S

    r48674 r58466  
    3838ASM_PFX(InternalMemSetMem16):
    3939    pushq    %rdi
    40     movq     %r8, %rax 
    41     movd     %rax, %mm0 
    42     movq     %rcx, %r8 
    43     movq     %r8, %rdi 
    44     movq     %rdx, %rcx 
    45     andl     $3, %edx 
     40    movq     %r8, %rax
     41    movd     %rax, %mm0
     42    movq     %rcx, %r8
     43    movq     %r8, %rdi
     44    movq     %rdx, %rcx
     45    andl     $3, %edx
    4646    shrq     $2, %rcx
    4747    jz       L_SetWords
    4848    .byte    0x0f, 0x70, 0x0C0, 0x00
    4949L0:
    50     movntq   %mm0, (%rdi) 
    51     addq     $8, %rdi 
     50    movntq   %mm0, (%rdi)
     51    addq     $8, %rdi
    5252    loop     L0
    5353    mfence
    5454L_SetWords:
    55     movl    %edx, %ecx 
     55    movl    %edx, %ecx
    5656    rep     stosw
    5757    movq    %r8, %rax
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem32.S

    r48674 r58466  
    4444   .byte    0x0f, 0x70, 0x0C0, 0x44
    4545L0:
    46     movntq  %mm0, (%rdx) 
     46    movntq  %mm0, (%rdx)
    4747    leaq    8(%rdx), %rdx               # use "lea" to avoid flag changes
    4848    loop    L0
     
    5050L_SetDwords:
    5151    jnc     L1
    52     movd    %mm0, (%rdx) 
     52    movd    %mm0, (%rdx)
    5353L1:
    5454    ret
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibMmx/X64/SetMem64.S

    r58459 r58466  
    4040    xchg      %rdx, %rcx                #rcx <- Count
    4141L0:
    42     movntq  %mm0, (%rdx) 
     42    movntq  %mm0, (%rdx)
    4343    addq    $8, %rdx
    4444    loop    L0
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibMmx/ZeroMemWrapper.c

    r48674 r58466  
    1212    PeiMemoryLib
    1313    UefiMemoryLib
    14    
     14
    1515  Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
    1616  This program and the accompanying materials
     
    3030
    3131  This function fills Length bytes of Buffer with zeros, and returns Buffer.
    32  
     32
    3333  If Length > 0 and Buffer is NULL, then ASSERT().
    3434  If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibOptDxe/BaseMemoryLibOptDxe.inf

    r58459 r58466  
    22#  Instance of Base Memory Library optimized for use in DXE phase.
    33#
    4 #  Base Memory Library that is optimized for use in DXE phase. 
     4#  Base Memory Library that is optimized for use in DXE phase.
    55#  Uses REP, MMX, XMM registers as required for best performance.
    66#
     
    2424  MODULE_TYPE                    = BASE
    2525  VERSION_STRING                 = 1.0
    26   LIBRARY_CLASS                  = BaseMemoryLib 
     26  LIBRARY_CLASS                  = BaseMemoryLib
    2727
    2828
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibOptDxe/CompareMemWrapper.c

    r48674 r58466  
    3232  value returned is the first mismatched byte in SourceBuffer subtracted from the first
    3333  mismatched byte in DestinationBuffer.
    34  
     34
    3535  If Length > 0 and DestinationBuffer is NULL, then ASSERT().
    3636  If Length > 0 and SourceBuffer is NULL, then ASSERT().
     
    4545  @retval Non-zero          The first mismatched byte in SourceBuffer subtracted from the first
    4646                            mismatched byte in DestinationBuffer.
    47                            
     47
    4848**/
    4949INTN
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibOptDxe/CopyMemWrapper.c

    r48674 r58466  
    33
    44  The following BaseMemoryLib instances contain the same copy of this file:
    5  
     5
    66    BaseMemoryLib
    77    BaseMemoryLibMmx
     
    3232  DestinationBuffer.  The implementation must be reentrant, and it must handle the case
    3333  where SourceBuffer overlaps DestinationBuffer.
    34  
     34
    3535  If Length is greater than (MAX_ADDRESS - DestinationBuffer + 1), then ASSERT().
    3636  If Length is greater than (MAX_ADDRESS - SourceBuffer + 1), then ASSERT().
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibOptDxe/MemLibGuid.c

    r48674 r58466  
    33
    44  The following BaseMemoryLib instances contain the same copy of this file:
    5  
     5
    66    BaseMemoryLib
    77    BaseMemoryLibMmx
     
    3131  This function copies the contents of the 128-bit GUID specified by SourceGuid to
    3232  DestinationGuid, and returns DestinationGuid.
    33  
     33
    3434  If DestinationGuid is NULL, then ASSERT().
    3535  If SourceGuid is NULL, then ASSERT().
     
    6464  This function compares Guid1 to Guid2.  If the GUIDs are identical then TRUE is returned.
    6565  If there are any bit differences in the two GUIDs, then FALSE is returned.
    66  
     66
    6767  If Guid1 is NULL, then ASSERT().
    6868  If Guid2 is NULL, then ASSERT().
     
    104104  GUID in the target buffer is returned.  If no match is found, then NULL is returned.
    105105  If Length is 0, then NULL is returned.
    106  
     106
    107107  If Length > 0 and Buffer is NULL, then ASSERT().
    108108  If Buffer is not aligned on a 32-bit boundary, then ASSERT().
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibOptDxe/ScanMem16Wrapper.c

    r48674 r58466  
    3434  then a pointer to the matching byte in the target buffer is returned.  If no match is found,
    3535  then NULL is returned.  If Length is 0, then NULL is returned.
    36  
     36
    3737  If Length > 0 and Buffer is NULL, then ASSERT().
    3838  If Buffer is not aligned on a 16-bit boundary, then ASSERT().
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibOptDxe/ScanMem32Wrapper.c

    r48674 r58466  
    3333  then a pointer to the matching byte in the target buffer is returned.  If no match is found,
    3434  then NULL is returned.  If Length is 0, then NULL is returned.
    35  
     35
    3636  If Length > 0 and Buffer is NULL, then ASSERT().
    3737  If Buffer is not aligned on a 32-bit boundary, then ASSERT().
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibOptDxe/ScanMem64Wrapper.c

    r48674 r58466  
    3434  then a pointer to the matching byte in the target buffer is returned.  If no match is found,
    3535  then NULL is returned.  If Length is 0, then NULL is returned.
    36  
     36
    3737  If Length > 0 and Buffer is NULL, then ASSERT().
    3838  If Buffer is not aligned on a 64-bit boundary, then ASSERT().
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibOptDxe/ScanMem8Wrapper.c

    r48674 r58466  
    3434  then a pointer to the matching byte in the target buffer is returned.  If no match is found,
    3535  then NULL is returned.  If Length is 0, then NULL is returned.
    36  
     36
    3737  If Length > 0 and Buffer is NULL, then ASSERT().
    3838  If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
     
    5858  ASSERT (Buffer != NULL);
    5959  ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer));
    60  
     60
    6161  return (VOID*)InternalMemScanMem8 (Buffer, Length, Value);
    6262}
    6363
    6464/**
    65   Scans a target buffer for a UINTN sized value, and returns a pointer to the matching 
     65  Scans a target buffer for a UINTN sized value, and returns a pointer to the matching
    6666  UINTN sized value in the target buffer.
    6767
     
    7070  then a pointer to the matching byte in the target buffer is returned.  If no match is found,
    7171  then NULL is returned.  If Length is 0, then NULL is returned.
    72  
     72
    7373  If Length > 0 and Buffer is NULL, then ASSERT().
    7474  If Buffer is not aligned on a UINTN boundary, then ASSERT().
     
    7878  @param  Buffer      The pointer to the target buffer to scan.
    7979  @param  Length      The number of bytes in Buffer to scan.
    80   @param  Value       
     80  @param  Value
    8181The value to search for in the target buffer.
    8282
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibOptDxe/SetMemWrapper.c

    r48674 r58466  
    3030
    3131  This function fills Length bytes of Buffer with Value, and returns Buffer.
    32  
     32
    3333  If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
    3434
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibOptDxe/X64/CompareMem.S

    r48674 r58466  
    4242#   IN      UINTN                     Length
    4343#   );
    44 #------------------------------------------------------------------------------ 
     44#------------------------------------------------------------------------------
    4545ASM_GLOBAL ASM_PFX(InternalMemCompareMem)
    4646ASM_PFX(InternalMemCompareMem):
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibOptDxe/X64/CopyMem.S

    r48674 r58466  
    4040    movq    %rdx, %rsi                  # rsi <- Source
    4141    movq    %rcx, %rdi                  # rdi <- Destination
    42     leaq    -1(%rsi,%r8,), %r9          # r9 <- Last byte of Source     
     42    leaq    -1(%rsi,%r8,), %r9          # r9 <- Last byte of Source
    4343    cmpq    %rdi, %rsi
    4444    movq    %rdi, %rax                  # rax <- Destination as return value
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem.S

    r48674 r58466  
    4848    shrq    $3, %rcx    # rcx = rcx / 8
    4949    cld
    50     rep     stosq 
     50    rep     stosq
    5151    movq    %rdx, %rcx  # rcx = rdx
    5252    andq    $7, %rcx    # rcx = rcx & 7
    53     rep     stosb 
     53    rep     stosb
    5454    popq    %rax        # rax = Buffer
    5555    popq    %rbx
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibOptDxe/X64/SetMem.asm

    r48674 r58466  
    4848    shr     rcx, 3    ; rcx = rcx / 8
    4949    cld
    50     rep     stosq 
     50    rep     stosq
    5151    mov     rcx, rdx  ; rcx = rdx
    5252    and     rcx, 7    ; rcx = rcx & 7
    53     rep     stosb 
     53    rep     stosb
    5454    pop     rax       ; rax = Buffer
    5555    ret
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibOptDxe/ZeroMemWrapper.c

    r48674 r58466  
    1212    PeiMemoryLib
    1313    UefiMemoryLib
    14    
     14
    1515  Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
    1616  This program and the accompanying materials
     
    3030
    3131  This function fills Length bytes of Buffer with zeros, and returns Buffer.
    32  
     32
    3333  If Length > 0 and Buffer is NULL, then ASSERT().
    3434  If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibOptPei/BaseMemoryLibOptPei.inf

    r58459 r58466  
    22#  Instance of Base Memory Library optimized for use in PEI phase.
    33#
    4 #  Base Memory Library that is optimized for use in PEI phase. 
     4#  Base Memory Library that is optimized for use in PEI phase.
    55#  Uses REP, MMX, XMM registers as required for best performance.
    66#
     
    2424  MODULE_TYPE                    = BASE
    2525  VERSION_STRING                 = 1.0
    26   LIBRARY_CLASS                  = BaseMemoryLib 
     26  LIBRARY_CLASS                  = BaseMemoryLib
    2727
    2828
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibOptPei/CompareMemWrapper.c

    r48674 r58466  
    3232  value returned is the first mismatched byte in SourceBuffer subtracted from the first
    3333  mismatched byte in DestinationBuffer.
    34  
     34
    3535  If Length > 0 and DestinationBuffer is NULL, then ASSERT().
    3636  If Length > 0 and SourceBuffer is NULL, then ASSERT().
     
    4545  @retval Non-zero          The first mismatched byte in SourceBuffer subtracted from the first
    4646                            mismatched byte in DestinationBuffer.
    47                            
     47
    4848**/
    4949INTN
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibOptPei/CopyMemWrapper.c

    r48674 r58466  
    33
    44  The following BaseMemoryLib instances contain the same copy of this file:
    5  
     5
    66    BaseMemoryLib
    77    BaseMemoryLibMmx
     
    3232  DestinationBuffer.  The implementation must be reentrant, and it must handle the case
    3333  where SourceBuffer overlaps DestinationBuffer.
    34  
     34
    3535  If Length is greater than (MAX_ADDRESS - DestinationBuffer + 1), then ASSERT().
    3636  If Length is greater than (MAX_ADDRESS - SourceBuffer + 1), then ASSERT().
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibOptPei/MemLibGuid.c

    r48674 r58466  
    33
    44  The following BaseMemoryLib instances contain the same copy of this file:
    5  
     5
    66    BaseMemoryLib
    77    BaseMemoryLibMmx
     
    3131  This function copies the contents of the 128-bit GUID specified by SourceGuid to
    3232  DestinationGuid, and returns DestinationGuid.
    33  
     33
    3434  If DestinationGuid is NULL, then ASSERT().
    3535  If SourceGuid is NULL, then ASSERT().
     
    6464  This function compares Guid1 to Guid2.  If the GUIDs are identical then TRUE is returned.
    6565  If there are any bit differences in the two GUIDs, then FALSE is returned.
    66  
     66
    6767  If Guid1 is NULL, then ASSERT().
    6868  If Guid2 is NULL, then ASSERT().
     
    104104  GUID in the target buffer is returned.  If no match is found, then NULL is returned.
    105105  If Length is 0, then NULL is returned.
    106  
     106
    107107  If Length > 0 and Buffer is NULL, then ASSERT().
    108108  If Buffer is not aligned on a 32-bit boundary, then ASSERT().
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibOptPei/ScanMem16Wrapper.c

    r48674 r58466  
    3434  then a pointer to the matching byte in the target buffer is returned.  If no match is found,
    3535  then NULL is returned.  If Length is 0, then NULL is returned.
    36  
     36
    3737  If Length > 0 and Buffer is NULL, then ASSERT().
    3838  If Buffer is not aligned on a 16-bit boundary, then ASSERT().
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibOptPei/ScanMem32Wrapper.c

    r48674 r58466  
    3333  then a pointer to the matching byte in the target buffer is returned.  If no match is found,
    3434  then NULL is returned.  If Length is 0, then NULL is returned.
    35  
     35
    3636  If Length > 0 and Buffer is NULL, then ASSERT().
    3737  If Buffer is not aligned on a 32-bit boundary, then ASSERT().
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibOptPei/ScanMem64Wrapper.c

    r48674 r58466  
    3434  then a pointer to the matching byte in the target buffer is returned.  If no match is found,
    3535  then NULL is returned.  If Length is 0, then NULL is returned.
    36  
     36
    3737  If Length > 0 and Buffer is NULL, then ASSERT().
    3838  If Buffer is not aligned on a 64-bit boundary, then ASSERT().
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibOptPei/ScanMem8Wrapper.c

    r48674 r58466  
    3434  then a pointer to the matching byte in the target buffer is returned.  If no match is found,
    3535  then NULL is returned.  If Length is 0, then NULL is returned.
    36  
     36
    3737  If Length > 0 and Buffer is NULL, then ASSERT().
    3838  If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
     
    5858  ASSERT (Buffer != NULL);
    5959  ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer));
    60  
     60
    6161  return (VOID*)InternalMemScanMem8 (Buffer, Length, Value);
    6262}
    6363
    6464/**
    65   Scans a target buffer for a UINTN sized value, and returns a pointer to the matching 
     65  Scans a target buffer for a UINTN sized value, and returns a pointer to the matching
    6666  UINTN sized value in the target buffer.
    6767
     
    7070  then a pointer to the matching byte in the target buffer is returned.  If no match is found,
    7171  then NULL is returned.  If Length is 0, then NULL is returned.
    72  
     72
    7373  If Length > 0 and Buffer is NULL, then ASSERT().
    7474  If Buffer is not aligned on a UINTN boundary, then ASSERT().
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibOptPei/SetMemWrapper.c

    r48674 r58466  
    3030
    3131  This function fills Length bytes of Buffer with Value, and returns Buffer.
    32  
     32
    3333  If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
    3434
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibOptPei/ZeroMemWrapper.c

    r48674 r58466  
    1212    PeiMemoryLib
    1313    UefiMemoryLib
    14    
     14
    1515  Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
    1616  This program and the accompanying materials
     
    3030
    3131  This function fills Length bytes of Buffer with zeros, and returns Buffer.
    32  
     32
    3333  If Length > 0 and Buffer is NULL, then ASSERT().
    3434  If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibRepStr/BaseMemoryLibRepStr.inf

    r58459 r58466  
    2424  MODULE_TYPE                    = BASE
    2525  VERSION_STRING                 = 1.0
    26   LIBRARY_CLASS                  = BaseMemoryLib 
     26  LIBRARY_CLASS                  = BaseMemoryLib
    2727
    2828
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibRepStr/CompareMemWrapper.c

    r48674 r58466  
    3232  value returned is the first mismatched byte in SourceBuffer subtracted from the first
    3333  mismatched byte in DestinationBuffer.
    34  
     34
    3535  If Length > 0 and DestinationBuffer is NULL, then ASSERT().
    3636  If Length > 0 and SourceBuffer is NULL, then ASSERT().
     
    4545  @retval Non-zero          The first mismatched byte in SourceBuffer subtracted from the first
    4646                            mismatched byte in DestinationBuffer.
    47                            
     47
    4848**/
    4949INTN
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibRepStr/CopyMemWrapper.c

    r48674 r58466  
    33
    44  The following BaseMemoryLib instances contain the same copy of this file:
    5  
     5
    66    BaseMemoryLib
    77    BaseMemoryLibMmx
     
    3232  DestinationBuffer.  The implementation must be reentrant, and it must handle the case
    3333  where SourceBuffer overlaps DestinationBuffer.
    34  
     34
    3535  If Length is greater than (MAX_ADDRESS - DestinationBuffer + 1), then ASSERT().
    3636  If Length is greater than (MAX_ADDRESS - SourceBuffer + 1), then ASSERT().
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibRepStr/MemLibGuid.c

    r48674 r58466  
    33
    44  The following BaseMemoryLib instances contain the same copy of this file:
    5  
     5
    66    BaseMemoryLib
    77    BaseMemoryLibMmx
     
    3131  This function copies the contents of the 128-bit GUID specified by SourceGuid to
    3232  DestinationGuid, and returns DestinationGuid.
    33  
     33
    3434  If DestinationGuid is NULL, then ASSERT().
    3535  If SourceGuid is NULL, then ASSERT().
     
    6464  This function compares Guid1 to Guid2.  If the GUIDs are identical then TRUE is returned.
    6565  If there are any bit differences in the two GUIDs, then FALSE is returned.
    66  
     66
    6767  If Guid1 is NULL, then ASSERT().
    6868  If Guid2 is NULL, then ASSERT().
     
    104104  GUID in the target buffer is returned.  If no match is found, then NULL is returned.
    105105  If Length is 0, then NULL is returned.
    106  
     106
    107107  If Length > 0 and Buffer is NULL, then ASSERT().
    108108  If Buffer is not aligned on a 32-bit boundary, then ASSERT().
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibRepStr/ScanMem16Wrapper.c

    r48674 r58466  
    3434  then a pointer to the matching byte in the target buffer is returned.  If no match is found,
    3535  then NULL is returned.  If Length is 0, then NULL is returned.
    36  
     36
    3737  If Length > 0 and Buffer is NULL, then ASSERT().
    3838  If Buffer is not aligned on a 16-bit boundary, then ASSERT().
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibRepStr/ScanMem32Wrapper.c

    r48674 r58466  
    3333  then a pointer to the matching byte in the target buffer is returned.  If no match is found,
    3434  then NULL is returned.  If Length is 0, then NULL is returned.
    35  
     35
    3636  If Length > 0 and Buffer is NULL, then ASSERT().
    3737  If Buffer is not aligned on a 32-bit boundary, then ASSERT().
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibRepStr/ScanMem64Wrapper.c

    r48674 r58466  
    3434  then a pointer to the matching byte in the target buffer is returned.  If no match is found,
    3535  then NULL is returned.  If Length is 0, then NULL is returned.
    36  
     36
    3737  If Length > 0 and Buffer is NULL, then ASSERT().
    3838  If Buffer is not aligned on a 64-bit boundary, then ASSERT().
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibRepStr/ScanMem8Wrapper.c

    r48674 r58466  
    3434  then a pointer to the matching byte in the target buffer is returned.  If no match is found,
    3535  then NULL is returned.  If Length is 0, then NULL is returned.
    36  
     36
    3737  If Length > 0 and Buffer is NULL, then ASSERT().
    3838  If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
     
    5858  ASSERT (Buffer != NULL);
    5959  ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer));
    60  
     60
    6161  return (VOID*)InternalMemScanMem8 (Buffer, Length, Value);
    6262}
    6363
    6464/**
    65   Scans a target buffer for a UINTN sized value, and returns a pointer to the matching 
     65  Scans a target buffer for a UINTN sized value, and returns a pointer to the matching
    6666  UINTN sized value in the target buffer.
    6767
     
    7070  then a pointer to the matching byte in the target buffer is returned.  If no match is found,
    7171  then NULL is returned.  If Length is 0, then NULL is returned.
    72  
     72
    7373  If Length > 0 and Buffer is NULL, then ASSERT().
    7474  If Buffer is not aligned on a UINTN boundary, then ASSERT().
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibRepStr/SetMemWrapper.c

    r48674 r58466  
    3030
    3131  This function fills Length bytes of Buffer with Value, and returns Buffer.
    32  
     32
    3333  If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
    3434
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibRepStr/ZeroMemWrapper.c

    r48674 r58466  
    1212    PeiMemoryLib
    1313    UefiMemoryLib
    14    
     14
    1515  Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
    1616  This program and the accompanying materials
     
    3030
    3131  This function fills Length bytes of Buffer with zeros, and returns Buffer.
    32  
     32
    3333  If Length > 0 and Buffer is NULL, then ASSERT().
    3434  If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibSse2/BaseMemoryLibSse2.inf

    r58459 r58466  
    2323  MODULE_TYPE                    = BASE
    2424  VERSION_STRING                 = 1.0
    25   LIBRARY_CLASS                  = BaseMemoryLib 
     25  LIBRARY_CLASS                  = BaseMemoryLib
    2626
    2727
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibSse2/CompareMemWrapper.c

    r48674 r58466  
    3232  value returned is the first mismatched byte in SourceBuffer subtracted from the first
    3333  mismatched byte in DestinationBuffer.
    34  
     34
    3535  If Length > 0 and DestinationBuffer is NULL, then ASSERT().
    3636  If Length > 0 and SourceBuffer is NULL, then ASSERT().
     
    4545  @retval Non-zero          The first mismatched byte in SourceBuffer subtracted from the first
    4646                            mismatched byte in DestinationBuffer.
    47                            
     47
    4848**/
    4949INTN
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibSse2/CopyMemWrapper.c

    r48674 r58466  
    33
    44  The following BaseMemoryLib instances contain the same copy of this file:
    5  
     5
    66    BaseMemoryLib
    77    BaseMemoryLibMmx
     
    3232  DestinationBuffer.  The implementation must be reentrant, and it must handle the case
    3333  where SourceBuffer overlaps DestinationBuffer.
    34  
     34
    3535  If Length is greater than (MAX_ADDRESS - DestinationBuffer + 1), then ASSERT().
    3636  If Length is greater than (MAX_ADDRESS - SourceBuffer + 1), then ASSERT().
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibSse2/MemLibGuid.c

    r48674 r58466  
    33
    44  The following BaseMemoryLib instances contain the same copy of this file:
    5  
     5
    66    BaseMemoryLib
    77    BaseMemoryLibMmx
     
    3131  This function copies the contents of the 128-bit GUID specified by SourceGuid to
    3232  DestinationGuid, and returns DestinationGuid.
    33  
     33
    3434  If DestinationGuid is NULL, then ASSERT().
    3535  If SourceGuid is NULL, then ASSERT().
     
    6464  This function compares Guid1 to Guid2.  If the GUIDs are identical then TRUE is returned.
    6565  If there are any bit differences in the two GUIDs, then FALSE is returned.
    66  
     66
    6767  If Guid1 is NULL, then ASSERT().
    6868  If Guid2 is NULL, then ASSERT().
     
    104104  GUID in the target buffer is returned.  If no match is found, then NULL is returned.
    105105  If Length is 0, then NULL is returned.
    106  
     106
    107107  If Length > 0 and Buffer is NULL, then ASSERT().
    108108  If Buffer is not aligned on a 32-bit boundary, then ASSERT().
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibSse2/ScanMem16Wrapper.c

    r48674 r58466  
    3434  then a pointer to the matching byte in the target buffer is returned.  If no match is found,
    3535  then NULL is returned.  If Length is 0, then NULL is returned.
    36  
     36
    3737  If Length > 0 and Buffer is NULL, then ASSERT().
    3838  If Buffer is not aligned on a 16-bit boundary, then ASSERT().
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibSse2/ScanMem32Wrapper.c

    r48674 r58466  
    3333  then a pointer to the matching byte in the target buffer is returned.  If no match is found,
    3434  then NULL is returned.  If Length is 0, then NULL is returned.
    35  
     35
    3636  If Length > 0 and Buffer is NULL, then ASSERT().
    3737  If Buffer is not aligned on a 32-bit boundary, then ASSERT().
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibSse2/ScanMem64Wrapper.c

    r48674 r58466  
    3434  then a pointer to the matching byte in the target buffer is returned.  If no match is found,
    3535  then NULL is returned.  If Length is 0, then NULL is returned.
    36  
     36
    3737  If Length > 0 and Buffer is NULL, then ASSERT().
    3838  If Buffer is not aligned on a 64-bit boundary, then ASSERT().
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibSse2/ScanMem8Wrapper.c

    r48674 r58466  
    3434  then a pointer to the matching byte in the target buffer is returned.  If no match is found,
    3535  then NULL is returned.  If Length is 0, then NULL is returned.
    36  
     36
    3737  If Length > 0 and Buffer is NULL, then ASSERT().
    3838  If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
     
    5858  ASSERT (Buffer != NULL);
    5959  ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer));
    60  
     60
    6161  return (VOID*)InternalMemScanMem8 (Buffer, Length, Value);
    6262}
    6363
    6464/**
    65   Scans a target buffer for a UINTN sized value, and returns a pointer to the matching 
     65  Scans a target buffer for a UINTN sized value, and returns a pointer to the matching
    6666  UINTN sized value in the target buffer.
    6767
     
    7070  then a pointer to the matching byte in the target buffer is returned.  If no match is found,
    7171  then NULL is returned.  If Length is 0, then NULL is returned.
    72  
     72
    7373  If Length > 0 and Buffer is NULL, then ASSERT().
    7474  If Buffer is not aligned on a UINTN boundary, then ASSERT().
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibSse2/SetMemWrapper.c

    r48674 r58466  
    3030
    3131  This function fills Length bytes of Buffer with Value, and returns Buffer.
    32  
     32
    3333  If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
    3434
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibSse2/X64/CopyMem.S

    r48674 r58466  
    4747    cmpq    %rdi, %r9                   # Overlapped?
    4848    jae     L_CopyBackward              # Copy backward if overlapped
    49 L0:           
    50     xorq    %rcx, %rcx                   
     49L0:
     50    xorq    %rcx, %rcx
    5151    subq    %rdi, %rcx                  # rcx <- -rdi
    5252    andq    $15, %rcx                   # rcx + rsi should be 16 bytes aligned
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseMemoryLibSse2/ZeroMemWrapper.c

    r48674 r58466  
    1212    PeiMemoryLib
    1313    UefiMemoryLib
    14    
     14
    1515  Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
    1616  This program and the accompanying materials
     
    3030
    3131  This function fills Length bytes of Buffer with zeros, and returns Buffer.
    32  
     32
    3333  If Length > 0 and Buffer is NULL, then ASSERT().
    3434  If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BasePalLibNull/BasePalLibNull.inf

    r58459 r58466  
    2121  MODULE_TYPE                    = BASE
    2222  VERSION_STRING                 = 1.0
    23   LIBRARY_CLASS                  = PalLib 
     23  LIBRARY_CLASS                  = PalLib
    2424
    2525
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BasePalLibNull/PalCall.c

    r48674 r58466  
    11/** @file
    2  
     2
    33  Template and Sample instance of PalCallLib.
    4  
     4
    55  Copyright (c) 2006 - 2010, 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.                                           
     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.
    1010
    11   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     
     11  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
    1212  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
    13      
     13
    1414**/
    1515
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf

    r58459 r58466  
    2424  MODULE_TYPE                    = BASE
    2525  VERSION_STRING                 = 1.0
    26   LIBRARY_CLASS                  = PcdLib 
     26  LIBRARY_CLASS                  = PcdLib
    2727
    2828
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BasePcdLibNull/PcdLib.c

    r58459 r58466  
    2525  Sets the current SKU in the PCD database to the value specified by SkuId.  SkuId is returned.
    2626
    27   @param[in]  SkuId The SKU value that will be used when the PCD service will retrieve and 
     27  @param[in]  SkuId The SKU value that will be used when the PCD service will retrieve and
    2828                    set values associated with a PCD token.
    29                    
    30   If SkuId >= 0x100, then ASSERT().                 
     29
     30  If SkuId >= 0x100, then ASSERT().
    3131
    3232  @return Return the SKU ID that just be set.
     
    4646/**
    4747  This function provides a means by which to retrieve a value for a given PCD token.
    48  
    49   Returns the 8-bit value for the token specified by TokenNumber. 
     48
     49  Returns the 8-bit value for the token specified by TokenNumber.
    5050
    5151  @param[in]  TokenNumber The PCD token number to retrieve a current value for.
    5252
    53   @return Returns the 8-bit value for the token specified by TokenNumber. 
     53  @return Returns the 8-bit value for the token specified by TokenNumber.
    5454
    5555**/
     
    6969/**
    7070  This function provides a means by which to retrieve a value for a given PCD token.
    71  
    72   Returns the 16-bit value for the token specified by TokenNumber. 
     71
     72  Returns the 16-bit value for the token specified by TokenNumber.
    7373
    7474  @param[in]  TokenNumber The PCD token number to retrieve a current value for.
    7575
    76   @return Returns the 16-bit value for the token specified by TokenNumber. 
     76  @return Returns the 16-bit value for the token specified by TokenNumber.
    7777
    7878**/
     
    9292/**
    9393  This function provides a means by which to retrieve a value for a given PCD token.
    94  
    95   Returns the 32-bit value for the token specified by TokenNumber. 
     94
     95  Returns the 32-bit value for the token specified by TokenNumber.
    9696
    9797  @param[in]  TokenNumber The PCD token number to retrieve a current value for.
     
    115115/**
    116116  This function provides a means by which to retrieve a value for a given PCD token.
    117  
     117
    118118  Returns the 64-bit value for the token specified by TokenNumber.
    119119
     
    138138/**
    139139  This function provides a means by which to retrieve a value for a given PCD token.
    140  
     140
    141141  Returns the pointer to the buffer of the token specified by TokenNumber.
    142142
     
    161161/**
    162162  This function provides a means by which to retrieve a value for a given PCD token.
    163  
    164   Returns the Boolean value of the token specified by TokenNumber. 
     163
     164  Returns the Boolean value of the token specified by TokenNumber.
    165165
    166166  @param[in]  TokenNumber The PCD token number to retrieve a current value for.
    167167
    168   @return Returns the Boolean value of the token specified by TokenNumber. 
    169 
    170 **/
    171 BOOLEAN 
     168  @return Returns the Boolean value of the token specified by TokenNumber.
     169
     170**/
     171BOOLEAN
    172172EFIAPI
    173173LibPcdGetBool (
     
    187187  @param[in]  TokenNumber The PCD token number to retrieve a current value for.
    188188
    189   @return Returns the size of the token specified by TokenNumber. 
     189  @return Returns the size of the token specified by TokenNumber.
    190190
    191191**/
     
    205205/**
    206206  This function provides a means by which to retrieve a value for a given PCD token.
    207  
     207
    208208  Returns the 8-bit value for the token specified by TokenNumber and Guid.
    209  
    210   If Guid is NULL, then ASSERT(). 
    211 
    212   @param[in]  Guid The pointer to a 128-bit unique value that designates 
     209
     210  If Guid is NULL, then ASSERT().
     211
     212  @param[in]  Guid The pointer to a 128-bit unique value that designates
    213213              which namespace to retrieve a value from.
    214214  @param[in]  TokenNumber The PCD token number to retrieve a current value for.
     
    235235
    236236  Returns the 16-bit value for the token specified by TokenNumber and Guid.
    237  
    238   If Guid is NULL, then ASSERT(). 
    239 
    240   @param[in]  Guid The pointer to a 128-bit unique value that designates 
     237
     238  If Guid is NULL, then ASSERT().
     239
     240  @param[in]  Guid The pointer to a 128-bit unique value that designates
    241241              which namespace to retrieve a value from.
    242242  @param[in]  TokenNumber The PCD token number to retrieve a current value for.
     
    261261/**
    262262  Returns the 32-bit value for the token specified by TokenNumber and Guid.
    263   If Guid is NULL, then ASSERT(). 
    264 
    265   @param[in]  Guid The pointer to a 128-bit unique value that designates 
     263  If Guid is NULL, then ASSERT().
     264
     265  @param[in]  Guid The pointer to a 128-bit unique value that designates
    266266              which namespace to retrieve a value from.
    267267  @param[in]  TokenNumber The PCD token number to retrieve a current value for.
     
    286286/**
    287287  This function provides a means by which to retrieve a value for a given PCD token.
    288  
     288
    289289  Returns the 64-bit value for the token specified by TokenNumber and Guid.
    290  
    291   If Guid is NULL, then ASSERT(). 
    292 
    293   @param[in]  Guid          The pointer to a 128-bit unique value that designates 
     290
     291  If Guid is NULL, then ASSERT().
     292
     293  @param[in]  Guid          The pointer to a 128-bit unique value that designates
    294294                            which namespace to retrieve a value from.
    295295  @param[in]  TokenNumber   The PCD token number to retrieve a current value for.
     
    314314/**
    315315  This function provides a means by which to retrieve a value for a given PCD token.
    316  
     316
    317317  Returns the pointer to the buffer of token specified by TokenNumber and Guid.
    318  
    319   If Guid is NULL, then ASSERT(). 
    320 
    321   @param[in]  Guid          The pointer to a 128-bit unique value that designates 
     318
     319  If Guid is NULL, then ASSERT().
     320
     321  @param[in]  Guid          The pointer to a 128-bit unique value that designates
    322322                            which namespace to retrieve a value from.
    323323  @param[in]  TokenNumber   The PCD token number to retrieve a current value for.
     
    342342/**
    343343  This function provides a means by which to retrieve a value for a given PCD token.
    344  
    345   Returns the Boolean value of the token specified by TokenNumber and Guid. 
    346  
    347   If Guid is NULL, then ASSERT(). 
    348 
    349   @param[in]  Guid          The pointer to a 128-bit unique value that designates 
     344
     345  Returns the Boolean value of the token specified by TokenNumber and Guid.
     346
     347  If Guid is NULL, then ASSERT().
     348
     349  @param[in]  Guid          The pointer to a 128-bit unique value that designates
    350350                            which namespace to retrieve a value from.
    351351  @param[in]  TokenNumber   The PCD token number to retrieve a current value for.
     
    370370/**
    371371  This function provides a means by which to retrieve the size of a given PCD token.
    372  
    373   Returns the size of the token specified by TokenNumber and Guid. 
    374  
    375   If Guid is NULL, then ASSERT(). 
    376 
    377   @param[in]  Guid          The pointer to a 128-bit unique value that designates 
     372
     373  Returns the size of the token specified by TokenNumber and Guid.
     374
     375  If Guid is NULL, then ASSERT().
     376
     377  @param[in]  Guid          The pointer to a 128-bit unique value that designates
    378378                            which namespace to retrieve a value from.
    379379  @param[in]  TokenNumber   The PCD token number to retrieve a current value for.
     
    398398/**
    399399  This function provides a means by which to set a value for a given PCD token.
    400  
    401   Sets the 8-bit value for the token specified by TokenNumber 
     400
     401  Sets the 8-bit value for the token specified by TokenNumber
    402402  to the value specified by Value.  Value is returned.
    403403
     
    426426/**
    427427  This function provides a means by which to set a value for a given PCD token.
    428  
    429   Sets the 16-bit value for the token specified by TokenNumber 
     428
     429  Sets the 16-bit value for the token specified by TokenNumber
    430430  to the value specified by Value.  Value is returned.
    431431
     
    454454/**
    455455  This function provides a means by which to set a value for a given PCD token.
    456  
    457   Sets the 32-bit value for the token specified by TokenNumber 
     456
     457  Sets the 32-bit value for the token specified by TokenNumber
    458458  to the value specified by Value.  Value is returned.
    459459
     
    482482/**
    483483  This function provides a means by which to set a value for a given PCD token.
    484  
    485   Sets the 64-bit value for the token specified by TokenNumber 
     484
     485  Sets the 64-bit value for the token specified by TokenNumber
    486486  to the value specified by Value.  Value is returned.
    487487
     
    510510/**
    511511  This function provides a means by which to set a value for a given PCD token.
    512  
    513   Sets a buffer for the token specified by TokenNumber to the value 
    514   specified by Buffer and SizeOfBuffer.  Buffer is returned. 
    515   If SizeOfBuffer is greater than the maximum size support by TokenNumber, 
    516   then set SizeOfBuffer to the maximum size supported by TokenNumber and 
     512
     513  Sets a buffer for the token specified by TokenNumber to the value
     514  specified by Buffer and SizeOfBuffer.  Buffer is returned.
     515  If SizeOfBuffer is greater than the maximum size support by TokenNumber,
     516  then set SizeOfBuffer to the maximum size supported by TokenNumber and
    517517  return NULL to indicate that the set operation was not actually performed,
    518518  or ASSERT() if the set operation was not corretly performed.
    519519
    520   If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to the 
     520  If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to the
    521521  maximum size supported by TokenName and NULL must be returned.
    522  
     522
    523523  If SizeOfBuffer is NULL, then ASSERT().
    524524  If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
    525  
     525
    526526  @param[in]      TokenNumber   The PCD token number to set a current value for.
    527527  @param[in, out] SizeOfBuffer  The size, in bytes, of Buffer.
     
    548548/**
    549549  This function provides a means by which to set a value for a given PCD token.
    550  
    551   Sets the Boolean value for the token specified by TokenNumber 
     550
     551  Sets the Boolean value for the token specified by TokenNumber
    552552  to the value specified by Value.  Value is returned.
    553553
     
    576576/**
    577577  This function provides a means by which to set a value for a given PCD token.
    578  
    579   Sets the 8-bit value for the token specified by TokenNumber and 
     578
     579  Sets the 8-bit value for the token specified by TokenNumber and
    580580  Guid to the value specified by Value. Value is returned.
    581581
     
    583583  If the set operation was not correctly performed, then ASSERT().
    584584
    585   @param[in]  Guid          The pointer to a 128-bit unique value that 
     585  @param[in]  Guid          The pointer to a 128-bit unique value that
    586586                            designates which namespace to set a value from.
    587587  @param[in]  TokenNumber   The PCD token number to set a current value for.
     
    608608/**
    609609  This function provides a means by which to set a value for a given PCD token.
    610  
    611   Sets the 16-bit value for the token specified by TokenNumber and 
     610
     611  Sets the 16-bit value for the token specified by TokenNumber and
    612612  Guid to the value specified by Value. Value is returned.
    613613
     
    615615  If the set operation was not correctly performed, then ASSERT().
    616616
    617   @param[in]  Guid          The pointer to a 128-bit unique value that 
     617  @param[in]  Guid          The pointer to a 128-bit unique value that
    618618                            designates which namespace to set a value from.
    619619  @param[in]  TokenNumber   The PCD token number to set a current value for.
     
    640640/**
    641641  This function provides a means by which to set a value for a given PCD token.
    642  
    643   Sets the 32-bit value for the token specified by TokenNumber and 
     642
     643  Sets the 32-bit value for the token specified by TokenNumber and
    644644  Guid to the value specified by Value. Value is returned.
    645645
     
    647647  If the set operation was not correctly performed, then ASSERT().
    648648
    649   @param[in]  Guid          The pointer to a 128-bit unique value that 
     649  @param[in]  Guid          The pointer to a 128-bit unique value that
    650650                            designates which namespace to set a value from.
    651651  @param[in]  TokenNumber   The PCD token number to set a current value for.
     
    672672/**
    673673  This function provides a means by which to set a value for a given PCD token.
    674  
    675   Sets the 64-bit value for the token specified by TokenNumber and 
     674
     675  Sets the 64-bit value for the token specified by TokenNumber and
    676676  Guid to the value specified by Value. Value is returned.
    677677
     
    679679  If the set operation was not correctly performed, then ASSERT().
    680680
    681   @param[in]  Guid          The pointer to a 128-bit unique value that 
     681  @param[in]  Guid          The pointer to a 128-bit unique value that
    682682                            designates which namespace to set a value from.
    683683  @param[in]  TokenNumber   The PCD token number to set a current value for.
     
    704704/**
    705705  This function provides a means by which to set a value for a given PCD token.
    706  
    707   Sets a buffer for the token specified by TokenNumber to the value specified by 
    708   Buffer and SizeOfBuffer.  Buffer is returned.  If SizeOfBuffer is greater than 
    709   the maximum size support by TokenNumber, then set SizeOfBuffer to the maximum size 
    710   supported by TokenNumber and return NULL to indicate that the set operation 
     706
     707  Sets a buffer for the token specified by TokenNumber to the value specified by
     708  Buffer and SizeOfBuffer.  Buffer is returned.  If SizeOfBuffer is greater than
     709  the maximum size support by TokenNumber, then set SizeOfBuffer to the maximum size
     710  supported by TokenNumber and return NULL to indicate that the set operation
    711711  was not actually performed, or ASSERT() if the set operation was not corretly performed.
    712  
     712
    713713  If Guid is NULL, then ASSERT().
    714714  If SizeOfBuffer is NULL, then ASSERT().
    715715  If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
    716  
    717   @param[in]  Guid              The pointer to a 128-bit unique value that 
     716
     717  @param[in]  Guid              The pointer to a 128-bit unique value that
    718718                                designates which namespace to set a value from.
    719719  @param[in]  TokenNumber       The PCD token number to set a current value for.
     
    742742/**
    743743  This function provides a means by which to set a value for a given PCD token.
    744  
    745   Sets the Boolean value for the token specified by TokenNumber and 
     744
     745  Sets the Boolean value for the token specified by TokenNumber and
    746746  Guid to the value specified by Value. Value is returned.
    747747
     
    749749  If the set operation was not correctly performed, then ASSERT().
    750750
    751   @param[in]  Guid          The pointer to a 128-bit unique value that 
     751  @param[in]  Guid          The pointer to a 128-bit unique value that
    752752                            designates which namespace to set a value from.
    753753  @param[in]  TokenNumber   The PCD token number to set a current value for.
     
    774774/**
    775775  Set up a notification function that is called when a specified token is set.
    776  
    777   When the token specified by TokenNumber and Guid is set, 
    778   then notification function specified by NotificationFunction is called. 
    779   If Guid is NULL, then the default token space is used. 
    780  
     776
     777  When the token specified by TokenNumber and Guid is set,
     778  then notification function specified by NotificationFunction is called.
     779  If Guid is NULL, then the default token space is used.
     780
    781781  If NotificationFunction is NULL, then ASSERT().
    782782
    783   @param[in]  Guid      The pointer to a 128-bit unique value that designates which 
    784                         namespace to set a value from.  If NULL, then the default 
     783  @param[in]  Guid      The pointer to a 128-bit unique value that designates which
     784                        namespace to set a value from.  If NULL, then the default
    785785                        token space is used.
    786786  @param[in]  TokenNumber   The PCD token number to monitor.
    787   @param[in]  NotificationFunction  The function to call when the token 
     787  @param[in]  NotificationFunction  The function to call when the token
    788788                                    specified by Guid and TokenNumber is set.
    789789
     
    804804/**
    805805  Disable a notification function that was established with LibPcdCallbackonSet().
    806  
    807   Disable a notification function that was previously established with LibPcdCallbackOnSet(). 
    808  
     806
     807  Disable a notification function that was previously established with LibPcdCallbackOnSet().
     808
    809809  If NotificationFunction is NULL, then ASSERT().
    810   If LibPcdCallbackOnSet() was not previously called with Guid, TokenNumber, 
     810  If LibPcdCallbackOnSet() was not previously called with Guid, TokenNumber,
    811811  and NotificationFunction, then ASSERT().
    812  
     812
    813813  @param[in]  Guid          Specify the GUID token space.
    814814  @param[in]  TokenNumber   Specify the token number.
     
    831831/**
    832832  Retrieves the next token in a token space.
    833  
    834   Retrieves the next PCD token number from the token space specified by Guid. 
    835   If Guid is NULL, then the default token space is used.  If TokenNumber is 0, 
    836   then the first token number is returned.  Otherwise, the token number that 
    837   follows TokenNumber in the token space is returned.  If TokenNumber is the last 
    838   token number in the token space, then 0 is returned. 
    839  
     833
     834  Retrieves the next PCD token number from the token space specified by Guid.
     835  If Guid is NULL, then the default token space is used.  If TokenNumber is 0,
     836  then the first token number is returned.  Otherwise, the token number that
     837  follows TokenNumber in the token space is returned.  If TokenNumber is the last
     838  token number in the token space, then 0 is returned.
     839
    840840  If TokenNumber is not 0 and is not in the token space specified by Guid, then ASSERT().
    841841
    842   @param[in]  Guid        The pointer to a 128-bit unique value that designates which namespace 
     842  @param[in]  Guid        The pointer to a 128-bit unique value that designates which namespace
    843843                          to set a value from.  If NULL, then the default token space is used.
    844   @param[in]  TokenNumber The previous PCD token number.  If 0, then retrieves the first PCD 
     844  @param[in]  TokenNumber The previous PCD token number.  If 0, then retrieves the first PCD
    845845                          token number.
    846846
     
    848848
    849849**/
    850 UINTN           
     850UINTN
    851851EFIAPI
    852852LibPcdGetNextToken (
     
    864864/**
    865865  Used to retrieve the list of available PCD token space GUIDs.
    866  
     866
    867867  Returns the PCD token space GUID that follows TokenSpaceGuid in the list of token spaces
    868868  in the platform.
    869869  If TokenSpaceGuid is NULL, then a pointer to the first PCD token spaces returned.
    870870  If TokenSpaceGuid is the last PCD token space GUID in the list, then NULL is returned.
    871  
     871
    872872  @param  TokenSpaceGuid  The pointer to a PCD token space GUID.
    873873
     
    875875
    876876**/
    877 GUID *           
     877GUID *
    878878EFIAPI
    879879LibPcdGetNextTokenSpace (
     
    889889/**
    890890  Sets a value of a patchable PCD entry that is type pointer.
    891  
    892   Sets the PCD entry specified by PatchVariable to the value specified by Buffer 
    893   and SizeOfBuffer.  Buffer is returned.  If SizeOfBuffer is greater than 
    894   MaximumDatumSize, then set SizeOfBuffer to MaximumDatumSize and return 
    895   NULL to indicate that the set operation was not actually performed. 
    896   If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to 
     891
     892  Sets the PCD entry specified by PatchVariable to the value specified by Buffer
     893  and SizeOfBuffer.  Buffer is returned.  If SizeOfBuffer is greater than
     894  MaximumDatumSize, then set SizeOfBuffer to MaximumDatumSize and return
     895  NULL to indicate that the set operation was not actually performed.
     896  If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to
    897897  MaximumDatumSize and NULL must be returned.
    898  
     898
    899899  If PatchVariable is NULL, then ASSERT().
    900900  If SizeOfBuffer is NULL, then ASSERT().
    901901  If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
    902902
    903   @param[in] PatchVariable      A pointer to the global variable in a module that is 
     903  @param[in] PatchVariable      A pointer to the global variable in a module that is
    904904                                the target of the set operation.
    905905  @param[in] MaximumDatumSize   The maximum size allowed for the PCD entry specified by PatchVariable.
    906906  @param[in, out] SizeOfBuffer  A pointer to the size, in bytes, of Buffer.
    907907  @param[in] Buffer             A pointer to the buffer to used to set the target variable.
    908  
     908
    909909  @return Return the pointer to the buffer that was set.
    910910
     
    921921  ASSERT (PatchVariable != NULL);
    922922  ASSERT (SizeOfBuffer  != NULL);
    923  
     923
    924924  if (*SizeOfBuffer > 0) {
    925925    ASSERT (Buffer != NULL);
     
    931931    return NULL;
    932932  }
    933    
     933
    934934  CopyMem (PatchVariable, Buffer, *SizeOfBuffer);
    935  
     935
    936936  return (VOID *) Buffer;
    937937}
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BasePciCf8Lib/BasePciCf8Lib.inf

    r58459 r58466  
    2424  MODULE_TYPE                    = BASE
    2525  VERSION_STRING                 = 1.0
    26   LIBRARY_CLASS                  = PciCf8Lib 
     26  LIBRARY_CLASS                  = PciCf8Lib
    2727
    2828#
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BasePciCf8Lib/PciCf8Lib.c

    r58459 r58466  
    6262
    6363/**
    64   Registers a PCI device so PCI configuration registers may be accessed after 
     64  Registers a PCI device so PCI configuration registers may be accessed after
    6565  SetVirtualAddressMap().
    66  
    67   Registers the PCI device specified by Address so all the PCI configuration registers 
     66
     67  Registers the PCI device specified by Address so all the PCI configuration registers
    6868  associated with that PCI device may be accessed after SetVirtualAddressMap() is called.
    69  
     69
    7070  If Address > 0x0FFFFFFF, then ASSERT().
    7171  If the register specified by Address >= 0x100, then ASSERT().
     
    7373  @param  Address The address that encodes the PCI Bus, Device, Function and
    7474                  Register.
    75  
     75
    7676  @retval RETURN_SUCCESS           The PCI device was registered for runtime access.
    77   @retval RETURN_UNSUPPORTED       An attempt was made to call this function 
     77  @retval RETURN_UNSUPPORTED       An attempt was made to call this function
    7878                                   after ExitBootServices().
    7979  @retval RETURN_UNSUPPORTED       The resources required to access the PCI device
     
    118118  UINT32   AddressPort;
    119119  UINT8    Result;
    120  
     120
    121121  ASSERT_INVALID_PCI_ADDRESS (Address, 0);
    122122  InterruptState = SaveAndDisableInterrupts ();
     
    156156  UINT32   AddressPort;
    157157  UINT8    Result;
    158  
     158
    159159  ASSERT_INVALID_PCI_ADDRESS (Address, 0);
    160160  InterruptState = SaveAndDisableInterrupts ();
     
    201201  UINT32   AddressPort;
    202202  UINT8    Result;
    203  
     203
    204204  ASSERT_INVALID_PCI_ADDRESS (Address, 0);
    205205  InterruptState = SaveAndDisableInterrupts ();
     
    246246  UINT32   AddressPort;
    247247  UINT8    Result;
    248  
     248
    249249  ASSERT_INVALID_PCI_ADDRESS (Address, 0);
    250250  InterruptState = SaveAndDisableInterrupts ();
     
    294294  UINT32   AddressPort;
    295295  UINT8    Result;
    296  
     296
    297297  ASSERT_INVALID_PCI_ADDRESS (Address, 0);
    298298  InterruptState = SaveAndDisableInterrupts ();
     
    342342  UINT32   AddressPort;
    343343  UINT8    Result;
    344  
     344
    345345  ASSERT_INVALID_PCI_ADDRESS (Address, 0);
    346346  InterruptState = SaveAndDisableInterrupts ();
     
    394394  UINT32   AddressPort;
    395395  UINT8    Result;
    396  
     396
    397397  ASSERT_INVALID_PCI_ADDRESS (Address, 0);
    398398  InterruptState = SaveAndDisableInterrupts ();
     
    450450  UINT32   AddressPort;
    451451  UINT8    Result;
    452  
     452
    453453  ASSERT_INVALID_PCI_ADDRESS (Address, 0);
    454454  InterruptState = SaveAndDisableInterrupts ();
     
    506506  UINT32   AddressPort;
    507507  UINT8    Result;
    508  
     508
    509509  ASSERT_INVALID_PCI_ADDRESS (Address, 0);
    510510  InterruptState = SaveAndDisableInterrupts ();
     
    567567  UINT32   AddressPort;
    568568  UINT8    Result;
    569  
     569
    570570  ASSERT_INVALID_PCI_ADDRESS (Address, 0);
    571571  InterruptState = SaveAndDisableInterrupts ();
     
    610610  UINT32   AddressPort;
    611611  UINT16   Result;
    612  
     612
    613613  ASSERT_INVALID_PCI_ADDRESS (Address, 1);
    614614  InterruptState = SaveAndDisableInterrupts ();
     
    649649  UINT32   AddressPort;
    650650  UINT16   Result;
    651  
     651
    652652  ASSERT_INVALID_PCI_ADDRESS (Address, 1);
    653653  InterruptState = SaveAndDisableInterrupts ();
     
    695695  UINT32   AddressPort;
    696696  UINT16   Result;
    697  
     697
    698698  ASSERT_INVALID_PCI_ADDRESS (Address, 1);
    699699  InterruptState = SaveAndDisableInterrupts ();
     
    741741  UINT32   AddressPort;
    742742  UINT16   Result;
    743  
     743
    744744  ASSERT_INVALID_PCI_ADDRESS (Address, 1);
    745745  InterruptState = SaveAndDisableInterrupts ();
     
    790790  UINT32   AddressPort;
    791791  UINT16   Result;
    792  
     792
    793793  ASSERT_INVALID_PCI_ADDRESS (Address, 1);
    794794  InterruptState = SaveAndDisableInterrupts ();
     
    839839  UINT32   AddressPort;
    840840  UINT16   Result;
    841  
     841
    842842  ASSERT_INVALID_PCI_ADDRESS (Address, 1);
    843843  InterruptState = SaveAndDisableInterrupts ();
     
    892892  UINT32   AddressPort;
    893893  UINT16   Result;
    894  
     894
    895895  ASSERT_INVALID_PCI_ADDRESS (Address, 1);
    896896  InterruptState = SaveAndDisableInterrupts ();
     
    949949  UINT32   AddressPort;
    950950  UINT16   Result;
    951  
     951
    952952  ASSERT_INVALID_PCI_ADDRESS (Address, 1);
    953953  InterruptState = SaveAndDisableInterrupts ();
     
    10061006  UINT32   AddressPort;
    10071007  UINT16   Result;
    1008  
     1008
    10091009  ASSERT_INVALID_PCI_ADDRESS (Address, 1);
    10101010  InterruptState = SaveAndDisableInterrupts ();
     
    10681068  UINT32   AddressPort;
    10691069  UINT16   Result;
    1070  
     1070
    10711071  ASSERT_INVALID_PCI_ADDRESS (Address, 1);
    10721072  InterruptState = SaveAndDisableInterrupts ();
     
    11111111  UINT32   AddressPort;
    11121112  UINT32   Result;
    1113  
     1113
    11141114  ASSERT_INVALID_PCI_ADDRESS (Address, 3);
    11151115  InterruptState = SaveAndDisableInterrupts ();
     
    11501150  UINT32   AddressPort;
    11511151  UINT32   Result;
    1152  
     1152
    11531153  ASSERT_INVALID_PCI_ADDRESS (Address, 3);
    11541154  InterruptState = SaveAndDisableInterrupts ();
     
    11961196  UINT32   AddressPort;
    11971197  UINT32   Result;
    1198  
     1198
    11991199  ASSERT_INVALID_PCI_ADDRESS (Address, 3);
    12001200  InterruptState = SaveAndDisableInterrupts ();
     
    12421242  UINT32   AddressPort;
    12431243  UINT32   Result;
    1244  
     1244
    12451245  ASSERT_INVALID_PCI_ADDRESS (Address, 3);
    12461246  InterruptState = SaveAndDisableInterrupts ();
     
    12911291  UINT32   AddressPort;
    12921292  UINT32   Result;
    1293  
     1293
    12941294  ASSERT_INVALID_PCI_ADDRESS (Address, 3);
    12951295  InterruptState = SaveAndDisableInterrupts ();
     
    13401340  UINT32   AddressPort;
    13411341  UINT32   Result;
    1342  
     1342
    13431343  ASSERT_INVALID_PCI_ADDRESS (Address, 3);
    13441344  InterruptState = SaveAndDisableInterrupts ();
     
    13931393  UINT32   AddressPort;
    13941394  UINT32   Result;
    1395  
     1395
    13961396  ASSERT_INVALID_PCI_ADDRESS (Address, 3);
    13971397  InterruptState = SaveAndDisableInterrupts ();
     
    14501450  UINT32   AddressPort;
    14511451  UINT32   Result;
    1452  
     1452
    14531453  ASSERT_INVALID_PCI_ADDRESS (Address, 3);
    14541454  InterruptState = SaveAndDisableInterrupts ();
     
    15071507  UINT32   AddressPort;
    15081508  UINT32   Result;
    1509  
     1509
    15101510  ASSERT_INVALID_PCI_ADDRESS (Address, 3);
    15111511  InterruptState = SaveAndDisableInterrupts ();
     
    15691569  UINT32   AddressPort;
    15701570  UINT32   Result;
    1571  
     1571
    15721572  ASSERT_INVALID_PCI_ADDRESS (Address, 3);
    15731573  InterruptState = SaveAndDisableInterrupts ();
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf

    r58459 r58466  
    2424  MODULE_TYPE                    = BASE
    2525  VERSION_STRING                 = 1.0
    26   LIBRARY_CLASS                  = PciExpressLib 
     26  LIBRARY_CLASS                  = PciExpressLib
    2727
    2828#
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BasePciExpressLib/PciExpressLib.c

    r58459 r58466  
    3838
    3939/**
    40   Registers a PCI device so PCI configuration registers may be accessed after 
     40  Registers a PCI device so PCI configuration registers may be accessed after
    4141  SetVirtualAddressMap().
    42  
    43   Registers the PCI device specified by Address so all the PCI configuration 
    44   registers associated with that PCI device may be accessed after SetVirtualAddressMap() 
     42
     43  Registers the PCI device specified by Address so all the PCI configuration
     44  registers associated with that PCI device may be accessed after SetVirtualAddressMap()
    4545  is called.
    46  
    47   If Address > 0x0FFFFFFF, then ASSERT().
    48 
    49   @param  Address The address that encodes the PCI Bus, Device, Function and
    50                   Register.
    51  
     46
     47  If Address > 0x0FFFFFFF, then ASSERT().
     48
     49  @param  Address The address that encodes the PCI Bus, Device, Function and
     50                  Register.
     51
    5252  @retval RETURN_SUCCESS           The PCI device was registered for runtime access.
    53   @retval RETURN_UNSUPPORTED       An attempt was made to call this function 
     53  @retval RETURN_UNSUPPORTED       An attempt was made to call this function
    5454                                   after ExitBootServices().
    5555  @retval RETURN_UNSUPPORTED       The resources required to access the PCI device
     
    7171/**
    7272  Gets the base address of PCI Express.
    73  
     73
    7474  This internal functions retrieves PCI Express Base Address via a PCD entry
    7575  PcdPciExpressBaseAddress.
    76  
     76
    7777  @return The base address of PCI Express.
    7878
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BasePciLibCf8/BasePciLibCf8.inf

    r58459 r58466  
    2424  MODULE_TYPE                    = BASE
    2525  VERSION_STRING                 = 1.0
    26   LIBRARY_CLASS                  = PciLib 
     26  LIBRARY_CLASS                  = PciLib
    2727
    2828#
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BasePciLibCf8/PciLib.c

    r58459 r58466  
    2121
    2222/**
    23   Registers a PCI device so PCI configuration registers may be accessed after 
     23  Registers a PCI device so PCI configuration registers may be accessed after
    2424  SetVirtualAddressMap().
    25  
    26   Registers the PCI device specified by Address so all the PCI configuration registers 
     25
     26  Registers the PCI device specified by Address so all the PCI configuration registers
    2727  associated with that PCI device may be accessed after SetVirtualAddressMap() is called.
    28  
    29   If Address > 0x0FFFFFFF, then ASSERT().
    30 
    31   @param  Address The address that encodes the PCI Bus, Device, Function and
    32                   Register.
    33  
     28
     29  If Address > 0x0FFFFFFF, then ASSERT().
     30
     31  @param  Address The address that encodes the PCI Bus, Device, Function and
     32                  Register.
     33
    3434  @retval RETURN_SUCCESS           The PCI device was registered for runtime access.
    35   @retval RETURN_UNSUPPORTED       An attempt was made to call this function 
     35  @retval RETURN_UNSUPPORTED       An attempt was made to call this function
    3636                                   after ExitBootServices().
    3737  @retval RETURN_UNSUPPORTED       The resources required to access the PCI device
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BasePciLibPciExpress/BasePciLibPciExpress.inf

    r58459 r58466  
    2424  MODULE_TYPE                    = BASE
    2525  VERSION_STRING                 = 1.0
    26   LIBRARY_CLASS                  = PciLib 
     26  LIBRARY_CLASS                  = PciLib
    2727
    2828
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BasePciLibPciExpress/PciLib.c

    r58459 r58466  
    2121
    2222/**
    23   Registers a PCI device so PCI configuration registers may be accessed after 
     23  Registers a PCI device so PCI configuration registers may be accessed after
    2424  SetVirtualAddressMap().
    25  
    26   Registers the PCI device specified by Address so all the PCI configuration registers 
     25
     26  Registers the PCI device specified by Address so all the PCI configuration registers
    2727  associated with that PCI device may be accessed after SetVirtualAddressMap() is called.
    28  
    29   If Address > 0x0FFFFFFF, then ASSERT().
    30 
    31   @param  Address The address that encodes the PCI Bus, Device, Function and
    32                   Register.
    33  
     28
     29  If Address > 0x0FFFFFFF, then ASSERT().
     30
     31  @param  Address The address that encodes the PCI Bus, Device, Function and
     32                  Register.
     33
    3434  @retval RETURN_SUCCESS           The PCI device was registered for runtime access.
    35   @retval RETURN_UNSUPPORTED       An attempt was made to call this function 
     35  @retval RETURN_UNSUPPORTED       An attempt was made to call this function
    3636                                   after ExitBootServices().
    3737  @retval RETURN_UNSUPPORTED       The resources required to access the PCI device
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BasePeCoffExtraActionLibNull/BasePeCoffExtraActionLibNull.inf

    r58459 r58466  
    2121  MODULE_TYPE                    = BASE
    2222  VERSION_STRING                 = 1.0
    23   LIBRARY_CLASS                  = PeCoffExtraActionLib 
     23  LIBRARY_CLASS                  = PeCoffExtraActionLib
    2424
    2525
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BasePeCoffExtraActionLibNull/PeCoffExtraActionLib.c

    r48674 r58466  
    3333{
    3434  ASSERT (ImageContext != NULL);
    35 } 
     35}
    3636
    3737/**
    3838  Performs additional actions just before a PE/COFF image is unloaded.  Any resources
    3939  that were allocated by PeCoffLoaderRelocateImageExtraAction() must be freed.
    40  
     40
    4141  If ImageContext is NULL, then ASSERT().
    42  
     42
    4343  @param  ImageContext  The pointer to the image context structure that describes the
    4444                        PE/COFF image that is being unloaded.
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf

    r58459 r58466  
    2121  MODULE_TYPE                    = BASE
    2222  VERSION_STRING                 = 1.0
    23   LIBRARY_CLASS                  = PeCoffGetEntryPointLib 
     23  LIBRARY_CLASS                  = PeCoffGetEntryPointLib
    2424
    2525
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BasePeCoffGetEntryPointLib/PeCoffGetEntryPoint.c

    r48674 r58466  
    11/** @file
    2   Provides the services to get the entry point to a PE/COFF image that has either been 
     2  Provides the services to get the entry point to a PE/COFF image that has either been
    33  loaded into memory or is executing at it's linked address.
    44
     
    129129/**
    130130  Returns a pointer to the PDB file name for a PE/COFF image that has been
    131   loaded into system memory with the PE/COFF Loader Library functions. 
     131  loaded into system memory with the PE/COFF Loader Library functions.
    132132
    133133  Returns the PDB file name for the PE/COFF image specified by Pe32Data.  If
     
    247247  //
    248248  // Scan the directory to find the debug entry.
    249   // 
     249  //
    250250  for (DirCount = 0; DirCount < DirectoryEntry->Size; DirCount += sizeof (EFI_IMAGE_DEBUG_DIRECTORY_ENTRY), DebugEntry++) {
    251251    if (DebugEntry->Type == EFI_IMAGE_DEBUG_TYPE_CODEVIEW) {
     
    292292
    293293  ASSERT (Pe32Data   != NULL);
    294  
     294
    295295  DosHdr = (EFI_IMAGE_DOS_HEADER *)Pe32Data;
    296296  if (DosHdr->e_magic == EFI_IMAGE_DOS_SIGNATURE) {
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BasePeCoffLib/Arm/PeCoffLoaderEx.c

    r48674 r58466  
    1919
    2020/**
    21   Pass in a pointer to an ARM MOVT or MOVW immediate instruciton and 
     21  Pass in a pointer to an ARM MOVT or MOVW immediate instruciton and
    2222  return the immediate data encoded in the instruction.
    2323
     
    3434  UINT32  Movt;
    3535  UINT16  Address;
    36  
     36
    3737  // Thumb2 is two 16-bit instructions working together. Not a single 32-bit instruction
    3838  // Example MOVT R0, #0 is 0x0000f2c0 or 0xf2c0 0x0000
    39   Movt = (*Instruction << 16) | (*(Instruction + 1)); 
     39  Movt = (*Instruction << 16) | (*(Instruction + 1));
    4040
    4141  // imm16 = imm4:i:imm3:imm8
     
    6666
    6767  // First 16-bit chunk of instruciton
    68   Patch  = ((Address >> 12) & 0x000f);            // imm4 
     68  Patch  = ((Address >> 12) & 0x000f);            // imm4
    6969  Patch |= (((Address & BIT11) != 0) ? BIT10 : 0); // i
    7070  // Mask out instruction bits and or in address
     
    8282
    8383/**
    84   Pass in a pointer to an ARM MOVW/MOVT instruciton pair and 
     84  Pass in a pointer to an ARM MOVW/MOVT instruciton pair and
    8585  return the immediate data encoded in the two` instruction.
    8686
     
    9797  UINT16  *Word;
    9898  UINT16  *Top;
    99  
     99
    100100  Word = Instructions;  // MOVW
    101101  Top  = Word + 2;      // MOVT
    102  
     102
    103103  return (ThumbMovtImmediateAddress (Top) << 16) + ThumbMovtImmediateAddress (Word);
    104104}
     
    119119  UINT16  *Word;
    120120  UINT16  *Top;
    121  
     121
    122122  Word = Instructions;  // MOVW
    123123  Top  = Word + 2;      // MOVT
     
    126126  ThumbMovtImmediatePatch (Top, (UINT16)(Address >> 16));
    127127}
    128  
    129  
     128
     129
    130130
    131131/**
     
    155155
    156156  switch ((*Reloc) >> 12) {
    157  
     157
    158158  case EFI_IMAGE_REL_BASED_ARM_MOV32T:
    159159    FixupVal = ThumbMovwMovtImmediateAddress (Fixup16) + (UINT32)Adjust;
     
    162162    if (*FixupData != NULL) {
    163163      *FixupData = ALIGN_POINTER(*FixupData, sizeof(UINT64));
    164       // Fixup16 is not aligned so we must copy it. Thumb instructions are streams of 16 bytes. 
     164      // Fixup16 is not aligned so we must copy it. Thumb instructions are streams of 16 bytes.
    165165      CopyMem (*FixupData, Fixup16, sizeof (UINT64));
    166166      *FixupData = *FixupData + sizeof(UINT64);
    167167    }
    168168    break;
    169  
     169
    170170  case EFI_IMAGE_REL_BASED_ARM_MOV32A:
    171171     ASSERT (FALSE);
     
    183183  loading and relocating of the image type. It's up to the caller to support
    184184  the entry point.
    185  
     185
    186186  @param  Machine   Machine type from the PE Header.
    187187
     
    195195{
    196196  if ((Machine == IMAGE_FILE_MACHINE_ARMTHUMB_MIXED) || (Machine ==  IMAGE_FILE_MACHINE_EBC)) {
    197     return TRUE; 
     197    return TRUE;
    198198  }
    199199
     
    236236    }
    237237    break;
    238  
     238
    239239  case EFI_IMAGE_REL_BASED_ARM_MOV32A:
    240240    ASSERT (FALSE);
     
    244244    return RETURN_UNSUPPORTED;
    245245  }
    246  
     246
    247247  return RETURN_SUCCESS;
    248248}
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BasePeCoffLib/BasePeCoff.c

    r58459 r58466  
    6262{
    6363  //
    64   // NOTE: Some versions of Linux ELILO for Itanium have an incorrect magic value 
    65   //       in the PE/COFF Header.  If the MachineType is Itanium(IA64) and the 
     64  // NOTE: Some versions of Linux ELILO for Itanium have an incorrect magic value
     65  //       in the PE/COFF Header.  If the MachineType is Itanium(IA64) and the
    6666  //       Magic value in the OptionalHeader is  EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC
    6767  //       then override the returned value to EFI_IMAGE_NT_OPTIONAL_HDR64_MAGIC
     
    7878
    7979/**
    80   Retrieves the PE or TE Header from a PE/COFF or TE image. 
     80  Retrieves the PE or TE Header from a PE/COFF or TE image.
    8181
    8282  Caution: This function may receive untrusted input.
    83   PE/COFF image is external input, so this routine will 
    84   also done many checks in PE image to make sure PE image DosHeader, PeOptionHeader, 
    85   SizeOfHeader, Section Data Region and Security Data Region be in PE image range. 
     83  PE/COFF image is external input, so this routine will
     84  also done many checks in PE image to make sure PE image DosHeader, PeOptionHeader,
     85  SizeOfHeader, Section Data Region and Security Data Region be in PE image range.
    8686
    8787  @param  ImageContext    The context of the image being loaded.
     
    212212    //
    213213    // TE Image Data Directory Entry size is non-zero, but the Data Directory Virtual Address is zero.
    214     // This case is not a valid TE image. 
     214    // This case is not a valid TE image.
    215215    //
    216216    if ((Hdr.Te->DataDirectory[0].Size != 0 && Hdr.Te->DataDirectory[0].VirtualAddress == 0) ||
     
    236236      //
    237237      // 2. Check the FileHeader.SizeOfOptionalHeader field.
    238       // OptionalHeader.NumberOfRvaAndSizes is not bigger than 16, so 
     238      // OptionalHeader.NumberOfRvaAndSizes is not bigger than 16, so
    239239      // OptionalHeader.NumberOfRvaAndSizes * sizeof (EFI_IMAGE_DATA_DIRECTORY) will not overflow.
    240240      //
     
    350350      //
    351351      // 2. Check the FileHeader.SizeOfOptionalHeader field.
    352       // OptionalHeader.NumberOfRvaAndSizes is not bigger than 16, so 
     352      // OptionalHeader.NumberOfRvaAndSizes is not bigger than 16, so
    353353      // OptionalHeader.NumberOfRvaAndSizes * sizeof (EFI_IMAGE_DATA_DIRECTORY) will not overflow.
    354354      //
     
    514514      // Section data should bigger than the Pe header.
    515515      //
    516       if (SectionHeader.VirtualAddress < ImageContext->SizeOfHeaders || 
     516      if (SectionHeader.VirtualAddress < ImageContext->SizeOfHeaders ||
    517517          SectionHeader.PointerToRawData < ImageContext->SizeOfHeaders) {
    518518        ImageContext->ImageError = IMAGE_ERROR_UNSUPPORTED;
     
    562562  Retrieves information about a PE/COFF image.
    563563
    564   Computes the PeCoffHeaderOffset, IsTeImage, ImageType, ImageAddress, ImageSize, 
    565   DestinationAddress, RelocationsStripped, SectionAlignment, SizeOfHeaders, and 
    566   DebugDirectoryEntryRva fields of the ImageContext structure. 
    567   If ImageContext is NULL, then return RETURN_INVALID_PARAMETER. 
    568   If the PE/COFF image accessed through the ImageRead service in the ImageContext 
    569   structure is not a supported PE/COFF image type, then return RETURN_UNSUPPORTED. 
    570   If any errors occur while computing the fields of ImageContext, 
    571   then the error status is returned in the ImageError field of ImageContext. 
     564  Computes the PeCoffHeaderOffset, IsTeImage, ImageType, ImageAddress, ImageSize,
     565  DestinationAddress, RelocationsStripped, SectionAlignment, SizeOfHeaders, and
     566  DebugDirectoryEntryRva fields of the ImageContext structure.
     567  If ImageContext is NULL, then return RETURN_INVALID_PARAMETER.
     568  If the PE/COFF image accessed through the ImageRead service in the ImageContext
     569  structure is not a supported PE/COFF image type, then return RETURN_UNSUPPORTED.
     570  If any errors occur while computing the fields of ImageContext,
     571  then the error status is returned in the ImageError field of ImageContext.
    572572  If the image is a TE image, then SectionAlignment is set to 0.
    573   The ImageRead and Handle fields of ImageContext structure must be valid prior 
     573  The ImageRead and Handle fields of ImageContext structure must be valid prior
    574574  to invoking this service.
    575575
    576576  Caution: This function may receive untrusted input.
    577   PE/COFF image is external input, so this routine will 
    578   also done many checks in PE image to make sure PE image DosHeader, PeOptionHeader, 
    579   SizeOfHeader, Section Data Region and Security Data Region be in PE image range. 
     577  PE/COFF image is external input, so this routine will
     578  also done many checks in PE image to make sure PE image DosHeader, PeOptionHeader,
     579  SizeOfHeader, Section Data Region and Security Data Region be in PE image range.
    580580
    581581  @param  ImageContext              The pointer to the image context structure that describes the PE/COFF
     
    832832      // values for the corresponding sections. So the ImageSize can be determined
    833833      // by the RVA and the VirtualSize of the last section header in the
    834       // Section Table. 
     834      // Section Table.
    835835      //
    836836      if ((++Index) == (UINTN)Hdr.Te->NumberOfSections) {
     
    887887PeCoffLoaderImageAddress (
    888888  IN OUT PE_COFF_LOADER_IMAGE_CONTEXT          *ImageContext,
    889   IN     UINTN                                 Address, 
     889  IN     UINTN                                 Address,
    890890  IN     UINTN                                 TeStrippedOffset
    891891  )
     
    909909  of ImageContext as the relocation base address.  The caller must allocate the relocation
    910910  fixup log buffer and fill in the FixupData field of ImageContext prior to calling this function.
    911  
    912   The ImageRead, Handle, PeCoffHeaderOffset,  IsTeImage, Machine, ImageType, ImageAddress, 
    913   ImageSize, DestinationAddress, RelocationsStripped, SectionAlignment, SizeOfHeaders, 
    914   DebugDirectoryEntryRva, EntryPoint, FixupDataSize, CodeView, PdbPointer, and FixupData of 
     911
     912  The ImageRead, Handle, PeCoffHeaderOffset,  IsTeImage, Machine, ImageType, ImageAddress,
     913  ImageSize, DestinationAddress, RelocationsStripped, SectionAlignment, SizeOfHeaders,
     914  DebugDirectoryEntryRva, EntryPoint, FixupDataSize, CodeView, PdbPointer, and FixupData of
    915915  the ImageContext structure must be valid prior to invoking this service.
    916    
     916
    917917  If ImageContext is NULL, then ASSERT().
    918918
     
    969969  //
    970970  if (ImageContext->RelocationsStripped) {
    971     // Applies additional environment specific actions to relocate fixups 
     971    // Applies additional environment specific actions to relocate fixups
    972972    // to a PE/COFF image if needed
    973     PeCoffLoaderRelocateImageExtraAction (ImageContext); 
     973    PeCoffLoaderRelocateImageExtraAction (ImageContext);
    974974    return RETURN_SUCCESS;
    975975  }
     
    10511051    // Set base and end to bypass processing below.
    10521052    //
    1053     RelocBase = RelocBaseEnd = NULL;   
     1053    RelocBase = RelocBaseEnd = NULL;
    10541054  }
    10551055  RelocBaseOrg = RelocBase;
     
    10871087        ImageContext->ImageError = IMAGE_ERROR_FAILED_RELOCATION;
    10881088        return RETURN_LOAD_ERROR;
    1089       } 
     1089      }
    10901090
    10911091      //
     
    11741174    }
    11751175  }
    1176  
    1177   // Applies additional environment specific actions to relocate fixups 
     1176
     1177  // Applies additional environment specific actions to relocate fixups
    11781178  // to a PE/COFF image if needed
    11791179  PeCoffLoaderRelocateImageExtraAction (ImageContext);
    1180  
     1180
    11811181  return RETURN_SUCCESS;
    11821182}
     
    11891189  the load buffer and fill in the ImageAddress and ImageSize fields prior to calling this function.
    11901190  The EntryPoint, FixupDataSize, CodeView, PdbPointer and HiiResourceData fields of ImageContext are computed.
    1191   The ImageRead, Handle, PeCoffHeaderOffset,  IsTeImage,  Machine, ImageType, ImageAddress, ImageSize, 
    1192   DestinationAddress, RelocationsStripped, SectionAlignment, SizeOfHeaders, and DebugDirectoryEntryRva 
     1191  The ImageRead, Handle, PeCoffHeaderOffset,  IsTeImage,  Machine, ImageType, ImageAddress, ImageSize,
     1192  DestinationAddress, RelocationsStripped, SectionAlignment, SizeOfHeaders, and DebugDirectoryEntryRva
    11931193  fields of the ImageContext structure must be valid prior to invoking this service.
    1194  
     1194
    11951195  If ImageContext is NULL, then ASSERT().
    11961196
     
    15041504
    15051505    if (TempDebugEntryRva != 0) {
    1506       ImageContext->CodeView = PeCoffLoaderImageAddress (ImageContext, TempDebugEntryRva, TeStrippedOffset); 
     1506      ImageContext->CodeView = PeCoffLoaderImageAddress (ImageContext, TempDebugEntryRva, TeStrippedOffset);
    15071507      if (ImageContext->CodeView == NULL) {
    15081508        ImageContext->ImageError = IMAGE_ERROR_FAILED_RELOCATION;
     
    15861586      if (Base != NULL) {
    15871587        ResourceDirectory = (EFI_IMAGE_RESOURCE_DIRECTORY *) Base;
    1588         Offset = sizeof (EFI_IMAGE_RESOURCE_DIRECTORY) + sizeof (EFI_IMAGE_RESOURCE_DIRECTORY_ENTRY) * 
     1588        Offset = sizeof (EFI_IMAGE_RESOURCE_DIRECTORY) + sizeof (EFI_IMAGE_RESOURCE_DIRECTORY_ENTRY) *
    15891589               (ResourceDirectory->NumberOfNamedEntries + ResourceDirectory->NumberOfIdEntries);
    15901590        if (Offset > DirectoryEntry->Size) {
     
    16221622                }
    16231623                ResourceDirectory = (EFI_IMAGE_RESOURCE_DIRECTORY *) (Base + ResourceDirectoryEntry->u2.s.OffsetToDirectory);
    1624                 Offset = ResourceDirectoryEntry->u2.s.OffsetToDirectory + sizeof (EFI_IMAGE_RESOURCE_DIRECTORY) + 
     1624                Offset = ResourceDirectoryEntry->u2.s.OffsetToDirectory + sizeof (EFI_IMAGE_RESOURCE_DIRECTORY) +
    16251625                         sizeof (EFI_IMAGE_RESOURCE_DIRECTORY_ENTRY) * (ResourceDirectory->NumberOfNamedEntries + ResourceDirectory->NumberOfIdEntries);
    16261626                if (Offset > DirectoryEntry->Size) {
     
    16391639                  }
    16401640                  ResourceDirectory = (EFI_IMAGE_RESOURCE_DIRECTORY *) (Base + ResourceDirectoryEntry->u2.s.OffsetToDirectory);
    1641                   Offset = ResourceDirectoryEntry->u2.s.OffsetToDirectory + sizeof (EFI_IMAGE_RESOURCE_DIRECTORY) + 
     1641                  Offset = ResourceDirectoryEntry->u2.s.OffsetToDirectory + sizeof (EFI_IMAGE_RESOURCE_DIRECTORY) +
    16421642                           sizeof (EFI_IMAGE_RESOURCE_DIRECTORY_ENTRY) * (ResourceDirectory->NumberOfNamedEntries + ResourceDirectory->NumberOfIdEntries);
    16431643                  if (Offset > DirectoryEntry->Size) {
     
    16681668    }
    16691669  }
    1670  
     1670
    16711671  return Status;
    16721672}
     
    16751675/**
    16761676  Reapply fixups on a fixed up PE32/PE32+ image to allow virutal calling at EFI
    1677   runtime. 
    1678  
    1679   This function reapplies relocation fixups to the PE/COFF image specified by ImageBase 
    1680   and ImageSize so the image will execute correctly when the PE/COFF image is mapped 
    1681   to the address specified by VirtualImageBase.  RelocationData must be identical 
    1682   to the FiuxupData buffer from the PE_COFF_LOADER_IMAGE_CONTEXT structure 
     1677  runtime.
     1678
     1679  This function reapplies relocation fixups to the PE/COFF image specified by ImageBase
     1680  and ImageSize so the image will execute correctly when the PE/COFF image is mapped
     1681  to the address specified by VirtualImageBase.  RelocationData must be identical
     1682  to the FiuxupData buffer from the PE_COFF_LOADER_IMAGE_CONTEXT structure
    16831683  after this PE/COFF image was relocated with PeCoffLoaderRelocateImage().
    16841684
     
    16871687  prior to transferring control to a PE/COFF image that is loaded using this library.
    16881688
    1689   @param  ImageBase          The base address of a PE/COFF image that has been loaded 
     1689  @param  ImageBase          The base address of a PE/COFF image that has been loaded
    16901690                             and relocated into system memory.
    16911691  @param  VirtImageBase      The request virtual address that the PE/COFF image is to
    16921692                             be fixed up for.
    16931693  @param  ImageSize          The size, in bytes, of the PE/COFF image.
    1694   @param  RelocationData     A pointer to the relocation data that was collected when the PE/COFF 
     1694  @param  RelocationData     A pointer to the relocation data that was collected when the PE/COFF
    16951695                             image was relocated using PeCoffLoaderRelocateImage().
    1696  
     1696
    16971697**/
    16981698VOID
     
    17871787    return ;
    17881788  }
    1789  
     1789
    17901790  //
    17911791  // ASSERT for the invalid image when RelocBase and RelocBaseEnd are both NULL.
     
    18891889/**
    18901890  Reads contents of a PE/COFF image from a buffer in system memory.
    1891    
    1892   This is the default implementation of a PE_COFF_LOADER_READ_FILE function 
    1893   that assumes FileHandle pointer to the beginning of a PE/COFF image.   
    1894   This function reads contents of the PE/COFF image that starts at the system memory 
    1895   address specified by FileHandle.  The read operation copies ReadSize bytes from the 
    1896   PE/COFF image starting at byte offset FileOffset into the buffer specified by Buffer. 
     1891
     1892  This is the default implementation of a PE_COFF_LOADER_READ_FILE function
     1893  that assumes FileHandle pointer to the beginning of a PE/COFF image.
     1894  This function reads contents of the PE/COFF image that starts at the system memory
     1895  address specified by FileHandle.  The read operation copies ReadSize bytes from the
     1896  PE/COFF image starting at byte offset FileOffset into the buffer specified by Buffer.
    18971897  The size of the buffer actually read is returned in ReadSize.
    1898  
     1898
    18991899  The caller must make sure the FileOffset and ReadSize within the file scope.
    19001900
     
    19051905  @param  FileHandle        The pointer to base of the input stream
    19061906  @param  FileOffset        Offset into the PE/COFF image to begin the read operation.
    1907   @param  ReadSize          On input, the size in bytes of the requested read operation. 
     1907  @param  ReadSize          On input, the size in bytes of the requested read operation.
    19081908                            On output, the number of bytes actually read.
    19091909  @param  Buffer            Output buffer that contains the data read from the PE/COFF image.
    19101910
    1911   @retval RETURN_SUCCESS    Data is read from FileOffset from the Handle into 
     1911  @retval RETURN_SUCCESS    Data is read from FileOffset from the Handle into
    19121912                            the buffer.
    19131913**/
     
    19311931/**
    19321932  Unloads a loaded PE/COFF image from memory and releases its taken resource.
    1933   Releases any environment specific resources that were allocated when the image 
    1934   specified by ImageContext was loaded using PeCoffLoaderLoadImage(). 
    1935  
     1933  Releases any environment specific resources that were allocated when the image
     1934  specified by ImageContext was loaded using PeCoffLoaderLoadImage().
     1935
    19361936  For NT32 emulator, the PE/COFF image loaded by system needs to release.
    1937   For real platform, the PE/COFF image loaded by Core doesn't needs to be unloaded, 
     1937  For real platform, the PE/COFF image loaded by Core doesn't needs to be unloaded,
    19381938  this function can simply return RETURN_SUCCESS.
    1939  
     1939
    19401940  If ImageContext is NULL, then ASSERT().
    1941  
     1941
    19421942  @param  ImageContext              The pointer to the image context structure that describes the PE/COFF
    19431943                                    image to be unloaded.
     
    19521952{
    19531953  //
    1954   // Applies additional environment specific actions to unload a 
     1954  // Applies additional environment specific actions to unload a
    19551955  // PE/COFF image if needed
    19561956  //
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf

    r58459 r58466  
    3030  MODULE_TYPE                    = BASE
    3131  VERSION_STRING                 = 1.0
    32   LIBRARY_CLASS                  = PeCoffLib 
     32  LIBRARY_CLASS                  = PeCoffLib
    3333
    3434
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BasePeCoffLib/Ipf/PeCoffLoaderEx.c

    r48674 r58466  
    219219  does not mean the image can be executed it means the PE/COFF loader supports
    220220  loading and relocating of the image type. It's up to the caller to support
    221   the entry point. 
    222  
     221  the entry point.
     222
    223223  The itanium version PE/COFF loader/relocater supports itanium and EBC image.
    224224
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BasePeCoffLib/PeCoffLoaderEx.c

    r48674 r58466  
    4444  loading and relocating of the image type. It's up to the caller to support
    4545  the entry point.
    46  
     46
    4747  The IA32/X64 version PE/COFF loader/relocater both support IA32, X64 and EBC images.
    4848
     
    5757  )
    5858{
    59   if ((Machine == IMAGE_FILE_MACHINE_I386) || (Machine == IMAGE_FILE_MACHINE_X64) || 
     59  if ((Machine == IMAGE_FILE_MACHINE_I386) || (Machine == IMAGE_FILE_MACHINE_X64) ||
    6060      (Machine ==  IMAGE_FILE_MACHINE_EBC)) {
    61     return TRUE; 
     61    return TRUE;
    6262  }
    6363
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibNull.inf

    r58459 r58466  
    2121  MODULE_TYPE                    = BASE
    2222  VERSION_STRING                 = 1.0
    23   LIBRARY_CLASS                  = PerformanceLib 
     23  LIBRARY_CLASS                  = PerformanceLib
    2424
    2525
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BasePerformanceLibNull/PerformanceLib.c

    r58459 r58466  
    2222
    2323/**
    24   Creates a record for the beginning of a performance measurement. 
    25  
     24  Creates a record for the beginning of a performance measurement.
     25
    2626  Creates a record that contains the Handle, Token, and Module.
    2727  If TimeStamp is not zero, then TimeStamp is added to the record as the start time.
     
    5555
    5656/**
    57   Fills in the end time of a performance measurement. 
    58  
     57  Fills in the end time of a performance measurement.
     58
    5959  Looks up the record that matches Handle, Token, and Module.
    6060  If the record can not be found then return RETURN_NOT_FOUND.
     
    9090
    9191/**
    92   Attempts to retrieve a performance measurement log entry from the performance measurement log. 
     92  Attempts to retrieve a performance measurement log entry from the performance measurement log.
    9393  It can also retrieve the log created by StartPerformanceMeasurementEx and EndPerformanceMeasurementEx,
    9494  and then eliminate the Identifier.
     
    115115                                  On exit, the key of the next performance lof entry entry.
    116116  @param  Handle                  The pointer to environment specific context used to identify the component
    117                                   being measured. 
     117                                  being measured.
    118118  @param  Token                   The pointer to a Null-terminated ASCII string that identifies the component
    119                                   being measured. 
     119                                  being measured.
    120120  @param  Module                  The pointer to a Null-terminated ASCII string that identifies the module
    121121                                  being measured.
     
    131131EFIAPI
    132132GetPerformanceMeasurement (
    133   IN  UINTN       LogEntryKey, 
     133  IN  UINTN       LogEntryKey,
    134134  OUT CONST VOID  **Handle,
    135135  OUT CONST CHAR8 **Token,
     
    266266EFIAPI
    267267GetPerformanceMeasurementEx (
    268   IN  UINTN       LogEntryKey, 
     268  IN  UINTN       LogEntryKey,
    269269  OUT CONST VOID  **Handle,
    270270  OUT CONST CHAR8 **Token,
     
    286286
    287287/**
    288   Returns TRUE if the performance measurement macros are enabled. 
    289  
     288  Returns TRUE if the performance measurement macros are enabled.
     289
    290290  This function returns TRUE if the PERFORMANCE_LIBRARY_PROPERTY_MEASUREMENT_ENABLED bit of
    291291  PcdPerformanceLibraryPropertyMask is set.  Otherwise FALSE is returned.
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BasePostCodeLibDebug/BasePostCodeLibDebug.inf

    r58459 r58466  
    2424  MODULE_TYPE                    = BASE
    2525  VERSION_STRING                 = 1.0
    26   LIBRARY_CLASS                  = PostCodeLib 
     26  LIBRARY_CLASS                  = PostCodeLib
    2727
    2828
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BasePostCodeLibDebug/PostCode.c

    r48674 r58466  
    33
    44  Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
    5   This program and the accompanying materials                         
    6   are licensed and made available under the terms and conditions of the BSD License         
    7   which accompanies this distribution.  The full text of the license may be found at       
    8   http://opensource.org/licenses/bsd-license.php.                                           
     5  This program and the accompanying materials
     6  are licensed and made available under the terms and conditions of the BSD License
     7  which accompanies this distribution.  The full text of the license may be found at
     8  http://opensource.org/licenses/bsd-license.php.
    99
    10   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     
    11   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             
     10  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
     11  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
    1212
    1313**/
     
    2222  Sends an 32-bit value to a POST card.
    2323
    24   Sends the 32-bit value specified by Value to a POST card, and returns Value. 
    25   Some implementations of this library function may perform I/O operations 
    26   directly to a POST card device.  Other implementations may send Value to 
    27   ReportStatusCode(), and the status code reporting mechanism will eventually 
     24  Sends the 32-bit value specified by Value to a POST card, and returns Value.
     25  Some implementations of this library function may perform I/O operations
     26  directly to a POST card device.  Other implementations may send Value to
     27  ReportStatusCode(), and the status code reporting mechanism will eventually
    2828  display the 32-bit value on the status reporting device.
    29  
    30   PostCode() must actively prevent recursion.  If PostCode() is called while 
    31   processing another any other Post Code Library function, then 
     29
     30  PostCode() must actively prevent recursion.  If PostCode() is called while
     31  processing another any other Post Code Library function, then
    3232  PostCode() must return Value immediately.
    3333
     
    5252
    5353  Sends the 32-bit value specified by Value to a POST card, and returns Value.
    54   If Description is not NULL, then the ASCII string specified by Description is 
    55   also passed to the handler that displays the POST card value.  Some 
    56   implementations of this library function may perform I/O operations directly 
    57   to a POST card device.  Other implementations may send Value to ReportStatusCode(), 
    58   and the status code reporting mechanism will eventually display the 32-bit 
    59   value on the status reporting device. 
     54  If Description is not NULL, then the ASCII string specified by Description is
     55  also passed to the handler that displays the POST card value.  Some
     56  implementations of this library function may perform I/O operations directly
     57  to a POST card device.  Other implementations may send Value to ReportStatusCode(),
     58  and the status code reporting mechanism will eventually display the 32-bit
     59  value on the status reporting device.
    6060
    61   PostCodeWithDescription()must actively prevent recursion.  If 
    62   PostCodeWithDescription() is called while processing another any other Post 
    63   Code Library function, then PostCodeWithDescription() must return Value 
     61  PostCodeWithDescription()must actively prevent recursion.  If
     62  PostCodeWithDescription() is called while processing another any other Post
     63  Code Library function, then PostCodeWithDescription() must return Value
    6464  immediately.
    6565
    6666  @param  Value        The 32-bit value to write to the POST card.
    67   @param  Description  The pointer to an ASCII string that is a description of the 
    68                        POST code value.  This is an optional parameter that may 
     67  @param  Description  The pointer to an ASCII string that is a description of the
     68                       POST code value.  This is an optional parameter that may
    6969                       be NULL.
    7070
     
    8787  Returns TRUE if POST Codes are enabled.
    8888
    89   This function returns TRUE if the POST_CODE_PROPERTY_POST_CODE_ENABLED 
     89  This function returns TRUE if the POST_CODE_PROPERTY_POST_CODE_ENABLED
    9090  bit of PcdPostCodePropertyMask is set.  Otherwise FALSE is returned.
    9191
    92   @retval  TRUE   The POST_CODE_PROPERTY_POST_CODE_ENABLED bit of 
     92  @retval  TRUE   The POST_CODE_PROPERTY_POST_CODE_ENABLED bit of
    9393                  PcdPostCodeProperyMask is set.
    94   @retval  FALSE  The POST_CODE_PROPERTY_POST_CODE_ENABLED bit of 
     94  @retval  FALSE  The POST_CODE_PROPERTY_POST_CODE_ENABLED bit of
    9595                  PcdPostCodeProperyMask is clear.
    9696
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BasePostCodeLibPort80/BasePostCodeLibPort80.inf

    r58459 r58466  
    2323  MODULE_TYPE                    = BASE
    2424  VERSION_STRING                 = 1.0
    25   LIBRARY_CLASS                  = PostCodeLib 
     25  LIBRARY_CLASS                  = PostCodeLib
    2626
    2727
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BasePostCodeLibPort80/PostCode.c

    r48674 r58466  
    33
    44  Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
    5   This program and the accompanying materials                         
    6   are licensed and made available under the terms and conditions of the BSD License         
    7   which accompanies this distribution.  The full text of the license may be found at       
    8   http://opensource.org/licenses/bsd-license.php.                                           
     5  This program and the accompanying materials
     6  are licensed and made available under the terms and conditions of the BSD License
     7  which accompanies this distribution.  The full text of the license may be found at
     8  http://opensource.org/licenses/bsd-license.php.
    99
    10   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     
    11   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             
     10  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
     11  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
    1212
    1313**/
     
    2222  Sends an 32-bit value to a POST card.
    2323
    24   Sends the 32-bit value specified by Value to a POST card, and returns Value. 
    25   Some implementations of this library function may perform I/O operations 
    26   directly to a POST card device.  Other implementations may send Value to 
    27   ReportStatusCode(), and the status code reporting mechanism will eventually 
     24  Sends the 32-bit value specified by Value to a POST card, and returns Value.
     25  Some implementations of this library function may perform I/O operations
     26  directly to a POST card device.  Other implementations may send Value to
     27  ReportStatusCode(), and the status code reporting mechanism will eventually
    2828  display the 32-bit value on the status reporting device.
    29  
    30   PostCode() must actively prevent recursion.  If PostCode() is called while 
    31   processing another any other Post Code Library function, then 
     29
     30  PostCode() must actively prevent recursion.  If PostCode() is called while
     31  processing another any other Post Code Library function, then
    3232  PostCode() must return Value immediately.
    3333
     
    5252
    5353  Sends the 32-bit value specified by Value to a POST card, and returns Value.
    54   If Description is not NULL, then the ASCII string specified by Description is 
    55   also passed to the handler that displays the POST card value.  Some 
    56   implementations of this library function may perform I/O operations directly 
    57   to a POST card device.  Other implementations may send Value to ReportStatusCode(), 
    58   and the status code reporting mechanism will eventually display the 32-bit 
    59   value on the status reporting device. 
     54  If Description is not NULL, then the ASCII string specified by Description is
     55  also passed to the handler that displays the POST card value.  Some
     56  implementations of this library function may perform I/O operations directly
     57  to a POST card device.  Other implementations may send Value to ReportStatusCode(),
     58  and the status code reporting mechanism will eventually display the 32-bit
     59  value on the status reporting device.
    6060
    61   PostCodeWithDescription()must actively prevent recursion.  If 
    62   PostCodeWithDescription() is called while processing another any other Post 
    63   Code Library function, then PostCodeWithDescription() must return Value 
     61  PostCodeWithDescription()must actively prevent recursion.  If
     62  PostCodeWithDescription() is called while processing another any other Post
     63  Code Library function, then PostCodeWithDescription() must return Value
    6464  immediately.
    6565
    6666  @param  Value        The 32-bit value to write to the POST card.
    67   @param  Description  The pointer to an ASCII string that is a description of the 
    68                        POST code value.  This is an optional parameter that may 
     67  @param  Description  The pointer to an ASCII string that is a description of the
     68                       POST code value.  This is an optional parameter that may
    6969                       be NULL.
    7070
     
    8787  Returns TRUE if POST Codes are enabled.
    8888
    89   This function returns TRUE if the POST_CODE_PROPERTY_POST_CODE_ENABLED 
     89  This function returns TRUE if the POST_CODE_PROPERTY_POST_CODE_ENABLED
    9090  bit of PcdPostCodePropertyMask is set.  Otherwise FALSE is returned.
    9191
    92   @retval  TRUE   The POST_CODE_PROPERTY_POST_CODE_ENABLED bit of 
     92  @retval  TRUE   The POST_CODE_PROPERTY_POST_CODE_ENABLED bit of
    9393                  PcdPostCodeProperyMask is set.
    94   @retval  FALSE  The POST_CODE_PROPERTY_POST_CODE_ENABLED bit of 
     94  @retval  FALSE  The POST_CODE_PROPERTY_POST_CODE_ENABLED bit of
    9595                  PcdPostCodeProperyMask is clear.
    9696
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BasePrintLib/BasePrintLib.inf

    r58459 r58466  
    2121  MODULE_TYPE                    = BASE
    2222  VERSION_STRING                 = 1.0
    23   LIBRARY_CLASS                  = PrintLib 
     23  LIBRARY_CLASS                  = PrintLib
    2424
    2525
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BasePrintLib/PrintLib.c

    r48674 r58466  
    1818//
    1919// Declare a VA_LIST global variable that is used in calls to BasePrintLibSPrintMarker()
    20 // when the BASE_LIST parameter is valid and the VA_LIST parameter is ignored. 
    21 // A NULL VA_LIST can not be passed into  BasePrintLibSPrintMarker() because some 
     20// when the BASE_LIST parameter is valid and the VA_LIST parameter is ignored.
     21// A NULL VA_LIST can not be passed into  BasePrintLibSPrintMarker() because some
    2222// compilers define VA_LIST to be a structure.
    2323//
     
    2727
    2828/**
    29   Produces a Null-terminated Unicode string in an output buffer based on 
     29  Produces a Null-terminated Unicode string in an output buffer based on
    3030  a Null-terminated Unicode format string and a VA_LIST argument list
    31  
     31
    3232  Produces a Null-terminated Unicode string in the output buffer specified by StartOfBuffer
    33   and BufferSize. 
    34   The Unicode string is produced by parsing the format string specified by FormatString. 
    35   Arguments are pulled from the variable argument list specified by Marker based on the 
    36   contents of the format string. 
     33  and BufferSize.
     34  The Unicode string is produced by parsing the format string specified by FormatString.
     35  Arguments are pulled from the variable argument list specified by Marker based on the
     36  contents of the format string.
    3737  The number of Unicode characters in the produced output buffer is returned not including
    3838  the Null-terminator.
     
    4343  If BufferSize > 1 and FormatString is NULL, then ASSERT().
    4444  If BufferSize > 1 and FormatString is not aligned on a 16-bit boundary, then ASSERT().
    45   If PcdMaximumUnicodeStringLength is not zero, and FormatString contains more than 
     45  If PcdMaximumUnicodeStringLength is not zero, and FormatString contains more than
    4646  PcdMaximumUnicodeStringLength Unicode characters not including the Null-terminator, then
    4747  ASSERT().
     
    5050  Null-terminator, then ASSERT().
    5151
    52   @param  StartOfBuffer   A pointer to the output buffer for the produced Null-terminated 
     52  @param  StartOfBuffer   A pointer to the output buffer for the produced Null-terminated
    5353                          Unicode string.
    5454  @param  BufferSize      The size, in bytes, of the output buffer specified by StartOfBuffer.
    5555  @param  FormatString    A Null-terminated Unicode format string.
    5656  @param  Marker          VA_LIST marker for the variable argument list.
    57  
     57
    5858  @return The number of Unicode characters in the produced output buffer not including the
    5959          Null-terminator.
     
    7575
    7676/**
    77   Produces a Null-terminated Unicode string in an output buffer based on 
     77  Produces a Null-terminated Unicode string in an output buffer based on
    7878  a Null-terminated Unicode format string and a BASE_LIST argument list
    79  
     79
    8080  Produces a Null-terminated Unicode string in the output buffer specified by StartOfBuffer
    81   and BufferSize. 
    82   The Unicode string is produced by parsing the format string specified by FormatString. 
    83   Arguments are pulled from the variable argument list specified by Marker based on the 
    84   contents of the format string. 
     81  and BufferSize.
     82  The Unicode string is produced by parsing the format string specified by FormatString.
     83  Arguments are pulled from the variable argument list specified by Marker based on the
     84  contents of the format string.
    8585  The number of Unicode characters in the produced output buffer is returned not including
    8686  the Null-terminator.
     
    9191  If BufferSize > 1 and FormatString is NULL, then ASSERT().
    9292  If BufferSize > 1 and FormatString is not aligned on a 16-bit boundary, then ASSERT().
    93   If PcdMaximumUnicodeStringLength is not zero, and FormatString contains more than 
     93  If PcdMaximumUnicodeStringLength is not zero, and FormatString contains more than
    9494  PcdMaximumUnicodeStringLength Unicode characters not including the Null-terminator, then
    9595  ASSERT().
     
    9898  Null-terminator, then ASSERT().
    9999
    100   @param  StartOfBuffer   A pointer to the output buffer for the produced Null-terminated 
     100  @param  StartOfBuffer   A pointer to the output buffer for the produced Null-terminated
    101101                          Unicode string.
    102102  @param  BufferSize      The size, in bytes, of the output buffer specified by StartOfBuffer.
    103103  @param  FormatString    A Null-terminated Unicode format string.
    104104  @param  Marker          BASE_LIST marker for the variable argument list.
    105  
     105
    106106  @return The number of Unicode characters in the produced output buffer not including the
    107107          Null-terminator.
     
    123123
    124124/**
    125   Produces a Null-terminated Unicode string in an output buffer based on a Null-terminated 
     125  Produces a Null-terminated Unicode string in an output buffer based on a Null-terminated
    126126  Unicode format string and variable argument list.
    127  
     127
    128128  Produces a Null-terminated Unicode string in the output buffer specified by StartOfBuffer
    129129  and BufferSize.
     
    138138  If BufferSize > 1 and FormatString is NULL, then ASSERT().
    139139  If BufferSize > 1 and FormatString is not aligned on a 16-bit boundary, then ASSERT().
    140   If PcdMaximumUnicodeStringLength is not zero, and FormatString contains more than 
     140  If PcdMaximumUnicodeStringLength is not zero, and FormatString contains more than
    141141  PcdMaximumUnicodeStringLength Unicode characters not including the Null-terminator, then
    142142  ASSERT().
     
    145145  Null-terminator, then ASSERT().
    146146
    147   @param  StartOfBuffer   A pointer to the output buffer for the produced Null-terminated 
     147  @param  StartOfBuffer   A pointer to the output buffer for the produced Null-terminated
    148148                          Unicode string.
    149149  @param  BufferSize      The size, in bytes, of the output buffer specified by StartOfBuffer.
    150150  @param  FormatString    A Null-terminated Unicode format string.
    151   @param  ...             Variable argument list whose contents are accessed based on the 
     151  @param  ...             Variable argument list whose contents are accessed based on the
    152152                          format string specified by FormatString.
    153  
     153
    154154  @return The number of Unicode characters in the produced output buffer not including the
    155155          Null-terminator.
     
    177177  Produces a Null-terminated Unicode string in an output buffer based on a Null-terminated
    178178  ASCII format string and a VA_LIST argument list
    179  
     179
    180180  Produces a Null-terminated Unicode string in the output buffer specified by StartOfBuffer
    181181  and BufferSize.
    182182  The Unicode string is produced by parsing the format string specified by FormatString.
    183   Arguments are pulled from the variable argument list specified by Marker based on the 
     183  Arguments are pulled from the variable argument list specified by Marker based on the
    184184  contents of the format string.
    185185  The number of Unicode characters in the produced output buffer is returned not including
     
    197197  Null-terminator, then ASSERT().
    198198
    199   @param  StartOfBuffer   A pointer to the output buffer for the produced Null-terminated 
     199  @param  StartOfBuffer   A pointer to the output buffer for the produced Null-terminated
    200200                          Unicode string.
    201201  @param  BufferSize      The size, in bytes, of the output buffer specified by StartOfBuffer.
    202202  @param  FormatString    A Null-terminated ASCII format string.
    203203  @param  Marker          VA_LIST marker for the variable argument list.
    204  
     204
    205205  @return The number of Unicode characters in the produced output buffer not including the
    206206          Null-terminator.
     
    223223  Produces a Null-terminated Unicode string in an output buffer based on a Null-terminated
    224224  ASCII format string and a BASE_LIST argument list
    225  
     225
    226226  Produces a Null-terminated Unicode string in the output buffer specified by StartOfBuffer
    227227  and BufferSize.
    228228  The Unicode string is produced by parsing the format string specified by FormatString.
    229   Arguments are pulled from the variable argument list specified by Marker based on the 
     229  Arguments are pulled from the variable argument list specified by Marker based on the
    230230  contents of the format string.
    231231  The number of Unicode characters in the produced output buffer is returned not including
     
    243243  Null-terminator, then ASSERT().
    244244
    245   @param  StartOfBuffer   A pointer to the output buffer for the produced Null-terminated 
     245  @param  StartOfBuffer   A pointer to the output buffer for the produced Null-terminated
    246246                          Unicode string.
    247247  @param  BufferSize      The size, in bytes, of the output buffer specified by StartOfBuffer.
    248248  @param  FormatString    A Null-terminated ASCII format string.
    249249  @param  Marker          BASE_LIST marker for the variable argument list.
    250  
     250
    251251  @return The number of Unicode characters in the produced output buffer not including the
    252252          Null-terminator.
     
    267267
    268268/**
    269   Produces a Null-terminated Unicode string in an output buffer based on a Null-terminated 
     269  Produces a Null-terminated Unicode string in an output buffer based on a Null-terminated
    270270  ASCII format string and  variable argument list.
    271  
     271
    272272  Produces a Null-terminated Unicode string in the output buffer specified by StartOfBuffer
    273273  and BufferSize.
    274274  The Unicode string is produced by parsing the format string specified by FormatString.
    275   Arguments are pulled from the variable argument list based on the contents of the 
     275  Arguments are pulled from the variable argument list based on the contents of the
    276276  format string.
    277277  The number of Unicode characters in the produced output buffer is returned not including
     
    289289  Null-terminator, then ASSERT().
    290290
    291   @param  StartOfBuffer   A pointer to the output buffer for the produced Null-terminated 
     291  @param  StartOfBuffer   A pointer to the output buffer for the produced Null-terminated
    292292                          Unicode string.
    293293  @param  BufferSize      The size, in bytes, of the output buffer specified by StartOfBuffer.
    294294  @param  FormatString    A Null-terminated ASCII format string.
    295   @param  ...             Variable argument list whose contents are accessed based on the 
     295  @param  ...             Variable argument list whose contents are accessed based on the
    296296                          format string specified by FormatString.
    297  
     297
    298298  @return The number of Unicode characters in the produced output buffer not including the
    299299          Null-terminator.
     
    320320/**
    321321  Converts a decimal value to a Null-terminated Unicode string.
    322  
    323   Converts the decimal number specified by Value to a Null-terminated Unicode 
    324   string specified by Buffer containing at most Width characters. No padding of spaces 
     322
     323  Converts the decimal number specified by Value to a Null-terminated Unicode
     324  string specified by Buffer containing at most Width characters. No padding of spaces
    325325  is ever performed. If Width is 0 then a width of MAXIMUM_VALUE_CHARACTERS is assumed.
    326326  The number of Unicode characters in Buffer is returned not including the Null-terminator.
    327327  If the conversion contains more than Width characters, then only the first
    328   Width characters are returned, and the total number of characters 
     328  Width characters are returned, and the total number of characters
    329329  required to perform the conversion is returned.
    330   Additional conversion parameters are specified in Flags. 
    331  
     330  Additional conversion parameters are specified in Flags.
     331
    332332  The Flags bit LEFT_JUSTIFY is always ignored.
    333333  All conversions are left justified in Buffer.
     
    335335  If COMMA_TYPE is set in Flags, then PREFIX_ZERO is ignored in Flags, and commas
    336336  are inserted every 3rd digit starting from the right.
    337   If RADIX_HEX is set in Flags, then the output buffer will be 
     337  If RADIX_HEX is set in Flags, then the output buffer will be
    338338  formatted in hexadecimal format.
    339339  If Value is < 0 and RADIX_HEX is not set in Flags, then the fist character in Buffer is a '-'.
    340   If PREFIX_ZERO is set in Flags and PREFIX_ZERO is not being ignored, 
    341   then Buffer is padded with '0' characters so the combination of the optional '-' 
     340  If PREFIX_ZERO is set in Flags and PREFIX_ZERO is not being ignored,
     341  then Buffer is padded with '0' characters so the combination of the optional '-'
    342342  sign character, '0' characters, digit characters for Value, and the Null-terminator
    343343  add up to Width characters.
     
    355355  @param  Width   The maximum number of Unicode characters to place in Buffer, not including
    356356                  the Null-terminator.
    357  
     357
    358358  @return The number of Unicode characters in Buffer not including the Null-terminator.
    359359
     
    375375  Produces a Null-terminated ASCII string in an output buffer based on a Null-terminated
    376376  ASCII format string and a VA_LIST argument list.
    377  
     377
    378378  Produces a Null-terminated ASCII string in the output buffer specified by StartOfBuffer
    379379  and BufferSize.
    380380  The ASCII string is produced by parsing the format string specified by FormatString.
    381   Arguments are pulled from the variable argument list specified by Marker based on 
     381  Arguments are pulled from the variable argument list specified by Marker based on
    382382  the contents of the format string.
    383383  The number of ASCII characters in the produced output buffer is returned not including
     
    394394  Null-terminator, then ASSERT().
    395395
    396   @param  StartOfBuffer   A pointer to the output buffer for the produced Null-terminated 
     396  @param  StartOfBuffer   A pointer to the output buffer for the produced Null-terminated
    397397                          ASCII string.
    398398  @param  BufferSize      The size, in bytes, of the output buffer specified by StartOfBuffer.
    399399  @param  FormatString    A Null-terminated ASCII format string.
    400400  @param  Marker          VA_LIST marker for the variable argument list.
    401  
     401
    402402  @return The number of ASCII characters in the produced output buffer not including the
    403403          Null-terminator.
     
    419419  Produces a Null-terminated ASCII string in an output buffer based on a Null-terminated
    420420  ASCII format string and a BASE_LIST argument list.
    421  
     421
    422422  Produces a Null-terminated ASCII string in the output buffer specified by StartOfBuffer
    423423  and BufferSize.
    424424  The ASCII string is produced by parsing the format string specified by FormatString.
    425   Arguments are pulled from the variable argument list specified by Marker based on 
     425  Arguments are pulled from the variable argument list specified by Marker based on
    426426  the contents of the format string.
    427427  The number of ASCII characters in the produced output buffer is returned not including
     
    438438  Null-terminator, then ASSERT().
    439439
    440   @param  StartOfBuffer   A pointer to the output buffer for the produced Null-terminated 
     440  @param  StartOfBuffer   A pointer to the output buffer for the produced Null-terminated
    441441                          ASCII string.
    442442  @param  BufferSize      The size, in bytes, of the output buffer specified by StartOfBuffer.
    443443  @param  FormatString    A Null-terminated ASCII format string.
    444444  @param  Marker          BASE_LIST marker for the variable argument list.
    445  
     445
    446446  @return The number of ASCII characters in the produced output buffer not including the
    447447          Null-terminator.
     
    463463  Produces a Null-terminated ASCII string in an output buffer based on a Null-terminated
    464464  ASCII format string and  variable argument list.
    465  
     465
    466466  Produces a Null-terminated ASCII string in the output buffer specified by StartOfBuffer
    467467  and BufferSize.
    468468  The ASCII string is produced by parsing the format string specified by FormatString.
    469   Arguments are pulled from the variable argument list based on the contents of the 
     469  Arguments are pulled from the variable argument list based on the contents of the
    470470  format string.
    471471  The number of ASCII characters in the produced output buffer is returned not including
     
    482482  Null-terminator, then ASSERT().
    483483
    484   @param  StartOfBuffer   A pointer to the output buffer for the produced Null-terminated 
     484  @param  StartOfBuffer   A pointer to the output buffer for the produced Null-terminated
    485485                          ASCII string.
    486486  @param  BufferSize      The size, in bytes, of the output buffer specified by StartOfBuffer.
    487487  @param  FormatString    A Null-terminated ASCII format string.
    488   @param  ...             Variable argument list whose contents are accessed based on the 
     488  @param  ...             Variable argument list whose contents are accessed based on the
    489489                          format string specified by FormatString.
    490    
     490
    491491  @return The number of ASCII characters in the produced output buffer not including the
    492492          Null-terminator.
     
    514514  Produces a Null-terminated ASCII string in an output buffer based on a Null-terminated
    515515  Unicode format string and a VA_LIST argument list.
    516  
     516
    517517  Produces a Null-terminated ASCII string in the output buffer specified by StartOfBuffer
    518518  and BufferSize.
    519519  The ASCII string is produced by parsing the format string specified by FormatString.
    520   Arguments are pulled from the variable argument list specified by Marker based on 
     520  Arguments are pulled from the variable argument list specified by Marker based on
    521521  the contents of the format string.
    522522  The number of ASCII characters in the produced output buffer is returned not including
     
    534534  Null-terminator, then ASSERT().
    535535
    536   @param  StartOfBuffer   A pointer to the output buffer for the produced Null-terminated 
     536  @param  StartOfBuffer   A pointer to the output buffer for the produced Null-terminated
    537537                          ASCII string.
    538538  @param  BufferSize      The size, in bytes, of the output buffer specified by StartOfBuffer.
    539539  @param  FormatString    A Null-terminated Unicode format string.
    540540  @param  Marker          VA_LIST marker for the variable argument list.
    541  
     541
    542542  @return The number of ASCII characters in the produced output buffer not including the
    543543          Null-terminator.
     
    560560  Produces a Null-terminated ASCII string in an output buffer based on a Null-terminated
    561561  Unicode format string and a BASE_LIST argument list.
    562  
     562
    563563  Produces a Null-terminated ASCII string in the output buffer specified by StartOfBuffer
    564564  and BufferSize.
    565565  The ASCII string is produced by parsing the format string specified by FormatString.
    566   Arguments are pulled from the variable argument list specified by Marker based on 
     566  Arguments are pulled from the variable argument list specified by Marker based on
    567567  the contents of the format string.
    568568  The number of ASCII characters in the produced output buffer is returned not including
     
    580580  Null-terminator, then ASSERT().
    581581
    582   @param  StartOfBuffer   A pointer to the output buffer for the produced Null-terminated 
     582  @param  StartOfBuffer   A pointer to the output buffer for the produced Null-terminated
    583583                          ASCII string.
    584584  @param  BufferSize      The size, in bytes, of the output buffer specified by StartOfBuffer.
    585585  @param  FormatString    A Null-terminated Unicode format string.
    586586  @param  Marker          BASE_LIST marker for the variable argument list.
    587  
     587
    588588  @return The number of ASCII characters in the produced output buffer not including the
    589589          Null-terminator.
     
    606606  Produces a Null-terminated ASCII string in an output buffer based on a Null-terminated
    607607  Unicode format string and  variable argument list.
    608  
     608
    609609  Produces a Null-terminated ASCII string in the output buffer specified by StartOfBuffer
    610610  and BufferSize.
    611611  The ASCII string is produced by parsing the format string specified by FormatString.
    612   Arguments are pulled from the variable argument list based on the contents of the 
     612  Arguments are pulled from the variable argument list based on the contents of the
    613613  format string.
    614614  The number of ASCII characters in the produced output buffer is returned not including
     
    626626  Null-terminator, then ASSERT().
    627627
    628   @param  StartOfBuffer   A pointer to the output buffer for the produced Null-terminated 
     628  @param  StartOfBuffer   A pointer to the output buffer for the produced Null-terminated
    629629                          ASCII string.
    630630  @param  BufferSize      The size, in bytes, of the output buffer specified by StartOfBuffer.
    631631  @param  FormatString    A Null-terminated Unicode format string.
    632   @param  ...             Variable argument list whose contents are accessed based on the 
     632  @param  ...             Variable argument list whose contents are accessed based on the
    633633                          format string specified by FormatString.
    634  
     634
    635635  @return The number of ASCII characters in the produced output buffer not including the
    636636          Null-terminator.
     
    658658/**
    659659  Converts a decimal value to a Null-terminated ASCII string.
    660  
    661   Converts the decimal number specified by Value to a Null-terminated ASCII string 
    662   specified by Buffer containing at most Width characters. No padding of spaces 
     660
     661  Converts the decimal number specified by Value to a Null-terminated ASCII string
     662  specified by Buffer containing at most Width characters. No padding of spaces
    663663  is ever performed.
    664664  If Width is 0 then a width of  MAXIMUM_VALUE_CHARACTERS is assumed.
     
    667667  characters are returned, and the total number of characters required to perform
    668668  the conversion is returned.
    669   Additional conversion parameters are specified in Flags. 
     669  Additional conversion parameters are specified in Flags.
    670670  The Flags bit LEFT_JUSTIFY is always ignored.
    671671  All conversions are left justified in Buffer.
     
    673673  If COMMA_TYPE is set in Flags, then PREFIX_ZERO is ignored in Flags, and commas
    674674  are inserted every 3rd digit starting from the right.
    675   If RADIX_HEX is set in Flags, then the output buffer will be 
     675  If RADIX_HEX is set in Flags, then the output buffer will be
    676676  formatted in hexadecimal format.
    677677  If Value is < 0 and RADIX_HEX is not set in Flags, then the fist character in Buffer is a '-'.
    678   If PREFIX_ZERO is set in Flags and PREFIX_ZERO is not being ignored, 
    679   then Buffer is padded with '0' characters so the combination of the optional '-' 
     678  If PREFIX_ZERO is set in Flags and PREFIX_ZERO is not being ignored,
     679  then Buffer is padded with '0' characters so the combination of the optional '-'
    680680  sign character, '0' characters, digit characters for Value, and the Null-terminator
    681681  add up to Width characters.
    682  
     682
    683683  If Buffer is NULL, then ASSERT().
    684684  If unsupported bits are set in Flags, then ASSERT().
     
    692692  @param  Width   The maximum number of ASCII characters to place in Buffer, not including
    693693                  the Null-terminator.
    694  
     694
    695695  @return The number of ASCII characters in Buffer not including the Null-terminator.
    696696
     
    709709
    710710/**
    711   Returns the number of characters that would be produced by if the formatted 
     711  Returns the number of characters that would be produced by if the formatted
    712712  output were produced not including the Null-terminator.
    713713
     
    718718  @param[in]  Marker          VA_LIST marker for the variable argument list.
    719719
    720   @return The number of characters that would be produced, not including the 
     720  @return The number of characters that would be produced, not including the
    721721          Null-terminator.
    722722**/
     
    734734
    735735/**
    736   Returns the number of characters that would be produced by if the formatted 
     736  Returns the number of characters that would be produced by if the formatted
    737737  output were produced not including the Null-terminator.
    738738
     
    742742  @param[in]  Marker          VA_LIST marker for the variable argument list.
    743743
    744   @return The number of characters that would be produced, not including the 
     744  @return The number of characters that would be produced, not including the
    745745          Null-terminator.
    746746**/
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BasePrintLib/PrintLibInternal.c

    r58459 r58466  
    7070  @param  Buffer      The buffer to place the Unicode or ASCII string.
    7171  @param  EndBuffer   The end of the input Buffer. No characters will be
    72                       placed after that. 
     72                      placed after that.
    7373  @param  Length      The count of character to be placed into Buffer.
    7474                      (Negative value indicates no buffer fill.)
     
    8989{
    9090  INTN  Index;
    91  
     91
    9292  for (Index = 0; Index < Length && Buffer < EndBuffer; Index++) {
    9393    *Buffer = (CHAR8) Character;
     
    115115CHAR8 *
    116116BasePrintLibValueToString (
    117   IN OUT CHAR8  *Buffer, 
    118   IN INT64      Value, 
     117  IN OUT CHAR8  *Buffer,
     118  IN INT64      Value,
    119119  IN UINTN      Radix
    120120  )
     
    139139/**
    140140  Internal function that converts a decimal value to a Null-terminated string.
    141  
    142   Converts the decimal number specified by Value to a Null-terminated 
     141
     142  Converts the decimal number specified by Value to a Null-terminated
    143143  string specified by Buffer containing at most Width characters.
    144144  If Width is 0 then a width of  MAXIMUM_VALUE_CHARACTERS is assumed.
    145145  The total number of characters placed in Buffer is returned.
    146146  If the conversion contains more than Width characters, then only the first
    147   Width characters are returned, and the total number of characters 
     147  Width characters are returned, and the total number of characters
    148148  required to perform the conversion is returned.
    149   Additional conversion parameters are specified in Flags. 
     149  Additional conversion parameters are specified in Flags.
    150150  The Flags bit LEFT_JUSTIFY is always ignored.
    151151  All conversions are left justified in Buffer.
     
    154154  are inserted every 3rd digit starting from the right.
    155155  If Value is < 0, then the fist character in Buffer is a '-'.
    156   If PREFIX_ZERO is set in Flags and PREFIX_ZERO is not being ignored, 
    157   then Buffer is padded with '0' characters so the combination of the optional '-' 
     156  If PREFIX_ZERO is set in Flags and PREFIX_ZERO is not being ignored,
     157  then Buffer is padded with '0' characters so the combination of the optional '-'
    158158  sign character, '0' characters, digit characters for Value, and the Null-terminator
    159159  add up to Width characters.
     
    171171                    the Null-terminator.
    172172  @param  Increment The character increment in Buffer.
    173  
     173
    174174  @return Total number of characters required to perform the conversion.
    175175
     
    209209
    210210  OriginalBuffer = Buffer;
    211  
     211
    212212  //
    213213  // Width is 0 or COMMA_TYPE is set, PREFIX_ZERO is ignored.
     
    226226  //
    227227  EndBuffer = Buffer + Width * Increment;
    228  
     228
    229229  //
    230230  // Convert decimal negative
     
    235235    Width--;
    236236  }
    237  
     237
    238238  //
    239239  // Count the length of the value string.
     
    242242  ValueBufferPtr = BasePrintLibValueToString (ValueBuffer, Value, Radix);
    243243  Count = ValueBufferPtr - ValueBuffer;
    244  
     244
    245245  //
    246246  // Append Zero
     
    249249    Buffer = BasePrintLibFillBuffer (Buffer, EndBuffer, Width - Count, '0', Increment);
    250250  }
    251  
     251
    252252  //
    253253  // Print Comma type for every 3 characters
     
    269269    }
    270270  }
    271  
     271
    272272  //
    273273  // Print Null-terminator
     
    279279
    280280/**
    281   Worker function that produces a Null-terminated string in an output buffer 
     281  Worker function that produces a Null-terminated string in an output buffer
    282282  based on a Null-terminated format string and a VA_LIST argument list.
    283283
    284   VSPrint function to process format and place the results in Buffer. Since a 
    285   VA_LIST is used this routine allows the nesting of Vararg routines. Thus 
     284  VSPrint function to process format and place the results in Buffer. Since a
     285  VA_LIST is used this routine allows the nesting of Vararg routines. Thus
    286286  this is the main print working routine.
    287287
    288288  If COUNT_ONLY_NO_PRINT is set in Flags, Buffer will not be modified at all.
    289289
    290   @param[out] Buffer          The character buffer to print the results of the 
     290  @param[out] Buffer          The character buffer to print the results of the
    291291                              parsing of Format into.
    292   @param[in]  BufferSize      The maximum number of characters to put into 
     292  @param[in]  BufferSize      The maximum number of characters to put into
    293293                              buffer.
    294294  @param[in]  Flags           Initial flags value.
    295                               Can only have FORMAT_UNICODE, OUTPUT_UNICODE, 
     295                              Can only have FORMAT_UNICODE, OUTPUT_UNICODE,
    296296                              and COUNT_ONLY_NO_PRINT set.
    297297  @param[in]  Format          A Null-terminated format string.
     
    349349  //
    350350  // If you change this code be sure to match the 2 versions of this function.
    351   // Nearly identical logic is found in the BasePrintLib and 
     351  // Nearly identical logic is found in the BasePrintLib and
    352352  // DxePrintLibPrint2Protocol (both PrintLib instances).
    353353  //
     
    393393    //
    394394    // Make sure format string cannot contain more than PcdMaximumUnicodeStringLength
    395     // Unicode characters if PcdMaximumUnicodeStringLength is not zero. 
     395    // Unicode characters if PcdMaximumUnicodeStringLength is not zero.
    396396    //
    397397    ASSERT (StrSize ((CHAR16 *) Format) != 0);
     
    401401    //
    402402    // Make sure format string cannot contain more than PcdMaximumAsciiStringLength
    403     // Ascii characters if PcdMaximumAsciiStringLength is not zero. 
     403    // Ascii characters if PcdMaximumAsciiStringLength is not zero.
    404404    //
    405405    ASSERT (AsciiStrSize (Format) != 0);
     
    445445        FormatCharacter = ((*Format & 0xff) | (*(Format + 1) << 8)) & FormatMask;
    446446        switch (FormatCharacter) {
    447         case '.': 
    448           Flags |= PRECISION; 
     447        case '.':
     448          Flags |= PRECISION;
    449449          break;
    450         case '-': 
    451           Flags |= LEFT_JUSTIFY; 
     450        case '-':
     451          Flags |= LEFT_JUSTIFY;
    452452          break;
    453         case '+': 
    454           Flags |= PREFIX_SIGN; 
     453        case '+':
     454          Flags |= PREFIX_SIGN;
    455455          break;
    456         case ' ': 
    457           Flags |= PREFIX_BLANK; 
     456        case ' ':
     457          Flags |= PREFIX_BLANK;
    458458          break;
    459         case ',': 
    460           Flags |= COMMA_TYPE; 
     459        case ',':
     460          Flags |= COMMA_TYPE;
    461461          break;
    462462        case 'L':
    463         case 'l': 
    464           Flags |= LONG_TYPE;   
     463        case 'l':
     464          Flags |= LONG_TYPE;
    465465          break;
    466466        case '*':
     
    506506          }
    507507          break;
    508        
     508
    509509        case '\0':
    510510          //
    511511          // Make no output if Format string terminates unexpectedly when
    512           // looking up for flag, width, precision and type. 
     512          // looking up for flag, width, precision and type.
    513513          //
    514514          Format   -= BytesPerFormatCharacter;
     
    521521          break;
    522522        }
    523       } 
     523      }
    524524
    525525      //
     
    553553          // 'd','x', and 'X' that are not preceded by 'l' or 'L' are assumed to be type "int".
    554554          // This assumption is made so the format string definition is compatible with the ANSI C
    555           // Specification for formatted strings.  It is recommended that the Base Types be used 
    556           // everywhere, but in this one case, compliance with ANSI C is more important, and 
    557           // provides an implementation that is compatible with that largest possible set of CPU 
     555          // Specification for formatted strings.  It is recommended that the Base Types be used
     556          // everywhere, but in this one case, compliance with ANSI C is more important, and
     557          // provides an implementation that is compatible with that largest possible set of CPU
    558558          // architectures.  This is why the type "int" is used in this one case.
    559559          //
     
    597597            // 'd','x', and 'X' that are not preceded by 'l' or 'L' are assumed to be type "int".
    598598            // This assumption is made so the format string definition is compatible with the ANSI C
    599             // Specification for formatted strings.  It is recommended that the Base Types be used 
    600             // everywhere, but in this one case, compliance with ANSI C is more important, and 
    601             // provides an implementation that is compatible with that largest possible set of CPU 
     599            // Specification for formatted strings.  It is recommended that the Base Types be used
     600            // everywhere, but in this one case, compliance with ANSI C is more important, and
     601            // provides an implementation that is compatible with that largest possible set of CPU
    602602            // architectures.  This is why the type "unsigned int" is used in this one case.
    603603            //
     
    613613        }
    614614        ArgumentString = (CHAR8 *)ValueBuffer + Count;
    615        
     615
    616616        Digits = Count % 3;
    617617        if (Digits != 0) {
     
    686686          BasePrintLibSPrint (
    687687            ValueBuffer,
    688             MAXIMUM_VALUE_CHARACTERS, 
     688            MAXIMUM_VALUE_CHARACTERS,
    689689            0,
    690690            "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
     
    707707      case 't':
    708708        if (BaseListMarker == NULL) {
    709           TmpTime = VA_ARG (VaListMarker, TIME *); 
     709          TmpTime = VA_ARG (VaListMarker, TIME *);
    710710        } else {
    711           TmpTime = BASE_ARG (BaseListMarker, TIME *); 
     711          TmpTime = BASE_ARG (BaseListMarker, TIME *);
    712712        }
    713713        if (TmpTime == NULL) {
     
    794794      }
    795795      break;
    796  
     796
    797797    case '\r':
    798798      Format += BytesPerFormatCharacter;
     
    960960  //
    961961  // Make sure output buffer cannot contain more than PcdMaximumUnicodeStringLength
    962   // Unicode characters if PcdMaximumUnicodeStringLength is not zero. 
     962  // Unicode characters if PcdMaximumUnicodeStringLength is not zero.
    963963  //
    964964  ASSERT ((((Flags & OUTPUT_UNICODE) == 0)) || (StrSize ((CHAR16 *) OriginalBuffer) != 0));
    965965  //
    966966  // Make sure output buffer cannot contain more than PcdMaximumAsciiStringLength
    967   // ASCII characters if PcdMaximumAsciiStringLength is not zero. 
     967  // ASCII characters if PcdMaximumAsciiStringLength is not zero.
    968968  //
    969969  ASSERT ((((Flags & OUTPUT_UNICODE) != 0)) || (AsciiStrSize (OriginalBuffer) != 0));
     
    973973
    974974/**
    975   Worker function that produces a Null-terminated string in an output buffer 
     975  Worker function that produces a Null-terminated string in an output buffer
    976976  based on a Null-terminated format string and variable argument list.
    977977
    978   VSPrint function to process format and place the results in Buffer. Since a 
    979   VA_LIST is used this routine allows the nesting of Vararg routines. Thus 
     978  VSPrint function to process format and place the results in Buffer. Since a
     979  VA_LIST is used this routine allows the nesting of Vararg routines. Thus
    980980  this is the main print working routine
    981981
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BasePrintLib/PrintLibInternal.h

    r48674 r58466  
    5454
    5555/**
    56   Worker function that produces a Null-terminated string in an output buffer 
     56  Worker function that produces a Null-terminated string in an output buffer
    5757  based on a Null-terminated format string and a VA_LIST argument list.
    5858
    59   VSPrint function to process format and place the results in Buffer. Since a 
    60   VA_LIST is used this routine allows the nesting of Vararg routines. Thus 
     59  VSPrint function to process format and place the results in Buffer. Since a
     60  VA_LIST is used this routine allows the nesting of Vararg routines. Thus
    6161  this is the main print working routine.
    6262
    6363  If COUNT_ONLY_NO_PRINT is set in Flags, Buffer will not be modified at all.
    6464
    65   @param[out] Buffer          The character buffer to print the results of the 
     65  @param[out] Buffer          The character buffer to print the results of the
    6666                              parsing of Format into.
    67   @param[in]  BufferSize      The maximum number of characters to put into 
     67  @param[in]  BufferSize      The maximum number of characters to put into
    6868                              buffer.
    6969  @param[in]  Flags           Initial flags value.
    70                               Can only have FORMAT_UNICODE, OUTPUT_UNICODE, 
     70                              Can only have FORMAT_UNICODE, OUTPUT_UNICODE,
    7171                              and COUNT_ONLY_NO_PRINT set.
    7272  @param[in]  Format          A Null-terminated format string.
     
    9292
    9393/**
    94   Worker function that produces a Null-terminated string in an output buffer 
     94  Worker function that produces a Null-terminated string in an output buffer
    9595  based on a Null-terminated format string and variable argument list.
    9696
    97   VSPrint function to process format and place the results in Buffer. Since a 
    98   VA_LIST is used this routine allows the nesting of Vararg routines. Thus 
     97  VSPrint function to process format and place the results in Buffer. Since a
     98  VA_LIST is used this routine allows the nesting of Vararg routines. Thus
    9999  this is the main print working routine
    100100
     
    128128  @param  Buffer      Buffer to place the Unicode or ASCII string.
    129129  @param  EndBuffer   The end of the input Buffer. No characters will be
    130                       placed after that. 
     130                      placed after that.
    131131  @param  Length      The count of character to be placed into Buffer.
    132132                      (Negative value indicates no buffer fill.)
     
    160160CHAR8 *
    161161BasePrintLibValueToString (
    162   IN OUT CHAR8  *Buffer, 
    163   IN INT64      Value, 
     162  IN OUT CHAR8  *Buffer,
     163  IN INT64      Value,
    164164  IN UINTN      Radix
    165165  );
     
    167167/**
    168168  Internal function that converts a decimal value to a Null-terminated string.
    169  
    170   Converts the decimal number specified by Value to a Null-terminated 
     169
     170  Converts the decimal number specified by Value to a Null-terminated
    171171  string specified by Buffer containing at most Width characters.
    172172  If Width is 0 then a width of  MAXIMUM_VALUE_CHARACTERS is assumed.
    173173  The total number of characters placed in Buffer is returned.
    174174  If the conversion contains more than Width characters, then only the first
    175   Width characters are returned, and the total number of characters 
     175  Width characters are returned, and the total number of characters
    176176  required to perform the conversion is returned.
    177   Additional conversion parameters are specified in Flags. 
     177  Additional conversion parameters are specified in Flags.
    178178  The Flags bit LEFT_JUSTIFY is always ignored.
    179179  All conversions are left justified in Buffer.
     
    182182  are inserted every 3rd digit starting from the right.
    183183  If Value is < 0, then the fist character in Buffer is a '-'.
    184   If PREFIX_ZERO is set in Flags and PREFIX_ZERO is not being ignored, 
    185   then Buffer is padded with '0' characters so the combination of the optional '-' 
     184  If PREFIX_ZERO is set in Flags and PREFIX_ZERO is not being ignored,
     185  then Buffer is padded with '0' characters so the combination of the optional '-'
    186186  sign character, '0' characters, digit characters for Value, and the Null-terminator
    187187  add up to Width characters.
     
    199199                    the Null-terminator.
    200200  @param  Increment Character increment in Buffer.
    201  
     201
    202202  @return Total number of characters required to perform the conversion.
    203203
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseReportStatusCodeLibNull/BaseReportStatusCodeLib.c

    r48674 r58466  
    216216{
    217217  ASSERT (DevicePath != NULL);
    218  
     218
    219219  return EFI_SUCCESS;
    220220}
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseS3BootScriptLibNull/BootScriptLib.c

    r58459 r58466  
    11/** @file
    2   Null function implementation for EFI S3 boot script. 
     2  Null function implementation for EFI S3 boot script.
    33
    44  Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
     
    2020
    2121/**
    22   Save I/O write to boot script 
     22  Save I/O write to boot script
    2323
    2424  @param Width  the width of the I/O operations.Enumerated in S3_BOOT_SCRIPT_LIB_WIDTH.
     
    199199  IN VOID                           *DataMask
    200200  )
    201 { 
     201{
    202202        return RETURN_SUCCESS;
    203203}
     
    210210  @param Length         A pointer to signify the number of bytes that this operation will do.
    211211  @param Buffer         Contains the value of data to execute to the SMBUS slave device.
    212  
     212
    213213  @retval RETURN_OUT_OF_RESOURCES  Not enough memory for the table do operation.
    214214  @retval RETURN_SUCCESS           Opcode is added.
     
    217217EFIAPI
    218218S3BootScriptSaveSmbusExecute (
    219   IN  UINTN                             SmBusAddress, 
     219  IN  UINTN                             SmBusAddress,
    220220  IN  EFI_SMBUS_OPERATION               Operation,
    221221  IN  UINTN                             *Length,
     
    229229
    230230  @param Duration   Duration in microseconds of the stall
    231  
     231
    232232  @retval RETURN_OUT_OF_RESOURCES  Not enough memory for the table do operation.
    233233  @retval RETURN_SUCCESS           Opcode is added.
     
    245245
    246246  @param EntryPoint   Entry point of the code to be dispatched.
    247  
     247
    248248  @retval RETURN_OUT_OF_RESOURCES   Not enough memory for the table do operation.
    249249  @retval RETURN_SUCCESS            Opcode is added.
     
    262262  @param EntryPoint   Entry point of the code to be dispatched.
    263263  @param Context      Argument to be passed into the EntryPoint of the code to be dispatched.
    264  
     264
    265265  @retval RETURN_OUT_OF_RESOURCES  Not enough memory for the table do operation.
    266266  @retval RETURN_SUCCESS           Opcode is added.
     
    279279  Adds a record for memory reads of the memory location and continues when the exit criteria is
    280280  satisfied or after a defined duration.
    281  
     281
    282282  Please aware, below interface is different with PI specification, Vol 5:
    283283  EFI_S3_SAVE_STATE_PROTOCOL.Write() for EFI_BOOT_SCRIPT_MEM_POLL_OPCODE.
     
    313313  Store arbitrary information in the boot script table. This opcode is a no-op on dispatch and is only
    314314  used for debugging script issues.
    315  
     315
    316316  @param InformationLength   Length of the data in bytes
    317317  @param Information       Information to be logged in the boot scrpit
    318  
     318
    319319  @retval RETURN_UNSUPPORTED   If  entering runtime, this method will not support.
    320320  @retval RETURN_OUT_OF_RESOURCES  Not enough memory for the table do operation.
     
    325325EFIAPI
    326326S3BootScriptSaveInformation (
    327   IN  UINT32                   InformationLength, 
     327  IN  UINT32                   InformationLength,
    328328  IN  VOID                    *Information
    329329  )
     
    334334  Adds a record for I/O reads the I/O location and continues when the exit criteria is satisfied or after a
    335335  defined duration.
    336  
    337   @param  Width                 The width of the I/O operations. 
     336
     337  @param  Width                 The width of the I/O operations.
    338338  @param  Address               The base address of the I/O operations.
    339339  @param  Data                  The comparison value used for the polling exit criteria.
     
    353353  IN UINT64                     Address,
    354354  IN VOID                      *Data,
    355   IN VOID                      *DataMask, 
    356   IN UINT64                     Delay   
     355  IN VOID                      *DataMask,
     356  IN UINT64                     Delay
    357357  )
    358358{
     
    364364  after a defined duration.
    365365
    366   @param  Width                 The width of the I/O operations. 
     366  @param  Width                 The width of the I/O operations.
    367367  @param  Address               The address within the PCI configuration space.
    368368  @param  Data                  The comparison value used for the polling exit criteria.
     
    392392  after a defined duration.
    393393
    394   @param  Width                 The width of the I/O operations. 
     394  @param  Width                 The width of the I/O operations.
    395395  @param  Segment               The PCI segment number for Address.
    396396  @param  Address               The address within the PCI configuration space.
     
    404404 @retval RETURN_SUCCESS           Opcode is added.
    405405 @note   A known Limitations in the implementation: When interpreting the opcode  EFI_BOOT_SCRIPT_PCI_CONFIG2_WRITE_OPCODE
    406          EFI_BOOT_SCRIPT_PCI_CONFIG2_READ_WRITE_OPCODE and EFI_BOOT_SCRIPT_PCI_CONFIG2_POLL_OPCODE, the 'Segment' parameter is assumed as 
     406         EFI_BOOT_SCRIPT_PCI_CONFIG2_READ_WRITE_OPCODE and EFI_BOOT_SCRIPT_PCI_CONFIG2_POLL_OPCODE, the 'Segment' parameter is assumed as
    407407         Zero, or else, assert.
    408408
     
    440440}
    441441/**
    442   This is an function to close the S3 boot script table. The function could only be called in 
    443   BOOT time phase. To comply with the Framework spec definition on 
     442  This is an function to close the S3 boot script table. The function could only be called in
     443  BOOT time phase. To comply with the Framework spec definition on
    444444  EFI_BOOT_SCRIPT_SAVE_PROTOCOL.CloseTable(), this function will fulfill following things:
    445445  1. Closes the specified boot script table
    446   2. It allocates a new memory pool to duplicate all the boot scripts in the specified table. 
    447      Once this function is called, the table maintained by the library will be destroyed 
     446  2. It allocates a new memory pool to duplicate all the boot scripts in the specified table.
     447     Once this function is called, the table maintained by the library will be destroyed
    448448     after it is copied into the allocated pool.
    449   3. Any attempts to add a script record after calling this function will cause a new table 
     449  3. Any attempts to add a script record after calling this function will cause a new table
    450450     to be created by the library.
    451   4. The base address of the allocated pool will be returned in Address. Note that after 
     451  4. The base address of the allocated pool will be returned in Address. Note that after
    452452     using the boot script table, the CALLER is responsible for freeing the pool that is allocated
    453      by this function. 
     453     by this function.
    454454
    455455  In Spec PI1.1, this EFI_BOOT_SCRIPT_SAVE_PROTOCOL.CloseTable() is retired. By then it is not
    456456  necessary to provide this API in BootScriptLib. To provides this API for now is only to meet
    457457  the requirement from Framework Spec.
    458  
    459   If anyone does call CloseTable() on a real platform, then the caller is responsible for figuring out 
    460   how to get the script to run on an S3 resume because the boot script maintained by the lib will be 
     458
     459  If anyone does call CloseTable() on a real platform, then the caller is responsible for figuring out
     460  how to get the script to run on an S3 resume because the boot script maintained by the lib will be
    461461  destroyed.
    462  
    463   @return the base address of the new copy of the boot script table.   
     462
     463  @return the base address of the new copy of the boot script table.
    464464
    465465**/
     
    476476
    477477  @param RETURN_SUCCESS           The boot script table was executed successfully.
    478   @param RETURN_UNSUPPORTED       Invalid script table or opcode. 
     478  @param RETURN_UNSUPPORTED       Invalid script table or opcode.
    479479**/
    480480RETURN_STATUS
     
    487487}
    488488/**
    489   Move the last boot script entry to the position 
     489  Move the last boot script entry to the position
    490490
    491491  @param  BeforeOrAfter         Specifies whether the opcode is stored before (TRUE) or after (FALSE) the position
     
    514514
    515515  @param  BeforeOrAfter         Specifies whether the opcode is stored before (TRUE)
    516                                 or after (FALSE) the position in the boot script table 
     516                                or after (FALSE) the position in the boot script table
    517517                                specified by Position.
    518   @param  CreateIfNotFound      Specifies whether the label will be created if the label 
     518  @param  CreateIfNotFound      Specifies whether the label will be created if the label
    519519                                does not exists (TRUE) or not (FALSE).
    520520  @param  Position              On entry, specifies the position in the boot script table
     
    527527                                specified script table.
    528528  @retval EFI_INVALID_PARAMETER The parameter is illegal or the given boot script is not supported.
    529                                 If the opcode is unknow or not supported because of the PCD 
     529                                If the opcode is unknow or not supported because of the PCD
    530530                                Feature Flags.
    531531  @retval EFI_OUT_OF_RESOURCES  There is insufficient memory to store the boot script.
     
    533533**/
    534534RETURN_STATUS
    535 EFIAPI 
     535EFIAPI
    536536S3BootScriptLabel (
    537537  IN       BOOLEAN                      BeforeOrAfter,
     
    552552                                specified script table.
    553553  @retval EFI_INVALID_PARAMETER The parameter is illegal or the given boot script is not supported.
    554                                 If the opcode is unknow or not supported because of the PCD 
     554                                If the opcode is unknow or not supported because of the PCD
    555555                                Feature Flags.
    556556  @retval EFI_OUT_OF_RESOURCES  There is insufficient memory to store the boot script.
     
    558558**/
    559559RETURN_STATUS
    560 EFIAPI 
     560EFIAPI
    561561S3BootScriptCompare (
    562562  IN  UINT8                       *Position1,
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseS3IoLib/BaseS3IoLib.inf

    r58459 r58466  
    22# Instance of S3 I/O Library based on I/O and S3 BootScript Library.
    33#
    4 # S3 I/O and MMIO Library Services that do I/O and also 
     4# S3 I/O and MMIO Library Services that do I/O and also
    55# enable the I/O operatation to be replayed during an S3 resume.
    66#
     
    2424  MODULE_TYPE                    = BASE
    2525  VERSION_STRING                 = 1.0
    26   LIBRARY_CLASS                  = S3IoLib 
     26  LIBRARY_CLASS                  = S3IoLib
    2727
    2828
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseS3IoLib/S3IoLib.c

    r58459 r58466  
    22  I/O and MMIO Library Services that do I/O and also enable the I/O operatation
    33  to be replayed during an S3 resume.
    4  
     4
    55  Copyright (c) 2006 -2012, Intel Corporation. All rights reserved.<BR>
    66
     
    2828
    2929  This internal worker function saves an I/O port value in the S3 script
    30   to be replayed on S3 resume. 
     30  to be replayed on S3 resume.
    3131
    3232  If the saving process fails, then ASSERT().
     
    4545{
    4646  RETURN_STATUS                Status;
    47  
     47
    4848  Status = S3BootScriptSaveIoWrite (
    4949             Width,
     
    5454  ASSERT (Status == RETURN_SUCCESS);
    5555}
    56  
     56
    5757/**
    5858  Saves an 8-bit I/O port value to the boot script.
    5959
    6060  This internal worker function saves an 8-bit I/O port value in the S3 script
    61   to be replayed on S3 resume. 
     61  to be replayed on S3 resume.
    6262
    6363  If the saving process fails, then ASSERT().
     
    190190/**
    191191  Reads an 8-bit I/O port, performs a bitwise AND followed by a bitwise
    192   inclusive OR, and writes the result back to the 8-bit I/O port and saves 
     192  inclusive OR, and writes the result back to the 8-bit I/O port and saves
    193193  the value in the S3 script to be replayed on S3 resume.
    194194
     
    291291/**
    292292  Reads a bit field in an 8-bit port, performs a bitwise OR, and writes the
    293   result back to the bit field in the 8-bit port and saves the value in the 
     293  result back to the bit field in the 8-bit port and saves the value in the
    294294  S3 script to be replayed on S3 resume.
    295295
     
    330330/**
    331331  Reads a bit field in an 8-bit port, performs a bitwise AND, and writes the
    332   result back to the bit field in the 8-bit port  and saves the value in the 
     332  result back to the bit field in the 8-bit port  and saves the value in the
    333333  S3 script to be replayed on S3 resume.
    334334
     
    414414
    415415  This internal worker function saves a 16-bit I/O port value in the S3 script
    416   to be replayed on S3 resume. 
     416  to be replayed on S3 resume.
    417417
    418418  If the saving process fails, then ASSERT().
     
    431431{
    432432  InternalSaveIoWriteValueToBootScript (S3BootScriptWidthUint16, Port, &Value);
    433  
     433
    434434  return Value;
    435435}
     
    487487/**
    488488  Reads a 16-bit I/O port, performs a bitwise OR, and writes the
    489   result back to the 16-bit I/O port and saves the value in the S3 script to 
     489  result back to the 16-bit I/O port and saves the value in the S3 script to
    490490  be replayed on S3 resume.
    491491
     
    608608
    609609/**
    610   Writes a bit field to an I/O register and saves the value in the S3 script 
     610  Writes a bit field to an I/O register and saves the value in the S3 script
    611611  to be replayed on S3 resume.
    612612
     
    646646/**
    647647  Reads a bit field in a 16-bit port, performs a bitwise OR, and writes the
    648   result back to the bit field in the 16-bit port and saves the value in the 
     648  result back to the bit field in the 16-bit port and saves the value in the
    649649  S3 script to be replayed on S3 resume.
    650650
     
    685685/**
    686686  Reads a bit field in a 16-bit port, performs a bitwise AND, and writes the
    687   result back to the bit field in the 16-bit port and saves the value in the 
     687  result back to the bit field in the 16-bit port and saves the value in the
    688688  S3 script to be replayed on S3 resume.
    689689
     
    725725  Reads a bit field in a 16-bit port, performs a bitwise AND followed by a
    726726  bitwise OR, and writes the result back to the bit field in the
    727   16-bit port  and saves the value in the S3 script to be replayed on S3 
     727  16-bit port  and saves the value in the S3 script to be replayed on S3
    728728  resume.
    729729
     
    770770
    771771  This internal worker function saves a 32-bit I/O port value in the S3 script
    772   to be replayed on S3 resume. 
     772  to be replayed on S3 resume.
    773773
    774774  If the saving process fails, then ASSERT().
     
    787787{
    788788  InternalSaveIoWriteValueToBootScript (S3BootScriptWidthUint32, Port, &Value);
    789  
     789
    790790  return Value;
    791791}
     
    843843/**
    844844  Reads a 32-bit I/O port, performs a bitwise OR, and writes the
    845   result back to the 32-bit I/O port and saves the value in the S3 script to 
     845  result back to the 32-bit I/O port and saves the value in the S3 script to
    846846  be replayed on S3 resume.
    847847
     
    901901/**
    902902  Reads a 32-bit I/O port, performs a bitwise AND followed by a bitwise
    903   inclusive OR, and writes the result back to the 32-bit I/O port and saves 
     903  inclusive OR, and writes the result back to the 32-bit I/O port and saves
    904904  the value in the S3 script to be replayed on S3 resume.
    905905
     
    10021002/**
    10031003  Reads a bit field in a 32-bit port, performs a bitwise OR, and writes the
    1004   result back to the bit field in the 32-bit port and saves the value in the 
     1004  result back to the bit field in the 32-bit port and saves the value in the
    10051005  S3 script to be replayed on S3 resume.
    10061006
     
    10411041/**
    10421042  Reads a bit field in a 32-bit port, performs a bitwise AND, and writes the
    1043   result back to the bit field in the 32-bit port and saves the value in the 
     1043  result back to the bit field in the 32-bit port and saves the value in the
    10441044  S3 script to be replayed on S3 resume.
    10451045
     
    10811081  Reads a bit field in a 32-bit port, performs a bitwise AND followed by a
    10821082  bitwise OR, and writes the result back to the bit field in the
    1083   32-bit port and saves the value in the S3 script to be replayed on S3 
     1083  32-bit port and saves the value in the S3 script to be replayed on S3
    10841084  resume.
    10851085
     
    11261126
    11271127  This internal worker function saves a 64-bit I/O port value in the S3 script
    1128   to be replayed on S3 resume. 
     1128  to be replayed on S3 resume.
    11291129
    11301130  If the saving process fails, then ASSERT().
     
    11431143{
    11441144  InternalSaveIoWriteValueToBootScript (S3BootScriptWidthUint64, Port, &Value);
    1145  
     1145
    11461146  return Value;
    11471147}
     
    11991199/**
    12001200  Reads a 64-bit I/O port, performs a bitwise OR, and writes the
    1201   result back to the 64-bit I/O port and saves the value in the S3 script to 
     1201  result back to the 64-bit I/O port and saves the value in the S3 script to
    12021202  be replayed on S3 resume.
    12031203
     
    13581358/**
    13591359  Reads a bit field in a 64-bit port, performs a bitwise OR, and writes the
    1360   result back to the bit field in the 64-bit port and saves the value in the 
     1360  result back to the bit field in the 64-bit port and saves the value in the
    13611361  S3 script to be replayed on S3 resume.
    13621362
     
    13971397/**
    13981398  Reads a bit field in a 64-bit port, performs a bitwise AND, and writes the
    1399   result back to the bit field in the 64-bit port and saves the value in the 
     1399  result back to the bit field in the 64-bit port and saves the value in the
    14001400  S3 script to be replayed on S3 resume.
    14011401
     
    14371437  Reads a bit field in a 64-bit port, performs a bitwise AND followed by a
    14381438  bitwise OR, and writes the result back to the bit field in the
    1439   64-bit port and saves the value in the S3 script to be replayed on S3 
     1439  64-bit port and saves the value in the S3 script to be replayed on S3
    14401440  resume.
    14411441
     
    14821482
    14831483  This internal worker function saves an MMIO register value in the S3 script
    1484   to be replayed on S3 resume. 
     1484  to be replayed on S3 resume.
    14851485
    14861486  If the saving process fails, then ASSERT().
     
    15131513
    15141514  This internal worker function saves an 8-bit MMIO register value in the S3 script
    1515   to be replayed on S3 resume. 
     1515  to be replayed on S3 resume.
    15161516
    15171517  If the saving process fails, then ASSERT().
     
    15351535
    15361536/**
    1537   Reads an 8-bit MMIO register and saves the value in the S3 script to be 
     1537  Reads an 8-bit MMIO register and saves the value in the S3 script to be
    15381538  replayed on S3 resume.
    15391539
     
    15591559
    15601560/**
    1561   Writes an 8-bit MMIO register and saves the value in the S3 script to be 
     1561  Writes an 8-bit MMIO register and saves the value in the S3 script to be
    15621562  replayed on S3 resume.
    15631563
     
    15861586/**
    15871587  Reads an 8-bit MMIO register, performs a bitwise OR, and writes the
    1588   result back to the 8-bit MMIO register and saves the value in the S3 script 
     1588  result back to the 8-bit MMIO register and saves the value in the S3 script
    15891589  to be replayed on S3 resume.
    15901590
     
    16151615/**
    16161616  Reads an 8-bit MMIO register, performs a bitwise AND, and writes the result
    1617   back to the 8-bit MMIO register and saves the value in the S3 script to be 
     1617  back to the 8-bit MMIO register and saves the value in the S3 script to be
    16181618  replayed on S3 resume.
    16191619
     
    16441644/**
    16451645  Reads an 8-bit MMIO register, performs a bitwise AND followed by a bitwise
    1646   inclusive OR, and writes the result back to the 8-bit MMIO register and saves 
     1646  inclusive OR, and writes the result back to the 8-bit MMIO register and saves
    16471647  the value in the S3 script to be replayed on S3 resume.
    16481648
     
    18701870
    18711871  This internal worker function saves a 16-bit MMIO register value in the S3 script
    1872   to be replayed on S3 resume. 
     1872  to be replayed on S3 resume.
    18731873
    18741874  If the saving process fails, then ASSERT().
     
    18871887{
    18881888  InternalSaveMmioWriteValueToBootScript (S3BootScriptWidthUint16, Address, &Value);
    1889  
     1889
    18901890  return Value;
    18911891}
     
    19441944/**
    19451945  Reads a 16-bit MMIO register, performs a bitwise OR, and writes the
    1946   result back to the 16-bit MMIO register and saves the value in the S3 script 
     1946  result back to the 16-bit MMIO register and saves the value in the S3 script
    19471947  to be replayed on S3 resume.
    19481948
     
    19731973/**
    19741974  Reads a 16-bit MMIO register, performs a bitwise AND, and writes the result
    1975   back to the 16-bit MMIO register and saves the value in the S3 script to be 
     1975  back to the 16-bit MMIO register and saves the value in the S3 script to be
    19761976  replayed on S3 resume.
    19771977
     
    20022002/**
    20032003  Reads a 16-bit MMIO register, performs a bitwise AND followed by a bitwise
    2004   inclusive OR, and writes the result back to the 16-bit MMIO register and 
     2004  inclusive OR, and writes the result back to the 16-bit MMIO register and
    20052005  saves the value in the S3 script to be replayed on S3 resume.
    20062006
     
    21022102/**
    21032103  Reads a bit field in a 16-bit MMIO register, performs a bitwise OR, and
    2104   writes the result back to the bit field in the 16-bit MMIO register and 
     2104  writes the result back to the bit field in the 16-bit MMIO register and
    21052105  saves the value in the S3 script to be replayed on S3 resume.
    21062106
     
    21422142/**
    21432143  Reads a bit field in a 16-bit MMIO register, performs a bitwise AND, and
    2144   writes the result back to the bit field in the 16-bit MMIO register and 
     2144  writes the result back to the bit field in the 16-bit MMIO register and
    21452145  saves the value in the S3 script to be replayed on S3 resume.
    21462146
     
    22282228
    22292229  This internal worker function saves a 32-bit MMIO register value in the S3 script
    2230   to be replayed on S3 resume. 
     2230  to be replayed on S3 resume.
    22312231
    22322232  If the saving process fails, then ASSERT().
     
    22502250
    22512251/**
    2252   Reads a 32-bit MMIO register saves the value in the S3 script to be 
     2252  Reads a 32-bit MMIO register saves the value in the S3 script to be
    22532253  replayed on S3 resume.
    22542254
     
    22742274
    22752275/**
    2276   Writes a 32-bit MMIO register and saves the value in the S3 script to be 
     2276  Writes a 32-bit MMIO register and saves the value in the S3 script to be
    22772277  replayed on S3 resume.
    22782278
     
    23012301/**
    23022302  Reads a 32-bit MMIO register, performs a bitwise OR, and writes the
    2303   result back to the 32-bit MMIO register and saves the value in the S3 script 
     2303  result back to the 32-bit MMIO register and saves the value in the S3 script
    23042304  to be replayed on S3 resume.
    23052305
     
    23302330/**
    23312331  Reads a 32-bit MMIO register, performs a bitwise AND, and writes the result
    2332   back to the 32-bit MMIO register and saves the value in the S3 script to be 
     2332  back to the 32-bit MMIO register and saves the value in the S3 script to be
    23332333  replayed on S3 resume.
    23342334
     
    23592359/**
    23602360  Reads a 32-bit MMIO register, performs a bitwise AND followed by a bitwise
    2361   inclusive OR, and writes the result back to the 32-bit MMIO register and 
     2361  inclusive OR, and writes the result back to the 32-bit MMIO register and
    23622362  saves the value in the S3 script to be replayed on S3 resume.
    23632363
     
    23902390
    23912391/**
    2392   Reads a bit field of a MMIO register and saves the value in the S3 script 
     2392  Reads a bit field of a MMIO register and saves the value in the S3 script
    23932393  to be replayed on S3 resume.
    23942394
     
    24222422
    24232423/**
    2424   Writes a bit field to a MMIO register and saves the value in the S3 script 
     2424  Writes a bit field to a MMIO register and saves the value in the S3 script
    24252425  to be replayed on S3 resume.
    24262426
     
    24592459/**
    24602460  Reads a bit field in a 32-bit MMIO register, performs a bitwise OR, and
    2461   writes the result back to the bit field in the 32-bit MMIO register and 
     2461  writes the result back to the bit field in the 32-bit MMIO register and
    24622462  saves the value in the S3 script to be replayed on S3 resume.
    24632463
     
    24992499/**
    25002500  Reads a bit field in a 32-bit MMIO register, performs a bitwise AND, and
    2501   writes the result back to the bit field in the 32-bit MMIO register and 
     2501  writes the result back to the bit field in the 32-bit MMIO register and
    25022502  saves the value in the S3 script to be replayed on S3 resume.
    25032503
     
    25852585
    25862586  This internal worker function saves a 64-bit MMIO register value in the S3 script
    2587   to be replayed on S3 resume. 
     2587  to be replayed on S3 resume.
    25882588
    25892589  If the saving process fails, then ASSERT().
     
    26072607
    26082608/**
    2609   Reads a 64-bit MMIO register and saves the value in the S3 script to be 
     2609  Reads a 64-bit MMIO register and saves the value in the S3 script to be
    26102610  replayed on S3 resume.
    26112611
     
    26312631
    26322632/**
    2633   Writes a 64-bit MMIO register and saves the value in the S3 script to be 
     2633  Writes a 64-bit MMIO register and saves the value in the S3 script to be
    26342634  replayed on S3 resume.
    26352635
     
    26582658/**
    26592659  Reads a 64-bit MMIO register, performs a bitwise OR, and writes the
    2660   result back to the 64-bit MMIO register and saves the value in the S3 script 
     2660  result back to the 64-bit MMIO register and saves the value in the S3 script
    26612661  to be replayed on S3 resume.
    26622662
     
    26872687/**
    26882688  Reads a 64-bit MMIO register, performs a bitwise AND, and writes the result
    2689   back to the 64-bit MMIO register and saves the value in the S3 script to be 
     2689  back to the 64-bit MMIO register and saves the value in the S3 script to be
    26902690  replayed on S3 resume.
    26912691
     
    27162716/**
    27172717  Reads a 64-bit MMIO register, performs a bitwise AND followed by a bitwise
    2718   inclusive OR, and writes the result back to the 64-bit MMIO register and 
     2718  inclusive OR, and writes the result back to the 64-bit MMIO register and
    27192719  saves the value in the S3 script to be replayed on S3 resume.
    27202720
     
    28162816/**
    28172817  Reads a bit field in a 64-bit MMIO register, performs a bitwise OR, and
    2818   writes the result back to the bit field in the 64-bit MMIO register and 
     2818  writes the result back to the bit field in the 64-bit MMIO register and
    28192819  saves the value in the S3 script to be replayed on S3 resume.
    28202820
     
    29422942  and saves the value in the S3 script to be replayed on S3 resume.
    29432943
    2944   Copy data from MMIO region specified by starting address StartAddress 
    2945   to system memory specified by Buffer by using 8-bit access. The total 
     2944  Copy data from MMIO region specified by starting address StartAddress
     2945  to system memory specified by Buffer by using 8-bit access. The total
    29462946  number of byte to be copied is specified by Length. Buffer is returned.
    2947  
    2948   If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT(). 
     2947
     2948  If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
    29492949  If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
    29502950
     
    29852985  and saves the value in the S3 script to be replayed on S3 resume.
    29862986
    2987   Copy data from MMIO region specified by starting address StartAddress 
    2988   to system memory specified by Buffer by using 16-bit access. The total 
     2987  Copy data from MMIO region specified by starting address StartAddress
     2988  to system memory specified by Buffer by using 16-bit access. The total
    29892989  number of byte to be copied is specified by Length. Buffer is returned.
    2990  
     2990
    29912991  If StartAddress is not aligned on a 16-bit boundary, then ASSERT().
    29922992
    2993   If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT(). 
     2993  If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
    29942994  If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
    29952995
     
    30323032  and saves the value in the S3 script to be replayed on S3 resume.
    30333033
    3034   Copy data from MMIO region specified by starting address StartAddress 
    3035   to system memory specified by Buffer by using 32-bit access. The total 
     3034  Copy data from MMIO region specified by starting address StartAddress
     3035  to system memory specified by Buffer by using 32-bit access. The total
    30363036  number of byte to be copied is specified by Length. Buffer is returned.
    3037  
     3037
    30383038  If StartAddress is not aligned on a 32-bit boundary, then ASSERT().
    30393039
    3040   If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT(). 
     3040  If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
    30413041  If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
    30423042
     
    30793079  and saves the value in the S3 script to be replayed on S3 resume.
    30803080
    3081   Copy data from MMIO region specified by starting address StartAddress 
    3082   to system memory specified by Buffer by using 64-bit access. The total 
     3081  Copy data from MMIO region specified by starting address StartAddress
     3082  to system memory specified by Buffer by using 64-bit access. The total
    30833083  number of byte to be copied is specified by Length. Buffer is returned.
    3084  
     3084
    30853085  If StartAddress is not aligned on a 64-bit boundary, then ASSERT().
    30863086
    3087   If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT(). 
     3087  If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
    30883088  If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
    30893089
     
    31273127  and saves the value in the S3 script to be replayed on S3 resume.
    31283128
    3129   Copy data from system memory specified by Buffer to MMIO region specified 
    3130   by starting address StartAddress by using 8-bit access. The total number 
     3129  Copy data from system memory specified by Buffer to MMIO region specified
     3130  by starting address StartAddress by using 8-bit access. The total number
    31313131  of byte to be copied is specified by Length. Buffer is returned.
    3132  
    3133   If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT(). 
     3132
     3133  If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
    31343134  If Length is greater than (MAX_ADDRESS -Buffer + 1), then ASSERT().
    31353135
     
    31703170  and saves the value in the S3 script to be replayed on S3 resume.
    31713171
    3172   Copy data from system memory specified by Buffer to MMIO region specified 
    3173   by starting address StartAddress by using 16-bit access. The total number 
     3172  Copy data from system memory specified by Buffer to MMIO region specified
     3173  by starting address StartAddress by using 16-bit access. The total number
    31743174  of byte to be copied is specified by Length. Buffer is returned.
    3175  
     3175
    31763176  If StartAddress is not aligned on a 16-bit boundary, then ASSERT().
    31773177
    3178   If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT(). 
     3178  If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
    31793179  If Length is greater than (MAX_ADDRESS -Buffer + 1), then ASSERT().
    31803180
     
    32193219  and saves the value in the S3 script to be replayed on S3 resume.
    32203220
    3221   Copy data from system memory specified by Buffer to MMIO region specified 
    3222   by starting address StartAddress by using 32-bit access. The total number 
     3221  Copy data from system memory specified by Buffer to MMIO region specified
     3222  by starting address StartAddress by using 32-bit access. The total number
    32233223  of byte to be copied is specified by Length. Buffer is returned.
    3224  
     3224
    32253225  If StartAddress is not aligned on a 32-bit boundary, then ASSERT().
    32263226
    3227   If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT(). 
     3227  If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
    32283228  If Length is greater than (MAX_ADDRESS -Buffer + 1), then ASSERT().
    32293229
     
    32673267  and saves the value in the S3 script to be replayed on S3 resume.
    32683268
    3269   Copy data from system memory specified by Buffer to MMIO region specified 
    3270   by starting address StartAddress by using 64-bit access. The total number 
     3269  Copy data from system memory specified by Buffer to MMIO region specified
     3270  by starting address StartAddress by using 64-bit access. The total number
    32713271  of byte to be copied is specified by Length. Buffer is returned.
    3272  
     3272
    32733273  If StartAddress is not aligned on a 64-bit boundary, then ASSERT().
    32743274
    3275   If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT(). 
     3275  If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
    32763276  If Length is greater than (MAX_ADDRESS -Buffer + 1), then ASSERT().
    32773277
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseS3PciLib/BaseS3PciLib.inf

    r58459 r58466  
    22# Instance of S3 PCI Library based on PCI and S3 BootScript Library.
    33#
    4 # S3 PCI Services that perform PCI Configuration cycles and 
     4# S3 PCI Services that perform PCI Configuration cycles and
    55# also enable the PCI operation to be replayed during an S3 resume.
    66#
     
    2424  MODULE_TYPE                    = BASE
    2525  VERSION_STRING                 = 1.0
    26   LIBRARY_CLASS                  = S3PciLib 
     26  LIBRARY_CLASS                  = S3PciLib
    2727
    2828
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseS3PciLib/S3PciLib.c

    r58459 r58466  
    22  PCI configuration Library Services that do PCI configuration and also enable
    33  the PCI operations to be replayed during an S3 resume. This library class
    4   maps directly on top of the PciLib class. 
     4  maps directly on top of the PciLib class.
    55
    66  Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
     
    3232
    3333  This internal worker function saves a PCI configuration value in
    34   the S3 script to be replayed on S3 resume. 
     34  the S3 script to be replayed on S3 resume.
    3535
    3636  If the saving process fails, then ASSERT().
     
    6464
    6565  This internal worker function saves an 8-bit PCI configuration value in
    66   the S3 script to be replayed on S3 resume. 
     66  the S3 script to be replayed on S3 resume.
    6767
    6868  If the saving process fails, then ASSERT().
     
    430430
    431431  This internal worker function saves a 16-bit PCI configuration value in
    432   the S3 script to be replayed on S3 resume. 
     432  the S3 script to be replayed on S3 resume.
    433433
    434434  If the saving process fails, then ASSERT().
     
    806806
    807807  This internal worker function saves a 32-bit PCI configuration value in the S3 script
    808   to be replayed on S3 resume. 
     808  to be replayed on S3 resume.
    809809
    810810  If the saving process fails, then ASSERT().
     
    12651265             );
    12661266  ASSERT (Status == RETURN_SUCCESS);
    1267  
     1267
    12681268  return Size;
    12691269}
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseS3SmbusLib/BaseS3SmbusLib.inf

    r58459 r58466  
    33#
    44# S3 Smbus Library Services that do SMBus transactions and also enable the
    5 # operatation to be replayed during an S3 resume. 
     5# operatation to be replayed during an S3 resume.
    66#
    77# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
     
    2424  MODULE_TYPE                    = BASE
    2525  VERSION_STRING                 = 1.0
    26   LIBRARY_CLASS                  = S3SmbusLib 
     26  LIBRARY_CLASS                  = S3SmbusLib
    2727
    2828
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseS3SmbusLib/S3SmbusLib.c

    r48674 r58466  
    22  Smbus Library Services that do SMBus transactions and also enable the operatation
    33  to be replayed during an S3 resume. This library class maps directly on top
    4   of the SmbusLib class. 
     4  of the SmbusLib class.
    55
    66  Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
     
    2626
    2727/**
    28   Saves an SMBus operation to S3 script to be replayed on S3 resume. 
     28  Saves an SMBus operation to S3 script to be replayed on S3 resume.
    2929
    3030  This function provides a standard way to save SMBus operation to S3 boot Script.
     
    8787{
    8888  SmBusQuickRead (SmBusAddress, Status);
    89  
     89
    9090  InternalSaveSmBusExecToBootScript (EfiSmbusQuickRead, SmBusAddress, 0, NULL);
    9191}
     
    120120  InternalSaveSmBusExecToBootScript (EfiSmbusQuickWrite, SmBusAddress, 0, NULL);
    121121}
    122  
     122
    123123/**
    124124  Executes an SMBUS receive byte command and saves the value in the S3 script to be replayed
     
    278278  If Length in SmBusAddress is not zero, then ASSERT().
    279279  If any reserved bits of SmBusAddress are set, then ASSERT().
    280  
     280
    281281  @param  SmBusAddress    Address that encodes the SMBUS Slave Address,
    282282                          SMBUS Command, SMBUS Data Length, and PEC.
     
    295295{
    296296  UINT16  Word;
    297  
     297
    298298  Word = SmBusReadDataWord (SmBusAddress, Status);
    299299
     
    376376  InternalSaveSmBusExecToBootScript (EfiSmbusProcessCall, SmBusAddress, 2, &Value);
    377377
    378   return Word; 
     378  return Word;
    379379}
    380380
     
    428428  Bytes are written to the SMBUS from Buffer.
    429429  The number of bytes written is returned, and will never return a value larger than 32-bytes.
    430   If Status is not NULL, then the status of the executed command is returned in Status. 
     430  If Status is not NULL, then the status of the executed command is returned in Status.
    431431  If Length in SmBusAddress is zero or greater than 32, then ASSERT().
    432432  If Buffer is NULL, then ASSERT().
     
    455455
    456456  InternalSaveSmBusExecToBootScript (EfiSmbusWriteBlock, SmBusAddress, SMBUS_LIB_LENGTH (SmBusAddress), Buffer);
    457  
     457
    458458  return Length;
    459459}
     
    494494{
    495495  UINTN   Length;
    496  
     496
    497497  Length = SmBusBlockProcessCall (SmBusAddress, WriteBuffer, ReadBuffer, Status);
    498  
     498
    499499  InternalSaveSmBusExecToBootScript (EfiSmbusBWBRProcessCall, SmBusAddress, SMBUS_LIB_LENGTH (SmBusAddress), ReadBuffer);
    500500
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseS3StallLib/BaseS3StallLib.inf

    r58459 r58466  
    33#
    44# Stall Services that do stall and also enable the Stall operatation
    5 # to be replayed during an S3 resume. 
     5# to be replayed during an S3 resume.
    66#
    77# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
     
    2424  MODULE_TYPE                    = BASE
    2525  VERSION_STRING                 = 1.0
    26   LIBRARY_CLASS                  = S3StallLib 
     26  LIBRARY_CLASS                  = S3StallLib
    2727
    2828
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseS3StallLib/S3StallLib.c

    r48674 r58466  
    22  Stall Services that do stall and also enable the Stall operatation
    33  to be replayed during an S3 resume. This library class maps directly on top
    4   of the Timer class. 
     4  of the Timer class.
    55
    66  Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
     
    4343{
    4444  RETURN_STATUS    Status;
    45  
     45
    4646  Status = S3BootScriptSaveStall (MicroSecondDelay (MicroSeconds));
    4747  ASSERT (Status == RETURN_SUCCESS);
    48  
     48
    4949  return MicroSeconds;
    5050}
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseSerialPortLibNull/BaseSerialPortLibNull.c

    r48674 r58466  
    1919/**
    2020  Initialize the serial device hardware.
    21  
     21
    2222  If no initialization is required, then return RETURN_SUCCESS.
    2323  If the serial device was successfully initialized, then return RETURN_SUCCESS.
    2424  If the serial device could not be initialized, then return RETURN_DEVICE_ERROR.
    25  
     25
    2626  @retval RETURN_SUCCESS        The serial device was initialized.
    2727  @retval RETURN_DEVICE_ERROR   The serial device could not be initialized.
     
    3838
    3939/**
    40   Write data from buffer to serial device. 
    41  
    42   Writes NumberOfBytes data bytes from Buffer to the serial device. 
     40  Write data from buffer to serial device.
     41
     42  Writes NumberOfBytes data bytes from Buffer to the serial device.
    4343  The number of bytes actually written to the serial device is returned.
    4444  If the return value is less than NumberOfBytes, then the write operation failed.
    45   If Buffer is NULL, then ASSERT(). 
     45  If Buffer is NULL, then ASSERT().
    4646  If NumberOfBytes is zero, then return 0.
    4747
     
    5050
    5151  @retval 0                NumberOfBytes is 0.
    52   @retval >0               The number of bytes written to the serial device. 
     52  @retval >0               The number of bytes written to the serial device.
    5353                           If this value is less than NumberOfBytes, then the read operation failed.
    5454
     
    6767/**
    6868  Read data from serial device and save the datas in buffer.
    69  
     69
    7070  Reads NumberOfBytes data bytes from a serial device into the buffer
    71   specified by Buffer. The number of bytes actually read is returned. 
     71  specified by Buffer. The number of bytes actually read is returned.
    7272  If the return value is less than NumberOfBytes, then the rest operation failed.
    73   If Buffer is NULL, then ASSERT(). 
     73  If Buffer is NULL, then ASSERT().
    7474  If NumberOfBytes is zero, then return 0.
    7575
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseSmbusLibNull/BaseSmbusLibNull.c

    r58464 r58466  
    279279  If Length in SmBusAddress is not zero, then ASSERT().
    280280  If any reserved bits of SmBusAddress are set, then ASSERT().
    281  
     281
    282282  @param  SmBusAddress  Address that encodes the SMBUS Slave Address,
    283283                        SMBUS Command, SMBUS Data Length, and PEC.
     
    454454  Bytes are written to the SMBUS from Buffer.
    455455  The number of bytes written is returned, and will never return a value larger than 32-bytes.
    456   If Status is not NULL, then the status of the executed command is returned in Status. 
     456  If Status is not NULL, then the status of the executed command is returned in Status.
    457457  If Length in SmBusAddress is zero or greater than 32, then ASSERT().
    458458  If Buffer is NULL, then ASSERT().
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseSynchronizationLib/Arm/Synchronization.c

    r48674 r58466  
    4646  Performs an atomic compare exchange operation on a 64-bit unsigned integer.
    4747
    48   Performs an atomic compare exchange operation on the 64-bit unsigned integer specified 
    49   by Value.  If Value is equal to CompareValue, then Value is set to ExchangeValue and 
    50   CompareValue is returned.  If Value is not equal to CompareValue, then Value is returned. 
     48  Performs an atomic compare exchange operation on the 64-bit unsigned integer specified
     49  by Value.  If Value is equal to CompareValue, then Value is set to ExchangeValue and
     50  CompareValue is returned.  If Value is not equal to CompareValue, then Value is returned.
    5151  The compare exchange operation must be performed using MP safe mechanisms.
    5252
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseSynchronizationLib/BaseSynchronizationLib.inf

    r58459 r58466  
    3131
    3232[Sources.IA32]
    33   Ia32/InterlockedCompareExchange64.c | MSFT 
    34   Ia32/InterlockedCompareExchange32.c | MSFT 
    35   Ia32/InterlockedDecrement.c | MSFT 
    36   Ia32/InterlockedIncrement.c | MSFT 
     33  Ia32/InterlockedCompareExchange64.c | MSFT
     34  Ia32/InterlockedCompareExchange32.c | MSFT
     35  Ia32/InterlockedDecrement.c | MSFT
     36  Ia32/InterlockedIncrement.c | MSFT
    3737  SynchronizationMsc.c  | MSFT
    3838
    39   Ia32/InterlockedCompareExchange64.asm | INTEL 
    40   Ia32/InterlockedCompareExchange32.asm | INTEL 
    41   Ia32/InterlockedDecrement.asm | INTEL 
    42   Ia32/InterlockedIncrement.asm | INTEL 
     39  Ia32/InterlockedCompareExchange64.asm | INTEL
     40  Ia32/InterlockedCompareExchange32.asm | INTEL
     41  Ia32/InterlockedDecrement.asm | INTEL
     42  Ia32/InterlockedIncrement.asm | INTEL
    4343  Synchronization.c | INTEL
    4444
     
    4949  X64/InterlockedCompareExchange64.c | MSFT
    5050  X64/InterlockedCompareExchange32.c | MSFT
    51  
     51
    5252  X64/InterlockedCompareExchange64.asm | INTEL
    5353  X64/InterlockedCompareExchange32.asm | INTEL
    54  
    55   X64/InterlockedDecrement.c | MSFT
    56   X64/InterlockedIncrement.c | MSFT
    57   SynchronizationMsc.c | MSFT
    5854
    59   X64/InterlockedDecrement.asm | INTEL
    60   X64/InterlockedIncrement.asm | INTEL
    61   Synchronization.c | INTEL
     55  X64/InterlockedDecrement.c | MSFT
     56  X64/InterlockedIncrement.c | MSFT
     57  SynchronizationMsc.c | MSFT
     58
     59  X64/InterlockedDecrement.asm | INTEL
     60  X64/InterlockedIncrement.asm | INTEL
     61  Synchronization.c | INTEL
    6262
    6363  X64/GccInline.c | GCC
    64   SynchronizationGcc.c  | GCC 
     64  SynchronizationGcc.c  | GCC
    6565
    6666[Sources.IPF]
     
    6969  Ipf/InterlockedCompareExchange32.s
    7070
    71   Synchronization.c     | INTEL 
    72   SynchronizationMsc.c  | MSFT 
    73   SynchronizationGcc.c  | GCC 
     71  Synchronization.c     | INTEL
     72  SynchronizationMsc.c  | MSFT
     73  SynchronizationGcc.c  | GCC
    7474
    7575[Sources.EBC]
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseSynchronizationLib/Ebc/Synchronization.c

    r48674 r58466  
    4747  Performs an atomic compare exchange operation on a 64-bit unsigned integer.
    4848
    49   Performs an atomic compare exchange operation on the 64-bit unsigned integer specified 
    50   by Value.  If Value is equal to CompareValue, then Value is set to ExchangeValue and 
    51   CompareValue is returned.  If Value is not equal to CompareValue, then Value is returned. 
     49  Performs an atomic compare exchange operation on the 64-bit unsigned integer specified
     50  by Value.  If Value is equal to CompareValue, then Value is set to ExchangeValue and
     51  CompareValue is returned.  If Value is not equal to CompareValue, then Value is returned.
    5252  The compare exchange operation must be performed using MP safe mechanisms.
    5353
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseSynchronizationLib/Ia32/GccInline.c

    r48674 r58466  
    11/** @file
    22  GCC inline implementation of BaseSynchronizationLib processor specific functions.
    3  
     3
    44  Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
    55  Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
     
    4343    : "=a" (Result),          // %0
    4444      "=m" (*Value)           // %1
    45     : "m"  (*Value)           // %2 
     45    : "m"  (*Value)           // %2
    4646    : "memory",
    4747      "cc"
    4848    );
    49    
    50   return Result;   
     49
     50  return Result;
    5151
    5252}
     
    7373{
    7474   UINT32  Result;
    75  
     75
    7676  __asm__ __volatile__ (
    7777    "lock               \n\t"
     
    8080    : "=a" (Result),          // %0
    8181      "=m" (*Value)           // %1
    82     : "m"  (*Value)           // %2 
     82    : "m"  (*Value)           // %2
    8383    : "memory",
    8484      "cc"
    8585    );
    86    
     86
    8787  return Result;
    8888}
     
    122122    : "q"  (ExchangeValue),   // %1
    123123      "m"  (*Value),          // %2
    124       "0"  (CompareValue)     // %4 
     124      "0"  (CompareValue)     // %4
    125125    : "memory",
    126126      "cc"
     
    157157  __asm__ __volatile__ (
    158158    "                       \n\t"
    159     "push        %%ebx      \n\t" 
    160     "movl        %2,%%ebx   \n\t"   
     159    "push        %%ebx      \n\t"
     160    "movl        %2,%%ebx   \n\t"
    161161    "lock                   \n\t"
    162162    "cmpxchg8b   (%1)       \n\t"
     
    169169      "cc"
    170170    );
    171  
     171
    172172  return CompareValue;
    173173}
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseSynchronizationLib/Synchronization.c

    r58459 r58466  
    2323
    2424  This function retrieves the spin lock alignment requirements for optimal
    25   performance on a given CPU architecture. The spin lock alignment is byte alignment. 
     25  performance on a given CPU architecture. The spin lock alignment is byte alignment.
    2626  It must be a power of two and is returned by this function. If there are no alignment
    2727  requirements, then 1 must be returned. The spin lock synchronization
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseSynchronizationLib/SynchronizationGcc.c

    r58459 r58466  
    1717
    1818//
    19 // GCC inline assembly for Read Write Barrier 
     19// GCC inline assembly for Read Write Barrier
    2020//
    2121#define _ReadWriteBarrier() do { __asm__ __volatile__ ("": : : "memory"); } while(0)
     
    2929
    3030  This function retrieves the spin lock alignment requirements for optimal
    31   performance on a given CPU architecture. The spin lock alignment is byte alignment. 
     31  performance on a given CPU architecture. The spin lock alignment is byte alignment.
    3232  It must be a power of two and is returned by this function. If there are no alignment
    3333  requirements, then 1 must be returned. The spin lock synchronization
     
    192192  SPIN_LOCK   LockValue;
    193193  VOID        *Result;
    194  
     194
    195195  ASSERT (SpinLock != NULL);
    196196
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseSynchronizationLib/SynchronizationMsc.c

    r58459 r58466  
    3131
    3232  This function retrieves the spin lock alignment requirements for optimal
    33   performance on a given CPU architecture. The spin lock alignment is byte alignment. 
     33  performance on a given CPU architecture. The spin lock alignment is byte alignment.
    3434  It must be a power of two and is returned by this function. If there are no alignment
    3535  requirements, then 1 must be returned. The spin lock synchronization
     
    194194  SPIN_LOCK   LockValue;
    195195  VOID        *Result;
    196  
     196
    197197  ASSERT (SpinLock != NULL);
    198198
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseSynchronizationLib/X64/GccInline.c

    r48674 r58466  
    11/** @file
    22  GCC inline implementation of BaseSynchronizationLib processor specific functions.
    3  
     3
    44  Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
    5   Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR> 
     5  Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
    66  This program and the accompanying materials
    77  are licensed and made available under the terms and conditions of the BSD License
     
    4444    : "=a" (Result),          // %0
    4545      "=m" (*Value)           // %1
    46     : "m"  (*Value)           // %2 
     46    : "m"  (*Value)           // %2
    4747    : "memory",
    4848      "cc"
    4949    );
    50    
    51   return Result;   
     50
     51  return Result;
    5252}
    5353
     
    7373{
    7474   UINT32  Result;
    75  
     75
    7676  __asm__ __volatile__ (
    7777    "lock               \n\t"
     
    8080    : "=a" (Result),          // %0
    8181      "=m" (*Value)           // %1
    82     : "m"  (*Value)           // %2 
     82    : "m"  (*Value)           // %2
    8383    : "memory",
    8484      "cc"
    8585    );
    86    
     86
    8787  return Result;
    8888}
     
    123123      "=m" (*Value)           // %1
    124124    : "a"  (CompareValue),    // %2
    125       "r"  (ExchangeValue),   // %3 
     125      "r"  (ExchangeValue),   // %3
    126126      "m"  (*Value)
    127127    : "memory",
    128128      "cc"
    129129    );
    130    
     130
    131131  return CompareValue;
    132132}
     
    165165      "=m" (*Value)           // %1
    166166    : "a"  (CompareValue),    // %2
    167       "r"  (ExchangeValue),   // %3 
     167      "r"  (ExchangeValue),   // %3
    168168      "m"  (*Value)
    169169    : "memory",
    170170      "cc"
    171171    );
    172  
     172
    173173  return CompareValue;
    174174}
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTemplate.inf

    r58459 r58466  
    2626  MODULE_TYPE                    = BASE
    2727  VERSION_STRING                 = 1.0
    28   LIBRARY_CLASS                  = TimerLib 
     28  LIBRARY_CLASS                  = TimerLib
    2929
    3030
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.c

    r58459 r58466  
    7272  //
    7373  Sd->mBitCount = (UINT16) (Sd->mBitCount - NumOfBits);
    74  
     74
    7575  //
    7676  // Copy NumOfBits of bits from mSubBitBuf into mBitBuf
     
    102102  //
    103103  // Pop NumOfBits of Bits from Left
    104   // 
     104  //
    105105  OutBits = (UINT32) (Sd->mBitBuf >> (BITBUFSIZ - NumOfBits));
    106106
     
    167167    Count[BitLen[Index]]++;
    168168  }
    169  
     169
    170170  Start[0] = 0;
    171171  Start[1] = 0;
     
    183183
    184184  JuBits = (UINT16) (16 - TableBits);
    185  
     185
    186186  Weight[0] = 0;
    187187  for (Index = 1; Index <= TableBits; Index++) {
     
    192192  while (Index <= 16) {
    193193    Weight[Index] = (UINT16) (1U << (16 - Index));
    194     Index++;   
     194    Index++;
    195195  }
    196196
     
    233233          *Pointer = Avail++;
    234234        }
    235        
     235
    236236        if (*Pointer < (2 * NC - 1)) {
    237237          if ((Index3 & Mask) != 0) {
     
    336336  ASSERT (nn <= NPT);
    337337  //
    338   // Read Extra Set Code Length Array size 
     338  // Read Extra Set Code Length Array size
    339339  //
    340340  Number = (UINT16) GetBits (Sd, nbit);
     
    361361    //
    362362    // If a code length is less than 7, then it is encoded as a 3-bit
    363     // value. Or it is encoded as a series of "1"s followed by a 
     363    // value. Or it is encoded as a series of "1"s followed by a
    364364    // terminating "0". The number of "1"s = Code length - 4.
    365365    //
     
    371371      }
    372372    }
    373    
     373
    374374    FillBuf (Sd, (UINT16) ((CharC < 7) ? 3 : CharC - 3));
    375375
    376376    Sd->mPTLen[Index++] = (UINT8) CharC;
    377  
    378     //
    379     // For Code&Len Set, 
     377
     378    //
     379    // For Code&Len Set,
    380380    // After the third length of the code length concatenation,
    381     // a 2-bit value is used to indicated the number of consecutive 
     381    // a 2-bit value is used to indicated the number of consecutive
    382382    // zero lengths after the third length.
    383383    //
     
    393393    Sd->mPTLen[Index++] = 0;
    394394  }
    395  
     395
    396396  return MakeTable (Sd, nn, Sd->mPTLen, 8, Sd->mPTTable);
    397397}
     
    505505    // Starting a new block
    506506    // Read BlockSize from block header
    507     // 
     507    //
    508508    Sd->mBlockSize    = (UINT16) GetBits (Sd, 16);
    509509
     
    524524
    525525    //
    526     // Read in the Position Set Code Length Arrary, 
     526    // Read in the Position Set Code Length Arrary,
    527527    // Generate the Huffman code mapping table for the Position Set.
    528528    //
     
    582582    //
    583583    // Get one code from mBitBuf
    584     // 
     584    //
    585585    CharC = DecodeC (Sd);
    586586    if (Sd->mBadTableFlag != 0) {
     
    606606      //
    607607      CharC       = (UINT16) (CharC - (BIT8 - THRESHOLD));
    608  
     608
    609609      //
    610610      // Get string length
     
    637637
    638638/**
    639   Given a compressed source buffer, this function retrieves the size of 
    640   the uncompressed buffer and the size of the scratch buffer required 
     639  Given a compressed source buffer, this function retrieves the size of
     640  the uncompressed buffer and the size of the scratch buffer required
    641641  to decompress the compressed source buffer.
    642642
    643   Retrieves the size of the uncompressed buffer and the temporary scratch buffer 
     643  Retrieves the size of the uncompressed buffer and the temporary scratch buffer
    644644  required to decompress the buffer specified by Source and SourceSize.
    645645  If the size of the uncompressed buffer or the size of the scratch buffer cannot
    646   be determined from the compressed data specified by Source and SourceData, 
     646  be determined from the compressed data specified by Source and SourceData,
    647647  then RETURN_INVALID_PARAMETER is returned.  Otherwise, the size of the uncompressed
    648648  buffer is returned in DestinationSize, the size of the scratch buffer is returned
    649649  in ScratchSize, and RETURN_SUCCESS is returned.
    650   This function does not have scratch buffer available to perform a thorough 
     650  This function does not have scratch buffer available to perform a thorough
    651651  checking of the validity of the source data.  It just retrieves the "Original Size"
    652652  field from the beginning bytes of the source data and output it as DestinationSize.
     
    663663                          by Source and SourceSize is decompressed.
    664664  @param  ScratchSize     A pointer to the size, in bytes, of the scratch buffer that
    665                           is required to decompress the compressed buffer specified 
     665                          is required to decompress the compressed buffer specified
    666666                          by Source and SourceSize.
    667667
    668   @retval  RETURN_SUCCESS The size of the uncompressed data was returned 
    669                           in DestinationSize, and the size of the scratch 
     668  @retval  RETURN_SUCCESS The size of the uncompressed data was returned
     669                          in DestinationSize, and the size of the scratch
    670670                          buffer was returned in ScratchSize.
    671   @retval  RETURN_INVALID_PARAMETER 
    672                           The size of the uncompressed data or the size of 
    673                           the scratch buffer cannot be determined from 
    674                           the compressed data specified by Source 
     671  @retval  RETURN_INVALID_PARAMETER
     672                          The size of the uncompressed data or the size of
     673                          the scratch buffer cannot be determined from
     674                          the compressed data specified by Source
    675675                          and SourceSize.
    676676**/
     
    711711  This function is designed so that the decompression algorithm can be implemented
    712712  without using any memory services.  As a result, this function is not allowed to
    713   call any memory allocation services in its implementation.  It is the caller's 
     713  call any memory allocation services in its implementation.  It is the caller's
    714714  responsibility to allocate and free the Destination and Scratch buffers.
    715   If the compressed source data specified by Source is successfully decompressed 
    716   into Destination, then RETURN_SUCCESS is returned.  If the compressed source data 
     715  If the compressed source data specified by Source is successfully decompressed
     716  into Destination, then RETURN_SUCCESS is returned.  If the compressed source data
    717717  specified by Source is not in a valid compressed data format,
    718718  then RETURN_INVALID_PARAMETER is returned.
     
    725725  @param  Destination The destination buffer to store the decompressed data.
    726726  @param  Scratch     A temporary scratch buffer that is used to perform the decompression.
    727                       This is an optional parameter that may be NULL if the 
     727                      This is an optional parameter that may be NULL if the
    728728                      required scratch buffer size is 0.
    729                      
    730   @retval  RETURN_SUCCESS Decompression completed successfully, and 
     729
     730  @retval  RETURN_SUCCESS Decompression completed successfully, and
    731731                          the uncompressed buffer is returned in Destination.
    732   @retval  RETURN_INVALID_PARAMETER 
    733                           The source buffer specified by Source is corrupted 
     732  @retval  RETURN_INVALID_PARAMETER
     733                          The source buffer specified by Source is corrupted
    734734                          (not in a valid compressed format).
    735735**/
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf

    r58459 r58466  
    2121  MODULE_TYPE                    = BASE
    2222  VERSION_STRING                 = 1.0
    23   LIBRARY_CLASS                  = UefiDecompressLib 
     23  LIBRARY_CLASS                  = UefiDecompressLib
    2424
    2525
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.c

    r48674 r58466  
    2222
    2323//
    24 // Cache copy of HobList pointer. 
    25 // 
     24// Cache copy of HobList pointer.
     25//
    2626VOID *gHobList = NULL;
    2727
    2828/**
    29   The entry point of PE/COFF Image for the DXE Core. 
     29  The entry point of PE/COFF Image for the DXE Core.
    3030
    3131  This function is the entry point for the DXE Core. This function is required to call
     
    3535  If ProcessModuleEntryPointList() returns, then ASSERT() and halt the system.
    3636
    37   @param  HobStart  The pointer to the beginning of the HOB List passed in from the PEI Phase. 
     37  @param  HobStart  The pointer to the beginning of the HOB List passed in from the PEI Phase.
    3838
    3939**/
     
    6767  This function is required to call _ModuleEntryPoint() passing in HobStart.
    6868
    69   @param  HobStart  The pointer to the beginning of the HOB List passed in from the PEI Phase. 
     69  @param  HobStart  The pointer to the beginning of the HOB List passed in from the PEI Phase.
    7070
    7171**/
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.inf

    r58459 r58466  
    2121  MODULE_TYPE                    = DXE_CORE
    2222  VERSION_STRING                 = 1.0
    23   LIBRARY_CLASS                  = DxeCoreEntryPoint|DXE_CORE 
     23  LIBRARY_CLASS                  = DxeCoreEntryPoint|DXE_CORE
    2424
    2525
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/DxeCoreHobLib/DxeCoreHobLib.inf

    r58459 r58466  
    2424  MODULE_TYPE                    = DXE_CORE
    2525  VERSION_STRING                 = 1.0
    26   LIBRARY_CLASS                  = HobLib|DXE_CORE 
     26  LIBRARY_CLASS                  = HobLib|DXE_CORE
    2727
    2828
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/DxeCoreHobLib/HobLib.c

    r58459 r58466  
    2424
    2525  This function returns the pointer to first HOB in the list.
    26   For PEI phase, the PEI service GetHobList() can be used to retrieve the pointer 
     26  For PEI phase, the PEI service GetHobList() can be used to retrieve the pointer
    2727  to the HOB list.  For the DXE phase, the HOB list pointer can be retrieved through
    2828  the EFI System Table by looking up theHOB list GUID in the System Configuration Table.
    29   Since the System Configuration Table does not exist that the time the DXE Core is 
    30   launched, the DXE Core uses a global variable from the DXE Core Entry Point Library 
     29  Since the System Configuration Table does not exist that the time the DXE Core is
     30  launched, the DXE Core uses a global variable from the DXE Core Entry Point Library
    3131  to manage the pointer to the HOB list.
    32  
     32
    3333  If the pointer to the HOB list is NULL, then ASSERT().
    34  
     34
    3535  @return The pointer to the HOB list.
    3636
     
    4949  Returns the next instance of a HOB type from the starting HOB.
    5050
    51   This function searches the first instance of a HOB type from the starting HOB pointer. 
     51  This function searches the first instance of a HOB type from the starting HOB pointer.
    5252  If there does not exist such HOB type from the starting HOB pointer, it will return NULL.
    5353  In contrast with macro GET_NEXT_HOB(), this function does not skip the starting HOB pointer
    5454  unconditionally: it returns HobStart back if HobStart itself meets the requirement;
    5555  caller is required to use GET_NEXT_HOB() if it wishes to skip current HobStart.
    56  
     56
    5757  If HobStart is NULL, then ASSERT().
    5858
     
    9090  Returns the first instance of a HOB type among the whole HOB list.
    9191
    92   This function searches the first instance of a HOB type among the whole HOB list. 
    93   If there does not exist such HOB type in the HOB list, it will return NULL. 
    94  
     92  This function searches the first instance of a HOB type among the whole HOB list.
     93  If there does not exist such HOB type in the HOB list, it will return NULL.
     94
    9595  If the pointer to the HOB list is NULL, then ASSERT().
    9696
     
    114114/**
    115115  Returns the next instance of the matched GUID HOB from the starting HOB.
    116  
    117   This function searches the first instance of a HOB from the starting HOB pointer. 
    118   Such HOB should satisfy two conditions: 
    119   its HOB type is EFI_HOB_TYPE_GUID_EXTENSION, and its GUID Name equals to the input Guid. 
    120   If such a HOB from the starting HOB pointer does not exist, it will return NULL. 
     116
     117  This function searches the first instance of a HOB from the starting HOB pointer.
     118  Such HOB should satisfy two conditions:
     119  its HOB type is EFI_HOB_TYPE_GUID_EXTENSION, and its GUID Name equals to the input Guid.
     120  If such a HOB from the starting HOB pointer does not exist, it will return NULL.
    121121  Caller is required to apply GET_GUID_HOB_DATA () and GET_GUID_HOB_DATA_SIZE ()
    122122  to extract the data section and its size information, respectively.
     
    124124  unconditionally: it returns HobStart back if HobStart itself meets the requirement;
    125125  caller is required to use GET_NEXT_HOB() if it wishes to skip current HobStart.
    126  
     126
    127127  If Guid is NULL, then ASSERT().
    128128  If HobStart is NULL, then ASSERT().
     
    155155/**
    156156  Returns the first instance of the matched GUID HOB among the whole HOB list.
    157  
    158   This function searches the first instance of a HOB among the whole HOB list. 
     157
     158  This function searches the first instance of a HOB among the whole HOB list.
    159159  Such HOB should satisfy two conditions:
    160160  its HOB type is EFI_HOB_TYPE_GUID_EXTENSION and its GUID Name equals to the input Guid.
     
    162162  Caller is required to apply GET_GUID_HOB_DATA () and GET_GUID_HOB_DATA_SIZE ()
    163163  to extract the data section and its size information, respectively.
    164  
     164
    165165  If the pointer to the HOB list is NULL, then ASSERT().
    166166  If Guid is NULL, then ASSERT().
     
    186186  Get the system boot mode from the HOB list.
    187187
    188   This function returns the system boot mode information from the 
     188  This function returns the system boot mode information from the
    189189  PHIT HOB in HOB list.
    190190
    191191  If the pointer to the HOB list is NULL, then ASSERT().
    192  
     192
    193193  @param  VOID
    194194
     
    215215  It can only be invoked during PEI phase;
    216216  for DXE phase, it will ASSERT() because PEI HOB is read-only for DXE phase.
    217  
     217
    218218  If ModuleName is NULL, then ASSERT().
    219219  If there is no additional space for HOB creation, then ASSERT().
     
    246246  It can only be invoked during PEI phase;
    247247  for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.
    248  
     248
    249249  If there is no additional space for HOB creation, then ASSERT().
    250250
     
    278278  It can only be invoked during PEI phase;
    279279  for DXE phase, it will ASSERT() because PEI HOB is read-only for DXE phase.
    280  
     280
    281281  If there is no additional space for HOB creation, then ASSERT().
    282282
     
    303303
    304304/**
    305   Builds a customized HOB tagged with a GUID for identification and returns 
     305  Builds a customized HOB tagged with a GUID for identification and returns
    306306  the start address of GUID HOB data.
    307307
    308   This function builds a customized HOB tagged with a GUID for identification 
    309   and returns the start address of GUID HOB data so that caller can fill the customized data. 
     308  This function builds a customized HOB tagged with a GUID for identification
     309  and returns the start address of GUID HOB data so that caller can fill the customized data.
    310310  The HOB Header and Name field is already stripped.
    311311  It can only be invoked during PEI phase.
    312312  For DXE phase, it will ASSERT() because PEI HOB is read-only for DXE phase.
    313  
     313
    314314  If Guid is NULL, then ASSERT().
    315315  If there is no additional space for HOB creation, then ASSERT().
     
    339339
    340340/**
    341   Builds a customized HOB tagged with a GUID for identification, copies the input data to the HOB 
     341  Builds a customized HOB tagged with a GUID for identification, copies the input data to the HOB
    342342  data field, and returns the start address of the GUID HOB data.
    343343
    344344  This function builds a customized HOB tagged with a GUID for identification and copies the input
    345   data to the HOB data field and returns the start address of the GUID HOB data.  It can only be 
    346   invoked during PEI phase; for DXE phase, it will ASSERT() because PEI HOB is read-only for DXE phase. 
     345  data to the HOB data field and returns the start address of the GUID HOB data.  It can only be
     346  invoked during PEI phase; for DXE phase, it will ASSERT() because PEI HOB is read-only for DXE phase.
    347347  The HOB Header and Name field is already stripped.
    348348  It can only be invoked during PEI phase.
    349349  For DXE phase, it will ASSERT() because PEI HOB is read-only for DXE phase.
    350  
     350
    351351  If Guid is NULL, then ASSERT().
    352352  If Data is NULL and DataLength > 0, then ASSERT().
     
    384384  It can only be invoked during PEI phase;
    385385  for DXE phase, it will ASSERT() because PEI HOB is read-only for DXE phase.
    386  
     386
    387387  If there is no additional space for HOB creation, then ASSERT().
    388388
     
    410410  It can only be invoked during PEI phase;
    411411  for DXE phase, it will ASSERT() because PEI HOB is read-only for DXE phase.
    412  
     412
    413413  If there is no additional space for HOB creation, then ASSERT().
    414414
     
    417417  @param  FvName        The name of the Firmware Volume.
    418418  @param  FileName      The name of the file.
    419  
     419
    420420**/
    421421VOID
     
    437437  It can only be invoked during PEI phase;
    438438  for DXE phase, it will ASSERT() because PEI HOB is read-only for DXE phase.
    439  
     439
    440440  If the platform does not support Capsule Volume HOBs, then ASSERT().
    441441  If there is no additional space for HOB creation, then ASSERT().
     
    464464  It can only be invoked during PEI phase;
    465465  for DXE phase, it will ASSERT() because PEI HOB is read-only for DXE phase.
    466  
     466
    467467  If there is no additional space for HOB creation, then ASSERT().
    468468
     
    490490  It can only be invoked during PEI phase;
    491491  for DXE phase, it will ASSERT() because PEI HOB is read-only for DXE phase.
    492  
     492
    493493  If there is no additional space for HOB creation, then ASSERT().
    494494
     
    516516  It can only be invoked during PEI phase;
    517517  for DXE phase, it will ASSERT() because PEI HOB is read-only for DXE phase.
    518  
     518
    519519  If there is no additional space for HOB creation, then ASSERT().
    520520
     
    544544  It can only be invoked during PEI phase;
    545545  for DXE phase, it will ASSERT() because PEI HOB is read-only for DXE phase.
    546  
     546
    547547  If there is no additional space for HOB creation, then ASSERT().
    548548
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/DxeExtendedSalLib/DxeExtendedSalLib.inf

    r58459 r58466  
    2020  MODULE_TYPE                    = DXE_DRIVER
    2121  VERSION_STRING                 = 1.0
    22   LIBRARY_CLASS                  = ExtendedSalLib|DXE_DRIVER UEFI_DRIVER UEFI_APPLICATION 
     22  LIBRARY_CLASS                  = ExtendedSalLib|DXE_DRIVER UEFI_DRIVER UEFI_APPLICATION
    2323  CONSTRUCTOR                    = DxeExtendedSalLibConstruct
    2424
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/DxeExtendedSalLib/ExtendedSalLib.c

    r48674 r58466  
    6565  Constructor function to get Extended SAL Boot Service Protocol, and initializes
    6666  physical plabel of ESAL entrypoint.
    67  
     67
    6868  This function first locates Extended SAL Boot Service Protocol and caches it in global variable.
    6969  Then it initializes the physical plable of ESAL entrypoint, and stores
     
    110110/**
    111111  Registers function of ESAL class and it's associated global.
    112  
     112
    113113  This function registers function of ESAL class, together with its associated global.
    114114  It is worker function for RegisterEsalClass().
     
    145145/**
    146146  Registers ESAL Class and it's associated global.
    147  
     147
    148148  This function registers one or more Extended SAL services in a given
    149149  class along with the associated global context.
     
    154154  @param  ModuleGlobal         Module global for the class.
    155155  @param  ...                  List of Function/FunctionId pairs, ended by NULL
    156  
     156
    157157  @retval EFI_SUCCESS          The Extended SAL services were registered.
    158158  @retval EFI_UNSUPPORTED      This function was called after ExitBootServices().
    159159  @retval EFI_OUT_OF_RESOURCES There are not enough resources available to register one or more of the specified services.
    160   @retval Other                ClassGuid could not be installed onto a new handle. 
     160  @retval Other                ClassGuid could not be installed onto a new handle.
    161161
    162162**/
     
    216216/**
    217217  Calls an Extended SAL Class service that was previously registered with RegisterEsalClass().
    218  
     218
    219219  This function gets the entrypoint of Extended SAL, and calls an Extended SAL Class service
    220220  that was previously registered with RegisterEsalClass() through this entrypoint.
     
    230230  @param  Arg7            Argument 7 ClassGuid/FunctionId defined
    231231  @param  Arg8            Argument 8 ClassGuid/FunctionId defined
    232  
     232
    233233  @retval EFI_SAL_SUCCESS ESAL procedure successfully called.
    234234  @retval EFI_SAL_ERROR   The address of ExtendedSalProc() can not be correctly
    235235                          initialized.
    236236  @retval Other           Status returned from ExtendedSalProc() service of
    237                           EXTENDED_SAL_BOOT_SERVICE_PROTOCOL. 
     237                          EXTENDED_SAL_BOOT_SERVICE_PROTOCOL.
    238238
    239239**/
     
    299299/**
    300300  Wrapper for the EsalStallFunctionId service of Extended SAL Stall Services Class.
    301  
     301
    302302  This function is a wrapper for the EsalStallFunctionId service of Extended SAL
    303303  Stall Services Class. See EsalStallFunctionId of Extended SAL Specification.
     
    317317{
    318318  return EsalCall (
    319            EFI_EXTENDED_SAL_STALL_SERVICES_PROTOCOL_GUID_LO, 
    320            EFI_EXTENDED_SAL_STALL_SERVICES_PROTOCOL_GUID_HI, 
    321            StallFunctionId, 
    322            Microseconds, 
    323            0, 
    324            0, 
    325            0, 
    326            0, 
    327            0, 
     319           EFI_EXTENDED_SAL_STALL_SERVICES_PROTOCOL_GUID_LO,
     320           EFI_EXTENDED_SAL_STALL_SERVICES_PROTOCOL_GUID_HI,
     321           StallFunctionId,
     322           Microseconds,
     323           0,
     324           0,
     325           0,
     326           0,
     327           0,
    328328           0
    329329           );
     
    332332/**
    333333  Wrapper for the EsalSetNewPalEntryFunctionId service of Extended SAL PAL Services Services Class.
    334  
     334
    335335  This function is a wrapper for the EsalSetNewPalEntryFunctionId service of Extended SAL
    336336  PAL Services Services Class. See EsalSetNewPalEntryFunctionId of Extended SAL Specification.
     
    354354{
    355355  return EsalCall (
    356            EFI_EXTENDED_SAL_PAL_SERVICES_PROTOCOL_GUID_LO, 
     356           EFI_EXTENDED_SAL_PAL_SERVICES_PROTOCOL_GUID_LO,
    357357           EFI_EXTENDED_SAL_PAL_SERVICES_PROTOCOL_GUID_HI,
    358            SetNewPalEntryFunctionId, 
    359            PhysicalAddress, 
    360            PalEntryPoint, 
    361            0, 
    362            0, 
    363            0, 
    364            0, 
     358           SetNewPalEntryFunctionId,
     359           PhysicalAddress,
     360           PalEntryPoint,
     361           0,
     362           0,
     363           0,
     364           0,
    365365           0
    366366           );
     
    369369/**
    370370  Wrapper for the EsalGetNewPalEntryFunctionId service of Extended SAL PAL Services Services Class.
    371  
     371
    372372  This function is a wrapper for the EsalGetNewPalEntryFunctionId service of Extended SAL
    373373  PAL Services Services Class. See EsalGetNewPalEntryFunctionId of Extended SAL Specification.
     
    393393           EFI_EXTENDED_SAL_PAL_SERVICES_PROTOCOL_GUID_LO,
    394394           EFI_EXTENDED_SAL_PAL_SERVICES_PROTOCOL_GUID_HI,
    395            GetNewPalEntryFunctionId, 
    396            PhysicalAddress, 
    397            0, 
    398            0, 
    399            0, 
    400            0, 
    401            0, 
     395           GetNewPalEntryFunctionId,
     396           PhysicalAddress,
     397           0,
     398           0,
     399           0,
     400           0,
     401           0,
    402402           0
    403403           );
     
    406406/**
    407407  Wrapper for the EsalGetStateBufferFunctionId service of Extended SAL MCA Log Services Class.
    408  
     408
    409409  This function is a wrapper for the EsalGetStateBufferFunctionId service of Extended SAL
    410410  MCA Log Services Class. See EsalGetStateBufferFunctionId of Extended SAL Specification.
     
    435435           EFI_EXTENDED_SAL_MCA_LOG_SERVICES_PROTOCOL_GUID_LO,
    436436           EFI_EXTENDED_SAL_MCA_LOG_SERVICES_PROTOCOL_GUID_HI,
    437            EsalGetStateBufferFunctionId, 
    438            McaType, 
    439            0, 
    440            0, 
    441            0, 
    442            0, 
    443            0, 
     437           EsalGetStateBufferFunctionId,
     438           McaType,
     439           0,
     440           0,
     441           0,
     442           0,
     443           0,
    444444           0
    445445           );
     
    453453/**
    454454  Wrapper for the EsalSaveStateBufferFunctionId service of Extended SAL MCA Log Services Class.
    455  
     455
    456456  This function is a wrapper for the EsalSaveStateBufferFunctionId service of Extended SAL
    457457  MCA Log Services Class. See EsalSaveStateBufferFunctionId of Extended SAL Specification.
     
    471471           EFI_EXTENDED_SAL_MCA_LOG_SERVICES_PROTOCOL_GUID_LO,
    472472           EFI_EXTENDED_SAL_MCA_LOG_SERVICES_PROTOCOL_GUID_HI,
    473            EsalSaveStateBufferFunctionId, 
    474            McaType, 
    475            0, 
    476            0, 
    477            0, 
    478            0, 
    479            0, 
     473           EsalSaveStateBufferFunctionId,
     474           McaType,
     475           0,
     476           0,
     477           0,
     478           0,
     479           0,
    480480           0
    481481           );
     
    484484/**
    485485  Wrapper for the EsalGetVectorsFunctionId service of Extended SAL Base Services Class.
    486  
     486
    487487  This function is a wrapper for the EsalGetVectorsFunctionId service of Extended SAL
    488488  Base Services Class. See EsalGetVectorsFunctionId of Extended SAL Specification.
     
    506506           EFI_EXTENDED_SAL_BASE_SERVICES_PROTOCOL_GUID_LO,
    507507           EFI_EXTENDED_SAL_BASE_SERVICES_PROTOCOL_GUID_HI,
    508            EsalGetVectorsFunctionId, 
    509            VectorType, 
    510            0, 
    511            0, 
    512            0, 
    513            0, 
    514            0, 
     508           EsalGetVectorsFunctionId,
     509           VectorType,
     510           0,
     511           0,
     512           0,
     513           0,
     514           0,
    515515           0
    516516           );
     
    519519/**
    520520  Wrapper for the EsalMcGetParamsFunctionId service of Extended SAL Base Services Class.
    521  
     521
    522522  This function is a wrapper for the EsalMcGetParamsFunctionId service of Extended SAL
    523523  Base Services Class. See EsalMcGetParamsFunctionId of Extended SAL Specification.
     
    543543           EFI_EXTENDED_SAL_BASE_SERVICES_PROTOCOL_GUID_LO,
    544544           EFI_EXTENDED_SAL_BASE_SERVICES_PROTOCOL_GUID_HI,
    545            EsalMcGetParamsFunctionId, 
    546            ParamInfoType, 
    547            0, 
    548            0, 
    549            0, 
    550            0, 
    551            0, 
     545           EsalMcGetParamsFunctionId,
     546           ParamInfoType,
     547           0,
     548           0,
     549           0,
     550           0,
     551           0,
    552552           0
    553553           );
     
    556556/**
    557557  Wrapper for the EsalMcGetParamsFunctionId service of Extended SAL Base Services Class.
    558  
     558
    559559  This function is a wrapper for the EsalMcGetParamsFunctionId service of Extended SAL
    560560  Base Services Class. See EsalMcGetParamsFunctionId of Extended SAL Specification.
     
    574574           EFI_EXTENDED_SAL_BASE_SERVICES_PROTOCOL_GUID_LO,
    575575           EFI_EXTENDED_SAL_BASE_SERVICES_PROTOCOL_GUID_HI,
    576            EsalMcGetMcParamsFunctionId, 
    577            0, 
    578            0, 
    579            0, 
    580            0, 
    581            0, 
    582            0, 
     576           EsalMcGetMcParamsFunctionId,
     577           0,
     578           0,
     579           0,
     580           0,
     581           0,
     582           0,
    583583           0
    584584           );
     
    587587/**
    588588  Wrapper for the EsalGetMcCheckinFlagsFunctionId service of Extended SAL Base Services Class.
    589  
     589
    590590  This function is a wrapper for the EsalGetMcCheckinFlagsFunctionId service of Extended SAL
    591591  Base Services Class. See EsalGetMcCheckinFlagsFunctionId of Extended SAL Specification.
     
    605605           EFI_EXTENDED_SAL_BASE_SERVICES_PROTOCOL_GUID_LO,
    606606           EFI_EXTENDED_SAL_BASE_SERVICES_PROTOCOL_GUID_HI,
    607            EsalGetMcCheckinFlagsFunctionId, 
    608            CpuIndex, 
    609            0, 
    610            0, 
    611            0, 
    612            0, 
    613            0, 
     607           EsalGetMcCheckinFlagsFunctionId,
     608           CpuIndex,
     609           0,
     610           0,
     611           0,
     612           0,
     613           0,
    614614           0
    615615           );
     
    618618/**
    619619  Wrapper for the EsalAddCpuDataFunctionId service of Extended SAL MP Services Class.
    620  
     620
    621621  This function is a wrapper for the EsalAddCpuDataFunctionId service of Extended SAL
    622622  MP Services Class. See EsalAddCpuDataFunctionId of Extended SAL Specification.
     
    643643           EFI_EXTENDED_SAL_MP_SERVICES_PROTOCOL_GUID_LO,
    644644           EFI_EXTENDED_SAL_MP_SERVICES_PROTOCOL_GUID_HI,
    645            AddCpuDataFunctionId, 
    646            CpuGlobalId, 
    647            Enabled, 
    648            PalCompatibility, 
    649            0, 
    650            0, 
    651            0, 
     645           AddCpuDataFunctionId,
     646           CpuGlobalId,
     647           Enabled,
     648           PalCompatibility,
     649           0,
     650           0,
     651           0,
    652652           0
    653653           );
     
    656656/**
    657657  Wrapper for the EsalRemoveCpuDataFunctionId service of Extended SAL MP Services Class.
    658  
     658
    659659  This function is a wrapper for the EsalRemoveCpuDataFunctionId service of Extended SAL
    660660  MP Services Class. See EsalRemoveCpuDataFunctionId of Extended SAL Specification.
     
    675675           EFI_EXTENDED_SAL_MP_SERVICES_PROTOCOL_GUID_LO,
    676676           EFI_EXTENDED_SAL_MP_SERVICES_PROTOCOL_GUID_HI,
    677            RemoveCpuDataFunctionId, 
    678            CpuGlobalId, 
    679            0, 
    680            0, 
    681            0, 
    682            0, 
    683            0, 
     677           RemoveCpuDataFunctionId,
     678           CpuGlobalId,
     679           0,
     680           0,
     681           0,
     682           0,
     683           0,
    684684           0
    685685           );
     
    688688/**
    689689  Wrapper for the EsalModifyCpuDataFunctionId service of Extended SAL MP Services Class.
    690  
     690
    691691  This function is a wrapper for the EsalModifyCpuDataFunctionId service of Extended SAL
    692692  MP Services Class. See EsalModifyCpuDataFunctionId of Extended SAL Specification.
     
    713713           EFI_EXTENDED_SAL_MP_SERVICES_PROTOCOL_GUID_LO,
    714714           EFI_EXTENDED_SAL_MP_SERVICES_PROTOCOL_GUID_HI,
    715            ModifyCpuDataFunctionId, 
    716            CpuGlobalId, 
    717            Enabled, 
    718            PalCompatibility, 
    719            0, 
    720            0, 
    721            0, 
     715           ModifyCpuDataFunctionId,
     716           CpuGlobalId,
     717           Enabled,
     718           PalCompatibility,
     719           0,
     720           0,
     721           0,
    722722           0
    723723           );
     
    726726/**
    727727  Wrapper for the EsalGetCpuDataByIdFunctionId service of Extended SAL MP Services Class.
    728  
     728
    729729  This function is a wrapper for the EsalGetCpuDataByIdFunctionId service of Extended SAL
    730730  MP Services Class. See EsalGetCpuDataByIdFunctionId of Extended SAL Specification.
     
    748748           EFI_EXTENDED_SAL_MP_SERVICES_PROTOCOL_GUID_LO,
    749749           EFI_EXTENDED_SAL_MP_SERVICES_PROTOCOL_GUID_HI,
    750            GetCpuDataByIDFunctionId, 
    751            CpuGlobalId, 
    752            IndexByEnabledCpu, 
    753            0, 
    754            0, 
    755            0, 
    756            0, 
     750           GetCpuDataByIDFunctionId,
     751           CpuGlobalId,
     752           IndexByEnabledCpu,
     753           0,
     754           0,
     755           0,
     756           0,
    757757           0
    758758           );
     
    761761/**
    762762  Wrapper for the EsalGetCpuDataByIndexFunctionId service of Extended SAL MP Services Class.
    763  
     763
    764764  This function is a wrapper for the EsalGetCpuDataByIndexFunctionId service of Extended SAL
    765765  MP Services Class. See EsalGetCpuDataByIndexFunctionId of Extended SAL Specification.
     
    783783           EFI_EXTENDED_SAL_MP_SERVICES_PROTOCOL_GUID_LO,
    784784           EFI_EXTENDED_SAL_MP_SERVICES_PROTOCOL_GUID_HI,
    785            GetCpuDataByIndexFunctionId, 
    786            Index, 
    787            IndexByEnabledCpu, 
    788            0, 
    789            0, 
    790            0, 
    791            0, 
     785           GetCpuDataByIndexFunctionId,
     786           Index,
     787           IndexByEnabledCpu,
     788           0,
     789           0,
     790           0,
     791           0,
    792792           0
    793793           );
     
    796796/**
    797797  Wrapper for the EsalWhoAmIFunctionId service of Extended SAL MP Services Class.
    798  
     798
    799799  This function is a wrapper for the EsalWhoAmIFunctionId service of Extended SAL
    800800  MP Services Class. See EsalWhoAmIFunctionId of Extended SAL Specification.
     
    816816           EFI_EXTENDED_SAL_MP_SERVICES_PROTOCOL_GUID_LO,
    817817           EFI_EXTENDED_SAL_MP_SERVICES_PROTOCOL_GUID_HI,
    818            CurrentProcInfoFunctionId, 
    819            IndexByEnabledCpu, 
    820            0, 
    821            0, 
    822            0, 
    823            0, 
    824            0, 
     818           CurrentProcInfoFunctionId,
     819           IndexByEnabledCpu,
     820           0,
     821           0,
     822           0,
     823           0,
     824           0,
    825825           0
    826826           );
     
    829829/**
    830830  Wrapper for the EsalNumProcessors service of Extended SAL MP Services Class.
    831  
     831
    832832  This function is a wrapper for the EsalNumProcessors service of Extended SAL
    833833  MP Services Class. See EsalNumProcessors of Extended SAL Specification.
     
    846846           EFI_EXTENDED_SAL_MP_SERVICES_PROTOCOL_GUID_LO,
    847847           EFI_EXTENDED_SAL_MP_SERVICES_PROTOCOL_GUID_HI,
    848            NumProcessorsFunctionId, 
    849            0, 
    850            0, 
    851            0, 
    852            0, 
    853            0, 
    854            0, 
     848           NumProcessorsFunctionId,
     849           0,
     850           0,
     851           0,
     852           0,
     853           0,
     854           0,
    855855           0
    856856           );
     
    859859/**
    860860  Wrapper for the EsalSetMinStateFnctionId service of Extended SAL MP Services Class.
    861  
     861
    862862  This function is a wrapper for the EsalSetMinStateFnctionId service of Extended SAL
    863863  MP Services Class. See EsalSetMinStateFnctionId of Extended SAL Specification.
     
    881881           EFI_EXTENDED_SAL_MP_SERVICES_PROTOCOL_GUID_LO,
    882882           EFI_EXTENDED_SAL_MP_SERVICES_PROTOCOL_GUID_HI,
    883            SetMinStateFunctionId, 
    884            CpuGlobalId, 
    885            MinStatePointer, 
    886            0, 
    887            0, 
    888            0, 
    889            0, 
     883           SetMinStateFunctionId,
     884           CpuGlobalId,
     885           MinStatePointer,
     886           0,
     887           0,
     888           0,
     889           0,
    890890           0
    891891           );
     
    894894/**
    895895  Wrapper for the EsalGetMinStateFunctionId service of Extended SAL MP Services Class.
    896  
     896
    897897  This function is a wrapper for the EsalGetMinStateFunctionId service of Extended SAL
    898898  MP Services Class. See EsalGetMinStateFunctionId of Extended SAL Specification.
     
    913913           EFI_EXTENDED_SAL_MP_SERVICES_PROTOCOL_GUID_LO,
    914914           EFI_EXTENDED_SAL_MP_SERVICES_PROTOCOL_GUID_HI,
    915            GetMinStateFunctionId, 
    916            CpuGlobalId, 
    917            0, 
    918            0, 
    919            0, 
    920            0, 
    921            0, 
     915           GetMinStateFunctionId,
     916           CpuGlobalId,
     917           0,
     918           0,
     919           0,
     920           0,
     921           0,
    922922           0
    923923           );
     
    926926/**
    927927  Wrapper for the EsalMcsGetStateInfoFunctionId service of Extended SAL MCA Services Class.
    928  
     928
    929929  This function is a wrapper for the EsalMcsGetStateInfoFunctionId service of Extended SAL
    930930  MCA Services Class. See EsalMcsGetStateInfoFunctionId of Extended SAL Specification.
     
    951951           EFI_EXTENDED_SAL_MCA_SERVICES_PROTOCOL_GUID_LO,
    952952           EFI_EXTENDED_SAL_MCA_SERVICES_PROTOCOL_GUID_HI,
    953            McaGetStateInfoFunctionId, 
    954            CpuGlobalId, 
    955            0, 
    956            0, 
    957            0, 
    958            0, 
    959            0, 
     953           McaGetStateInfoFunctionId,
     954           CpuGlobalId,
     955           0,
     956           0,
     957           0,
     958           0,
     959           0,
    960960           0
    961961           );
     
    969969/**
    970970  Wrapper for the EsalMcaRegisterCpuFunctionId service of Extended SAL MCA Services Class.
    971  
     971
    972972  This function is a wrapper for the EsalMcaRegisterCpuFunctionId service of Extended SAL
    973973  MCA Services Class. See EsalMcaRegisterCpuFunctionId of Extended SAL Specification.
     
    990990           EFI_EXTENDED_SAL_MCA_SERVICES_PROTOCOL_GUID_LO,
    991991           EFI_EXTENDED_SAL_MCA_SERVICES_PROTOCOL_GUID_HI,
    992            McaRegisterCpuFunctionId, 
    993            CpuGlobalId, 
    994            StateBufferPointer, 
    995            0, 
    996            0, 
    997            0, 
    998            0, 
    999            0
    1000            );
    1001 }
     992           McaRegisterCpuFunctionId,
     993           CpuGlobalId,
     994           StateBufferPointer,
     995           0,
     996           0,
     997           0,
     998           0,
     999           0
     1000           );
     1001}
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/DxeExtendedSalLib/Ipf/AsmExtendedSalLib.s

    r48674 r58466  
    3636//        r10 = Virtual Plabel
    3737//        r11 = psr
    38 // 
    39 // As per static calling conventions. 
    40 // 
     38//
     39// As per static calling conventions.
     40//
    4141//--
    4242//---------------------------------------------------------------------------
     
    6767//  in1 = Physical GP
    6868//
    69 // Return Value: 
     69// Return Value:
    7070//   r8 = EFI_SAL_SUCCESS
    71 // 
    72 // As per static calling conventions. 
    73 // 
     71//
     72// As per static calling conventions.
     73//
    7474//--
    7575//---------------------------------------------------------------------------
     
    9191
    9292.align 32
    93 EsalEntryPoint: 
     93EsalEntryPoint:
    9494    data8 0   // Physical Entry
    9595    data8 0   //         GP
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.c

    r58459 r58466  
    4040ReallocateExtractHandlerTable (
    4141  )
    42 { 
     42{
    4343  //
    4444  // Reallocate memory for GuidTable
    4545  //
    4646  mExtractHandlerGuidTable = ReallocatePool (
    47                                mMaxNumberOfExtractHandler * sizeof (GUID), 
    48                                (mMaxNumberOfExtractHandler + EXTRACT_HANDLER_TABLE_SIZE) * sizeof (GUID), 
     47                               mMaxNumberOfExtractHandler * sizeof (GUID),
     48                               (mMaxNumberOfExtractHandler + EXTRACT_HANDLER_TABLE_SIZE) * sizeof (GUID),
    4949                               mExtractHandlerGuidTable
    5050                             );
     
    5858  //
    5959  mExtractDecodeHandlerTable = ReallocatePool (
    60                                mMaxNumberOfExtractHandler * sizeof (EXTRACT_GUIDED_SECTION_DECODE_HANDLER), 
    61                                (mMaxNumberOfExtractHandler + EXTRACT_HANDLER_TABLE_SIZE) * sizeof (EXTRACT_GUIDED_SECTION_DECODE_HANDLER), 
     60                               mMaxNumberOfExtractHandler * sizeof (EXTRACT_GUIDED_SECTION_DECODE_HANDLER),
     61                               (mMaxNumberOfExtractHandler + EXTRACT_HANDLER_TABLE_SIZE) * sizeof (EXTRACT_GUIDED_SECTION_DECODE_HANDLER),
    6262                               mExtractDecodeHandlerTable
    6363                             );
     
    7171  //
    7272  mExtractGetInfoHandlerTable = ReallocatePool (
    73                                mMaxNumberOfExtractHandler * sizeof (EXTRACT_GUIDED_SECTION_GET_INFO_HANDLER), 
    74                                (mMaxNumberOfExtractHandler + EXTRACT_HANDLER_TABLE_SIZE) * sizeof (EXTRACT_GUIDED_SECTION_GET_INFO_HANDLER), 
     73                               mMaxNumberOfExtractHandler * sizeof (EXTRACT_GUIDED_SECTION_GET_INFO_HANDLER),
     74                               (mMaxNumberOfExtractHandler + EXTRACT_HANDLER_TABLE_SIZE) * sizeof (EXTRACT_GUIDED_SECTION_GET_INFO_HANDLER),
    7575                               mExtractGetInfoHandlerTable
    7676                             );
     
    7979    goto Done;
    8080  }
    81  
     81
    8282  //
    8383  // Increase max handler number
     
    9696    FreePool (mExtractGetInfoHandlerTable);
    9797  }
    98  
     98
    9999  return RETURN_OUT_OF_RESOURCES;
    100100}
     
    123123  Sets ExtractHandlerGuidTable so it points at a callee allocated array of registered GUIDs.
    124124  The total number of GUIDs in the array are returned. Since the array of GUIDs is callee allocated
    125   and caller must treat this array of GUIDs as read-only data. 
     125  and caller must treat this array of GUIDs as read-only data.
    126126  If ExtractHandlerGuidTable is NULL, then ASSERT().
    127127
     
    151151  If the GUID value specified by SectionGuid has already been registered, then return RETURN_ALREADY_STARTED.
    152152  If there are not enough resources available to register the handlers  then RETURN_OUT_OF_RESOURCES is returned.
    153  
     153
    154154  If SectionGuid is NULL, then ASSERT().
    155155  If GetInfoHandler is NULL, then ASSERT().
     
    162162                             required to actually decode the data in a GUIDed section.
    163163  @param[in]  DecodeHandler  The pointer to a function that decodes a GUIDed section into a caller
    164                              allocated output buffer. 
     164                             allocated output buffer.
    165165
    166166  @retval  RETURN_SUCCESS           The handlers were registered.
     
    199199    }
    200200  }
    201  
     201
    202202  //
    203203  // Check the global table is enough to contain new Handler.
     
    208208    }
    209209  }
    210  
     210
    211211  //
    212212  // Register new Handler and guid value.
     
    234234  optional scratch buffer required to actually decode the data in a GUIDed section.
    235235
    236   Examines a GUIDed section specified by InputSection. 
     236  Examines a GUIDed section specified by InputSection.
    237237  If GUID for InputSection does not match any of the GUIDs registered through ExtractGuidedSectionRegisterHandlers(),
    238   then RETURN_UNSUPPORTED is returned. 
    239   If the GUID of InputSection does match the GUID that this handler supports, then the the associated handler 
     238  then RETURN_UNSUPPORTED is returned.
     239  If the GUID of InputSection does match the GUID that this handler supports, then the the associated handler
    240240  of type EXTRACT_GUIDED_SECTION_GET_INFO_HANDLER that was registered with ExtractGuidedSectionRegisterHandlers()
    241241  is used to retrieve the OututBufferSize, ScratchSize, and Attributes values. The return status from the handler of
    242242  type EXTRACT_GUIDED_SECTION_GET_INFO_HANDLER is returned.
    243  
     243
    244244  If InputSection is NULL, then ASSERT().
    245245  If OutputBufferSize is NULL, then ASSERT().
     
    268268  OUT       UINT32  *OutputBufferSize,
    269269  OUT       UINT32  *ScratchBufferSize,
    270   OUT       UINT16  *SectionAttribute   
     270  OUT       UINT16  *SectionAttribute
    271271  )
    272272{
     
    274274  EFI_GUID *SectionDefinitionGuid;
    275275
    276   ASSERT (InputSection != NULL); 
     276  ASSERT (InputSection != NULL);
    277277  ASSERT (OutputBufferSize != NULL);
    278278  ASSERT (ScratchBufferSize != NULL);
     
    284284    SectionDefinitionGuid = &(((EFI_GUID_DEFINED_SECTION *) InputSection)->SectionDefinitionGuid);
    285285  }
    286  
     286
    287287  //
    288288  // Search the match registered GetInfo handler for the input guided section.
     
    303303
    304304  //
    305   // Not found, the input guided section is not supported. 
     305  // Not found, the input guided section is not supported.
    306306  //
    307307  return RETURN_UNSUPPORTED;
     
    314314  allocated output buffer.
    315315
    316   Decodes the GUIDed section specified by InputSection. 
     316  Decodes the GUIDed section specified by InputSection.
    317317  If GUID for InputSection does not match any of the GUIDs registered through ExtractGuidedSectionRegisterHandlers(),
    318   then RETURN_UNSUPPORTED is returned. 
     318  then RETURN_UNSUPPORTED is returned.
    319319  If the GUID of InputSection does match the GUID that this handler supports, then the the associated handler
    320320  of type EXTRACT_GUIDED_SECTION_DECODE_HANDLER that was registered with ExtractGuidedSectionRegisterHandlers()
     
    323323  then OutputBuffer is set to point at the data in InputSection.  Otherwise, the decoded data will be placed in caller
    324324  allocated buffer specified by OutputBuffer.    This function is responsible for computing the  EFI_AUTH_STATUS_PLATFORM_OVERRIDE
    325   bit of in AuthenticationStatus.  The return status from the handler of type EXTRACT_GUIDED_SECTION_DECODE_HANDLER is returned. 
    326    
     325  bit of in AuthenticationStatus.  The return status from the handler of type EXTRACT_GUIDED_SECTION_DECODE_HANDLER is returned.
     326
    327327  If InputSection is NULL, then ASSERT().
    328328  If OutputBuffer is NULL, then ASSERT().
    329329  If ScratchBuffer is NULL and this decode operation requires a scratch buffer, then ASSERT().
    330   If AuthenticationStatus is NULL, then ASSERT(). 
     330  If AuthenticationStatus is NULL, then ASSERT().
    331331
    332332  @param[in]  InputSection   A pointer to a GUIDed section of an FFS formatted file.
    333   @param[out] OutputBuffer   A pointer to a buffer that contains the result of a decode operation. 
    334   @param[in]  ScratchBuffer  A caller allocated buffer that may be required by this function as a scratch buffer to perform the decode operation. 
    335   @param[out] AuthenticationStatus 
     333  @param[out] OutputBuffer   A pointer to a buffer that contains the result of a decode operation.
     334  @param[in]  ScratchBuffer  A caller allocated buffer that may be required by this function as a scratch buffer to perform the decode operation.
     335  @param[out] AuthenticationStatus
    336336                             A pointer to the authentication status of the decoded output buffer. See the definition
    337337                             of authentication status in the EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI section of the PI
     
    349349  OUT       VOID    **OutputBuffer,
    350350  IN        VOID    *ScratchBuffer,        OPTIONAL
    351   OUT       UINT32  *AuthenticationStatus 
     351  OUT       UINT32  *AuthenticationStatus
    352352  )
    353353{
    354354  UINT32 Index;
    355355  EFI_GUID *SectionDefinitionGuid;
    356  
     356
    357357  //
    358358  // Check the input parameters
     
    386386
    387387  //
    388   // Not found, the input guided section is not supported. 
     388  // Not found, the input guided section is not supported.
    389389  //
    390390  return RETURN_UNSUPPORTED;
     
    392392
    393393/**
    394   Retrieves handlers of type EXTRACT_GUIDED_SECTION_GET_INFO_HANDLER and 
     394  Retrieves handlers of type EXTRACT_GUIDED_SECTION_GET_INFO_HANDLER and
    395395  EXTRACT_GUIDED_SECTION_DECODE_HANDLER for a specific GUID section type.
    396  
    397   Retrieves the handlers associated with SectionGuid and returns them in 
     396
     397  Retrieves the handlers associated with SectionGuid and returns them in
    398398  GetInfoHandler and DecodeHandler.
    399399
    400   If the GUID value specified by SectionGuid has not been registered, then 
     400  If the GUID value specified by SectionGuid has not been registered, then
    401401  return RETURN_NOT_FOUND.
    402  
     402
    403403  If SectionGuid is NULL, then ASSERT().
    404404
    405   @param[in]  SectionGuid    A pointer to the GUID associated with the handlersof the GUIDed 
     405  @param[in]  SectionGuid    A pointer to the GUID associated with the handlersof the GUIDed
    406406                             section type being retrieved.
    407   @param[out] GetInfoHandler Pointer to a function that examines a GUIDed section and returns 
    408                              the size of the decoded buffer and the size of an optional scratch 
    409                              buffer required to actually decode the data in a GUIDed section. 
    410                              This is an optional parameter that may be NULL. If it is NULL, then 
     407  @param[out] GetInfoHandler Pointer to a function that examines a GUIDed section and returns
     408                             the size of the decoded buffer and the size of an optional scratch
     409                             buffer required to actually decode the data in a GUIDed section.
     410                             This is an optional parameter that may be NULL. If it is NULL, then
    411411                             the previously registered handler is not returned.
    412412  @param[out] DecodeHandler  Pointer to a function that decodes a GUIDed section into a caller
     
    426426  )
    427427{
    428   UINT32 Index; 
     428  UINT32 Index;
    429429
    430430  //
     
    438438  for (Index = 0; Index < mNumberOfExtractHandler; Index ++) {
    439439    if (CompareGuid (&mExtractHandlerGuidTable[Index], SectionGuid)) {
    440      
     440
    441441      //
    442442      // If the guided handler has been registered before, then return the registered handlers.
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.inf

    r58459 r58466  
    2323  MODULE_TYPE                    = DXE_DRIVER
    2424  VERSION_STRING                 = 1.0
    25   LIBRARY_CLASS                  = ExtractGuidedSectionLib|DXE_CORE DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER 
     25  LIBRARY_CLASS                  = ExtractGuidedSectionLib|DXE_CORE DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER
    2626
    2727  CONSTRUCTOR                    = DxeExtractGuidedSectionLibConstructor
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/DxeHobLib/DxeHobLib.inf

    r58459 r58466  
    2424  MODULE_TYPE                    = DXE_DRIVER
    2525  VERSION_STRING                 = 1.0
    26   LIBRARY_CLASS                  = HobLib|DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER SMM_CORE DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER 
     26  LIBRARY_CLASS                  = HobLib|DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER SMM_CORE DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER
    2727  CONSTRUCTOR                    = HobLibConstructor
    2828
     
    4343  DebugLib
    4444  UefiLib
    45    
     45
    4646[Guids]
    4747  gEfiHobListGuid                               ## CONSUMES  ## SystemTable
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/DxeHobLib/HobLib.c

    r58459 r58466  
    2626/**
    2727  The constructor function caches the pointer to HOB list.
    28  
     28
    2929  The constructor function gets the start address of HOB list from system configuration table.
    30   It will ASSERT() if that operation fails and it will always return EFI_SUCCESS. 
     30  It will ASSERT() if that operation fails and it will always return EFI_SUCCESS.
    3131
    3232  @param  ImageHandle   The firmware allocated handle for the EFI image.
    3333  @param  SystemTable   A pointer to the EFI System Table.
    34  
     34
    3535  @retval EFI_SUCCESS   The constructor successfully gets HobList.
    3636  @retval Other value   The constructor can't get HobList.
     
    5757
    5858  This function returns the pointer to first HOB in the list.
    59   For PEI phase, the PEI service GetHobList() can be used to retrieve the pointer 
     59  For PEI phase, the PEI service GetHobList() can be used to retrieve the pointer
    6060  to the HOB list.  For the DXE phase, the HOB list pointer can be retrieved through
    6161  the EFI System Table by looking up theHOB list GUID in the System Configuration Table.
    62   Since the System Configuration Table does not exist that the time the DXE Core is 
    63   launched, the DXE Core uses a global variable from the DXE Core Entry Point Library 
     62  Since the System Configuration Table does not exist that the time the DXE Core is
     63  launched, the DXE Core uses a global variable from the DXE Core Entry Point Library
    6464  to manage the pointer to the HOB list.
    65  
     65
    6666  If the pointer to the HOB list is NULL, then ASSERT().
    67  
     67
    6868  @return The pointer to the HOB list.
    6969
     
    8282  Returns the next instance of a HOB type from the starting HOB.
    8383
    84   This function searches the first instance of a HOB type from the starting HOB pointer. 
     84  This function searches the first instance of a HOB type from the starting HOB pointer.
    8585  If there does not exist such HOB type from the starting HOB pointer, it will return NULL.
    8686  In contrast with macro GET_NEXT_HOB(), this function does not skip the starting HOB pointer
    8787  unconditionally: it returns HobStart back if HobStart itself meets the requirement;
    8888  caller is required to use GET_NEXT_HOB() if it wishes to skip current HobStart.
    89  
     89
    9090  If HobStart is NULL, then ASSERT().
    9191
     
    106106
    107107  ASSERT (HobStart != NULL);
    108    
     108
    109109  Hob.Raw = (UINT8 *) HobStart;
    110110  //
     
    123123  Returns the first instance of a HOB type among the whole HOB list.
    124124
    125   This function searches the first instance of a HOB type among the whole HOB list. 
    126   If there does not exist such HOB type in the HOB list, it will return NULL. 
    127  
     125  This function searches the first instance of a HOB type among the whole HOB list.
     126  If there does not exist such HOB type in the HOB list, it will return NULL.
     127
    128128  If the pointer to the HOB list is NULL, then ASSERT().
    129129
     
    147147/**
    148148  Returns the next instance of the matched GUID HOB from the starting HOB.
    149  
    150   This function searches the first instance of a HOB from the starting HOB pointer. 
    151   Such HOB should satisfy two conditions: 
    152   its HOB type is EFI_HOB_TYPE_GUID_EXTENSION and its GUID Name equals to the input Guid. 
    153   If there does not exist such HOB from the starting HOB pointer, it will return NULL. 
     149
     150  This function searches the first instance of a HOB from the starting HOB pointer.
     151  Such HOB should satisfy two conditions:
     152  its HOB type is EFI_HOB_TYPE_GUID_EXTENSION and its GUID Name equals to the input Guid.
     153  If there does not exist such HOB from the starting HOB pointer, it will return NULL.
    154154  Caller is required to apply GET_GUID_HOB_DATA () and GET_GUID_HOB_DATA_SIZE ()
    155155  to extract the data section and its size information, respectively.
     
    157157  unconditionally: it returns HobStart back if HobStart itself meets the requirement;
    158158  caller is required to use GET_NEXT_HOB() if it wishes to skip current HobStart.
    159  
     159
    160160  If Guid is NULL, then ASSERT().
    161161  If HobStart is NULL, then ASSERT().
     
    188188/**
    189189  Returns the first instance of the matched GUID HOB among the whole HOB list.
    190  
    191   This function searches the first instance of a HOB among the whole HOB list. 
     190
     191  This function searches the first instance of a HOB among the whole HOB list.
    192192  Such HOB should satisfy two conditions:
    193193  its HOB type is EFI_HOB_TYPE_GUID_EXTENSION and its GUID Name equals to the input Guid.
     
    195195  Caller is required to apply GET_GUID_HOB_DATA () and GET_GUID_HOB_DATA_SIZE ()
    196196  to extract the data section and its size information, respectively.
    197  
     197
    198198  If the pointer to the HOB list is NULL, then ASSERT().
    199199  If Guid is NULL, then ASSERT().
     
    219219  Get the system boot mode from the HOB list.
    220220
    221   This function returns the system boot mode information from the 
     221  This function returns the system boot mode information from the
    222222  PHIT HOB in HOB list.
    223223
    224224  If the pointer to the HOB list is NULL, then ASSERT().
    225  
     225
    226226  @param  VOID
    227227
     
    248248  It can only be invoked during PEI phase;
    249249  for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.
    250  
     250
    251251  If ModuleName is NULL, then ASSERT().
    252252  If there is no additional space for HOB creation, then ASSERT().
     
    279279  It can only be invoked during PEI phase;
    280280  for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.
    281  
     281
    282282  If there is no additional space for HOB creation, then ASSERT().
    283283
     
    311311  It can only be invoked during PEI phase;
    312312  for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.
    313  
     313
    314314  If there is no additional space for HOB creation, then ASSERT().
    315315
     
    336336
    337337/**
    338   Builds a customized HOB tagged with a GUID for identification and returns 
     338  Builds a customized HOB tagged with a GUID for identification and returns
    339339  the start address of GUID HOB data.
    340340
    341   This function builds a customized HOB tagged with a GUID for identification 
    342   and returns the start address of GUID HOB data so that caller can fill the customized data. 
     341  This function builds a customized HOB tagged with a GUID for identification
     342  and returns the start address of GUID HOB data so that caller can fill the customized data.
    343343  The HOB Header and Name field is already stripped.
    344344  It can only be invoked during PEI phase;
    345345  for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.
    346  
     346
    347347  If Guid is NULL, then ASSERT().
    348348  If there is no additional space for HOB creation, then ASSERT().
     
    372372
    373373/**
    374   Builds a customized HOB tagged with a GUID for identification, copies the input data to the HOB 
     374  Builds a customized HOB tagged with a GUID for identification, copies the input data to the HOB
    375375  data field, and returns the start address of the GUID HOB data.
    376376
    377377  This function builds a customized HOB tagged with a GUID for identification and copies the input
    378   data to the HOB data field and returns the start address of the GUID HOB data.  It can only be 
    379   invoked during PEI phase; for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase. 
     378  data to the HOB data field and returns the start address of the GUID HOB data.  It can only be
     379  invoked during PEI phase; for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.
    380380  The HOB Header and Name field is already stripped.
    381381  It can only be invoked during PEI phase;
    382382  for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.
    383  
     383
    384384  If Guid is NULL, then ASSERT().
    385385  If Data is NULL and DataLength > 0, then ASSERT().
     
    417417  It can only be invoked during PEI phase;
    418418  for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.
    419  
     419
    420420  If there is no additional space for HOB creation, then ASSERT().
    421421
     
    443443  It can only be invoked during PEI phase;
    444444  for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.
    445  
     445
    446446  If there is no additional space for HOB creation, then ASSERT().
    447447
     
    450450  @param  FvName        The name of the Firmware Volume.
    451451  @param  FileName      The name of the file.
    452  
     452
    453453**/
    454454VOID
     
    471471  It can only be invoked during PEI phase;
    472472  for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.
    473  
     473
    474474  If the platform does not support Capsule Volume HOBs, then ASSERT().
    475475  If there is no additional space for HOB creation, then ASSERT().
     
    498498  It can only be invoked during PEI phase;
    499499  for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.
    500  
     500
    501501  If there is no additional space for HOB creation, then ASSERT().
    502502
     
    524524  It can only be invoked during PEI phase;
    525525  for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.
    526  
     526
    527527  If there is no additional space for HOB creation, then ASSERT().
    528528
     
    550550  It can only be invoked during PEI phase;
    551551  for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.
    552  
     552
    553553  If there is no additional space for HOB creation, then ASSERT().
    554554
     
    578578  It can only be invoked during PEI phase;
    579579  for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.
    580  
     580
    581581  If there is no additional space for HOB creation, then ASSERT().
    582582
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/DxeHstiLib/HstiAip.c

    r58464 r58466  
    1919  This function returns information of type InformationType from the adapter.
    2020  If an adapter does not support the requested informational type, then
    21   EFI_UNSUPPORTED is returned. 
     21  EFI_UNSUPPORTED is returned.
    2222
    2323  @param[in]  This                   A pointer to the EFI_ADAPTER_INFORMATION_PROTOCOL instance.
     
    3131  @retval EFI_DEVICE_ERROR           The device reported an error.
    3232  @retval EFI_OUT_OF_RESOURCES       The request could not be completed due to a lack of resources.
    33   @retval EFI_INVALID_PARAMETER      This is NULL. 
    34   @retval EFI_INVALID_PARAMETER      InformationBlock is NULL. 
     33  @retval EFI_INVALID_PARAMETER      This is NULL.
     34  @retval EFI_INVALID_PARAMETER      InformationBlock is NULL.
    3535  @retval EFI_INVALID_PARAMETER      InformationBlockSize is NULL.
    3636
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/DxeHstiLib/HstiDxe.c

    r58464 r58466  
    116116
    117117    Hsti = InformationBlock;
    118     if ((Hsti->Role == Role) && 
     118    if ((Hsti->Role == Role) &&
    119119        ((ImplementationID == NULL) || (StrCmp (ImplementationID, Hsti->ImplementationID) == 0))) {
    120120      break;
     
    312312  HstiAip->HstiSize = HstiSize;
    313313  HstiAip->HstiMaxSize = HstiSize;
    314  
     314
    315315  Handle = NULL;
    316316  Status = gBS->InstallMultipleProtocolInterfaces (
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/DxeIoLibCpuIo2/DxeCpuIo2LibInternal.h

    r48674 r58466  
    11/** @file
    22  Internal include file of DXE CPU IO2 Library.
    3  
     3
    44  Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>
    55  This program and the accompanying materials are licensed and made available
     
    102102  @param  Width         The width of the I/O operation.
    103103  @param  Data          The value to write to the I/O port.
    104  
     104
    105105  @return Data read from registers in the EFI system memory space.
    106106
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/DxeIoLibCpuIo2/DxeIoLibCpuIo2.inf

    r58459 r58466  
    66# Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR>
    77# This program and the accompanying materials are licensed and made available
    8 # under the terms and conditions of the BSD License which accompanies this 
     8# under the terms and conditions of the BSD License which accompanies this
    99# distribution. The full text of the license may be found at
    1010# http://opensource.org/licenses/bsd-license.php.
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/DxeIoLibCpuIo2/IoLib.c

    r48674 r58466  
    11/** @file
    22  I/O Library instance based on EFI_CPU_IO2_PROTOCOL.
    3  
     3
    44  Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>
    55  This program and the accompanying materials are licensed and made available
     
    149149  @param  Width         The width of the I/O operation.
    150150  @param  Data          The value to write to the I/O port.
    151  
     151
    152152  @return Data read from registers in the EFI system memory space.
    153153
     
    225225
    226226  If Port is not aligned on a 16-bit boundary, then ASSERT().
    227  
     227
    228228  If 16-bit I/O port operations are not supported, then ASSERT().
    229229
     
    283283  This function must guarantee that all I/O read and write operations are
    284284  serialized.
    285  
     285
    286286  If Port is not aligned on a 32-bit boundary, then ASSERT().
    287287
     
    374374
    375375  If Port is not aligned on a 64-bit boundary, then ASSERT().
    376  
     376
    377377  If 64-bit I/O port operations are not supported, then ASSERT().
    378378
     
    451451
    452452  If Address is not aligned on a 16-bit boundary, then ASSERT().
    453  
     453
    454454  If 16-bit MMIO register operations are not supported, then ASSERT().
    455455
     
    480480
    481481  If Address is not aligned on a 16-bit boundary, then ASSERT().
    482  
     482
    483483  If 16-bit MMIO register operations are not supported, then ASSERT().
    484484
     
    509509
    510510  If Address is not aligned on a 32-bit boundary, then ASSERT().
    511  
     511
    512512  If 32-bit MMIO register operations are not supported, then ASSERT().
    513513
     
    538538
    539539  If Address is not aligned on a 32-bit boundary, then ASSERT().
    540  
     540
    541541  If 32-bit MMIO register operations are not supported, then ASSERT().
    542542
     
    567567
    568568  If Address is not aligned on a 64-bit boundary, then ASSERT().
    569  
     569
    570570  If 64-bit MMIO register operations are not supported, then ASSERT().
    571571
     
    596596
    597597  If Address is not aligned on a 64-bit boundary, then ASSERT().
    598  
     598
    599599  If 64-bit MMIO register operations are not supported, then ASSERT().
    600600
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/DxeIoLibCpuIo2/IoLibMmioBuffer.c

    r48674 r58466  
    6868
    6969  If Length is not aligned on a 16-bit boundary, then ASSERT().
    70  
     70
    7171  If Buffer is not aligned on a 16-bit boundary, then ASSERT().
    7272
     
    171171
    172172  If Length is not aligned on a 64-bit boundary, then ASSERT().
    173  
     173
    174174  If Buffer is not aligned on a 64-bit boundary, then ASSERT().
    175175
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/DxeIoLibEsal/DxeIoLibEsal.inf

    r58459 r58466  
    77# Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
    88# This program and the accompanying materials are licensed and made available
    9 # under the terms and conditions of the BSD License which accompanies this 
     9# under the terms and conditions of the BSD License which accompanies this
    1010# distribution. The full text of the license may be found at
    1111# http://opensource.org/licenses/bsd-license.php.
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/DxeIoLibEsal/DxeIoLibEsalInternal.h

    r48674 r58466  
    11/** @file
    22  Internal include file for the I/O Library using ESAL services.
    3  
     3
    44  Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
    55  This program and the accompanying materials are licensed and made available
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/DxeIoLibEsal/IoLib.c

    r48674 r58466  
    4444                EFI_EXTENDED_SAL_BASE_IO_SERVICES_PROTOCOL_GUID_LO,
    4545                EFI_EXTENDED_SAL_BASE_IO_SERVICES_PROTOCOL_GUID_HI,
    46                 IoReadFunctionId, 
    47                 (UINT64)Width, 
    48                 Port, 
    49                 1, 
    50                 (UINT64)&Data, 
    51                 0, 
    52                 0, 
     46                IoReadFunctionId,
     47                (UINT64)Width,
     48                Port,
     49                1,
     50                (UINT64)&Data,
     51                0,
     52                0,
    5353                0
    5454                );
     
    8585                EFI_EXTENDED_SAL_BASE_IO_SERVICES_PROTOCOL_GUID_LO,
    8686                EFI_EXTENDED_SAL_BASE_IO_SERVICES_PROTOCOL_GUID_HI,
    87                 IoWriteFunctionId, 
    88                 (UINT64)Width, 
    89                 Port, 
    90                 1, 
    91                 (UINT64)&Data, 
    92                 0, 
    93                 0, 
     87                IoWriteFunctionId,
     88                (UINT64)Width,
     89                Port,
     90                1,
     91                (UINT64)&Data,
     92                0,
     93                0,
    9494                0
    9595                );
     
    127127                EFI_EXTENDED_SAL_BASE_IO_SERVICES_PROTOCOL_GUID_LO,
    128128                EFI_EXTENDED_SAL_BASE_IO_SERVICES_PROTOCOL_GUID_HI,
    129                 MemReadFunctionId, 
    130                 (UINT64)Width, 
    131                 Address, 
    132                 1, 
    133                 (UINT64)&Data, 
    134                 0, 
    135                 0, 
     129                MemReadFunctionId,
     130                (UINT64)Width,
     131                Address,
     132                1,
     133                (UINT64)&Data,
     134                0,
     135                0,
    136136                0
    137137                );
     
    168168                EFI_EXTENDED_SAL_BASE_IO_SERVICES_PROTOCOL_GUID_LO,
    169169                EFI_EXTENDED_SAL_BASE_IO_SERVICES_PROTOCOL_GUID_HI,
    170                 MemWriteFunctionId, 
    171                 (UINT64)Width, 
    172                 Address, 
    173                 1, 
    174                 (UINT64)&Data, 
    175                 0, 
    176                 0, 
     170                MemWriteFunctionId,
     171                (UINT64)Width,
     172                Address,
     173                1,
     174                (UINT64)&Data,
     175                0,
     176                0,
    177177                0
    178178                );
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/DxeIoLibEsal/IoLibMmioBuffer.c

    r48674 r58466  
    1818  Copy data from MMIO region to system memory by using 8-bit access.
    1919
    20   Copy data from MMIO region specified by starting address StartAddress 
    21   to system memory specified by Buffer by using 8-bit access. The total 
     20  Copy data from MMIO region specified by starting address StartAddress
     21  to system memory specified by Buffer by using 8-bit access. The total
    2222  number of byte to be copied is specified by Length. Buffer is returned.
    23  
    24   If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT(). 
     23
     24  If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
    2525  If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
    2626
     
    4545  ASSERT ((Length - 1) <=  (MAX_ADDRESS - StartAddress));
    4646  ASSERT ((Length - 1) <=  (MAX_ADDRESS - (UINTN) Buffer));
    47  
     47
    4848  ReturnBuffer = Buffer;
    49  
     49
    5050  while (Length-- > 0) {
    5151    *(Buffer++) = MmioRead8 (StartAddress++);
     
    5858  Copy data from MMIO region to system memory by using 16-bit access.
    5959
    60   Copy data from MMIO region specified by starting address StartAddress 
    61   to system memory specified by Buffer by using 16-bit access. The total 
     60  Copy data from MMIO region specified by starting address StartAddress
     61  to system memory specified by Buffer by using 16-bit access. The total
    6262  number of byte to be copied is specified by Length. Buffer is returned.
    63  
     63
    6464  If StartAddress is not aligned on a 16-bit boundary, then ASSERT().
    6565
    66   If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT(). 
     66  If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
    6767  If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
    6868
     
    8888
    8989  ASSERT ((StartAddress & (sizeof (UINT16) - 1)) == 0);
    90  
     90
    9191  ASSERT ((Length - 1) <=  (MAX_ADDRESS - StartAddress));
    9292  ASSERT ((Length - 1) <=  (MAX_ADDRESS - (UINTN) Buffer));
     
    9494  ASSERT ((Length & (sizeof (UINT16) - 1)) == 0);
    9595  ASSERT (((UINTN) Buffer & (sizeof (UINT16) - 1)) == 0);
    96  
     96
    9797  ReturnBuffer = Buffer;
    98  
     98
    9999  while (Length > 0) {
    100100    *(Buffer++) = MmioRead16 (StartAddress);
     
    109109  Copy data from MMIO region to system memory by using 32-bit access.
    110110
    111   Copy data from MMIO region specified by starting address StartAddress 
    112   to system memory specified by Buffer by using 32-bit access. The total 
     111  Copy data from MMIO region specified by starting address StartAddress
     112  to system memory specified by Buffer by using 32-bit access. The total
    113113  number of byte to be copied is specified by Length. Buffer is returned.
    114  
     114
    115115  If StartAddress is not aligned on a 32-bit boundary, then ASSERT().
    116116
    117   If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT(). 
     117  If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
    118118  If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
    119119
     
    139139
    140140  ASSERT ((StartAddress & (sizeof (UINT32) - 1)) == 0);
    141  
     141
    142142  ASSERT ((Length - 1) <=  (MAX_ADDRESS - StartAddress));
    143143  ASSERT ((Length - 1) <=  (MAX_ADDRESS - (UINTN) Buffer));
     
    145145  ASSERT ((Length & (sizeof (UINT32) - 1)) == 0);
    146146  ASSERT (((UINTN) Buffer & (sizeof (UINT32) - 1)) == 0);
    147  
     147
    148148  ReturnBuffer = Buffer;
    149  
     149
    150150  while (Length > 0) {
    151151    *(Buffer++) = MmioRead32 (StartAddress);
     
    160160  Copy data from MMIO region to system memory by using 64-bit access.
    161161
    162   Copy data from MMIO region specified by starting address StartAddress 
    163   to system memory specified by Buffer by using 64-bit access. The total 
     162  Copy data from MMIO region specified by starting address StartAddress
     163  to system memory specified by Buffer by using 64-bit access. The total
    164164  number of byte to be copied is specified by Length. Buffer is returned.
    165  
     165
    166166  If StartAddress is not aligned on a 64-bit boundary, then ASSERT().
    167167
    168   If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT(). 
     168  If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
    169169  If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
    170170
     
    190190
    191191  ASSERT ((StartAddress & (sizeof (UINT64) - 1)) == 0);
    192  
     192
    193193  ASSERT ((Length - 1) <=  (MAX_ADDRESS - StartAddress));
    194194  ASSERT ((Length - 1) <=  (MAX_ADDRESS - (UINTN) Buffer));
     
    196196  ASSERT ((Length & (sizeof (UINT64) - 1)) == 0);
    197197  ASSERT (((UINTN) Buffer & (sizeof (UINT64) - 1)) == 0);
    198  
     198
    199199  ReturnBuffer = Buffer;
    200  
     200
    201201  while (Length > 0) {
    202202    *(Buffer++) = MmioRead64 (StartAddress);
     
    212212  Copy data from system memory to MMIO region by using 8-bit access.
    213213
    214   Copy data from system memory specified by Buffer to MMIO region specified 
    215   by starting address StartAddress by using 8-bit access. The total number 
     214  Copy data from system memory specified by Buffer to MMIO region specified
     215  by starting address StartAddress by using 8-bit access. The total number
    216216  of byte to be copied is specified by Length. Buffer is returned.
    217  
    218   If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT(). 
     217
     218  If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
    219219  If Length is greater than (MAX_ADDRESS -Buffer + 1), then ASSERT().
    220220
     
    239239  ASSERT ((Length - 1) <=  (MAX_ADDRESS - StartAddress));
    240240  ASSERT ((Length - 1) <=  (MAX_ADDRESS - (UINTN) Buffer));
    241  
     241
    242242  ReturnBuffer = (UINT8 *) Buffer;
    243  
     243
    244244  while (Length-- > 0) {
    245245     MmioWrite8 (StartAddress++, *(Buffer++));
     
    247247
    248248  return ReturnBuffer;
    249  
     249
    250250}
    251251
     
    253253  Copy data from system memory to MMIO region by using 16-bit access.
    254254
    255   Copy data from system memory specified by Buffer to MMIO region specified 
    256   by starting address StartAddress by using 16-bit access. The total number 
     255  Copy data from system memory specified by Buffer to MMIO region specified
     256  by starting address StartAddress by using 16-bit access. The total number
    257257  of byte to be copied is specified by Length. Buffer is returned.
    258  
     258
    259259  If StartAddress is not aligned on a 16-bit boundary, then ASSERT().
    260260
    261   If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT(). 
     261  If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
    262262  If Length is greater than (MAX_ADDRESS -Buffer + 1), then ASSERT().
    263263
     
    284284
    285285  ASSERT ((StartAddress & (sizeof (UINT16) - 1)) == 0);
    286  
     286
    287287  ASSERT ((Length - 1) <=  (MAX_ADDRESS - StartAddress));
    288288  ASSERT ((Length - 1) <=  (MAX_ADDRESS - (UINTN) Buffer));
     
    292292
    293293  ReturnBuffer = (UINT16 *) Buffer;
    294  
     294
    295295  while (Length > 0) {
    296296    MmioWrite16 (StartAddress, *(Buffer++));
    297    
     297
    298298    StartAddress += sizeof (UINT16);
    299299    Length -= sizeof (UINT16);
     
    307307  Copy data from system memory to MMIO region by using 32-bit access.
    308308
    309   Copy data from system memory specified by Buffer to MMIO region specified 
    310   by starting address StartAddress by using 32-bit access. The total number 
     309  Copy data from system memory specified by Buffer to MMIO region specified
     310  by starting address StartAddress by using 32-bit access. The total number
    311311  of byte to be copied is specified by Length. Buffer is returned.
    312  
     312
    313313  If StartAddress is not aligned on a 32-bit boundary, then ASSERT().
    314314
    315   If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT(). 
     315  If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
    316316  If Length is greater than (MAX_ADDRESS -Buffer + 1), then ASSERT().
    317317
     
    338338
    339339  ASSERT ((StartAddress & (sizeof (UINT32) - 1)) == 0);
    340  
     340
    341341  ASSERT ((Length - 1) <=  (MAX_ADDRESS - StartAddress));
    342342  ASSERT ((Length - 1) <=  (MAX_ADDRESS - (UINTN) Buffer));
     
    346346
    347347  ReturnBuffer = (UINT32 *) Buffer;
    348  
     348
    349349  while (Length > 0) {
    350350    MmioWrite32 (StartAddress, *(Buffer++));
    351    
     351
    352352    StartAddress += sizeof (UINT32);
    353353    Length -= sizeof (UINT32);
     
    360360  Copy data from system memory to MMIO region by using 64-bit access.
    361361
    362   Copy data from system memory specified by Buffer to MMIO region specified 
    363   by starting address StartAddress by using 64-bit access. The total number 
     362  Copy data from system memory specified by Buffer to MMIO region specified
     363  by starting address StartAddress by using 64-bit access. The total number
    364364  of byte to be copied is specified by Length. Buffer is returned.
    365  
     365
    366366  If StartAddress is not aligned on a 64-bit boundary, then ASSERT().
    367367
    368   If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT(). 
     368  If Length is greater than (MAX_ADDRESS - StartAddress + 1), then ASSERT().
    369369  If Length is greater than (MAX_ADDRESS -Buffer + 1), then ASSERT().
    370370
     
    391391
    392392  ASSERT ((StartAddress & (sizeof (UINT64) - 1)) == 0);
    393  
     393
    394394  ASSERT ((Length - 1) <=  (MAX_ADDRESS - StartAddress));
    395395  ASSERT ((Length - 1) <=  (MAX_ADDRESS - (UINTN) Buffer));
     
    399399
    400400  ReturnBuffer = (UINT64 *) Buffer;
    401  
     401
    402402  while (Length > 0) {
    403403    MmioWrite64 (StartAddress, *(Buffer++));
    404    
     404
    405405    StartAddress += sizeof (UINT64);
    406406    Length -= sizeof (UINT64);
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/DxePalLibEsal/DxePalLibEsal.c

    r48674 r58466  
    6060                EFI_EXTENDED_SAL_PAL_SERVICES_PROTOCOL_GUID_LO,
    6161                EFI_EXTENDED_SAL_PAL_SERVICES_PROTOCOL_GUID_HI,
    62                 PalProcFunctionId, 
    63                 Index, 
    64                 Arg2, 
    65                 Arg3, 
    66                 Arg4, 
    67                 0, 
    68                 0, 
     62                PalProcFunctionId,
     63                Index,
     64                Arg2,
     65                Arg3,
     66                Arg4,
     67                0,
     68                0,
    6969                0
    7070                );
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/DxePalLibEsal/DxePalLibEsal.inf

    r58459 r58466  
    2020  MODULE_TYPE                    = DXE_DRIVER
    2121  VERSION_STRING                 = 1.0
    22   LIBRARY_CLASS                  = PalLib|DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SMM_DRIVER DXE_SAL_DRIVER UEFI_DRIVER UEFI_APPLICATION 
     22  LIBRARY_CLASS                  = PalLib|DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SMM_DRIVER DXE_SAL_DRIVER UEFI_DRIVER UEFI_APPLICATION
    2323
    2424#
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/DxePcdLib/DxePcdLib.c

    r58459 r58466  
    33
    44Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
    5 This program and the accompanying materials                         
    6 are licensed and made available under the terms and conditions of the BSD License         
    7 which accompanies this distribution.  The full text of the license may be found at       
    8 http://opensource.org/licenses/bsd-license.php                                           
    9                                                                                          
    10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     
    11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             
     5This program and the accompanying materials
     6are licensed and made available under the terms and conditions of the BSD License
     7which accompanies this distribution.  The full text of the license may be found at
     8http://opensource.org/licenses/bsd-license.php
     9
     10THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
     11WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
    1212
    1313
     
    4747  if (mPiPcd == NULL) {
    4848    //
    49     // PI Pcd protocol defined in PI 1.2 vol3 should be installed before the module 
     49    // PI Pcd protocol defined in PI 1.2 vol3 should be installed before the module
    5050    // access DynamicEx type PCD.
    5151    //
     
    7474    // PCD protocol need to be installed before the module access Dynamic type PCD.
    7575    // But dynamic type PCD is not required in PI 1.2 specification.
    76     // 
     76    //
    7777    Status = gBS->LocateProtocol (&gPcdProtocolGuid, NULL, (VOID **)&mPcd);
    7878    ASSERT_EFI_ERROR (Status);
     
    110110GetPcdInfoProtocolPointer (
    111111  VOID
    112   ) 
     112  )
    113113{
    114114  EFI_STATUS  Status;
     
    126126
    127127  Sets the current SKU in the PCD database to the value specified by SkuId.  SkuId is returned.
    128   If SkuId >= PCD_MAX_SKU_ID, then ASSERT(). 
     128  If SkuId >= PCD_MAX_SKU_ID, then ASSERT().
    129129
    130130  @param  SkuId   The SKU value that will be used when the PCD service retrieves and sets values
     
    151151/**
    152152  This function provides a means by which to retrieve a value for a given PCD token.
    153  
    154   Returns the 8-bit value for the token specified by TokenNumber. 
     153
     154  Returns the 8-bit value for the token specified by TokenNumber.
    155155
    156156  @param[in]  TokenNumber The PCD token number to retrieve a current value for.
    157157
    158   @return Returns the 8-bit value for the token specified by TokenNumber. 
     158  @return Returns the 8-bit value for the token specified by TokenNumber.
    159159
    160160**/
     
    172172/**
    173173  This function provides a means by which to retrieve a value for a given PCD token.
    174  
    175   Returns the 16-bit value for the token specified by TokenNumber. 
     174
     175  Returns the 16-bit value for the token specified by TokenNumber.
    176176
    177177  @param[in]  TokenNumber The PCD token number to retrieve a current value for.
    178178
    179   @return Returns the 16-bit value for the token specified by TokenNumber. 
     179  @return Returns the 16-bit value for the token specified by TokenNumber.
    180180
    181181**/
     
    193193/**
    194194  This function provides a means by which to retrieve a value for a given PCD token.
    195  
    196   Returns the 32-bit value for the token specified by TokenNumber. 
     195
     196  Returns the 32-bit value for the token specified by TokenNumber.
    197197
    198198  @param[in]  TokenNumber The PCD token number to retrieve a current value for.
     
    214214/**
    215215  This function provides a means by which to retrieve a value for a given PCD token.
    216  
     216
    217217  Returns the 64-bit value for the token specified by TokenNumber.
    218218
     
    235235/**
    236236  This function provides a means by which to retrieve a value for a given PCD token.
    237  
     237
    238238  Returns the pointer to the buffer of the token specified by TokenNumber.
    239239
     
    256256/**
    257257  This function provides a means by which to retrieve a value for a given PCD token.
    258  
    259   Returns the Boolean value of the token specified by TokenNumber. 
     258
     259  Returns the Boolean value of the token specified by TokenNumber.
    260260
    261261  @param[in]  TokenNumber The PCD token number to retrieve a current value for.
    262262
    263   @return Returns the Boolean value of the token specified by TokenNumber. 
    264 
    265 **/
    266 BOOLEAN 
     263  @return Returns the Boolean value of the token specified by TokenNumber.
     264
     265**/
     266BOOLEAN
    267267EFIAPI
    268268LibPcdGetBool (
     
    280280  @param[in]  TokenNumber The PCD token number to retrieve a current value for.
    281281
    282   @return Returns the size of the token specified by TokenNumber. 
     282  @return Returns the size of the token specified by TokenNumber.
    283283
    284284**/
     
    296296/**
    297297  This function provides a means by which to retrieve a value for a given PCD token.
    298  
     298
    299299  Returns the 8-bit value for the token specified by TokenNumber and Guid.
    300  
    301   If Guid is NULL, then ASSERT(). 
    302 
    303   @param[in]  Guid         The pointer to a 128-bit unique value that designates 
     300
     301  If Guid is NULL, then ASSERT().
     302
     303  @param[in]  Guid         The pointer to a 128-bit unique value that designates
    304304                           which namespace to retrieve a value from.
    305305  @param[in]  TokenNumber  The PCD token number to retrieve a current value for.
     
    316316{
    317317  ASSERT (Guid != NULL);
    318  
     318
    319319  return GetPiPcdProtocol()->Get8 (Guid, TokenNumber);
    320320}
     
    325325
    326326  Returns the 16-bit value for the token specified by TokenNumber and Guid.
    327  
    328   If Guid is NULL, then ASSERT(). 
    329 
    330   @param[in]  Guid         The pointer to a 128-bit unique value that designates 
     327
     328  If Guid is NULL, then ASSERT().
     329
     330  @param[in]  Guid         The pointer to a 128-bit unique value that designates
    331331                           which namespace to retrieve a value from.
    332332  @param[in]  TokenNumber  The PCD token number to retrieve a current value for.
     
    350350/**
    351351  Returns the 32-bit value for the token specified by TokenNumber and Guid.
    352   If Guid is NULL, then ASSERT(). 
    353 
    354   @param[in]  Guid         The pointer to a 128-bit unique value that designates 
     352  If Guid is NULL, then ASSERT().
     353
     354  @param[in]  Guid         The pointer to a 128-bit unique value that designates
    355355                           which namespace to retrieve a value from.
    356356  @param[in]  TokenNumber  The PCD token number to retrieve a current value for.
     
    375375/**
    376376  This function provides a means by which to retrieve a value for a given PCD token.
    377  
     377
    378378  Returns the 64-bit value for the token specified by TokenNumber and Guid.
    379  
    380   If Guid is NULL, then ASSERT(). 
    381 
    382   @param[in]  Guid          The pointer to a 128-bit unique value that designates 
     379
     380  If Guid is NULL, then ASSERT().
     381
     382  @param[in]  Guid          The pointer to a 128-bit unique value that designates
    383383                            which namespace to retrieve a value from.
    384384  @param[in]  TokenNumber   The PCD token number to retrieve a current value for.
     
    395395{
    396396  ASSERT (Guid != NULL);
    397  
     397
    398398  return GetPiPcdProtocol()->Get64 (Guid, TokenNumber);
    399399}
     
    403403/**
    404404  This function provides a means by which to retrieve a value for a given PCD token.
    405  
     405
    406406  Returns the pointer to the buffer of token specified by TokenNumber and Guid.
    407  
    408   If Guid is NULL, then ASSERT(). 
    409 
    410   @param[in]  Guid          The pointer to a 128-bit unique value that designates 
     407
     408  If Guid is NULL, then ASSERT().
     409
     410  @param[in]  Guid          The pointer to a 128-bit unique value that designates
    411411                            which namespace to retrieve a value from.
    412412  @param[in]  TokenNumber   The PCD token number to retrieve a current value for.
     
    431431/**
    432432  This function provides a means by which to retrieve a value for a given PCD token.
    433  
    434   Returns the Boolean value of the token specified by TokenNumber and Guid. 
    435  
    436   If Guid is NULL, then ASSERT(). 
    437 
    438   @param[in]  Guid          The pointer to a 128-bit unique value that designates 
     433
     434  Returns the Boolean value of the token specified by TokenNumber and Guid.
     435
     436  If Guid is NULL, then ASSERT().
     437
     438  @param[in]  Guid          The pointer to a 128-bit unique value that designates
    439439                            which namespace to retrieve a value from.
    440440  @param[in]  TokenNumber   The PCD token number to retrieve a current value for.
     
    459459/**
    460460  This function provides a means by which to retrieve the size of a given PCD token.
    461  
    462   Returns the size of the token specified by TokenNumber and Guid. 
    463  
    464   If Guid is NULL, then ASSERT(). 
    465 
    466   @param[in]  Guid          The pointer to a 128-bit unique value that designates 
     461
     462  Returns the size of the token specified by TokenNumber and Guid.
     463
     464  If Guid is NULL, then ASSERT().
     465
     466  @param[in]  Guid          The pointer to a 128-bit unique value that designates
    467467                            which namespace to retrieve a value from.
    468468  @param[in]  TokenNumber   The PCD token number to retrieve a current value for.
     
    487487/**
    488488  This function provides a means by which to set a value for a given PCD token.
    489  
    490   Sets the 8-bit value for the token specified by TokenNumber 
     489
     490  Sets the 8-bit value for the token specified by TokenNumber
    491491  to the value specified by Value.  Value is returned.
    492492
     
    510510  Status = GetPcdProtocol()->Set8 (TokenNumber, Value);
    511511  ASSERT_EFI_ERROR (Status);
    512  
     512
    513513  return Value;
    514514}
     
    518518/**
    519519  This function provides a means by which to set a value for a given PCD token.
    520  
    521   Sets the 16-bit value for the token specified by TokenNumber 
     520
     521  Sets the 16-bit value for the token specified by TokenNumber
    522522  to the value specified by Value.  Value is returned.
    523523
     
    541541  Status = GetPcdProtocol()->Set16 (TokenNumber, Value);
    542542  ASSERT_EFI_ERROR (Status);
    543  
     543
    544544  return Value;
    545545}
     
    549549/**
    550550  This function provides a means by which to set a value for a given PCD token.
    551  
    552   Sets the 32-bit value for the token specified by TokenNumber 
     551
     552  Sets the 32-bit value for the token specified by TokenNumber
    553553  to the value specified by Value.  Value is returned.
    554554
     
    569569{
    570570  EFI_STATUS Status;
    571  
     571
    572572  Status = GetPcdProtocol()->Set32 (TokenNumber, Value);
    573573  ASSERT_EFI_ERROR (Status);
     
    580580/**
    581581  This function provides a means by which to set a value for a given PCD token.
    582  
    583   Sets the 64-bit value for the token specified by TokenNumber 
     582
     583  Sets the 64-bit value for the token specified by TokenNumber
    584584  to the value specified by Value.  Value is returned.
    585585
    586586  If the set operation was not correctly performed, then ASSERT().
    587  
     587
    588588  @param[in]  TokenNumber   The PCD token number to set a current value for.
    589589  @param[in]  Value         The 64-bit value to set.
     
    611611/**
    612612  This function provides a means by which to set a value for a given PCD token.
    613  
    614   Sets a buffer for the token specified by TokenNumber to the value 
    615   specified by Buffer and SizeOfBuffer.  Buffer is returned. 
    616   If SizeOfBuffer is greater than the maximum size support by TokenNumber, 
    617   then set SizeOfBuffer to the maximum size supported by TokenNumber and 
     613
     614  Sets a buffer for the token specified by TokenNumber to the value
     615  specified by Buffer and SizeOfBuffer.  Buffer is returned.
     616  If SizeOfBuffer is greater than the maximum size support by TokenNumber,
     617  then set SizeOfBuffer to the maximum size supported by TokenNumber and
    618618  return NULL to indicate that the set operation was not actually performed,
    619619  or ASSERT() if the set operation was not correctly performed.
    620620
    621   If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to the 
     621  If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to the
    622622  maximum size supported by TokenName and NULL must be returned.
    623  
     623
    624624  If SizeOfBuffer is NULL, then ASSERT().
    625625  If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
    626  
     626
    627627  @param[in]      TokenNumber   The PCD token number to set a current value for.
    628628  @param[in, out] SizeOfBuffer  The size, in bytes, of Buffer.
     
    663663/**
    664664  This function provides a means by which to set a value for a given PCD token.
    665  
    666   Sets the Boolean value for the token specified by TokenNumber 
     665
     666  Sets the Boolean value for the token specified by TokenNumber
    667667  to the value specified by Value.  Value is returned.
    668668
     
    694694/**
    695695  This function provides a means by which to set a value for a given PCD token.
    696  
    697   Sets the 8-bit value for the token specified by TokenNumber and 
     696
     697  Sets the 8-bit value for the token specified by TokenNumber and
    698698  Guid to the value specified by Value. Value is returned.
    699699
     
    701701  If the set operation was not correctly performed, then ASSERT().
    702702
    703   @param[in]  Guid          The pointer to a 128-bit unique value that 
     703  @param[in]  Guid          The pointer to a 128-bit unique value that
    704704                            designates which namespace to set a value from.
    705705  @param[in]  TokenNumber   The PCD token number to set a current value for.
     
    731731/**
    732732  This function provides a means by which to set a value for a given PCD token.
    733  
    734   Sets the 16-bit value for the token specified by TokenNumber and 
     733
     734  Sets the 16-bit value for the token specified by TokenNumber and
    735735  Guid to the value specified by Value. Value is returned.
    736736
     
    738738  If the set operation was not correctly performed, then ASSERT().
    739739
    740   @param[in]  Guid          The pointer to a 128-bit unique value that 
     740  @param[in]  Guid          The pointer to a 128-bit unique value that
    741741                            designates which namespace to set a value from.
    742742  @param[in]  TokenNumber   The PCD token number to set a current value for.
     
    768768/**
    769769  This function provides a means by which to set a value for a given PCD token.
    770  
    771   Sets the 32-bit value for the token specified by TokenNumber and 
     770
     771  Sets the 32-bit value for the token specified by TokenNumber and
    772772  Guid to the value specified by Value. Value is returned.
    773773
     
    775775  If the set operation was not correctly performed, then ASSERT().
    776776
    777   @param[in]  Guid          The pointer to a 128-bit unique value that 
     777  @param[in]  Guid          The pointer to a 128-bit unique value that
    778778                            designates which namespace to set a value from.
    779779  @param[in]  TokenNumber   The PCD token number to set a current value for.
     
    805805/**
    806806  This function provides a means by which to set a value for a given PCD token.
    807  
    808   Sets the 64-bit value for the token specified by TokenNumber and 
     807
     808  Sets the 64-bit value for the token specified by TokenNumber and
    809809  Guid to the value specified by Value. Value is returned.
    810810
     
    812812  If the set operation was not correctly performed, then ASSERT().
    813813
    814   @param[in]  Guid          The pointer to a 128-bit unique value that 
     814  @param[in]  Guid          The pointer to a 128-bit unique value that
    815815                            designates which namespace to set a value from.
    816816  @param[in]  TokenNumber   The PCD token number to set a current value for.
     
    842842/**
    843843  This function provides a means by which to set a value for a given PCD token.
    844  
    845   Sets a buffer for the token specified by TokenNumber to the value specified by 
    846   Buffer and SizeOfBuffer.  Buffer is returned.  If SizeOfBuffer is greater than 
    847   the maximum size support by TokenNumber, then set SizeOfBuffer to the maximum size 
    848   supported by TokenNumber and return NULL to indicate that the set operation 
     844
     845  Sets a buffer for the token specified by TokenNumber to the value specified by
     846  Buffer and SizeOfBuffer.  Buffer is returned.  If SizeOfBuffer is greater than
     847  the maximum size support by TokenNumber, then set SizeOfBuffer to the maximum size
     848  supported by TokenNumber and return NULL to indicate that the set operation
    849849  was not actually performed, or ASSERT() if the set operation was not corretly performed.
    850  
     850
    851851  If Guid is NULL, then ASSERT().
    852852  If SizeOfBuffer is NULL, then ASSERT().
    853853  If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
    854  
    855   @param[in]  Guid              The pointer to a 128-bit unique value that 
     854
     855  @param[in]  Guid              The pointer to a 128-bit unique value that
    856856                                designates which namespace to set a value from.
    857857  @param[in]  TokenNumber       The PCD token number to set a current value for.
     
    896896/**
    897897  This function provides a means by which to set a value for a given PCD token.
    898  
    899   Sets the Boolean value for the token specified by TokenNumber and 
     898
     899  Sets the Boolean value for the token specified by TokenNumber and
    900900  Guid to the value specified by Value. Value is returned.
    901901
     
    903903  If the set operation was not correctly performed, then ASSERT().
    904904
    905   @param[in]  Guid          The pointer to a 128-bit unique value that 
     905  @param[in]  Guid          The pointer to a 128-bit unique value that
    906906                            designates which namespace to set a value from.
    907907  @param[in]  TokenNumber   The PCD token number to set a current value for.
     
    933933/**
    934934  Set up a notification function that is called when a specified token is set.
    935  
    936   When the token specified by TokenNumber and Guid is set, 
    937   then notification function specified by NotificationFunction is called. 
     935
     936  When the token specified by TokenNumber and Guid is set,
     937  then notification function specified by NotificationFunction is called.
    938938  If Guid is NULL, then the default token space is used.
    939939  If NotificationFunction is NULL, then ASSERT().
    940940
    941   @param[in]  Guid                  The pointer to a 128-bit unique value that designates which 
    942                                     namespace to set a value from.  If NULL, then the default 
     941  @param[in]  Guid                  The pointer to a 128-bit unique value that designates which
     942                                    namespace to set a value from.  If NULL, then the default
    943943                                    token space is used.
    944944  @param[in]  TokenNumber           The PCD token number to monitor.
    945   @param[in]  NotificationFunction  The function to call when the token 
     945  @param[in]  NotificationFunction  The function to call when the token
    946946                                    specified by Guid and TokenNumber is set.
    947947
     
    969969/**
    970970  Disable a notification function that was established with LibPcdCallbackonSet().
    971  
     971
    972972  Disable a notification function that was previously established with LibPcdCallbackOnSet().
    973973  If NotificationFunction is NULL, then ASSERT().
    974   If LibPcdCallbackOnSet() was not previously called with Guid, TokenNumber, 
     974  If LibPcdCallbackOnSet() was not previously called with Guid, TokenNumber,
    975975  and NotificationFunction, then ASSERT().
    976  
     976
    977977  @param[in]  Guid                 Specify the GUID token space.
    978978  @param[in]  TokenNumber          Specify the token number.
     
    991991
    992992  ASSERT (NotificationFunction != NULL);
    993    
     993
    994994  Status = GetPiPcdProtocol()->CancelCallback (Guid, TokenNumber, (EFI_PCD_PROTOCOL_CALLBACK) NotificationFunction);
    995995  ASSERT_EFI_ERROR (Status);
     
    10021002/**
    10031003  Retrieves the next token in a token space.
    1004  
    1005   Retrieves the next PCD token number from the token space specified by Guid. 
    1006   If Guid is NULL, then the default token space is used.  If TokenNumber is 0, 
    1007   then the first token number is returned.  Otherwise, the token number that 
    1008   follows TokenNumber in the token space is returned.  If TokenNumber is the last 
    1009   token number in the token space, then 0 is returned. 
    1010  
     1004
     1005  Retrieves the next PCD token number from the token space specified by Guid.
     1006  If Guid is NULL, then the default token space is used.  If TokenNumber is 0,
     1007  then the first token number is returned.  Otherwise, the token number that
     1008  follows TokenNumber in the token space is returned.  If TokenNumber is the last
     1009  token number in the token space, then 0 is returned.
     1010
    10111011  If TokenNumber is not 0 and is not in the token space specified by Guid, then ASSERT().
    10121012
    1013   @param[in]  Guid        The pointer to a 128-bit unique value that designates which namespace 
     1013  @param[in]  Guid        The pointer to a 128-bit unique value that designates which namespace
    10141014                          to set a value from.  If NULL, then the default token space is used.
    1015   @param[in]  TokenNumber The previous PCD token number.  If 0, then retrieves the first PCD 
     1015  @param[in]  TokenNumber The previous PCD token number.  If 0, then retrieves the first PCD
    10161016                          token number.
    10171017
     
    10191019
    10201020**/
    1021 UINTN           
     1021UINTN
    10221022EFIAPI
    10231023LibPcdGetNextToken (
     
    10381038/**
    10391039  Used to retrieve the list of available PCD token space GUIDs.
    1040  
     1040
    10411041  Returns the PCD token space GUID that follows TokenSpaceGuid in the list of token spaces
    10421042  in the platform.
    10431043  If TokenSpaceGuid is NULL, then a pointer to the first PCD token spaces returned.
    10441044  If TokenSpaceGuid is the last PCD token space GUID in the list, then NULL is returned.
    1045  
     1045
    10461046  @param  TokenSpaceGuid  The pointer to the a PCD token space GUID.
    10471047
     
    10631063/**
    10641064  Sets a value of a patchable PCD entry that is type pointer.
    1065  
    1066   Sets the PCD entry specified by PatchVariable to the value specified by Buffer 
    1067   and SizeOfBuffer.  Buffer is returned.  If SizeOfBuffer is greater than 
    1068   MaximumDatumSize, then set SizeOfBuffer to MaximumDatumSize and return 
    1069   NULL to indicate that the set operation was not actually performed. 
    1070   If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to 
     1065
     1066  Sets the PCD entry specified by PatchVariable to the value specified by Buffer
     1067  and SizeOfBuffer.  Buffer is returned.  If SizeOfBuffer is greater than
     1068  MaximumDatumSize, then set SizeOfBuffer to MaximumDatumSize and return
     1069  NULL to indicate that the set operation was not actually performed.
     1070  If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to
    10711071  MaximumDatumSize and NULL must be returned.
    1072  
     1072
    10731073  If PatchVariable is NULL, then ASSERT().
    10741074  If SizeOfBuffer is NULL, then ASSERT().
    10751075  If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
    10761076
    1077   @param[in] PatchVariable      A pointer to the global variable in a module that is 
     1077  @param[in] PatchVariable      A pointer to the global variable in a module that is
    10781078                                the target of the set operation.
    10791079  @param[in] MaximumDatumSize   The maximum size allowed for the PCD entry specified by PatchVariable.
    10801080  @param[in, out] SizeOfBuffer  A pointer to the size, in bytes, of Buffer.
    10811081  @param[in] Buffer             A pointer to the buffer to used to set the target variable.
    1082  
     1082
    10831083  @return Return the pointer to the buffer been set.
    10841084
     
    10951095  ASSERT (PatchVariable != NULL);
    10961096  ASSERT (SizeOfBuffer  != NULL);
    1097  
     1097
    10981098  if (*SizeOfBuffer > 0) {
    10991099    ASSERT (Buffer != NULL);
     
    11051105    return NULL;
    11061106  }
    1107    
     1107
    11081108  CopyMem (PatchVariable, Buffer, *SizeOfBuffer);
    1109  
     1109
    11101110  return (VOID *) Buffer;
    11111111}
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/DxePcdLib/DxePcdLib.inf

    r58459 r58466  
    66#      It is EDKII implementation which support Dynamic/DynamicEx Pcds.
    77#   2) EFI_PCD_PROTOCOL
    8 #      It is defined by PI specification 1.2, Vol 3 which only support dynamicEx 
     8#      It is defined by PI specification 1.2, Vol 3 which only support dynamicEx
    99#      type Pcd.
    1010#
     
    1414# EFI_PCD_PROTOCOL to handle dynamicEx type PCD.
    1515#
    16 # Note: A driver of type DXE_RUNTIME_DRIVER and DXE_SMM_DRIVER can only use this DxePcdLib 
    17 #  in their initialization without any issues to access Dynamic and DynamicEx PCD. They can't 
     16# Note: A driver of type DXE_RUNTIME_DRIVER and DXE_SMM_DRIVER can only use this DxePcdLib
     17#  in their initialization without any issues to access Dynamic and DynamicEx PCD. They can't
    1818#  access Dynamic and DynamicEx PCD in the implementation of runtime services and SMI handlers.
    19 #  Because EFI_PCD_PROTOCOL is DXE protocol that is not aviable in OS runtime phase. 
     19#  Because EFI_PCD_PROTOCOL is DXE protocol that is not aviable in OS runtime phase.
    2020#
    2121# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
     
    3838  MODULE_TYPE                    = DXE_DRIVER
    3939  VERSION_STRING                 = 1.0
    40   LIBRARY_CLASS                  = PcdLib|DXE_CORE DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER SMM_CORE UEFI_APPLICATION UEFI_DRIVER 
     40  LIBRARY_CLASS                  = PcdLib|DXE_CORE DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER SMM_CORE UEFI_APPLICATION UEFI_DRIVER
    4141
    4242#
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/DxeRuntimeExtendedSalLib/DxeRuntimeExtendedSalLib.inf

    r58459 r58466  
    2020  MODULE_TYPE                    = DXE_RUNTIME_DRIVER
    2121  VERSION_STRING                 = 1.0
    22   LIBRARY_CLASS                  = ExtendedSalLib|DXE_RUNTIME_DRIVER DXE_SAL_DRIVER 
     22  LIBRARY_CLASS                  = ExtendedSalLib|DXE_RUNTIME_DRIVER DXE_SAL_DRIVER
    2323  CONSTRUCTOR                    = DxeRuntimeExtendedSalLibConstruct
    2424  DESTRUCTOR                     = DxeRuntimeExtendedSalLibDeconstruct
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/DxeRuntimeExtendedSalLib/ExtendedSalLib.c

    r48674 r58466  
    159159  Constructor function to initializes physical plabel of ESAL entrypoint and register an event
    160160  for initialization of virtual plabel of ESAL entrypoint.
    161  
     161
    162162  This is the library constructor function to call a function to initialize physical plabel of ESAL entrypoint
    163   and to register notification function for 
     163  and to register notification function for
    164164  EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE, which sets virtual plabel of ESAL entrypoint.
    165165
     
    201201
    202202/**
    203   Destructor function to close the event created by the library constructor 
    204  
    205   This is the library destructor function to close the event with type of 
     203  Destructor function to close the event created by the library constructor
     204
     205  This is the library destructor function to close the event with type of
    206206  EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE, which is created by the library constructor.
    207207
     
    233233/**
    234234  Registers function of ESAL class and it's associated global.
    235  
     235
    236236  This function registers function of ESAL class, together with its associated global.
    237237  It is worker function for RegisterEsalClass().
     
    268268/**
    269269  Registers ESAL Class and it's associated global.
    270  
     270
    271271  This function registers one or more Extended SAL services in a given
    272272  class along with the associated global context.
     
    281281  @retval EFI_UNSUPPORTED      This function was called after ExitBootServices().
    282282  @retval EFI_OUT_OF_RESOURCES There are not enough resources available to register one or more of the specified services.
    283   @retval Other                ClassGuid could not be installed onto a new handle. 
     283  @retval Other                ClassGuid could not be installed onto a new handle.
    284284
    285285**/
     
    339339/**
    340340  Calls an Extended SAL Class service that was previously registered with RegisterEsalClass().
    341  
     341
    342342  This function gets the entrypoint of Extended SAL, and calls an Extended SAL Class service
    343343  that was previously registered with RegisterEsalClass() through this entrypoint.
     
    353353  @param  Arg7            Argument 7 ClassGuid/FunctionId defined
    354354  @param  Arg8            Argument 8 ClassGuid/FunctionId defined
    355  
     355
    356356  @retval EFI_SAL_SUCCESS ESAL procedure successfully called.
    357357  @retval EFI_SAL_ERROR   The address of ExtendedSalProc() can not be correctly
    358358                          initialized.
    359359  @retval Other           Status returned from ExtendedSalProc() service of
    360                           EXTENDED_SAL_BOOT_SERVICE_PROTOCOL. 
     360                          EXTENDED_SAL_BOOT_SERVICE_PROTOCOL.
    361361
    362362**/
     
    422422/**
    423423  Wrapper for the EsalStallFunctionId service of Extended SAL Stall Services Class.
    424  
     424
    425425  This function is a wrapper for the EsalStallFunctionId service of Extended SAL
    426426  Stall Services Class. See EsalStallFunctionId of Extended SAL Specification.
     
    440440{
    441441  return EsalCall (
    442            EFI_EXTENDED_SAL_STALL_SERVICES_PROTOCOL_GUID_LO, 
    443            EFI_EXTENDED_SAL_STALL_SERVICES_PROTOCOL_GUID_HI, 
    444            StallFunctionId, 
    445            Microseconds, 
    446            0, 
    447            0, 
    448            0, 
    449            0, 
    450            0, 
     442           EFI_EXTENDED_SAL_STALL_SERVICES_PROTOCOL_GUID_LO,
     443           EFI_EXTENDED_SAL_STALL_SERVICES_PROTOCOL_GUID_HI,
     444           StallFunctionId,
     445           Microseconds,
     446           0,
     447           0,
     448           0,
     449           0,
     450           0,
    451451           0
    452452           );
     
    455455/**
    456456  Wrapper for the EsalSetNewPalEntryFunctionId service of Extended SAL PAL Services Services Class.
    457  
     457
    458458  This function is a wrapper for the EsalSetNewPalEntryFunctionId service of Extended SAL
    459459  PAL Services Services Class. See EsalSetNewPalEntryFunctionId of Extended SAL Specification.
     
    477477{
    478478  return EsalCall (
    479            EFI_EXTENDED_SAL_PAL_SERVICES_PROTOCOL_GUID_LO, 
     479           EFI_EXTENDED_SAL_PAL_SERVICES_PROTOCOL_GUID_LO,
    480480           EFI_EXTENDED_SAL_PAL_SERVICES_PROTOCOL_GUID_HI,
    481            SetNewPalEntryFunctionId, 
    482            PhysicalAddress, 
    483            PalEntryPoint, 
    484            0, 
    485            0, 
    486            0, 
    487            0, 
     481           SetNewPalEntryFunctionId,
     482           PhysicalAddress,
     483           PalEntryPoint,
     484           0,
     485           0,
     486           0,
     487           0,
    488488           0
    489489           );
     
    492492/**
    493493  Wrapper for the EsalGetNewPalEntryFunctionId service of Extended SAL PAL Services Services Class.
    494  
     494
    495495  This function is a wrapper for the EsalGetNewPalEntryFunctionId service of Extended SAL
    496496  PAL Services Services Class. See EsalGetNewPalEntryFunctionId of Extended SAL Specification.
     
    516516           EFI_EXTENDED_SAL_PAL_SERVICES_PROTOCOL_GUID_LO,
    517517           EFI_EXTENDED_SAL_PAL_SERVICES_PROTOCOL_GUID_HI,
    518            GetNewPalEntryFunctionId, 
    519            PhysicalAddress, 
    520            0, 
    521            0, 
    522            0, 
    523            0, 
    524            0, 
     518           GetNewPalEntryFunctionId,
     519           PhysicalAddress,
     520           0,
     521           0,
     522           0,
     523           0,
     524           0,
    525525           0
    526526           );
     
    529529/**
    530530  Wrapper for the EsalGetStateBufferFunctionId service of Extended SAL MCA Log Services Class.
    531  
     531
    532532  This function is a wrapper for the EsalGetStateBufferFunctionId service of Extended SAL
    533533  MCA Log Services Class. See EsalGetStateBufferFunctionId of Extended SAL Specification.
     
    558558           EFI_EXTENDED_SAL_MCA_LOG_SERVICES_PROTOCOL_GUID_LO,
    559559           EFI_EXTENDED_SAL_MCA_LOG_SERVICES_PROTOCOL_GUID_HI,
    560            EsalGetStateBufferFunctionId, 
    561            McaType, 
    562            0, 
    563            0, 
    564            0, 
    565            0, 
    566            0, 
     560           EsalGetStateBufferFunctionId,
     561           McaType,
     562           0,
     563           0,
     564           0,
     565           0,
     566           0,
    567567           0
    568568           );
     
    576576/**
    577577  Wrapper for the EsalSaveStateBufferFunctionId service of Extended SAL MCA Log Services Class.
    578  
     578
    579579  This function is a wrapper for the EsalSaveStateBufferFunctionId service of Extended SAL
    580580  MCA Log Services Class. See EsalSaveStateBufferFunctionId of Extended SAL Specification.
    581  
     581
    582582  @param  McaType         See type parameter of SAL Procedure SAL_GET_STATE_INFO.
    583583
     
    594594           EFI_EXTENDED_SAL_MCA_LOG_SERVICES_PROTOCOL_GUID_LO,
    595595           EFI_EXTENDED_SAL_MCA_LOG_SERVICES_PROTOCOL_GUID_HI,
    596            EsalSaveStateBufferFunctionId, 
    597            McaType, 
    598            0, 
    599            0, 
    600            0, 
    601            0, 
    602            0, 
     596           EsalSaveStateBufferFunctionId,
     597           McaType,
     598           0,
     599           0,
     600           0,
     601           0,
     602           0,
    603603           0
    604604           );
     
    607607/**
    608608  Wrapper for the EsalGetVectorsFunctionId service of Extended SAL Base Services Class.
    609  
     609
    610610  This function is a wrapper for the EsalGetVectorsFunctionId service of Extended SAL
    611611  Base Services Class. See EsalGetVectorsFunctionId of Extended SAL Specification.
     
    629629           EFI_EXTENDED_SAL_BASE_SERVICES_PROTOCOL_GUID_LO,
    630630           EFI_EXTENDED_SAL_BASE_SERVICES_PROTOCOL_GUID_HI,
    631            EsalGetVectorsFunctionId, 
    632            VectorType, 
    633            0, 
    634            0, 
    635            0, 
    636            0, 
    637            0, 
     631           EsalGetVectorsFunctionId,
     632           VectorType,
     633           0,
     634           0,
     635           0,
     636           0,
     637           0,
    638638           0
    639639           );
     
    642642/**
    643643  Wrapper for the EsalMcGetParamsFunctionId service of Extended SAL Base Services Class.
    644  
     644
    645645  This function is a wrapper for the EsalMcGetParamsFunctionId service of Extended SAL
    646646  Base Services Class. See EsalMcGetParamsFunctionId of Extended SAL Specification.
     
    666666           EFI_EXTENDED_SAL_BASE_SERVICES_PROTOCOL_GUID_LO,
    667667           EFI_EXTENDED_SAL_BASE_SERVICES_PROTOCOL_GUID_HI,
    668            EsalMcGetParamsFunctionId, 
    669            ParamInfoType, 
    670            0, 
    671            0, 
    672            0, 
    673            0, 
    674            0, 
     668           EsalMcGetParamsFunctionId,
     669           ParamInfoType,
     670           0,
     671           0,
     672           0,
     673           0,
     674           0,
    675675           0
    676676           );
     
    679679/**
    680680  Wrapper for the EsalMcGetParamsFunctionId service of Extended SAL Base Services Class.
    681  
     681
    682682  This function is a wrapper for the EsalMcGetParamsFunctionId service of Extended SAL
    683683  Base Services Class. See EsalMcGetParamsFunctionId of Extended SAL Specification.
    684  
     684
    685685  @retval EFI_SAL_SUCCESS          Call completed without error.
    686686  @retval EFI_SAL_NO_INFORMATION   The requested vector has not been registered
     
    697697           EFI_EXTENDED_SAL_BASE_SERVICES_PROTOCOL_GUID_LO,
    698698           EFI_EXTENDED_SAL_BASE_SERVICES_PROTOCOL_GUID_HI,
    699            EsalMcGetMcParamsFunctionId, 
    700            0, 
    701            0, 
    702            0, 
    703            0, 
    704            0, 
    705            0, 
     699           EsalMcGetMcParamsFunctionId,
     700           0,
     701           0,
     702           0,
     703           0,
     704           0,
     705           0,
    706706           0
    707707           );
     
    710710/**
    711711  Wrapper for the EsalGetMcCheckinFlagsFunctionId service of Extended SAL Base Services Class.
    712  
     712
    713713  This function is a wrapper for the EsalGetMcCheckinFlagsFunctionId service of Extended SAL
    714714  Base Services Class. See EsalGetMcCheckinFlagsFunctionId of Extended SAL Specification.
     
    728728           EFI_EXTENDED_SAL_BASE_SERVICES_PROTOCOL_GUID_LO,
    729729           EFI_EXTENDED_SAL_BASE_SERVICES_PROTOCOL_GUID_HI,
    730            EsalGetMcCheckinFlagsFunctionId, 
    731            CpuIndex, 
    732            0, 
    733            0, 
    734            0, 
    735            0, 
    736            0, 
     730           EsalGetMcCheckinFlagsFunctionId,
     731           CpuIndex,
     732           0,
     733           0,
     734           0,
     735           0,
     736           0,
    737737           0
    738738           );
     
    741741/**
    742742  Wrapper for the EsalAddCpuDataFunctionId service of Extended SAL MP Services Class.
    743  
     743
    744744  This function is a wrapper for the EsalAddCpuDataFunctionId service of Extended SAL
    745745  MP Services Class. See EsalAddCpuDataFunctionId of Extended SAL Specification.
     
    766766           EFI_EXTENDED_SAL_MP_SERVICES_PROTOCOL_GUID_LO,
    767767           EFI_EXTENDED_SAL_MP_SERVICES_PROTOCOL_GUID_HI,
    768            AddCpuDataFunctionId, 
    769            CpuGlobalId, 
    770            Enabled, 
    771            PalCompatibility, 
    772            0, 
    773            0, 
    774            0, 
     768           AddCpuDataFunctionId,
     769           CpuGlobalId,
     770           Enabled,
     771           PalCompatibility,
     772           0,
     773           0,
     774           0,
    775775           0
    776776           );
     
    779779/**
    780780  Wrapper for the EsalRemoveCpuDataFunctionId service of Extended SAL MP Services Class.
    781  
     781
    782782  This function is a wrapper for the EsalRemoveCpuDataFunctionId service of Extended SAL
    783783  MP Services Class. See EsalRemoveCpuDataFunctionId of Extended SAL Specification.
     
    798798           EFI_EXTENDED_SAL_MP_SERVICES_PROTOCOL_GUID_LO,
    799799           EFI_EXTENDED_SAL_MP_SERVICES_PROTOCOL_GUID_HI,
    800            RemoveCpuDataFunctionId, 
    801            CpuGlobalId, 
    802            0, 
    803            0, 
    804            0, 
    805            0, 
    806            0, 
     800           RemoveCpuDataFunctionId,
     801           CpuGlobalId,
     802           0,
     803           0,
     804           0,
     805           0,
     806           0,
    807807           0
    808808           );
     
    811811/**
    812812  Wrapper for the EsalModifyCpuDataFunctionId service of Extended SAL MP Services Class.
    813  
     813
    814814  This function is a wrapper for the EsalModifyCpuDataFunctionId service of Extended SAL
    815815  MP Services Class. See EsalModifyCpuDataFunctionId of Extended SAL Specification.
     
    836836           EFI_EXTENDED_SAL_MP_SERVICES_PROTOCOL_GUID_LO,
    837837           EFI_EXTENDED_SAL_MP_SERVICES_PROTOCOL_GUID_HI,
    838            ModifyCpuDataFunctionId, 
    839            CpuGlobalId, 
    840            Enabled, 
    841            PalCompatibility, 
    842            0, 
    843            0, 
    844            0, 
     838           ModifyCpuDataFunctionId,
     839           CpuGlobalId,
     840           Enabled,
     841           PalCompatibility,
     842           0,
     843           0,
     844           0,
    845845           0
    846846           );
     
    849849/**
    850850  Wrapper for the EsalGetCpuDataByIdFunctionId service of Extended SAL MP Services Class.
    851  
     851
    852852  This function is a wrapper for the EsalGetCpuDataByIdFunctionId service of Extended SAL
    853853  MP Services Class. See EsalGetCpuDataByIdFunctionId of Extended SAL Specification.
     
    871871           EFI_EXTENDED_SAL_MP_SERVICES_PROTOCOL_GUID_LO,
    872872           EFI_EXTENDED_SAL_MP_SERVICES_PROTOCOL_GUID_HI,
    873            GetCpuDataByIDFunctionId, 
    874            CpuGlobalId, 
    875            IndexByEnabledCpu, 
    876            0, 
    877            0, 
    878            0, 
    879            0, 
     873           GetCpuDataByIDFunctionId,
     874           CpuGlobalId,
     875           IndexByEnabledCpu,
     876           0,
     877           0,
     878           0,
     879           0,
    880880           0
    881881           );
     
    884884/**
    885885  Wrapper for the EsalGetCpuDataByIndexFunctionId service of Extended SAL MP Services Class.
    886  
     886
    887887  This function is a wrapper for the EsalGetCpuDataByIndexFunctionId service of Extended SAL
    888888  MP Services Class. See EsalGetCpuDataByIndexFunctionId of Extended SAL Specification.
     
    906906           EFI_EXTENDED_SAL_MP_SERVICES_PROTOCOL_GUID_LO,
    907907           EFI_EXTENDED_SAL_MP_SERVICES_PROTOCOL_GUID_HI,
    908            GetCpuDataByIndexFunctionId, 
    909            Index, 
    910            IndexByEnabledCpu, 
    911            0, 
    912            0, 
    913            0, 
    914            0, 
     908           GetCpuDataByIndexFunctionId,
     909           Index,
     910           IndexByEnabledCpu,
     911           0,
     912           0,
     913           0,
     914           0,
    915915           0
    916916           );
     
    919919/**
    920920  Wrapper for the EsalWhoAmIFunctionId service of Extended SAL MP Services Class.
    921  
     921
    922922  This function is a wrapper for the EsalWhoAmIFunctionId service of Extended SAL
    923923  MP Services Class. See EsalWhoAmIFunctionId of Extended SAL Specification.
     
    939939           EFI_EXTENDED_SAL_MP_SERVICES_PROTOCOL_GUID_LO,
    940940           EFI_EXTENDED_SAL_MP_SERVICES_PROTOCOL_GUID_HI,
    941            CurrentProcInfoFunctionId, 
    942            IndexByEnabledCpu, 
    943            0, 
    944            0, 
    945            0, 
    946            0, 
    947            0, 
     941           CurrentProcInfoFunctionId,
     942           IndexByEnabledCpu,
     943           0,
     944           0,
     945           0,
     946           0,
     947           0,
    948948           0
    949949           );
     
    952952/**
    953953  Wrapper for the EsalNumProcessors service of Extended SAL MP Services Class.
    954  
     954
    955955  This function is a wrapper for the EsalNumProcessors service of Extended SAL
    956956  MP Services Class. See EsalNumProcessors of Extended SAL Specification.
     
    969969           EFI_EXTENDED_SAL_MP_SERVICES_PROTOCOL_GUID_LO,
    970970           EFI_EXTENDED_SAL_MP_SERVICES_PROTOCOL_GUID_HI,
    971            NumProcessorsFunctionId, 
    972            0, 
    973            0, 
    974            0, 
    975            0, 
    976            0, 
    977            0, 
     971           NumProcessorsFunctionId,
     972           0,
     973           0,
     974           0,
     975           0,
     976           0,
     977           0,
    978978           0
    979979           );
     
    982982/**
    983983  Wrapper for the EsalSetMinStateFnctionId service of Extended SAL MP Services Class.
    984  
     984
    985985  This function is a wrapper for the EsalSetMinStateFnctionId service of Extended SAL
    986986  MP Services Class. See EsalSetMinStateFnctionId of Extended SAL Specification.
     
    10041004           EFI_EXTENDED_SAL_MP_SERVICES_PROTOCOL_GUID_LO,
    10051005           EFI_EXTENDED_SAL_MP_SERVICES_PROTOCOL_GUID_HI,
    1006            SetMinStateFunctionId, 
    1007            CpuGlobalId, 
    1008            MinStatePointer, 
    1009            0, 
    1010            0, 
    1011            0, 
    1012            0, 
     1006           SetMinStateFunctionId,
     1007           CpuGlobalId,
     1008           MinStatePointer,
     1009           0,
     1010           0,
     1011           0,
     1012           0,
    10131013           0
    10141014           );
     
    10171017/**
    10181018  Wrapper for the EsalGetMinStateFunctionId service of Extended SAL MP Services Class.
    1019  
     1019
    10201020  This function is a wrapper for the EsalGetMinStateFunctionId service of Extended SAL
    10211021  MP Services Class. See EsalGetMinStateFunctionId of Extended SAL Specification.
     
    10361036           EFI_EXTENDED_SAL_MP_SERVICES_PROTOCOL_GUID_LO,
    10371037           EFI_EXTENDED_SAL_MP_SERVICES_PROTOCOL_GUID_HI,
    1038            GetMinStateFunctionId, 
    1039            CpuGlobalId, 
    1040            0, 
    1041            0, 
    1042            0, 
    1043            0, 
    1044            0, 
     1038           GetMinStateFunctionId,
     1039           CpuGlobalId,
     1040           0,
     1041           0,
     1042           0,
     1043           0,
     1044           0,
    10451045           0
    10461046           );
     
    10491049/**
    10501050  Wrapper for the EsalMcsGetStateInfoFunctionId service of Extended SAL MCA Services Class.
    1051  
     1051
    10521052  This function is a wrapper for the EsalMcsGetStateInfoFunctionId service of Extended SAL
    10531053  MCA Services Class. See EsalMcsGetStateInfoFunctionId of Extended SAL Specification.
     
    10741074           EFI_EXTENDED_SAL_MCA_SERVICES_PROTOCOL_GUID_LO,
    10751075           EFI_EXTENDED_SAL_MCA_SERVICES_PROTOCOL_GUID_HI,
    1076            McaGetStateInfoFunctionId, 
    1077            CpuGlobalId, 
    1078            0, 
    1079            0, 
    1080            0, 
    1081            0, 
    1082            0, 
     1076           McaGetStateInfoFunctionId,
     1077           CpuGlobalId,
     1078           0,
     1079           0,
     1080           0,
     1081           0,
     1082           0,
    10831083           0
    10841084           );
     
    10921092/**
    10931093  Wrapper for the EsalMcaRegisterCpuFunctionId service of Extended SAL MCA Services Class.
    1094  
     1094
    10951095  This function is a wrapper for the EsalMcaRegisterCpuFunctionId service of Extended SAL
    10961096  MCA Services Class. See EsalMcaRegisterCpuFunctionId of Extended SAL Specification.
     
    11131113           EFI_EXTENDED_SAL_MCA_SERVICES_PROTOCOL_GUID_LO,
    11141114           EFI_EXTENDED_SAL_MCA_SERVICES_PROTOCOL_GUID_HI,
    1115            McaRegisterCpuFunctionId, 
    1116            CpuGlobalId, 
    1117            StateBufferPointer, 
    1118            0, 
    1119            0, 
    1120            0, 
    1121            0, 
    1122            0
    1123            );
    1124 }
     1115           McaRegisterCpuFunctionId,
     1116           CpuGlobalId,
     1117           StateBufferPointer,
     1118           0,
     1119           0,
     1120           0,
     1121           0,
     1122           0
     1123           );
     1124}
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/DxeRuntimeExtendedSalLib/Ipf/AsmExtendedSalLib.s

    r48674 r58466  
    3636//        r10 = Virtual Plabel
    3737//        r11 = psr
    38 // 
    39 // As per static calling conventions. 
    40 // 
     38//
     39// As per static calling conventions.
     40//
    4141//--
    4242//---------------------------------------------------------------------------
     
    6767//  in1 = Physical GP
    6868//
    69 // Return Value: 
     69// Return Value:
    7070//   r8 = EFI_SAL_SUCCESS
    71 // 
    72 // As per static calling conventions. 
    73 // 
     71//
     72// As per static calling conventions.
     73//
    7474//--
    7575//---------------------------------------------------------------------------
     
    100100//  in1 = Virtual GP
    101101//
    102 // Return Value: 
     102// Return Value:
    103103//  r8 = EFI_SAL_ERROR
    104 // 
    105 // As per static calling conventions. 
    106 // 
     104//
     105// As per static calling conventions.
     106//
    107107//--
    108108//---------------------------------------------------------------------------
     
    125125
    126126.align 32
    127 EsalEntryPoint: 
     127EsalEntryPoint:
    128128    data8 0   // Physical Entry
    129129    data8 0   //         GP
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/DxeRuntimePciExpressLib/DxeRuntimePciExpressLib.inf

    r58459 r58466  
    11## @file
    2 # Instance of PCI Express Library using the 256 MB PCI Express MMIO window that 
     2# Instance of PCI Express Library using the 256 MB PCI Express MMIO window that
    33# is safe for runtime use.
    44#
    55# PCI Express Library that uses the 256 MB PCI Express MMIO window to perform
    6 #  PCI Configuration cycles. Layers on top of an I/O Library instance.  A table of 
    7 #  PCI devices that are registered for for runtime access is maintained so the 
     6#  PCI Configuration cycles. Layers on top of an I/O Library instance.  A table of
     7#  PCI devices that are registered for for runtime access is maintained so the
    88#  proper virtual address is used to perform the PCI Express Configuration cycle.
    99#
     
    2727  MODULE_TYPE                    = DXE_RUNTIME_DRIVER
    2828  VERSION_STRING                 = 1.0
    29   LIBRARY_CLASS                  = PciExpressLib|DXE_RUNTIME_DRIVER 
     29  LIBRARY_CLASS                  = PciExpressLib|DXE_RUNTIME_DRIVER
    3030  CONSTRUCTOR                    = DxeRuntimePciExpressLibConstructor
    3131  DESTRUCTOR                     = DxeRuntimePciExpressLibDestructor
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/DxeRuntimePciExpressLib/PciExpressLib.c

    r58459 r58466  
    104104
    105105/**
    106   The constructor function caches the PCI Express Base Address and creates a 
     106  The constructor function caches the PCI Express Base Address and creates a
    107107  Set Virtual Address Map event to convert physical address to virtual addresses.
    108  
     108
    109109  @param  ImageHandle   The firmware allocated handle for the EFI image.
    110110  @param  SystemTable   A pointer to the EFI System Table.
    111  
     111
    112112  @retval EFI_SUCCESS   The constructor completed successfully.
    113113  @retval Other value   The constructor did not complete successfully.
     
    145145
    146146/**
    147   The destructor function frees any allocated buffers and closes the Set Virtual 
     147  The destructor function frees any allocated buffers and closes the Set Virtual
    148148  Address Map event.
    149  
     149
    150150  @param  ImageHandle   The firmware allocated handle for the EFI image.
    151151  @param  SystemTable   A pointer to the EFI System Table.
    152  
     152
    153153  @retval EFI_SUCCESS   The destructor completed successfully.
    154154  @retval Other value   The destructor did not complete successfully.
     
    165165
    166166  //
    167   // If one or more PCI devices have been registered for runtime access, then 
     167  // If one or more PCI devices have been registered for runtime access, then
    168168  // free the registration table.
    169169  //
     
    183183/**
    184184  Gets the base address of PCI Express.
    185  
     185
    186186  This internal functions retrieves PCI Express Base Address via a PCD entry
    187187  PcdPciExpressBaseAddress.
    188  
     188
    189189  @param  Address  The address that encodes the PCI Bus, Device, Function and Register.
    190190  @return          The base address of PCI Express.
     
    248248
    249249  //
    250   // Return the physical address 
     250  // Return the physical address
    251251  //
    252252  return Address;
     
    254254
    255255/**
    256   Registers a PCI device so PCI configuration registers may be accessed after 
     256  Registers a PCI device so PCI configuration registers may be accessed after
    257257  SetVirtualAddressMap().
    258  
    259   Registers the PCI device specified by Address so all the PCI configuration 
    260   registers associated with that PCI device may be accessed after SetVirtualAddressMap() 
     258
     259  Registers the PCI device specified by Address so all the PCI configuration
     260  registers associated with that PCI device may be accessed after SetVirtualAddressMap()
    261261  is called.
    262  
     262
    263263  If Address > 0x0FFFFFFF, then ASSERT().
    264264
    265265  @param  Address The address that encodes the PCI Bus, Device, Function and
    266266                  Register.
    267  
     267
    268268  @retval RETURN_SUCCESS           The PCI device was registered for runtime access.
    269   @retval RETURN_UNSUPPORTED       An attempt was made to call this function 
     269  @retval RETURN_UNSUPPORTED       An attempt was made to call this function
    270270                                   after ExitBootServices().
    271271  @retval RETURN_UNSUPPORTED       The resources required to access the PCI device
     
    335335  //
    336336  NewTable = ReallocateRuntimePool (
    337                (mDxeRuntimePciExpressLibNumberOfRuntimeRanges + 0) * sizeof (PCI_EXPRESS_RUNTIME_REGISTRATION_TABLE), 
    338                (mDxeRuntimePciExpressLibNumberOfRuntimeRanges + 1) * sizeof (PCI_EXPRESS_RUNTIME_REGISTRATION_TABLE), 
     337               (mDxeRuntimePciExpressLibNumberOfRuntimeRanges + 0) * sizeof (PCI_EXPRESS_RUNTIME_REGISTRATION_TABLE),
     338               (mDxeRuntimePciExpressLibNumberOfRuntimeRanges + 1) * sizeof (PCI_EXPRESS_RUNTIME_REGISTRATION_TABLE),
    339339               mDxeRuntimePciExpressLibRegistrationTable
    340340               );
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/DxeSalLibEsal/DxeSalLibEsal.c

    r48674 r58466  
    2222/**
    2323  Makes a SAL procedure call.
    24  
    25   This is a wrapper function to make a SAL procedure call. 
     24
     25  This is a wrapper function to make a SAL procedure call.
    2626  No parameter checking is performed on the 8 input parameters,
    2727  but there are some common rules that the caller should follow
     
    6060{
    6161  SAL_RETURN_REGS Regs;
    62  
     62
    6363  //
    6464  // Initial all members in this structure.
     
    7474             EFI_EXTENDED_SAL_BASE_SERVICES_PROTOCOL_GUID_LO,
    7575             EFI_EXTENDED_SAL_BASE_SERVICES_PROTOCOL_GUID_HI,
    76              SalSetVectorsFunctionId, 
    77              Arg2, 
    78              Arg3, 
    79              Arg4, 
    80              Arg5, 
    81              Arg6, 
    82              Arg7, 
     76             SalSetVectorsFunctionId,
     77             Arg2,
     78             Arg3,
     79             Arg4,
     80             Arg5,
     81             Arg6,
     82             Arg7,
    8383             Arg8
    8484             );
     
    8989             EFI_EXTENDED_SAL_MCA_LOG_SERVICES_PROTOCOL_GUID_LO,
    9090             EFI_EXTENDED_SAL_MCA_LOG_SERVICES_PROTOCOL_GUID_HI,
    91              SalGetStateInfoFunctionId, 
    92              Arg2, 
    93              Arg3, 
    94              Arg4, 
    95              Arg5, 
    96              Arg6, 
    97              Arg7, 
     91             SalGetStateInfoFunctionId,
     92             Arg2,
     93             Arg3,
     94             Arg4,
     95             Arg5,
     96             Arg6,
     97             Arg7,
    9898             Arg8
    9999             );
     
    104104             EFI_EXTENDED_SAL_MCA_LOG_SERVICES_PROTOCOL_GUID_LO,
    105105             EFI_EXTENDED_SAL_MCA_LOG_SERVICES_PROTOCOL_GUID_HI,
    106              SalGetStateInfoSizeFunctionId, 
    107              Arg2, 
    108              Arg3, 
    109              Arg4, 
    110              Arg5, 
    111              Arg6, 
    112              Arg7, 
     106             SalGetStateInfoSizeFunctionId,
     107             Arg2,
     108             Arg3,
     109             Arg4,
     110             Arg5,
     111             Arg6,
     112             Arg7,
    113113             Arg8
    114114             );
     
    119119             EFI_EXTENDED_SAL_MCA_LOG_SERVICES_PROTOCOL_GUID_LO,
    120120             EFI_EXTENDED_SAL_MCA_LOG_SERVICES_PROTOCOL_GUID_HI,
    121              SalClearStateInfoFunctionId, 
    122              Arg2, 
    123              Arg3, 
    124              Arg4, 
    125              Arg5, 
    126              Arg6, 
    127              Arg7, 
     121             SalClearStateInfoFunctionId,
     122             Arg2,
     123             Arg3,
     124             Arg4,
     125             Arg5,
     126             Arg6,
     127             Arg7,
    128128             Arg8
    129129             );
     
    134134             EFI_EXTENDED_SAL_BASE_SERVICES_PROTOCOL_GUID_LO,
    135135             EFI_EXTENDED_SAL_BASE_SERVICES_PROTOCOL_GUID_HI,
    136              SalMcRendezFunctionId, 
    137              Arg2, 
    138              Arg3, 
    139              Arg4, 
    140              Arg5, 
    141              Arg6, 
    142              Arg7, 
     136             SalMcRendezFunctionId,
     137             Arg2,
     138             Arg3,
     139             Arg4,
     140             Arg5,
     141             Arg6,
     142             Arg7,
    143143             Arg8
    144144             );
     
    149149             EFI_EXTENDED_SAL_BASE_SERVICES_PROTOCOL_GUID_LO,
    150150             EFI_EXTENDED_SAL_BASE_SERVICES_PROTOCOL_GUID_HI,
    151              SalMcSetParamsFunctionId, 
    152              Arg2, 
    153              Arg3, 
    154              Arg4, 
    155              Arg5, 
    156              Arg6, 
    157              Arg7, 
     151             SalMcSetParamsFunctionId,
     152             Arg2,
     153             Arg3,
     154             Arg4,
     155             Arg5,
     156             Arg6,
     157             Arg7,
    158158             Arg8
    159159             );
     
    164164             EFI_EXTENDED_SAL_BASE_SERVICES_PROTOCOL_GUID_LO,
    165165             EFI_EXTENDED_SAL_BASE_SERVICES_PROTOCOL_GUID_HI,
    166              EsalRegisterPhysicalAddrFunctionId, 
    167              Arg2, 
    168              Arg3, 
    169              Arg4, 
    170              Arg5, 
    171              Arg6, 
    172              Arg7, 
     166             EsalRegisterPhysicalAddrFunctionId,
     167             Arg2,
     168             Arg3,
     169             Arg4,
     170             Arg5,
     171             Arg6,
     172             Arg7,
    173173             Arg8
    174174             );
     
    179179             EFI_EXTENDED_SAL_CACHE_SERVICES_PROTOCOL_GUID_LO,
    180180             EFI_EXTENDED_SAL_CACHE_SERVICES_PROTOCOL_GUID_HI,
    181              SalCacheFlushFunctionId, 
    182              Arg2, 
    183              Arg3, 
    184              Arg4, 
    185              Arg5, 
    186              Arg6, 
    187              Arg7, 
     181             SalCacheFlushFunctionId,
     182             Arg2,
     183             Arg3,
     184             Arg4,
     185             Arg5,
     186             Arg6,
     187             Arg7,
    188188             Arg8
    189189             );
     
    194194             EFI_EXTENDED_SAL_CACHE_SERVICES_PROTOCOL_GUID_LO,
    195195             EFI_EXTENDED_SAL_CACHE_SERVICES_PROTOCOL_GUID_HI,
    196              SalCacheInitFunctionId, 
    197              Arg2, 
    198              Arg3, 
    199              Arg4, 
    200              Arg5, 
    201              Arg6, 
    202              Arg7, 
     196             SalCacheInitFunctionId,
     197             Arg2,
     198             Arg3,
     199             Arg4,
     200             Arg5,
     201             Arg6,
     202             Arg7,
    203203             Arg8
    204204             );
     
    209209             EFI_EXTENDED_SAL_PCI_SERVICES_PROTOCOL_GUID_LO,
    210210             EFI_EXTENDED_SAL_PCI_SERVICES_PROTOCOL_GUID_HI,
    211              SalPciConfigReadFunctionId, 
    212              Arg2, 
    213              Arg3, 
    214              Arg4, 
    215              Arg5, 
    216              Arg6, 
    217              Arg7, 
     211             SalPciConfigReadFunctionId,
     212             Arg2,
     213             Arg3,
     214             Arg4,
     215             Arg5,
     216             Arg6,
     217             Arg7,
    218218             Arg8
    219219             );
     
    224224             EFI_EXTENDED_SAL_PCI_SERVICES_PROTOCOL_GUID_LO,
    225225             EFI_EXTENDED_SAL_PCI_SERVICES_PROTOCOL_GUID_HI,
    226              SalPciConfigWriteFunctionId, 
    227              Arg2, 
    228              Arg3, 
    229              Arg4, 
    230              Arg5, 
    231              Arg6, 
    232              Arg7, 
     226             SalPciConfigWriteFunctionId,
     227             Arg2,
     228             Arg3,
     229             Arg4,
     230             Arg5,
     231             Arg6,
     232             Arg7,
    233233             Arg8
    234234             );
     
    239239             EFI_EXTENDED_SAL_BASE_SERVICES_PROTOCOL_GUID_LO,
    240240             EFI_EXTENDED_SAL_BASE_SERVICES_PROTOCOL_GUID_HI,
    241              EsalGetPlatformBaseFreqFunctionId, 
    242              Arg2, 
    243              Arg3, 
    244              Arg4, 
    245              Arg5, 
    246              Arg6, 
    247              Arg7, 
     241             EsalGetPlatformBaseFreqFunctionId,
     242             Arg2,
     243             Arg3,
     244             Arg4,
     245             Arg5,
     246             Arg6,
     247             Arg7,
    248248             Arg8
    249249             );
     
    254254             EFI_EXTENDED_SAL_BASE_SERVICES_PROTOCOL_GUID_LO,
    255255             EFI_EXTENDED_SAL_BASE_SERVICES_PROTOCOL_GUID_HI,
    256              EsalPhysicalIdInfoFunctionId, 
    257              Arg2, 
    258              Arg3, 
    259              Arg4, 
    260              Arg5, 
    261              Arg6, 
    262              Arg7, 
     256             EsalPhysicalIdInfoFunctionId,
     257             Arg2,
     258             Arg3,
     259             Arg4,
     260             Arg5,
     261             Arg6,
     262             Arg7,
    263263             Arg8
    264264             );
     
    269269             EFI_EXTENDED_SAL_PAL_SERVICES_PROTOCOL_GUID_LO,
    270270             EFI_EXTENDED_SAL_PAL_SERVICES_PROTOCOL_GUID_HI,
    271              EsalUpdatePalFunctionId, 
    272              Arg2, 
    273              Arg3, 
    274              Arg4, 
    275              Arg5, 
    276              Arg6, 
    277              Arg7, 
     271             EsalUpdatePalFunctionId,
     272             Arg2,
     273             Arg3,
     274             Arg4,
     275             Arg5,
     276             Arg6,
     277             Arg7,
    278278             Arg8
    279279             );
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/DxeSalLibEsal/DxeSalLibEsal.inf

    r58459 r58466  
    2020  MODULE_TYPE                    = DXE_DRIVER
    2121  VERSION_STRING                 = 1.0
    22   LIBRARY_CLASS                  = SalLib|DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SMM_DRIVER DXE_SAL_DRIVER UEFI_DRIVER UEFI_APPLICATION 
     22  LIBRARY_CLASS                  = SalLib|DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SMM_DRIVER DXE_SAL_DRIVER UEFI_DRIVER UEFI_APPLICATION
    2323
    2424#
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/DxeServicesLib/DxeServicesLib.c

    r58459 r58466  
    11/** @file
    2   MDE DXE Services Library provides functions that simplify the development of DXE Drivers. 
     2  MDE DXE Services Library provides functions that simplify the development of DXE Drivers.
    33  These functions help access data from sections of FFS files or from file path.
    44
     
    3030/**
    3131  Identify the device handle from which the Image is loaded from. As this device handle is passed to
    32   GetSectionFromFv as the identifier for a Firmware Volume, an EFI_FIRMWARE_VOLUME2_PROTOCOL 
     32  GetSectionFromFv as the identifier for a Firmware Volume, an EFI_FIRMWARE_VOLUME2_PROTOCOL
    3333  protocol instance should be located succesfully by calling gBS->HandleProtocol ().
    3434
    3535  This function locates the EFI_LOADED_IMAGE_PROTOCOL instance installed
    3636  on ImageHandle. It then returns EFI_LOADED_IMAGE_PROTOCOL.DeviceHandle.
    37  
     37
    3838  If ImageHandle is NULL, then ASSERT ();
    3939  If failed to locate a EFI_LOADED_IMAGE_PROTOCOL on ImageHandle, then ASSERT ();
    40  
     40
    4141  @param  ImageHandle         The firmware allocated handle for UEFI image.
    4242
     
    5151  EFI_STATUS                    Status;
    5252  EFI_LOADED_IMAGE_PROTOCOL     *LoadedImage;
    53  
     53
    5454  ASSERT (ImageHandle != NULL);
    5555
     
    6767
    6868/**
    69   Allocate and fill a buffer from a Firmware Section identified by a Firmware File GUID name, a Firmware 
     69  Allocate and fill a buffer from a Firmware Section identified by a Firmware File GUID name, a Firmware
    7070  Section type and instance number from the specified Firmware Volume.
    7171
    72   This functions first locate the EFI_FIRMWARE_VOLUME2_PROTOCOL protocol instance on FvHandle in order to 
    73   carry out the Firmware Volume read operation. The function then reads the Firmware Section found sepcifed 
    74   by NameGuid, SectionType and SectionInstance. 
    75  
    76   The details of this search order is defined in description of EFI_FIRMWARE_VOLUME2_PROTOCOL.ReadSection () 
     72  This functions first locate the EFI_FIRMWARE_VOLUME2_PROTOCOL protocol instance on FvHandle in order to
     73  carry out the Firmware Volume read operation. The function then reads the Firmware Section found sepcifed
     74  by NameGuid, SectionType and SectionInstance.
     75
     76  The details of this search order is defined in description of EFI_FIRMWARE_VOLUME2_PROTOCOL.ReadSection ()
    7777  found in PI Specification.
    78  
    79   If SectionType is EFI_SECTION_TE, EFI_SECTION_TE is used as section type to start the search. If EFI_SECTION_TE section 
    80   is not found, EFI_SECTION_PE32 will be used to try the search again. If no EFI_SECTION_PE32 section is found, EFI_NOT_FOUND 
     78
     79  If SectionType is EFI_SECTION_TE, EFI_SECTION_TE is used as section type to start the search. If EFI_SECTION_TE section
     80  is not found, EFI_SECTION_PE32 will be used to try the search again. If no EFI_SECTION_PE32 section is found, EFI_NOT_FOUND
    8181  is returned.
    82  
    83   The data and size is returned by Buffer and Size. The caller is responsible to free the Buffer allocated 
     82
     83  The data and size is returned by Buffer and Size. The caller is responsible to free the Buffer allocated
    8484  by this function. This function can be only called at TPL_NOTIFY and below.
    85  
     85
    8686  If FvHandle is NULL, then ASSERT ();
    8787  If NameGuid is NULL, then ASSERT();
     
    8989  If Size is NULL, then ASSERT().
    9090
    91   @param  FvHandle                The device handle that contains a instance of 
     91  @param  FvHandle                The device handle that contains a instance of
    9292                                  EFI_FIRMWARE_VOLUME2_PROTOCOL instance.
    9393  @param  NameGuid                The GUID name of a Firmware File.
    9494  @param  SectionType             The Firmware Section type.
    95   @param  SectionInstance         The instance number of Firmware Section to 
     95  @param  SectionInstance         The instance number of Firmware Section to
    9696                                  read from starting from 0.
    97   @param  Buffer                  On output, Buffer contains the the data read 
     97  @param  Buffer                  On output, Buffer contains the the data read
    9898                                  from the section in the Firmware File found.
    9999  @param  Size                    On output, the size of Buffer.
    100100
    101101  @retval  EFI_SUCCESS            The image is found and data and size is returned.
    102   @retval  EFI_NOT_FOUND          The image specified by NameGuid and SectionType 
     102  @retval  EFI_NOT_FOUND          The image specified by NameGuid and SectionType
    103103                                  can't be found.
    104   @retval  EFI_OUT_OF_RESOURCES   There were not enough resources to allocate the 
     104  @retval  EFI_OUT_OF_RESOURCES   There were not enough resources to allocate the
    105105                                  output data buffer or complete the operations.
    106   @retval  EFI_DEVICE_ERROR       A hardware error occurs during reading from the 
     106  @retval  EFI_DEVICE_ERROR       A hardware error occurs during reading from the
    107107                                  Firmware Volume.
    108   @retval  EFI_ACCESS_DENIED      The firmware volume containing the searched 
     108  @retval  EFI_ACCESS_DENIED      The firmware volume containing the searched
    109109                                  Firmware File is configured to disallow reads.
    110  
     110
    111111**/
    112112EFI_STATUS
     
    127127  ASSERT (Buffer != NULL);
    128128  ASSERT (Size != NULL);
    129  
     129
    130130  ASSERT (FvHandle != NULL);
    131131
     
    156156  if (EFI_ERROR (Status) && (SectionType == EFI_SECTION_TE)) {
    157157    //
    158     // Try reading PE32 section, if the required section is TE type 
     158    // Try reading PE32 section, if the required section is TE type
    159159    //
    160160    *Buffer = NULL;
     
    175175
    176176/**
    177   Searches all the available firmware volumes and returns the first matching FFS section. 
     177  Searches all the available firmware volumes and returns the first matching FFS section.
    178178
    179179  This function searches all the firmware volumes for FFS files with FV file type specified by FileType
    180   The order that the firmware volumes is searched is not deterministic. For each available FV a search 
    181   is made for FFS file of type FileType. If the FV contains more than one FFS file with the same FileType, 
    182   the FileInstance instance will be the matched FFS file. For each FFS file found a search 
    183   is made for FFS sections of type SectionType. If the FFS file contains at least SectionInstance instances 
    184   of the FFS section specified by SectionType, then the SectionInstance instance is returned in Buffer. 
    185   Buffer is allocated using AllocatePool(), and the size of the allocated buffer is returned in Size. 
    186   It is the caller's responsibility to use FreePool() to free the allocated buffer. 
    187   See EFI_FIRMWARE_VOLUME2_PROTOCOL.ReadSection() for details on how sections 
     180  The order that the firmware volumes is searched is not deterministic. For each available FV a search
     181  is made for FFS file of type FileType. If the FV contains more than one FFS file with the same FileType,
     182  the FileInstance instance will be the matched FFS file. For each FFS file found a search
     183  is made for FFS sections of type SectionType. If the FFS file contains at least SectionInstance instances
     184  of the FFS section specified by SectionType, then the SectionInstance instance is returned in Buffer.
     185  Buffer is allocated using AllocatePool(), and the size of the allocated buffer is returned in Size.
     186  It is the caller's responsibility to use FreePool() to free the allocated buffer.
     187  See EFI_FIRMWARE_VOLUME2_PROTOCOL.ReadSection() for details on how sections
    188188  are retrieved from an FFS file based on SectionType and SectionInstance.
    189189
    190   If SectionType is EFI_SECTION_TE, and the search with an FFS file fails, 
     190  If SectionType is EFI_SECTION_TE, and the search with an FFS file fails,
    191191  the search will be retried with a section type of EFI_SECTION_PE32.
    192192  This function must be called with a TPL <= TPL_NOTIFY.
     
    195195  If Size is NULL, then ASSERT().
    196196
    197   @param  FileType             Indicates the FV file type to search for within all 
     197  @param  FileType             Indicates the FV file type to search for within all
    198198                               available FVs.
    199   @param  FileInstance         Indicates which file instance within all available 
     199  @param  FileInstance         Indicates which file instance within all available
    200200                               FVs specified by FileType.
    201201                               FileInstance starts from zero.
    202   @param  SectionType          Indicates the FFS section type to search for 
    203                                within the FFS file 
     202  @param  SectionType          Indicates the FFS section type to search for
     203                               within the FFS file
    204204                               specified by FileType with FileInstance.
    205   @param  SectionInstance      Indicates which section instance within the FFS file 
    206                                specified by FileType with FileInstance to retrieve. 
     205  @param  SectionInstance      Indicates which section instance within the FFS file
     206                               specified by FileType with FileInstance to retrieve.
    207207                               SectionInstance starts from zero.
    208   @param  Buffer               On output, a pointer to a callee allocated buffer 
     208  @param  Buffer               On output, a pointer to a callee allocated buffer
    209209                               containing the FFS file section that was found.
    210                                Is it the caller's responsibility to free this 
     210                               Is it the caller's responsibility to free this
    211211                               buffer using FreePool().
    212212  @param  Size                 On output, a pointer to the size, in bytes, of Buffer.
     
    214214  @retval  EFI_SUCCESS          The specified FFS section was returned.
    215215  @retval  EFI_NOT_FOUND        The specified FFS section could not be found.
    216   @retval  EFI_OUT_OF_RESOURCES There are not enough resources available to retrieve 
     216  @retval  EFI_OUT_OF_RESOURCES There are not enough resources available to retrieve
    217217                                the matching FFS section.
    218   @retval  EFI_DEVICE_ERROR     The FFS section could not be retrieves due to a 
     218  @retval  EFI_DEVICE_ERROR     The FFS section could not be retrieves due to a
    219219                                device error.
    220   @retval  EFI_ACCESS_DENIED    The FFS section could not be retrieves because 
    221                                 the firmware volume that 
     220  @retval  EFI_ACCESS_DENIED    The FFS section could not be retrieves because
     221                                the firmware volume that
    222222                                contains the matching FFS section does not allow reads.
    223223**/
     
    290290    if (IndexFile == 0) {
    291291      Status = InternalGetSectionFromFv (
    292                  HandleBuffer[IndexFv], 
     292                 HandleBuffer[IndexFv],
    293293                 &NameGuid,
    294294                 SectionType,
     
    305305
    306306  //
    307   // The required FFS section file is not found. 
     307  // The required FFS section file is not found.
    308308  //
    309309  if (IndexFv == HandleCount) {
     
    312312
    313313Done:
    314   if (HandleBuffer != NULL) { 
     314  if (HandleBuffer != NULL) {
    315315    FreePool(HandleBuffer);
    316316  }
     
    320320
    321321/**
    322   Searches all the availables firmware volumes and returns the first matching FFS section. 
    323 
    324   This function searches all the firmware volumes for FFS files with an FFS filename specified by NameGuid. 
    325   The order that the firmware volumes is searched is not deterministic. For each FFS file found a search 
    326   is made for FFS sections of type SectionType. If the FFS file contains at least SectionInstance instances 
    327   of the FFS section specified by SectionType, then the SectionInstance instance is returned in Buffer. 
    328   Buffer is allocated using AllocatePool(), and the size of the allocated buffer is returned in Size. 
    329   It is the caller's responsibility to use FreePool() to free the allocated buffer. 
    330   See EFI_FIRMWARE_VOLUME2_PROTOCOL.ReadSection() for details on how sections 
     322  Searches all the availables firmware volumes and returns the first matching FFS section.
     323
     324  This function searches all the firmware volumes for FFS files with an FFS filename specified by NameGuid.
     325  The order that the firmware volumes is searched is not deterministic. For each FFS file found a search
     326  is made for FFS sections of type SectionType. If the FFS file contains at least SectionInstance instances
     327  of the FFS section specified by SectionType, then the SectionInstance instance is returned in Buffer.
     328  Buffer is allocated using AllocatePool(), and the size of the allocated buffer is returned in Size.
     329  It is the caller's responsibility to use FreePool() to free the allocated buffer.
     330  See EFI_FIRMWARE_VOLUME2_PROTOCOL.ReadSection() for details on how sections
    331331  are retrieved from an FFS file based on SectionType and SectionInstance.
    332332
    333   If SectionType is EFI_SECTION_TE, and the search with an FFS file fails, 
     333  If SectionType is EFI_SECTION_TE, and the search with an FFS file fails,
    334334  the search will be retried with a section type of EFI_SECTION_PE32.
    335335  This function must be called with a TPL <= TPL_NOTIFY.
     
    340340
    341341
    342   @param  NameGuid             A pointer to to the FFS filename GUID to search for 
    343                                within any of the firmware volumes in the platform. 
    344   @param  SectionType          Indicates the FFS section type to search for within 
     342  @param  NameGuid             A pointer to to the FFS filename GUID to search for
     343                               within any of the firmware volumes in the platform.
     344  @param  SectionType          Indicates the FFS section type to search for within
    345345                               the FFS file specified by NameGuid.
    346   @param  SectionInstance      Indicates which section instance within the FFS file 
     346  @param  SectionInstance      Indicates which section instance within the FFS file
    347347                               specified by NameGuid to retrieve.
    348   @param  Buffer               On output, a pointer to a callee allocated buffer 
    349                                containing the FFS file section that was found. 
    350                                Is it the caller's responsibility to free this buffer 
     348  @param  Buffer               On output, a pointer to a callee allocated buffer
     349                               containing the FFS file section that was found.
     350                               Is it the caller's responsibility to free this buffer
    351351                               using FreePool().
    352352  @param  Size                 On output, a pointer to the size, in bytes, of Buffer.
     
    354354  @retval  EFI_SUCCESS          The specified FFS section was returned.
    355355  @retval  EFI_NOT_FOUND        The specified FFS section could not be found.
    356   @retval  EFI_OUT_OF_RESOURCES There are not enough resources available to 
     356  @retval  EFI_OUT_OF_RESOURCES There are not enough resources available to
    357357                                retrieve the matching FFS section.
    358   @retval  EFI_DEVICE_ERROR     The FFS section could not be retrieves due to a 
     358  @retval  EFI_DEVICE_ERROR     The FFS section could not be retrieves due to a
    359359                                device error.
    360   @retval  EFI_ACCESS_DENIED    The FFS section could not be retrieves because the 
    361                                 firmware volume that 
     360  @retval  EFI_ACCESS_DENIED    The FFS section could not be retrieves because the
     361                                firmware volume that
    362362                                contains the matching FFS section does not allow reads.
    363363**/
     
    415415    if (HandleBuffer[Index] != FvHandle) {
    416416      Status = InternalGetSectionFromFv (
    417                  HandleBuffer[Index], 
    418                  NameGuid, 
    419                  SectionType, 
     417                 HandleBuffer[Index],
     418                 NameGuid,
     419                 SectionType,
    420420                 SectionInstance,
    421                  Buffer, 
     421                 Buffer,
    422422                 Size
    423423                 );
     
    435435
    436436Done:
    437  
    438   if (HandleBuffer != NULL) { 
     437
     438  if (HandleBuffer != NULL) {
    439439    FreePool(HandleBuffer);
    440440  }
    441441  return Status;
    442  
     442
    443443}
    444444
    445445/**
    446   Searches the firmware volume that the currently executing module was loaded from and returns the first matching FFS section. 
    447 
    448   This function searches the firmware volume that the currently executing module was loaded 
    449   from for an FFS file with an FFS filename specified by NameGuid. If the FFS file is found a search 
    450   is made for FFS sections of type SectionType. If the FFS file contains at least SectionInstance 
     446  Searches the firmware volume that the currently executing module was loaded from and returns the first matching FFS section.
     447
     448  This function searches the firmware volume that the currently executing module was loaded
     449  from for an FFS file with an FFS filename specified by NameGuid. If the FFS file is found a search
     450  is made for FFS sections of type SectionType. If the FFS file contains at least SectionInstance
    451451  instances of the FFS section specified by SectionType, then the SectionInstance instance is returned in Buffer.
    452   Buffer is allocated using AllocatePool(), and the size of the allocated buffer is returned in Size. 
    453   It is the caller's responsibility to use FreePool() to free the allocated buffer. 
    454   See EFI_FIRMWARE_VOLUME2_PROTOCOL.ReadSection() for details on how sections are retrieved from 
     452  Buffer is allocated using AllocatePool(), and the size of the allocated buffer is returned in Size.
     453  It is the caller's responsibility to use FreePool() to free the allocated buffer.
     454  See EFI_FIRMWARE_VOLUME2_PROTOCOL.ReadSection() for details on how sections are retrieved from
    455455  an FFS file based on SectionType and SectionInstance.
    456456
    457457  If the currently executing module was not loaded from a firmware volume, then EFI_NOT_FOUND is returned.
    458   If SectionType is EFI_SECTION_TE, and the search with an FFS file fails, 
     458  If SectionType is EFI_SECTION_TE, and the search with an FFS file fails,
    459459  the search will be retried with a section type of EFI_SECTION_PE32.
    460  
     460
    461461  This function must be called with a TPL <= TPL_NOTIFY.
    462462  If NameGuid is NULL, then ASSERT().
     
    464464  If Size is NULL, then ASSERT().
    465465
    466   @param  NameGuid             A pointer to to the FFS filename GUID to search for 
    467                                within the firmware volumes that the currently 
     466  @param  NameGuid             A pointer to to the FFS filename GUID to search for
     467                               within the firmware volumes that the currently
    468468                               executing module was loaded from.
    469   @param  SectionType          Indicates the FFS section type to search for within 
     469  @param  SectionType          Indicates the FFS section type to search for within
    470470                               the FFS file specified by NameGuid.
    471   @param  SectionInstance      Indicates which section instance within the FFS file 
     471  @param  SectionInstance      Indicates which section instance within the FFS file
    472472                               specified by NameGuid to retrieve.
    473   @param  Buffer               On output, a pointer to a callee allocated buffer 
    474                                containing the FFS file section that was found. 
    475                                Is it the caller's responsibility to free this buffer 
     473  @param  Buffer               On output, a pointer to a callee allocated buffer
     474                               containing the FFS file section that was found.
     475                               Is it the caller's responsibility to free this buffer
    476476                               using FreePool().
    477477  @param  Size                 On output, a pointer to the size, in bytes, of Buffer.
     
    480480  @retval  EFI_SUCCESS          The specified FFS section was returned.
    481481  @retval  EFI_NOT_FOUND        The specified FFS section could not be found.
    482   @retval  EFI_OUT_OF_RESOURCES There are not enough resources available to retrieve 
     482  @retval  EFI_OUT_OF_RESOURCES There are not enough resources available to retrieve
    483483                                the matching FFS section.
    484   @retval  EFI_DEVICE_ERROR     The FFS section could not be retrieves due to a 
     484  @retval  EFI_DEVICE_ERROR     The FFS section could not be retrieves due to a
    485485                                device error.
    486   @retval  EFI_ACCESS_DENIED    The FFS section could not be retrieves because the 
    487                                 firmware volume that contains the matching FFS 
    488                                 section does not allow reads. 
     486  @retval  EFI_ACCESS_DENIED    The FFS section could not be retrieves because the
     487                                firmware volume that contains the matching FFS
     488                                section does not allow reads.
    489489**/
    490490EFI_STATUS
     
    513513
    514514  This function searches the FFS file that the currently executing module was loaded from for a FFS sections of type SectionType.
    515   If the FFS file contains at least SectionInstance instances of the FFS section specified by SectionType, 
    516   then the SectionInstance instance is returned in Buffer. Buffer is allocated using AllocatePool(), 
    517   and the size of the allocated buffer is returned in Size. It is the caller's responsibility 
    518   to use FreePool() to free the allocated buffer. See EFI_FIRMWARE_VOLUME2_PROTOCOL.ReadSection() for 
     515  If the FFS file contains at least SectionInstance instances of the FFS section specified by SectionType,
     516  then the SectionInstance instance is returned in Buffer. Buffer is allocated using AllocatePool(),
     517  and the size of the allocated buffer is returned in Size. It is the caller's responsibility
     518  to use FreePool() to free the allocated buffer. See EFI_FIRMWARE_VOLUME2_PROTOCOL.ReadSection() for
    519519  details on how sections are retrieved from an FFS file based on SectionType and SectionInstance.
    520520
    521521  If the currently executing module was not loaded from an FFS file, then EFI_NOT_FOUND is returned.
    522   If SectionType is EFI_SECTION_TE, and the search with an FFS file fails, 
     522  If SectionType is EFI_SECTION_TE, and the search with an FFS file fails,
    523523  the search will be retried with a section type of EFI_SECTION_PE32.
    524524  This function must be called with a TPL <= TPL_NOTIFY.
    525  
     525
    526526  If Buffer is NULL, then ASSERT().
    527527  If Size is NULL, then ASSERT().
    528528
    529529
    530   @param  SectionType          Indicates the FFS section type to search for within 
    531                                the FFS file that the currently executing module 
     530  @param  SectionType          Indicates the FFS section type to search for within
     531                               the FFS file that the currently executing module
    532532                               was loaded from.
    533   @param  SectionInstance      Indicates which section instance to retrieve within 
    534                                the FFS file that the currently executing module 
     533  @param  SectionInstance      Indicates which section instance to retrieve within
     534                               the FFS file that the currently executing module
    535535                               was loaded from.
    536   @param  Buffer               On output, a pointer to a callee allocated buffer 
    537                                containing the FFS file section that was found. 
    538                                Is it the caller's responsibility to free this buffer 
     536  @param  Buffer               On output, a pointer to a callee allocated buffer
     537                               containing the FFS file section that was found.
     538                               Is it the caller's responsibility to free this buffer
    539539                               using FreePool().
    540540  @param  Size                 On output, a pointer to the size, in bytes, of Buffer.
     
    542542  @retval  EFI_SUCCESS          The specified FFS section was returned.
    543543  @retval  EFI_NOT_FOUND        The specified FFS section could not be found.
    544   @retval  EFI_OUT_OF_RESOURCES There are not enough resources available to retrieve 
     544  @retval  EFI_OUT_OF_RESOURCES There are not enough resources available to retrieve
    545545                                the matching FFS section.
    546   @retval  EFI_DEVICE_ERROR     The FFS section could not be retrieves due to a 
     546  @retval  EFI_DEVICE_ERROR     The FFS section could not be retrieves due to a
    547547                                device error.
    548   @retval  EFI_ACCESS_DENIED    The FFS section could not be retrieves because the 
    549                                 firmware volume that contains the matching FFS 
    550                                 section does not allow reads. 
    551  
     548  @retval  EFI_ACCESS_DENIED    The FFS section could not be retrieves because the
     549                                firmware volume that contains the matching FFS
     550                                section does not allow reads.
     551
    552552**/
    553553EFI_STATUS
     
    572572
    573573/**
    574   Get the image file buffer data and buffer size by its device path. 
    575  
    576   Access the file either from a firmware volume, from a file system interface, 
     574  Get the image file buffer data and buffer size by its device path.
     575
     576  Access the file either from a firmware volume, from a file system interface,
    577577  or from the load file interface.
    578  
     578
    579579  Allocate memory to store the found image. The caller is responsible to free memory.
    580580
     
    583583  If AuthenticationStatus is NULL, then NULL is returned.
    584584
    585   @param[in]       BootPolicy           Policy for Open Image File.If TRUE, indicates 
    586                                         that the request originates from the boot 
     585  @param[in]       BootPolicy           Policy for Open Image File.If TRUE, indicates
     586                                        that the request originates from the boot
    587587                                        manager, and that the boot manager is
    588588                                        attempting to load FilePath as a boot
    589                                         selection. If FALSE, then FilePath must 
     589                                        selection. If FALSE, then FilePath must
    590590                                        match an exact file to be loaded.
    591591  @param[in]       FilePath             The pointer to the device path of the file
    592592                                        that is absracted to the file buffer.
    593   @param[out]      FileSize             The pointer to the size of the abstracted 
     593  @param[out]      FileSize             The pointer to the size of the abstracted
    594594                                        file buffer.
    595595  @param[out]      AuthenticationStatus Pointer to the authentication status.
     
    644644  ImageBufferSize     = 0;
    645645  *AuthenticationStatus = 0;
    646  
     646
    647647  //
    648648  // Copy File Device Path
     
    748748            break;
    749749          }
    750  
     750
    751751          LastHandle = FileHandle;
    752752          FileHandle = NULL;
    753  
     753
    754754          Status = LastHandle->Open (
    755755                                LastHandle,
     
    759759                                0
    760760                                );
    761  
     761
    762762          //
    763763          // Close the previous node
    764764          //
    765765          LastHandle->Close (LastHandle);
    766  
     766
    767767          DevicePathNode = NextDevicePathNode (DevicePathNode);
    768768        }
    769  
     769
    770770        if (!EFI_ERROR (Status)) {
    771771          //
     
    781781                                FileInfo
    782782                                );
    783  
     783
    784784          if (Status == EFI_BUFFER_TOO_SMALL) {
    785785            FileInfo = AllocatePool (FileInfoSize);
     
    795795            }
    796796          }
    797          
     797
    798798          if (!EFI_ERROR (Status) && (FileInfo != NULL)) {
    799799            //
     
    814814        //
    815815        // Close the file and Free FileInfo and TempDevicePathNode since we are done
    816         // 
     816        //
    817817        if (FileInfo != NULL) {
    818818          FreePool (FileInfo);
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/DxeServicesLib/DxeServicesLib.inf

    r58459 r58466  
    33#
    44# DXE Services Library provides access data from sections of FFS files based on FV protocol.
    5 # It also provides access file based on file path from a firmware volume, 
     5# It also provides access file based on file path from a firmware volume,
    66# from a file system interface, or from the load file interface.
    77#
     
    5252  gEfiLoadedImageProtocolGuid                   ## SOMETIMES_CONSUMES
    5353  gEfiLoadFileProtocolGuid                      ## SOMETIMES_CONSUMES
    54   gEfiLoadFile2ProtocolGuid                     ## SOMETIMES_CONSUMES 
    55   gEfiSimpleFileSystemProtocolGuid              ## SOMETIMES_CONSUMES 
     54  gEfiLoadFile2ProtocolGuid                     ## SOMETIMES_CONSUMES
     55  gEfiSimpleFileSystemProtocolGuid              ## SOMETIMES_CONSUMES
    5656
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.c

    r48674 r58466  
    22  This library implement library class DxeServiceTableLib.
    33  It produce EFI_DXE_SERVICE pointer in global variable gDS in library's constructure.
    4  
     4
    55  A DXE driver can use gDS pointer to access services in EFI_DXE_SERVICE, if this
    6   DXE driver declare that use DxeServicesTableLib library class and link to this 
     6  DXE driver declare that use DxeServicesTableLib library class and link to this
    77  library instance.
    88
    9   Please attention this library instance can not be used util EFI_SYSTEM_TABLE was 
     9  Please attention this library instance can not be used util EFI_SYSTEM_TABLE was
    1010  initialized.
    11  
     11
    1212  This library contains contruct function to retrieve EFI_DXE_SERIVCE, this construct
    1313  function will be invoked in DXE driver's autogen file.
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/DxeSmbusLib/DxeSmbusLib.c

    r48674 r58466  
    5858  the Length byte, word, or a block of data.
    5959
    60   @param  SmbusOperation  Signifies which particular SMBus hardware protocol instance 
     60  @param  SmbusOperation  Signifies which particular SMBus hardware protocol instance
    6161                          that it will use to execute the SMBus transactions.
    6262  @param  SmBusAddress    The address that encodes the SMBUS Slave Address,
    6363                          SMBUS Command, SMBUS Data Length, and PEC.
    64   @param  Length          Signifies the number of bytes that this operation will do. 
    65                           The maximum number of bytes can be revision specific 
     64  @param  Length          Signifies the number of bytes that this operation will do.
     65                          The maximum number of bytes can be revision specific
    6666                          and operation specific.
    67   @param  Buffer          Contains the value of data to execute to the SMBus slave 
    68                           device. Not all operations require this argument. The 
     67  @param  Buffer          Contains the value of data to execute to the SMBus slave
     68                          device. Not all operations require this argument. The
    6969                          length of this buffer is identified by Length.
    7070  @param  Status          Return status for the executed command.
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/DxeSmbusLib/InternalSmbusLib.h

    r48674 r58466  
    3939  the Length byte, word, or a block of data.
    4040
    41   @param  SmbusOperation  Signifies which particular SMBus hardware protocol instance 
     41  @param  SmbusOperation  Signifies which particular SMBus hardware protocol instance
    4242                          that it will use toexecute the SMBus transactions.
    4343  @param  SmBusAddress    The address that encodes the SMBUS Slave Address,
    4444                          SMBUS Command, SMBUS Data Length, and PEC.
    45   @param  Length          Signifies the number of bytes that this operation will 
    46                           do. The maximum number of bytes can be revision specific 
     45  @param  Length          Signifies the number of bytes that this operation will
     46                          do. The maximum number of bytes can be revision specific
    4747                          and operation specific.
    4848  @param  Buffer          Contains the value of data to execute to the SMBus slave
    49                           device. Not all operations require this argument. The 
     49                          device. Not all operations require this argument. The
    5050                          length of this buffer is identified by Length.
    5151  @param  Status          Return status for the executed command.
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/DxeSmbusLib/SmbusLib.c

    r48674 r58466  
    3232                        This is an optional parameter and may be NULL.
    3333                        RETURN_SUCCESS:  The SMBUS command was executed.
    34                         RETURN_TIMEOUT:  A timeout occurred while executing the 
    35                         SMBUS command. 
    36                         RETURN_DEVICE_ERROR: The request was not 
    37                         completed because a failure reflected in the Host Status 
    38                         Register bit.  Device errors are a result of a transaction 
    39                         collision, illegal command field, unclaimed cycle (host 
    40                         initiated), or bus errors (collisions). 
     34                        RETURN_TIMEOUT:  A timeout occurred while executing the
     35                        SMBUS command.
     36                        RETURN_DEVICE_ERROR: The request was not
     37                        completed because a failure reflected in the Host Status
     38                        Register bit.  Device errors are a result of a transaction
     39                        collision, illegal command field, unclaimed cycle (host
     40                        initiated), or bus errors (collisions).
    4141                        RETURN_UNSUPPORTED: The SMBus operation is not supported.
    4242
     
    7373                        This is an optional parameter and may be NULL.
    7474                        RETURN_SUCCESS: The SMBUS command was executed.
    75                         RETURN_TIMEOUT: A timeout occurred while executing the 
    76                         SMBUS command.
    77                         RETURN_DEVICE_ERROR:  The request was not completed because 
    78                         a failure reflected in the Host Status Register bit. 
    79                         Device errors are a result of a transaction collision, 
    80                         illegal command field, unclaimed cycle (host initiated), 
     75                        RETURN_TIMEOUT: A timeout occurred while executing the
     76                        SMBUS command.
     77                        RETURN_DEVICE_ERROR:  The request was not completed because
     78                        a failure reflected in the Host Status Register bit.
     79                        Device errors are a result of a transaction collision,
     80                        illegal command field, unclaimed cycle (host initiated),
    8181                        or bus errors (collisions).
    8282                        RETURN_UNSUPPORTED:  The SMBus operation is not supported.
     
    114114                        This is an optional parameter and may be NULL.
    115115                        RETURN_SUCCESS: The SMBUS command was executed.
    116                         RETURN_TIMEOUT: A timeout occurred while executing the 
    117                         SMBUS command.
    118                         RETURN_DEVICE_ERROR:  The request was not completed because 
     116                        RETURN_TIMEOUT: A timeout occurred while executing the
     117                        SMBUS command.
     118                        RETURN_DEVICE_ERROR:  The request was not completed because
    119119                        a failure reflected in the Host Status Register bit.  Device
    120                         errors are a result of a transaction collision, illegal 
    121                         command field, unclaimed cycle(host initiated), or bus 
     120                        errors are a result of a transaction collision, illegal
     121                        command field, unclaimed cycle(host initiated), or bus
    122122                        errors (collisions).
    123123                        RETURN_CRC_ERROR:  The checksum is not correct. (PEC is incorrect.)
     
    162162                        This is an optional parameter and may be NULL.
    163163                        RETURN_SUCCESS: The SMBUS command was executed.
    164                         RETURN_TIMEOUT: A timeout occurred while executing the 
    165                         SMBUS command.
    166                         RETURN_DEVICE_ERROR:  The request was not completed because
    167                         a failure reflected in the Host Status Register bit.  Device 
    168                         errors are a result of a transaction collision, illegal 
    169                         command field, unclaimed cycle(host initiated), or bus 
     164                        RETURN_TIMEOUT: A timeout occurred while executing the
     165                        SMBUS command.
     166                        RETURN_DEVICE_ERROR:  The request was not completed because
     167                        a failure reflected in the Host Status Register bit.  Device
     168                        errors are a result of a transaction collision, illegal
     169                        command field, unclaimed cycle(host initiated), or bus
    170170                        errors (collisions).
    171171                        RETURN_CRC_ERROR:  The checksum is not correct (PEC is incorrect)
     
    210210                        This is an optional parameter and may be NULL.
    211211                        RETURN_SUCCESS: The SMBUS command was executed.
    212                         RETURN_TIMEOUT: A timeout occurred while executing the 
    213                         SMBUS command.
    214                         RETURN_DEVICE_ERROR:  The request was not completed because 
    215                         a failurereflected in the Host Status Register bit.  Device 
    216                         errors are a result of a transaction collision, illegal 
    217                         command field, unclaimed cycle (host initiated), or bus 
     212                        RETURN_TIMEOUT: A timeout occurred while executing the
     213                        SMBUS command.
     214                        RETURN_DEVICE_ERROR:  The request was not completed because
     215                        a failurereflected in the Host Status Register bit.  Device
     216                        errors are a result of a transaction collision, illegal
     217                        command field, unclaimed cycle (host initiated), or bus
    218218                        errors (collisions).
    219219                        RETURN_CRC_ERROR:  The checksum is not correct (PEC is incorrect)
     
    257257                        This is an optional parameter and may be NULL.
    258258                        RETURN_SUCCESS: The SMBUS command was executed.
    259                         RETURN_TIMEOUT: A timeout occurred while executing the 
    260                         SMBUS command.
    261                         RETURN_DEVICE_ERROR:  The request was not completed because 
    262                         a failure reflected in the Host Status Register bit.  Device 
    263                         errors are a result of a transaction collision, illegal 
    264                         command field, unclaimed cycle host initiated), or bus 
     259                        RETURN_TIMEOUT: A timeout occurred while executing the
     260                        SMBUS command.
     261                        RETURN_DEVICE_ERROR:  The request was not completed because
     262                        a failure reflected in the Host Status Register bit.  Device
     263                        errors are a result of a transaction collision, illegal
     264                        command field, unclaimed cycle host initiated), or bus
    265265                        errors (collisions).
    266266                        RETURN_CRC_ERROR:  The checksum is not correct. (PEC is incorrect.)
     
    298298  If Length in SmBusAddress is not zero, then ASSERT().
    299299  If any reserved bits of SmBusAddress are set, then ASSERT().
    300  
    301   @param  SmBusAddress  The address that encodes the SMBUS Slave Address,
    302                         SMBUS Command, SMBUS Data Length, and PEC.
    303   @param  Status        Return status for the executed command.
    304                         This is an optional parameter and may be NULL.
    305                         RETURN_SUCCESS: The SMBUS command was executed.
    306                         RETURN_TIMEOUT: A timeout occurred while executing the 
    307                         SMBUS command.
    308                         RETURN_DEVICE_ERROR:  The request was not completed because 
    309                         a failure reflected in the Host Status Register bit. 
    310                         Device errors are a result of a transaction collision, 
    311                         illegal command field, unclaimed cycle (host initiated), 
     300
     301  @param  SmBusAddress  The address that encodes the SMBUS Slave Address,
     302                        SMBUS Command, SMBUS Data Length, and PEC.
     303  @param  Status        Return status for the executed command.
     304                        This is an optional parameter and may be NULL.
     305                        RETURN_SUCCESS: The SMBUS command was executed.
     306                        RETURN_TIMEOUT: A timeout occurred while executing the
     307                        SMBUS command.
     308                        RETURN_DEVICE_ERROR:  The request was not completed because
     309                        a failure reflected in the Host Status Register bit.
     310                        Device errors are a result of a transaction collision,
     311                        illegal command field, unclaimed cycle (host initiated),
    312312                        or bus errors (collisions).
    313                         RETURN_CRC_ERROR:  The checksum is not correct. (PEC is 
     313                        RETURN_CRC_ERROR:  The checksum is not correct. (PEC is
    314314                        incorrect.)
    315315                        RETURN_UNSUPPORTED:  The SMBus operation is not supported.
     
    352352                        This is an optional parameter and may be NULL.
    353353                        RETURN_SUCCESS: The SMBUS command was executed.
    354                         RETURN_TIMEOUT: A timeout occurred while executing the SMBUS 
     354                        RETURN_TIMEOUT: A timeout occurred while executing the SMBUS
    355355                        command.
    356                         RETURN_DEVICE_ERROR:  The request was not completed because 
    357                         a failure reflected in the Host Status Register bit. 
    358                         Device errors are a result of a transaction collision, 
    359                         illegal command field, unclaimed cycle (host initiated), 
     356                        RETURN_DEVICE_ERROR:  The request was not completed because
     357                        a failure reflected in the Host Status Register bit.
     358                        Device errors are a result of a transaction collision,
     359                        illegal command field, unclaimed cycle (host initiated),
    360360                        or bus errors (collisions).
    361                         RETURN_CRC_ERROR:  The checksum is not correct. 
     361                        RETURN_CRC_ERROR:  The checksum is not correct.
    362362                        (PEC is incorrect.)
    363363                        RETURN_UNSUPPORTED:  The SMBus operation is not supported.
     
    402402                        This is an optional parameter and may be NULL.
    403403                        RETURN_SUCCESS: The SMBUS command was executed.
    404                         RETURN_TIMEOUT: A timeout occurred while executing the 
    405                         SMBUS command.
    406                         RETURN_DEVICE_ERROR:  The request was not completed because 
    407                         a failure reflected in the Host Status Register bit. 
    408                         Device errors are a result of a transaction collision, 
    409                         illegal command field, unclaimed cycle (host initiated), 
     404                        RETURN_TIMEOUT: A timeout occurred while executing the
     405                        SMBUS command.
     406                        RETURN_DEVICE_ERROR:  The request was not completed because
     407                        a failure reflected in the Host Status Register bit.
     408                        Device errors are a result of a transaction collision,
     409                        illegal command field, unclaimed cycle (host initiated),
    410410                        or bus errors (collisions).
    411                         RETURN_CRC_ERROR:  The checksum is not correct. (PEC is 
     411                        RETURN_CRC_ERROR:  The checksum is not correct. (PEC is
    412412                        incorrect.)
    413413                        RETURN_UNSUPPORTED:  The SMBus operation is not supported.
     
    448448  @param  SmBusAddress  The address that encodes the SMBUS Slave Address,
    449449                        SMBUS Command, SMBUS Data Length, and PEC.
    450   @param  Buffer        The pointer to the buffer to store the bytes read from 
     450  @param  Buffer        The pointer to the buffer to store the bytes read from
    451451                        the SMBUS.
    452452  @param  Status        Return status for the executed command.
    453453                        This is an optional parameter and may be NULL.
    454454                        RETURN_SUCCESS: The SMBUS command was executed.
    455                         RETURN_TIMEOUT: A timeout occurred while executing the SMBUS 
     455                        RETURN_TIMEOUT: A timeout occurred while executing the SMBUS
    456456                        command.
    457                         RETURN_DEVICE_ERROR:  The request was not completed because 
    458                         a failure reflected in the Host Status Register bit.  Device 
    459                         errors are a result of a transaction collision, illegal 
    460                         command field, unclaimed cycle (host initiated), or bus 
    461                         errors (collisions).
    462                         RETURN_CRC_ERROR:  The checksum is not correct. (PEC is 
     457                        RETURN_DEVICE_ERROR:  The request was not completed because
     458                        a failure reflected in the Host Status Register bit.  Device
     459                        errors are a result of a transaction collision, illegal
     460                        command field, unclaimed cycle (host initiated), or bus
     461                        errors (collisions).
     462                        RETURN_CRC_ERROR:  The checksum is not correct. (PEC is
    463463                        incorrect.)
    464464                        RETURN_UNSUPPORTED:  The SMBus operation is not supported.
     
    489489  Bytes are written to the SMBUS from Buffer.
    490490  The number of bytes written is returned, and will never return a value larger than 32-bytes.
    491   If Status is not NULL, then the status of the executed command is returned in Status. 
     491  If Status is not NULL, then the status of the executed command is returned in Status.
    492492  If Length in SmBusAddress is zero or greater than 32, then ASSERT().
    493493  If Buffer is NULL, then ASSERT().
     
    496496  @param  SmBusAddress  The address that encodes the SMBUS Slave Address,
    497497                        MBUS Command, SMBUS Data Length, and PEC.
    498   @param  Buffer        The pointer to the buffer to store the bytes read from 
     498  @param  Buffer        The pointer to the buffer to store the bytes read from
    499499                        the SMBUS.
    500500  @param  Status        Return status for the executed command.
    501501                        This is an optional parameter and may be NULL.
    502                         RETURN_TIMEOUT: A timeout occurred while executing the 
    503                         SMBUS command.
    504                         RETURN_DEVICE_ERROR:  The request was not completed because 
    505                         a failure reflected in the Host Status Register bit.  Device 
    506                         errors are a result of a transaction collision, illegal 
    507                         command field, unclaimed cycle (host initiated), or bus 
    508                         errors (collisions).
    509                         RETURN_CRC_ERROR:  The checksum is not correct. (PEC is 
     502                        RETURN_TIMEOUT: A timeout occurred while executing the
     503                        SMBUS command.
     504                        RETURN_DEVICE_ERROR:  The request was not completed because
     505                        a failure reflected in the Host Status Register bit.  Device
     506                        errors are a result of a transaction collision, illegal
     507                        command field, unclaimed cycle (host initiated), or bus
     508                        errors (collisions).
     509                        RETURN_CRC_ERROR:  The checksum is not correct. (PEC is
    510510                        incorrect.)
    511511                        RETURN_UNSUPPORTED:  The SMBus operation is not supported.
     
    553553  @param  Status        Return status for the executed command.
    554554                        This is an optional parameter and may be NULL.
    555                         RETURN_TIMEOUT: A timeout occurred while executing the 
    556                         SMBUS command.
    557                         RETURN_DEVICE_ERROR: The request was not completed because 
    558                         a failure reflected in the Host Status Register bit.  Device 
    559                         errors are a result of a transaction collision, illegal 
    560                         command field, unclaimed cycle (host initiated), or bus 
    561                         errors (collisions).
    562                         RETURN_CRC_ERROR:  The checksum is not correct. (PEC is 
     555                        RETURN_TIMEOUT: A timeout occurred while executing the
     556                        SMBUS command.
     557                        RETURN_DEVICE_ERROR: The request was not completed because
     558                        a failure reflected in the Host Status Register bit.  Device
     559                        errors are a result of a transaction collision, illegal
     560                        command field, unclaimed cycle (host initiated), or bus
     561                        errors (collisions).
     562                        RETURN_CRC_ERROR:  The checksum is not correct. (PEC is
    563563                        incorrect.)
    564564                        RETURN_UNSUPPORTED:  The SMBus operation is not supported.
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/DxeTimerLibEsal/DxeTimerLibEsal.c

    r48674 r58466  
    4343    EFI_EXTENDED_SAL_STALL_SERVICES_PROTOCOL_GUID_LO,
    4444    EFI_EXTENDED_SAL_STALL_SERVICES_PROTOCOL_GUID_HI,
    45     StallFunctionId, 
    46     MicroSeconds, 
    47     0, 
    48     0, 
    49     0, 
    50     0, 
    51     0, 
     45    StallFunctionId,
     46    MicroSeconds,
     47    0,
     48    0,
     49    0,
     50    0,
     51    0,
    5252    0
    5353    );
     
    8383    EFI_EXTENDED_SAL_STALL_SERVICES_PROTOCOL_GUID_LO,
    8484    EFI_EXTENDED_SAL_STALL_SERVICES_PROTOCOL_GUID_HI,
    85     StallFunctionId, 
    86     MicroSeconds, 
    87     0, 
    88     0, 
    89     0, 
    90     0, 
    91     0, 
     85    StallFunctionId,
     86    MicroSeconds,
     87    0,
     88    0,
     89    0,
     90    0,
     91    0,
    9292    0
    9393    );
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/DxeTimerLibEsal/DxeTimerLibEsal.inf

    r58459 r58466  
    2020  MODULE_TYPE                    = DXE_DRIVER
    2121  VERSION_STRING                 = 1.0
    22   LIBRARY_CLASS                  = TimerLib|DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SMM_DRIVER DXE_SAL_DRIVER UEFI_DRIVER UEFI_APPLICATION 
     22  LIBRARY_CLASS                  = TimerLib|DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SMM_DRIVER DXE_SAL_DRIVER UEFI_DRIVER UEFI_APPLICATION
    2323
    2424#
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/PeiCoreEntryPoint/PeiCoreEntryPoint.c

    r48674 r58466  
    4040  If ProcessModuleEntryPointList() returns, then ASSERT() and halt the system.
    4141
    42   @param SecCoreData  Points to a data structure containing information about the 
    43                       PEI core's operating environment, such as the size and 
    44                       location of temporary RAM, the stack location and the BFV 
     42  @param SecCoreData  Points to a data structure containing information about the
     43                      PEI core's operating environment, such as the size and
     44                      location of temporary RAM, the stack location and the BFV
    4545                      location.
    46                      
    47   @param PpiList      Points to a list of one or more PPI descriptors to be 
    48                       installed initially by the PEI core. An empty PPI list 
    49                       consists of a single descriptor with the end-tag 
     46
     47  @param PpiList      Points to a list of one or more PPI descriptors to be
     48                      installed initially by the PEI core. An empty PPI list
     49                      consists of a single descriptor with the end-tag
    5050                      EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST.
    5151                      As part of its initialization phase, the PEI Foundation will
    52                       add these SEC-hosted PPIs to its PPI database, such that both 
    53                       the PEI Foundation and any modules can leverage the associated 
     52                      add these SEC-hosted PPIs to its PPI database, such that both
     53                      the PEI Foundation and any modules can leverage the associated
    5454                      service calls and/or code in these early PPIs.
    5555
    5656**/
    5757VOID
    58 EFIAPI 
     58EFIAPI
    5959_ModuleEntryPoint(
    6060  IN CONST  EFI_SEC_PEI_HAND_OFF    *SecCoreData,
     
    6363{
    6464  ProcessModuleEntryPointList (SecCoreData, PpiList, NULL);
    65  
     65
    6666  //
    6767  // Should never return
    6868  //
    6969  ASSERT(FALSE);
    70   CpuDeadLoop (); 
     70  CpuDeadLoop ();
    7171}
    7272
     
    7979  @param SecCoreData  Points to a data structure containing information about the PEI core's
    8080                      operating environment, such as the size and location of temporary RAM,
    81                       the stack location and the BFV location. 
     81                      the stack location and the BFV location.
    8282
    8383  @param PpiList      Points to a list of one or more PPI descriptors to be installed
    84                       initially by the PEI core.  An empty PPI list consists of 
    85                       a single descriptor with the end-tag 
     84                      initially by the PEI core.  An empty PPI list consists of
     85                      a single descriptor with the end-tag
    8686                      EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST.
    87                       As part of its initialization phase, the PEI Foundation will 
    88                       add these SEC-hosted PPIs to its PPI database, such that both 
    89                       the PEI Foundationand any modules can leverage the associated 
     87                      As part of its initialization phase, the PEI Foundation will
     88                      add these SEC-hosted PPIs to its PPI database, such that both
     89                      the PEI Foundationand any modules can leverage the associated
    9090                      service calls and/or code in these early PPIs.
    9191
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/PeiDxePostCodeLibReportStatusCode/PostCode.c

    r48674 r58466  
    4040  Sends an 32-bit value to a POST card.
    4141
    42   Sends the 32-bit value specified by Value to a POST card, and returns Value. 
    43   Some implementations of this library function may perform I/O operations 
    44   directly to a POST card device.  Other implementations may send Value to 
    45   ReportStatusCode(), and the status code reporting mechanism will eventually 
     42  Sends the 32-bit value specified by Value to a POST card, and returns Value.
     43  Some implementations of this library function may perform I/O operations
     44  directly to a POST card device.  Other implementations may send Value to
     45  ReportStatusCode(), and the status code reporting mechanism will eventually
    4646  display the 32-bit value on the status reporting device.
    47  
    48   PostCode() must actively prevent recursion.  If PostCode() is called while 
    49   processing another any other Post Code Library function, then 
     47
     48  PostCode() must actively prevent recursion.  If PostCode() is called while
     49  processing another any other Post Code Library function, then
    5050  PostCode() must return Value immediately.
    5151
     
    7070
    7171  Sends the 32-bit value specified by Value to a POST card, and returns Value.
    72   If Description is not NULL, then the ASCII string specified by Description is 
    73   also passed to the handler that displays the POST card value.  Some 
    74   implementations of this library function may perform I/O operations directly 
    75   to a POST card device.  Other implementations may send Value to ReportStatusCode(), 
    76   and the status code reporting mechanism will eventually display the 32-bit 
    77   value on the status reporting device. 
     72  If Description is not NULL, then the ASCII string specified by Description is
     73  also passed to the handler that displays the POST card value.  Some
     74  implementations of this library function may perform I/O operations directly
     75  to a POST card device.  Other implementations may send Value to ReportStatusCode(),
     76  and the status code reporting mechanism will eventually display the 32-bit
     77  value on the status reporting device.
    7878
    79   PostCodeWithDescription()must actively prevent recursion.  If 
    80   PostCodeWithDescription() is called while processing another any other Post 
    81   Code Library function, then PostCodeWithDescription() must return Value 
     79  PostCodeWithDescription()must actively prevent recursion.  If
     80  PostCodeWithDescription() is called while processing another any other Post
     81  Code Library function, then PostCodeWithDescription() must return Value
    8282  immediately.
    8383
    8484  @param  Value        The 32-bit value to write to the POST card.
    85   @param  Description  The pointer to an ASCII string that is a description of the 
    86                        POST code value.  This is an optional parameter that may 
     85  @param  Description  The pointer to an ASCII string that is a description of the
     86                       POST code value.  This is an optional parameter that may
    8787                       be NULL.
    8888
     
    118118  Returns TRUE if POST Codes are enabled.
    119119
    120   This function returns TRUE if the POST_CODE_PROPERTY_POST_CODE_ENABLED 
     120  This function returns TRUE if the POST_CODE_PROPERTY_POST_CODE_ENABLED
    121121  bit of PcdPostCodePropertyMask is set.  Otherwise FALSE is returned.
    122122
    123   @retval  TRUE   The POST_CODE_PROPERTY_POST_CODE_ENABLED bit of 
     123  @retval  TRUE   The POST_CODE_PROPERTY_POST_CODE_ENABLED bit of
    124124                  PcdPostCodeProperyMask is set.
    125   @retval  FALSE  The POST_CODE_PROPERTY_POST_CODE_ENABLED bit of 
     125  @retval  FALSE  The POST_CODE_PROPERTY_POST_CODE_ENABLED bit of
    126126                  PcdPostCodeProperyMask is clear.
    127127
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.c

    r58459 r58466  
    4747  PEI_EXTRACT_GUIDED_SECTION_HANDLER_INFO *HandlerInfo;
    4848  EFI_PEI_HOB_POINTERS                    Hob;
    49  
     49
    5050  //
    5151  // First try to get handler information from guid hob specified by CallerId.
     
    6262          HandlerInfo->ExtractHandlerGuidTable    = (GUID *) (HandlerInfo + 1);
    6363          HandlerInfo->ExtractDecodeHandlerTable  = (EXTRACT_GUIDED_SECTION_DECODE_HANDLER *) (
    64                                                       (UINT8 *)HandlerInfo->ExtractHandlerGuidTable + 
     64                                                      (UINT8 *)HandlerInfo->ExtractHandlerGuidTable +
    6565                                                      PcdGet32 (PcdMaximumGuidedExtractHandler) * sizeof (GUID)
    6666                                                     );
    6767          HandlerInfo->ExtractGetInfoHandlerTable = (EXTRACT_GUIDED_SECTION_GET_INFO_HANDLER *) (
    68                                                       (UINT8 *)HandlerInfo->ExtractDecodeHandlerTable + 
    69                                                       PcdGet32 (PcdMaximumGuidedExtractHandler) * 
     68                                                      (UINT8 *)HandlerInfo->ExtractDecodeHandlerTable +
     69                                                      PcdGet32 (PcdMaximumGuidedExtractHandler) *
    7070                                                      sizeof (EXTRACT_GUIDED_SECTION_DECODE_HANDLER)
    7171                                                     );
     
    8181    Hob.Raw = GetNextHob (EFI_HOB_TYPE_GUID_EXTENSION, Hob.Raw);
    8282  }
    83  
     83
    8484  //
    8585  // If Guid Hob is not found, Build CallerId Guid hob to store Handler Info
    8686  //
    8787  HandlerInfo = BuildGuidHob (
    88                  &gEfiCallerIdGuid, 
     88                 &gEfiCallerIdGuid,
    8989                 sizeof (PEI_EXTRACT_GUIDED_SECTION_HANDLER_INFO) +
    90                  PcdGet32 (PcdMaximumGuidedExtractHandler) * 
     90                 PcdGet32 (PcdMaximumGuidedExtractHandler) *
    9191                 (sizeof (GUID) + sizeof (EXTRACT_GUIDED_SECTION_DECODE_HANDLER) + sizeof (EXTRACT_GUIDED_SECTION_GET_INFO_HANDLER))
    9292                );
     
    105105  HandlerInfo->ExtractHandlerGuidTable    = (GUID *) (HandlerInfo + 1);
    106106  HandlerInfo->ExtractDecodeHandlerTable  = (EXTRACT_GUIDED_SECTION_DECODE_HANDLER *) (
    107                                               (UINT8 *)HandlerInfo->ExtractHandlerGuidTable + 
     107                                              (UINT8 *)HandlerInfo->ExtractHandlerGuidTable +
    108108                                              PcdGet32 (PcdMaximumGuidedExtractHandler) * sizeof (GUID)
    109109                                             );
    110110  HandlerInfo->ExtractGetInfoHandlerTable = (EXTRACT_GUIDED_SECTION_GET_INFO_HANDLER *) (
    111                                               (UINT8 *)HandlerInfo->ExtractDecodeHandlerTable + 
    112                                               PcdGet32 (PcdMaximumGuidedExtractHandler) * 
     111                                              (UINT8 *)HandlerInfo->ExtractDecodeHandlerTable +
     112                                              PcdGet32 (PcdMaximumGuidedExtractHandler) *
    113113                                              sizeof (EXTRACT_GUIDED_SECTION_DECODE_HANDLER)
    114114                                             );
     
    125125  Sets ExtractHandlerGuidTable so it points at a callee allocated array of registered GUIDs.
    126126  The total number of GUIDs in the array are returned. Since the array of GUIDs is callee allocated
    127   and caller must treat this array of GUIDs as read-only data. 
     127  and caller must treat this array of GUIDs as read-only data.
    128128  If ExtractHandlerGuidTable is NULL, then ASSERT().
    129129
     
    169169  If the GUID value specified by SectionGuid has already been registered, then return RETURN_ALREADY_STARTED.
    170170  If there are not enough resources available to register the handlers  then RETURN_OUT_OF_RESOURCES is returned.
    171  
     171
    172172  If SectionGuid is NULL, then ASSERT().
    173173  If GetInfoHandler is NULL, then ASSERT().
     
    180180                             required to actually decode the data in a GUIDed section.
    181181  @param[in]  DecodeHandler  The pointer to a function that decodes a GUIDed section into a caller
    182                              allocated output buffer. 
     182                             allocated output buffer.
    183183
    184184  @retval  RETURN_SUCCESS           The handlers were registered.
     
    236236    return RETURN_OUT_OF_RESOURCES;
    237237  }
    238  
     238
    239239  //
    240240  // Register new Handler and guid value.
     
    263263  optional scratch buffer required to actually decode the data in a GUIDed section.
    264264
    265   Examines a GUIDed section specified by InputSection. 
     265  Examines a GUIDed section specified by InputSection.
    266266  If GUID for InputSection does not match any of the GUIDs registered through ExtractGuidedSectionRegisterHandlers(),
    267   then RETURN_UNSUPPORTED is returned. 
    268   If the GUID of InputSection does match the GUID that this handler supports, then the the associated handler 
     267  then RETURN_UNSUPPORTED is returned.
     268  If the GUID of InputSection does match the GUID that this handler supports, then the the associated handler
    269269  of type EXTRACT_GUIDED_SECTION_GET_INFO_HANDLER that was registered with ExtractGuidedSectionRegisterHandlers()
    270270  is used to retrieve the OututBufferSize, ScratchSize, and Attributes values. The return status from the handler of
    271271  type EXTRACT_GUIDED_SECTION_GET_INFO_HANDLER is returned.
    272  
     272
    273273  If InputSection is NULL, then ASSERT().
    274274  If OutputBufferSize is NULL, then ASSERT().
     
    297297  OUT       UINT32  *OutputBufferSize,
    298298  OUT       UINT32  *ScratchBufferSize,
    299   OUT       UINT16  *SectionAttribute   
     299  OUT       UINT16  *SectionAttribute
    300300  )
    301301{
     
    304304  PEI_EXTRACT_GUIDED_SECTION_HANDLER_INFO *HandlerInfo;
    305305  EFI_GUID *SectionDefinitionGuid;
    306  
     306
    307307  //
    308308  // Check input paramter
     
    346346
    347347  //
    348   // Not found, the input guided section is not supported. 
     348  // Not found, the input guided section is not supported.
    349349  //
    350350  return RETURN_UNSUPPORTED;
     
    357357  allocated output buffer.
    358358
    359   Decodes the GUIDed section specified by InputSection. 
     359  Decodes the GUIDed section specified by InputSection.
    360360  If GUID for InputSection does not match any of the GUIDs registered through ExtractGuidedSectionRegisterHandlers(),
    361   then RETURN_UNSUPPORTED is returned. 
     361  then RETURN_UNSUPPORTED is returned.
    362362  If the GUID of InputSection does match the GUID that this handler supports, then the the associated handler
    363363  of type EXTRACT_GUIDED_SECTION_DECODE_HANDLER that was registered with ExtractGuidedSectionRegisterHandlers()
     
    366366  then OutputBuffer is set to point at the data in InputSection.  Otherwise, the decoded data will be placed in caller
    367367  allocated buffer specified by OutputBuffer.    This function is responsible for computing the  EFI_AUTH_STATUS_PLATFORM_OVERRIDE
    368   bit of in AuthenticationStatus.  The return status from the handler of type EXTRACT_GUIDED_SECTION_DECODE_HANDLER is returned. 
    369    
     368  bit of in AuthenticationStatus.  The return status from the handler of type EXTRACT_GUIDED_SECTION_DECODE_HANDLER is returned.
     369
    370370  If InputSection is NULL, then ASSERT().
    371371  If OutputBuffer is NULL, then ASSERT().
    372372  If ScratchBuffer is NULL and this decode operation requires a scratch buffer, then ASSERT().
    373   If AuthenticationStatus is NULL, then ASSERT(). 
     373  If AuthenticationStatus is NULL, then ASSERT().
    374374
    375375  @param[in]  InputSection   A pointer to a GUIDed section of an FFS formatted file.
    376   @param[out] OutputBuffer   A pointer to a buffer that contains the result of a decode operation. 
    377   @param[in]  ScratchBuffer  A caller allocated buffer that may be required by this function as a scratch buffer to perform the decode operation. 
    378   @param[out] AuthenticationStatus 
     376  @param[out] OutputBuffer   A pointer to a buffer that contains the result of a decode operation.
     377  @param[in]  ScratchBuffer  A caller allocated buffer that may be required by this function as a scratch buffer to perform the decode operation.
     378  @param[out] AuthenticationStatus
    379379                             A pointer to the authentication status of the decoded output buffer. See the definition
    380380                             of authentication status in the EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI section of the PI
     
    392392  OUT       VOID    **OutputBuffer,
    393393  IN        VOID    *ScratchBuffer,        OPTIONAL
    394   OUT       UINT32  *AuthenticationStatus 
     394  OUT       UINT32  *AuthenticationStatus
    395395  )
    396396{
     
    399399  PEI_EXTRACT_GUIDED_SECTION_HANDLER_INFO *HandlerInfo;
    400400  EFI_GUID *SectionDefinitionGuid;
    401  
     401
    402402  //
    403403  // Check input parameter
     
    409409  //
    410410  // Get all registered handler information.
    411   // 
     411  //
    412412  Status = PeiGetExtractGuidedSectionHandlerInfo (&HandlerInfo);
    413413  if (EFI_ERROR (Status)) {
     
    440440
    441441  //
    442   // Not found, the input guided section is not supported. 
     442  // Not found, the input guided section is not supported.
    443443  //
    444444  return RETURN_UNSUPPORTED;
     
    446446
    447447/**
    448   Retrieves handlers of type EXTRACT_GUIDED_SECTION_GET_INFO_HANDLER and 
     448  Retrieves handlers of type EXTRACT_GUIDED_SECTION_GET_INFO_HANDLER and
    449449  EXTRACT_GUIDED_SECTION_DECODE_HANDLER for a specific GUID section type.
    450  
    451   Retrieves the handlers associated with SectionGuid and returns them in 
     450
     451  Retrieves the handlers associated with SectionGuid and returns them in
    452452  GetInfoHandler and DecodeHandler.
    453453
    454   If the GUID value specified by SectionGuid has not been registered, then 
     454  If the GUID value specified by SectionGuid has not been registered, then
    455455  return RETURN_NOT_FOUND.
    456  
     456
    457457  If SectionGuid is NULL, then ASSERT().
    458458
    459   @param[in]  SectionGuid    A pointer to the GUID associated with the handlersof the GUIDed 
     459  @param[in]  SectionGuid    A pointer to the GUID associated with the handlersof the GUIDed
    460460                             section type being retrieved.
    461   @param[out] GetInfoHandler Pointer to a function that examines a GUIDed section and returns 
    462                              the size of the decoded buffer and the size of an optional scratch 
    463                              buffer required to actually decode the data in a GUIDed section. 
    464                              This is an optional parameter that may be NULL. If it is NULL, then 
     461  @param[out] GetInfoHandler Pointer to a function that examines a GUIDed section and returns
     462                             the size of the decoded buffer and the size of an optional scratch
     463                             buffer required to actually decode the data in a GUIDed section.
     464                             This is an optional parameter that may be NULL. If it is NULL, then
    465465                             the previously registered handler is not returned.
    466466  @param[out] DecodeHandler  Pointer to a function that decodes a GUIDed section into a caller
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/PeiHobLib/HobLib.c

    r58459 r58466  
    2626
    2727  This function returns the pointer to first HOB in the list.
    28   For PEI phase, the PEI service GetHobList() can be used to retrieve the pointer 
     28  For PEI phase, the PEI service GetHobList() can be used to retrieve the pointer
    2929  to the HOB list.  For the DXE phase, the HOB list pointer can be retrieved through
    3030  the EFI System Table by looking up theHOB list GUID in the System Configuration Table.
    31   Since the System Configuration Table does not exist that the time the DXE Core is 
    32   launched, the DXE Core uses a global variable from the DXE Core Entry Point Library 
     31  Since the System Configuration Table does not exist that the time the DXE Core is
     32  launched, the DXE Core uses a global variable from the DXE Core Entry Point Library
    3333  to manage the pointer to the HOB list.
    34  
     34
    3535  If the pointer to the HOB list is NULL, then ASSERT().
    36  
     36
    3737  @return The pointer to the HOB list.
    3838
     
    5757  Returns the next instance of a HOB type from the starting HOB.
    5858
    59   This function searches the first instance of a HOB type from the starting HOB pointer. 
     59  This function searches the first instance of a HOB type from the starting HOB pointer.
    6060  If there does not exist such HOB type from the starting HOB pointer, it will return NULL.
    6161  In contrast with macro GET_NEXT_HOB(), this function does not skip the starting HOB pointer
    6262  unconditionally: it returns HobStart back if HobStart itself meets the requirement;
    6363  caller is required to use GET_NEXT_HOB() if it wishes to skip current HobStart.
    64  
     64
    6565  If HobStart is NULL, then ASSERT().
    6666
     
    8181
    8282  ASSERT (HobStart != NULL);
    83    
     83
    8484  Hob.Raw = (UINT8 *) HobStart;
    8585  //
     
    9898  Returns the first instance of a HOB type among the whole HOB list.
    9999
    100   This function searches the first instance of a HOB type among the whole HOB list. 
    101   If there does not exist such HOB type in the HOB list, it will return NULL. 
    102  
     100  This function searches the first instance of a HOB type among the whole HOB list.
     101  If there does not exist such HOB type in the HOB list, it will return NULL.
     102
    103103  If the pointer to the HOB list is NULL, then ASSERT().
    104104
     
    122122/**
    123123  Returns the next instance of the matched GUID HOB from the starting HOB.
    124  
    125   This function searches the first instance of a HOB from the starting HOB pointer. 
    126   Such HOB should satisfy two conditions: 
    127   its HOB type is EFI_HOB_TYPE_GUID_EXTENSION and its GUID Name equals to the input Guid. 
    128   If there does not exist such HOB from the starting HOB pointer, it will return NULL. 
     124
     125  This function searches the first instance of a HOB from the starting HOB pointer.
     126  Such HOB should satisfy two conditions:
     127  its HOB type is EFI_HOB_TYPE_GUID_EXTENSION and its GUID Name equals to the input Guid.
     128  If there does not exist such HOB from the starting HOB pointer, it will return NULL.
    129129  Caller is required to apply GET_GUID_HOB_DATA () and GET_GUID_HOB_DATA_SIZE ()
    130130  to extract the data section and its size information, respectively.
     
    132132  unconditionally: it returns HobStart back if HobStart itself meets the requirement;
    133133  caller is required to use GET_NEXT_HOB() if it wishes to skip current HobStart.
    134  
     134
    135135  If Guid is NULL, then ASSERT().
    136136  If HobStart is NULL, then ASSERT().
     
    163163/**
    164164  Returns the first instance of the matched GUID HOB among the whole HOB list.
    165  
    166   This function searches the first instance of a HOB among the whole HOB list. 
     165
     166  This function searches the first instance of a HOB among the whole HOB list.
    167167  Such HOB should satisfy two conditions:
    168168  its HOB type is EFI_HOB_TYPE_GUID_EXTENSION and its GUID Name equals to the input Guid.
     
    170170  Caller is required to apply GET_GUID_HOB_DATA () and GET_GUID_HOB_DATA_SIZE ()
    171171  to extract the data section and its size information, respectively.
    172  
     172
    173173  If the pointer to the HOB list is NULL, then ASSERT().
    174174  If Guid is NULL, then ASSERT().
     
    194194  Get the system boot mode from the HOB list.
    195195
    196   This function returns the system boot mode information from the 
     196  This function returns the system boot mode information from the
    197197  PHIT HOB in HOB list.
    198198
    199199  If the pointer to the HOB list is NULL, then ASSERT().
    200  
     200
    201201  @param  VOID.
    202202
     
    258258  It can only be invoked during PEI phase;
    259259  for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.
    260  
     260
    261261  If ModuleName is NULL, then ASSERT().
    262262  If there is no additional space for HOB creation, then ASSERT().
     
    296296  //
    297297  ZeroMem (Hob->MemoryAllocationHeader.Reserved, sizeof (Hob->MemoryAllocationHeader.Reserved));
    298  
     298
    299299  CopyGuid (&Hob->ModuleName, ModuleName);
    300300  Hob->EntryPoint = EntryPoint;
     
    307307  It can only be invoked during PEI phase;
    308308  for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.
    309  
     309
    310310  If there is no additional space for HOB creation, then ASSERT().
    311311
     
    348348  It can only be invoked during PEI phase;
    349349  for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.
    350  
     350
    351351  If there is no additional space for HOB creation, then ASSERT().
    352352
     
    381381
    382382/**
    383   Builds a customized HOB tagged with a GUID for identification and returns 
     383  Builds a customized HOB tagged with a GUID for identification and returns
    384384  the start address of GUID HOB data.
    385385
    386   This function builds a customized HOB tagged with a GUID for identification 
    387   and returns the start address of GUID HOB data so that caller can fill the customized data. 
     386  This function builds a customized HOB tagged with a GUID for identification
     387  and returns the start address of GUID HOB data so that caller can fill the customized data.
    388388  The HOB Header and Name field is already stripped.
    389389  It can only be invoked during PEI phase;
    390390  for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.
    391  
     391
    392392  If Guid is NULL, then ASSERT().
    393393  If there is no additional space for HOB creation, then ASSERT().
     
    415415  //
    416416  ASSERT (Guid != NULL);
    417  
     417
    418418  //
    419419  // Make sure that data length is not too long.
     
    430430
    431431/**
    432   Builds a customized HOB tagged with a GUID for identification, copies the input data to the HOB 
     432  Builds a customized HOB tagged with a GUID for identification, copies the input data to the HOB
    433433  data field, and returns the start address of the GUID HOB data.
    434434
    435435  This function builds a customized HOB tagged with a GUID for identification and copies the input
    436   data to the HOB data field and returns the start address of the GUID HOB data.  It can only be 
    437   invoked during PEI phase; for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase. 
     436  data to the HOB data field and returns the start address of the GUID HOB data.  It can only be
     437  invoked during PEI phase; for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.
    438438  The HOB Header and Name field is already stripped.
    439439  It can only be invoked during PEI phase;
    440440  for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.
    441  
     441
    442442  If Guid is NULL, then ASSERT().
    443443  If Data is NULL and DataLength > 0, then ASSERT().
     
    480480  It can only be invoked during PEI phase;
    481481  for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.
    482  
     482
    483483  If there is no additional space for HOB creation, then ASSERT().
    484484
     
    511511  It can only be invoked during PEI phase;
    512512  for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.
    513  
     513
    514514  If there is no additional space for HOB creation, then ASSERT().
    515515
     
    518518  @param  FvName        The name of the Firmware Volume.
    519519  @param  FileName      The name of the file.
    520  
     520
    521521**/
    522522VOID
     
    548548  It can only be invoked during PEI phase;
    549549  for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.
    550  
     550
    551551  If the platform does not support Capsule Volume HOBs, then ASSERT().
    552552  If there is no additional space for HOB creation, then ASSERT().
     
    580580  It can only be invoked during PEI phase;
    581581  for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.
    582  
     582
    583583  If there is no additional space for HOB creation, then ASSERT().
    584584
     
    607607  // Zero the reserved space to match HOB spec
    608608  //
    609   ZeroMem (Hob->Reserved, sizeof (Hob->Reserved)); 
     609  ZeroMem (Hob->Reserved, sizeof (Hob->Reserved));
    610610}
    611611
     
    616616  It can only be invoked during PEI phase;
    617617  for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.
    618  
     618
    619619  If there is no additional space for HOB creation, then ASSERT().
    620620
     
    657657  It can only be invoked during PEI phase;
    658658  for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.
    659  
     659
    660660  If there is no additional space for HOB creation, then ASSERT().
    661661
     
    700700  It can only be invoked during PEI phase;
    701701  for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.
    702  
     702
    703703  If there is no additional space for HOB creation, then ASSERT().
    704704
     
    720720  ASSERT (((BaseAddress & (EFI_PAGE_SIZE - 1)) == 0) &&
    721721          ((Length & (EFI_PAGE_SIZE - 1)) == 0));
    722  
     722
    723723  Hob = InternalPeiCreateHob (EFI_HOB_TYPE_MEMORY_ALLOCATION, (UINT16) sizeof (EFI_HOB_MEMORY_ALLOCATION));
    724724  if (Hob == NULL) {
    725725    return;
    726726  }
    727  
     727
    728728  ZeroMem (&(Hob->AllocDescriptor.Name), sizeof (EFI_GUID));
    729729  Hob->AllocDescriptor.MemoryBaseAddress = BaseAddress;
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/PeiHobLib/PeiHobLib.inf

    r58459 r58466  
    5353#   RESOURCE_DESCRIPTOR   ## SOMETIMES_PRODUCES
    5454#   FIRMWARE_VOLUME       ## SOMETIMES_PRODUCES
    55 #   
     55#
    5656
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/PeiIoLibCpuIo/IoHighLevel.c

    r58459 r58466  
    8181
    8282/**
    83   Reads an 8-bit I/O port, performs a bitwise AND followed by a bitwise 
     83  Reads an 8-bit I/O port, performs a bitwise AND followed by a bitwise
    8484  OR, and writes the result back to the 8-bit I/O port.
    8585
     
    147147  Writes Value to the bit field of the I/O register. The bit field is specified
    148148  by the StartBit and the EndBit. All other bits in the destination I/O
    149   register are preserved. The value written to the I/O port is returned. 
     149  register are preserved. The value written to the I/O port is returned.
    150150
    151151  If 8-bit I/O port operations are not supported, then ASSERT().
     
    349349  If 16-bit I/O port operations are not supported, then ASSERT().
    350350  If Port is not aligned on a 16-bit boundary, then ASSERT().
    351  
     351
    352352  @param  Port    The I/O port to write.
    353353  @param  AndData The value to AND with the read value from the I/O port.
     
    367367
    368368/**
    369   Reads a 16-bit I/O port, performs a bitwise AND followed by a bitwise 
     369  Reads a 16-bit I/O port, performs a bitwise AND followed by a bitwise
    370370  OR, and writes the result back to the 16-bit I/O port.
    371371
     
    379379  If 16-bit I/O port operations are not supported, then ASSERT().
    380380  If Port is not aligned on a 16-bit boundary, then ASSERT().
    381  
     381
    382382  @param  Port    The I/O port to write.
    383383  @param  AndData The value to AND with the read value from the I/O port.
     
    660660
    661661/**
    662   Reads a 32-bit I/O port, performs a bitwise AND followed by a bitwise 
     662  Reads a 32-bit I/O port, performs a bitwise AND followed by a bitwise
    663663  OR, and writes the result back to the 32-bit I/O port.
    664664
     
    953953
    954954/**
    955   Reads a 64-bit I/O port, performs a bitwise AND followed by a bitwise 
     955  Reads a 64-bit I/O port, performs a bitwise AND followed by a bitwise
    956956  OR, and writes the result back to the 64-bit I/O port.
    957957
     
    11911191  result back to the 8-bit MMIO register.
    11921192
    1193   Reads the 8-bit MMIO register specified by Address, performs a bitwise 
     1193  Reads the 8-bit MMIO register specified by Address, performs a bitwise
    11941194  OR between the read result and the value specified by OrData, and
    11951195  writes the result to the 8-bit MMIO register specified by Address. The value
     
    12441244
    12451245/**
    1246   Reads an 8-bit MMIO register, performs a bitwise AND followed by a bitwise 
     1246  Reads an 8-bit MMIO register, performs a bitwise AND followed by a bitwise
    12471247  OR, and writes the result back to the 8-bit MMIO register.
    12481248
     
    13481348  writes the result back to the bit field in the 8-bit MMIO register.
    13491349
    1350   Reads the 8-bit MMIO register specified by Address, performs a bitwise 
     1350  Reads the 8-bit MMIO register specified by Address, performs a bitwise
    13511351  OR between the read result and the value specified by OrData, and
    13521352  writes the result to the 8-bit MMIO register specified by Address. The value
     
    14781478  result back to the 16-bit MMIO register.
    14791479
    1480   Reads the 16-bit MMIO register specified by Address, performs a bitwise 
     1480  Reads the 16-bit MMIO register specified by Address, performs a bitwise
    14811481  OR between the read result and the value specified by OrData, and
    14821482  writes the result to the 16-bit MMIO register specified by Address. The value
     
    15331533
    15341534/**
    1535   Reads a 16-bit MMIO register, performs a bitwise AND followed by a bitwise 
     1535  Reads a 16-bit MMIO register, performs a bitwise AND followed by a bitwise
    15361536  OR, and writes the result back to the 16-bit MMIO register.
    15371537
     
    16391639  writes the result back to the bit field in the 16-bit MMIO register.
    16401640
    1641   Reads the 16-bit MMIO register specified by Address, performs a bitwise 
     1641  Reads the 16-bit MMIO register specified by Address, performs a bitwise
    16421642  OR between the read result and the value specified by OrData, and
    16431643  writes the result to the 16-bit MMIO register specified by Address. The value
     
    17721772  result back to the 32-bit MMIO register.
    17731773
    1774   Reads the 32-bit MMIO register specified by Address, performs a bitwise 
     1774  Reads the 32-bit MMIO register specified by Address, performs a bitwise
    17751775  OR between the read result and the value specified by OrData, and
    17761776  writes the result to the 32-bit MMIO register specified by Address. The value
     
    18271827
    18281828/**
    1829   Reads a 32-bit MMIO register, performs a bitwise AND followed by a bitwise 
     1829  Reads a 32-bit MMIO register, performs a bitwise AND followed by a bitwise
    18301830  OR, and writes the result back to the 32-bit MMIO register.
    18311831
     
    19331933  writes the result back to the bit field in the 32-bit MMIO register.
    19341934
    1935   Reads the 32-bit MMIO register specified by Address, performs a bitwise 
     1935  Reads the 32-bit MMIO register specified by Address, performs a bitwise
    19361936  OR between the read result and the value specified by OrData, and
    19371937  writes the result to the 32-bit MMIO register specified by Address. The value
     
    20662066  result back to the 64-bit MMIO register.
    20672067
    2068   Reads the 64-bit MMIO register specified by Address, performs a bitwise 
     2068  Reads the 64-bit MMIO register specified by Address, performs a bitwise
    20692069  OR between the read result and the value specified by OrData, and
    20702070  writes the result to the 64-bit MMIO register specified by Address. The value
     
    21212121
    21222122/**
    2123   Reads a 64-bit MMIO register, performs a bitwise AND followed by a bitwise 
     2123  Reads a 64-bit MMIO register, performs a bitwise AND followed by a bitwise
    21242124  OR, and writes the result back to the 64-bit MMIO register.
    21252125
     
    22272227  writes the result back to the bit field in the 64-bit MMIO register.
    22282228
    2229   Reads the 64-bit MMIO register specified by Address, performs a bitwise 
     2229  Reads the 64-bit MMIO register specified by Address, performs a bitwise
    22302230  OR between the read result and the value specified by OrData, and
    22312231  writes the result to the 64-bit MMIO register specified by Address. The value
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/PeiIoLibCpuIo/IoLib.c

    r48674 r58466  
    127127  If 16-bit I/O port operations are not supported, then ASSERT().
    128128  If Port is not aligned on a 16-bit boundary, then ASSERT().
    129  
     129
    130130  @param  Port  The I/O port to write.
    131131  @param  Value The value to write to the I/O port.
     
    164164  If 32-bit I/O port operations are not supported, then ASSERT().
    165165  If Port is not aligned on a 32-bit boundary, then ASSERT().
    166  
     166
    167167  @param  Port  The I/O port to read.
    168168
     
    198198  If 32-bit I/O port operations are not supported, then ASSERT().
    199199  If Port is not aligned on a 32-bit boundary, then ASSERT().
    200  
     200
    201201  @param  Port  The I/O port to write.
    202202  @param  Value The value to write to the I/O port.
     
    338338  @param  Address The MMIO register to write.
    339339  @param  Value   The value to write to the MMIO register.
    340  
     340
    341341  @return Value.
    342342
     
    407407  @param  Address The MMIO register to write.
    408408  @param  Value   The value to write to the MMIO register.
    409  
     409
    410410  @return Value.
    411411
     
    479479  @param  Address The MMIO register to write.
    480480  @param  Value   The value to write to the MMIO register.
    481  
     481
    482482  @return Value.
    483483
  • 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);
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/PeiIoLibCpuIo/PeiIoLibCpuIo.inf

    r58459 r58466  
    3535  IoLib.c
    3636  IoLibMmioBuffer.c
    37  
     37
    3838[Packages]
    3939  MdePkg/MdePkg.dec
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/PeiMemoryAllocationLib/MemoryAllocationLib.c

    r58459 r58466  
    11/** @file
    2   Support routines for memory allocation routines 
     2  Support routines for memory allocation routines
    33  based on PeiService for PEI phase drivers.
    44
    55  Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
    6   This program and the accompanying materials                         
    7   are licensed and made available under the terms and conditions of the BSD License         
    8   which accompanies this distribution.  The full text of the license may be found at       
    9   http://opensource.org/licenses/bsd-license.php.                                           
    10 
    11   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     
    12   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             
     6  This program and the accompanying materials
     7  are licensed and made available under the terms and conditions of the BSD License
     8  which accompanies this distribution.  The full text of the license may be found at
     9  http://opensource.org/licenses/bsd-license.php.
     10
     11  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
     12  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
    1313
    1414**/
     
    4040VOID *
    4141InternalAllocatePages (
    42   IN EFI_MEMORY_TYPE  MemoryType, 
     42  IN EFI_MEMORY_TYPE  MemoryType,
    4343  IN UINTN            Pages
    4444  )
    4545{
    4646  EFI_STATUS            Status;
    47   EFI_PHYSICAL_ADDRESS  Memory; 
     47  EFI_PHYSICAL_ADDRESS  Memory;
    4848  EFI_MEMORY_TYPE       RequestType;
    4949  EFI_PEI_HOB_POINTERS  Hob;
     
    5656  if (MemoryType == EfiReservedMemoryType) {
    5757    //
    58     // PEI AllocatePages() doesn't support EfiReservedMemoryType. 
     58    // PEI AllocatePages() doesn't support EfiReservedMemoryType.
    5959    // Change RequestType to EfiBootServicesData for memory allocation.
    6060    //
     
    6666    return NULL;
    6767  }
    68  
     68
    6969  if (MemoryType == EfiReservedMemoryType) {
    7070    //
    71     // Memory type needs to be updated to EfiReservedMemoryType. Per PI spec Volume 1, 
    72     // PEI AllocatePages() will automate the creation of the Memory Allocation HOB types. 
     71    // Memory type needs to be updated to EfiReservedMemoryType. Per PI spec Volume 1,
     72    // PEI AllocatePages() will automate the creation of the Memory Allocation HOB types.
    7373    // Search Memory Allocation HOB and find the matched memory region,
    7474    // then change its memory type to EfiReservedMemoryType.
     
    160160  Allocation Library.  If it is not possible to free allocated pages, then this function will
    161161  perform no actions.
    162  
     162
    163163  If Buffer was not allocated with a page allocation function in the Memory Allocation Library,
    164164  then ASSERT().
    165165  If Pages is zero, then ASSERT().
    166  
     166
    167167  @param  Buffer                The pointer to the buffer of pages to free.
    168168  @param  Pages                 The number of 4 KB pages to free.
     
    194194  @param  MemoryType            The type of memory to allocate.
    195195  @param  Pages                 The number of 4 KB pages to allocate.
    196   @param  Alignment             The requested alignment of the allocation. 
     196  @param  Alignment             The requested alignment of the allocation.
    197197                                Must be a power of two.
    198198                                If Alignment is zero, then byte alignment is used.
     
    203203VOID *
    204204InternalAllocateAlignedPages (
    205   IN EFI_MEMORY_TYPE  MemoryType, 
     205  IN EFI_MEMORY_TYPE  MemoryType,
    206206  IN UINTN            Pages,
    207207  IN UINTN            Alignment
     
    229229  // Make sure that Pages plus EFI_SIZE_TO_PAGES (Alignment) does not overflow.
    230230  //
    231   ASSERT (Pages <= (MAX_ADDRESS - EFI_SIZE_TO_PAGES (Alignment))); 
     231  ASSERT (Pages <= (MAX_ADDRESS - EFI_SIZE_TO_PAGES (Alignment)));
    232232
    233233  //
     
    236236  // we simply reserve an overhead memory equal to Alignmemt(page-aligned), no matter what.
    237237  // The overhead mem size could be reduced later with more involved malloc mechanisms
    238   // (e.g., somthing that can detect the alignment boundary before allocating memory or 
     238  // (e.g., somthing that can detect the alignment boundary before allocating memory or
    239239  //  can request that memory be allocated at a certain address that is aleady aligned).
    240240  //
     
    282282  }
    283283
    284   // 
    285   // Search for the mem HOB referring to the original(unaligned) allocation 
     284  //
     285  // Search for the mem HOB referring to the original(unaligned) allocation
    286286  // and update the size and type if needed.
    287287  //
     
    303303  } else {
    304304    //
    305     // Use this HOB as before mem HOB and create a new HOB for the aligned portion 
     305    // Use this HOB as before mem HOB and create a new HOB for the aligned portion
    306306    //
    307     HobLength = (AlignedMemory - Memory); 
     307    HobLength = (AlignedMemory - Memory);
    308308    Hob.MemoryAllocation->AllocDescriptor.MemoryLength = HobLength;
    309309    Hob.MemoryAllocation->AllocDescriptor.MemoryType = EfiConventionalMemory;
     
    368368  returned.  If there is not enough memory at the specified alignment remaining to satisfy the
    369369  request, then NULL is returned.
    370  
     370
    371371  If Alignment is not a power of two and Alignment is not zero, then ASSERT().
    372372  If Pages plus EFI_SIZE_TO_PAGES (Alignment) overflows, then ASSERT().
    373373
    374374  @param  Pages                 The number of 4 KB pages to allocate.
    375   @param  Alignment             The requested alignment of the allocation. 
     375  @param  Alignment             The requested alignment of the allocation.
    376376                                Must be a power of two.
    377377                                If Alignment is zero, then byte alignment is used.
     
    397397  returned.  If there is not enough memory at the specified alignment remaining to satisfy the
    398398  request, then NULL is returned.
    399  
     399
    400400  If Alignment is not a power of two and Alignment is not zero, then ASSERT().
    401401  If Pages plus EFI_SIZE_TO_PAGES (Alignment) overflows, then ASSERT().
    402402
    403403  @param  Pages                 The number of 4 KB pages to allocate.
    404   @param  Alignment             The requested alignment of the allocation. 
     404  @param  Alignment             The requested alignment of the allocation.
    405405                                Must be a power of two.
    406406                                If Alignment is zero, then byte alignment is used.
     
    426426  returned.  If there is not enough memory at the specified alignment remaining to satisfy the
    427427  request, then NULL is returned.
    428  
     428
    429429  If Alignment is not a power of two and Alignment is not zero, then ASSERT().
    430430  If Pages plus EFI_SIZE_TO_PAGES (Alignment) overflows, then ASSERT().
    431431
    432432  @param  Pages                 The number of 4 KB pages to allocate.
    433   @param  Alignment             The requested alignment of the allocation. 
     433  @param  Alignment             The requested alignment of the allocation.
    434434                                Must be a power of two.
    435435                                If Alignment is zero, then byte alignment is used.
     
    454454  Frees the number of 4KB pages specified by Pages from the buffer specified by Buffer.  Buffer
    455455  must have been allocated on a previous call to the aligned page allocation services of the Memory
    456   Allocation Library.  If it is not possible to free allocated pages, then this function will 
     456  Allocation Library.  If it is not possible to free allocated pages, then this function will
    457457  perform no actions.
    458  
     458
    459459  If Buffer was not allocated with an aligned page allocation function in the Memory Allocation
    460460  Library, then ASSERT().
    461461  If Pages is zero, then ASSERT().
    462  
     462
    463463  @param  Buffer                The pointer to the buffer of pages to free.
    464464  @param  Pages                 The number of 4 KB pages to free.
     
    493493VOID *
    494494InternalAllocatePool (
    495   IN EFI_MEMORY_TYPE  MemoryType, 
     495  IN EFI_MEMORY_TYPE  MemoryType,
    496496  IN UINTN            AllocationSize
    497497  )
    498498{
    499499  //
    500   // If we need lots of small runtime/reserved memory type from PEI in the future, 
    501   // we can consider providing a more complex algorithm that allocates runtime pages and 
    502   // provide pool allocations from those pages. 
     500  // If we need lots of small runtime/reserved memory type from PEI in the future,
     501  // we can consider providing a more complex algorithm that allocates runtime pages and
     502  // provide pool allocations from those pages.
    503503  //
    504504  return InternalAllocatePages (MemoryType, EFI_SIZE_TO_PAGES (AllocationSize));
     
    525525  EFI_STATUS        Status;
    526526  VOID              *Buffer;
    527  
     527
    528528  Status = PeiServicesAllocatePool (AllocationSize, &Buffer);
    529529  if (EFI_ERROR (Status)) {
     
    591591VOID *
    592592InternalAllocateZeroPool (
    593   IN EFI_MEMORY_TYPE  PoolType, 
     593  IN EFI_MEMORY_TYPE  PoolType,
    594594  IN UINTN            AllocationSize
    595   ) 
     595  )
    596596{
    597597  VOID  *Memory;
     
    684684  is not enough memory remaining to satisfy the request, then NULL is returned.
    685685  If Buffer is NULL, then ASSERT().
    686   If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). 
     686  If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
    687687
    688688  @param  PoolType              The type of pool to allocate.
     
    695695VOID *
    696696InternalAllocateCopyPool (
    697   IN EFI_MEMORY_TYPE  PoolType, 
     697  IN EFI_MEMORY_TYPE  PoolType,
    698698  IN UINTN            AllocationSize,
    699699  IN CONST VOID       *Buffer
    700   ) 
     700  )
    701701{
    702702  VOID  *Memory;
     
    710710  }
    711711  return Memory;
    712 } 
     712}
    713713
    714714/**
     
    719719  allocated buffer.  If AllocationSize is 0, then a valid buffer of 0 size is returned.  If there
    720720  is not enough memory remaining to satisfy the request, then NULL is returned.
    721  
     721
    722722  If Buffer is NULL, then ASSERT().
    723   If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). 
     723  If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
    724724
    725725  @param  AllocationSize        The number of bytes to allocate and zero.
     
    755755  allocated buffer.  If AllocationSize is 0, then a valid buffer of 0 size is returned.  If there
    756756  is not enough memory remaining to satisfy the request, then NULL is returned.
    757  
     757
    758758  If Buffer is NULL, then ASSERT().
    759   If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). 
     759  If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
    760760
    761761  @param  AllocationSize        The number of bytes to allocate and zero.
     
    782782  allocated buffer.  If AllocationSize is 0, then a valid buffer of 0 size is returned.  If there
    783783  is not enough memory remaining to satisfy the request, then NULL is returned.
    784  
     784
    785785  If Buffer is NULL, then ASSERT().
    786   If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). 
     786  If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
    787787
    788788  @param  AllocationSize        The number of bytes to allocate and zero.
     
    806806
    807807  Allocates and zeros the number bytes specified by NewSize from memory of the type
    808   specified by PoolType.  If OldBuffer is not NULL, then the smaller of OldSize and 
    809   NewSize bytes are copied from OldBuffer to the newly allocated buffer, and 
    810   OldBuffer is freed.  A pointer to the newly allocated buffer is returned. 
    811   If NewSize is 0, then a valid buffer of 0 size is  returned.  If there is not 
     808  specified by PoolType.  If OldBuffer is not NULL, then the smaller of OldSize and
     809  NewSize bytes are copied from OldBuffer to the newly allocated buffer, and
     810  OldBuffer is freed.  A pointer to the newly allocated buffer is returned.
     811  If NewSize is 0, then a valid buffer of 0 size is  returned.  If there is not
    812812  enough memory remaining to satisfy the request, then NULL is returned.
    813  
     813
    814814  If the allocation of the new buffer is successful and the smaller of NewSize and OldSize
    815815  is greater than (MAX_ADDRESS - OldBuffer + 1), then ASSERT().
     
    818818  @param  OldSize        The size, in bytes, of OldBuffer.
    819819  @param  NewSize        The size, in bytes, of the buffer to reallocate.
    820   @param  OldBuffer      The buffer to copy to the allocated buffer.  This is an 
     820  @param  OldBuffer      The buffer to copy to the allocated buffer.  This is an
    821821                         optional parameter that may be NULL.
    822822
     
    826826VOID *
    827827InternalReallocatePool (
    828   IN EFI_MEMORY_TYPE  PoolType, 
     828  IN EFI_MEMORY_TYPE  PoolType,
    829829  IN UINTN            OldSize,
    830830  IN UINTN            NewSize,
     
    846846
    847847  Allocates and zeros the number bytes specified by NewSize from memory of type
    848   EfiBootServicesData.  If OldBuffer is not NULL, then the smaller of OldSize and 
    849   NewSize bytes are copied from OldBuffer to the newly allocated buffer, and 
    850   OldBuffer is freed.  A pointer to the newly allocated buffer is returned. 
    851   If NewSize is 0, then a valid buffer of 0 size is  returned.  If there is not 
     848  EfiBootServicesData.  If OldBuffer is not NULL, then the smaller of OldSize and
     849  NewSize bytes are copied from OldBuffer to the newly allocated buffer, and
     850  OldBuffer is freed.  A pointer to the newly allocated buffer is returned.
     851  If NewSize is 0, then a valid buffer of 0 size is  returned.  If there is not
    852852  enough memory remaining to satisfy the request, then NULL is returned.
    853  
     853
    854854  If the allocation of the new buffer is successful and the smaller of NewSize and OldSize
    855855  is greater than (MAX_ADDRESS - OldBuffer + 1), then ASSERT().
     
    857857  @param  OldSize        The size, in bytes, of OldBuffer.
    858858  @param  NewSize        The size, in bytes, of the buffer to reallocate.
    859   @param  OldBuffer      The buffer to copy to the allocated buffer.  This is an optional 
     859  @param  OldBuffer      The buffer to copy to the allocated buffer.  This is an optional
    860860                         parameter that may be NULL.
    861861
     
    878878
    879879  Allocates and zeros the number bytes specified by NewSize from memory of type
    880   EfiRuntimeServicesData.  If OldBuffer is not NULL, then the smaller of OldSize and 
    881   NewSize bytes are copied from OldBuffer to the newly allocated buffer, and 
    882   OldBuffer is freed.  A pointer to the newly allocated buffer is returned. 
    883   If NewSize is 0, then a valid buffer of 0 size is  returned.  If there is not 
     880  EfiRuntimeServicesData.  If OldBuffer is not NULL, then the smaller of OldSize and
     881  NewSize bytes are copied from OldBuffer to the newly allocated buffer, and
     882  OldBuffer is freed.  A pointer to the newly allocated buffer is returned.
     883  If NewSize is 0, then a valid buffer of 0 size is  returned.  If there is not
    884884  enough memory remaining to satisfy the request, then NULL is returned.
    885885
     
    889889  @param  OldSize        The size, in bytes, of OldBuffer.
    890890  @param  NewSize        The size, in bytes, of the buffer to reallocate.
    891   @param  OldBuffer      The buffer to copy to the allocated buffer.  This is an optional 
     891  @param  OldBuffer      The buffer to copy to the allocated buffer.  This is an optional
    892892                         parameter that may be NULL.
    893893
     
    910910
    911911  Allocates and zeros the number bytes specified by NewSize from memory of type
    912   EfiReservedMemoryType.  If OldBuffer is not NULL, then the smaller of OldSize and 
    913   NewSize bytes are copied from OldBuffer to the newly allocated buffer, and 
    914   OldBuffer is freed.  A pointer to the newly allocated buffer is returned. 
    915   If NewSize is 0, then a valid buffer of 0 size is  returned.  If there is not 
     912  EfiReservedMemoryType.  If OldBuffer is not NULL, then the smaller of OldSize and
     913  NewSize bytes are copied from OldBuffer to the newly allocated buffer, and
     914  OldBuffer is freed.  A pointer to the newly allocated buffer is returned.
     915  If NewSize is 0, then a valid buffer of 0 size is  returned.  If there is not
    916916  enough memory remaining to satisfy the request, then NULL is returned.
    917917
     
    921921  @param  OldSize        The size, in bytes, of OldBuffer.
    922922  @param  NewSize        The size, in bytes, of the buffer to reallocate.
    923   @param  OldBuffer      The buffer to copy to the allocated buffer.  This is an 
     923  @param  OldBuffer      The buffer to copy to the allocated buffer.  This is an
    924924                         optional parameter that may be NULL.
    925925
     
    945945  pool allocation services of the Memory Allocation Library.  If it is not possible to free pool
    946946  resources, then this function will perform no actions.
    947  
     947
    948948  If Buffer was not allocated with a pool allocation function in the Memory Allocation Library,
    949949  then ASSERT().
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/PeiMemoryLib/CompareMemWrapper.c

    r48674 r58466  
    3232  value returned is the first mismatched byte in SourceBuffer subtracted from the first
    3333  mismatched byte in DestinationBuffer.
    34  
     34
    3535  If Length > 0 and DestinationBuffer is NULL, then ASSERT().
    3636  If Length > 0 and SourceBuffer is NULL, then ASSERT().
     
    4545  @retval Non-zero          The first mismatched byte in SourceBuffer subtracted from the first
    4646                            mismatched byte in DestinationBuffer.
    47                            
     47
    4848**/
    4949INTN
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/PeiMemoryLib/CopyMemWrapper.c

    r48674 r58466  
    33
    44  The following BaseMemoryLib instances contain the same copy of this file:
    5  
     5
    66    BaseMemoryLib
    77    BaseMemoryLibMmx
     
    3232  DestinationBuffer.  The implementation must be reentrant, and it must handle the case
    3333  where SourceBuffer overlaps DestinationBuffer.
    34  
     34
    3535  If Length is greater than (MAX_ADDRESS - DestinationBuffer + 1), then ASSERT().
    3636  If Length is greater than (MAX_ADDRESS - SourceBuffer + 1), then ASSERT().
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/PeiMemoryLib/MemLib.c

    r48674 r58466  
    1919
    2020  This function wraps the gPS->CopyMem ().
    21  
     21
    2222  @param  DestinationBuffer   The pointer to the destination buffer of the memory copy.
    2323  @param  SourceBuffer        The pointer to the source buffer of the memory copy.
     
    4747
    4848  This function wraps the gPS->SetMem ().
    49  
     49
    5050  @param  Buffer    Memory to set.
    5151  @param  Size      The number of bytes to set.
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/PeiMemoryLib/MemLibGuid.c

    r48674 r58466  
    33
    44  The following BaseMemoryLib instances contain the same copy of this file:
    5  
     5
    66    BaseMemoryLib
    77    BaseMemoryLibMmx
     
    3131  This function copies the contents of the 128-bit GUID specified by SourceGuid to
    3232  DestinationGuid, and returns DestinationGuid.
    33  
     33
    3434  If DestinationGuid is NULL, then ASSERT().
    3535  If SourceGuid is NULL, then ASSERT().
     
    6464  This function compares Guid1 to Guid2.  If the GUIDs are identical then TRUE is returned.
    6565  If there are any bit differences in the two GUIDs, then FALSE is returned.
    66  
     66
    6767  If Guid1 is NULL, then ASSERT().
    6868  If Guid2 is NULL, then ASSERT().
     
    104104  GUID in the target buffer is returned.  If no match is found, then NULL is returned.
    105105  If Length is 0, then NULL is returned.
    106  
     106
    107107  If Length > 0 and Buffer is NULL, then ASSERT().
    108108  If Buffer is not aligned on a 32-bit boundary, then ASSERT().
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/PeiMemoryLib/MemLibInternals.h

    r48674 r58466  
    2727
    2828  This function wraps the (*PeiServices)->CopyMem ().
    29  
     29
    3030  @param  DestinationBuffer   The pointer to the destination buffer of the memory copy.
    3131  @param  SourceBuffer        The pointer to the source buffer of the memory copy.
     
    4747
    4848  This function wraps the (*PeiServices)->SetMem ().
    49  
     49
    5050  @param  Buffer    The memory to set.
    5151  @param  Size      The number of bytes to set.
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/PeiMemoryLib/ScanMem16Wrapper.c

    r48674 r58466  
    3434  then a pointer to the matching byte in the target buffer is returned.  If no match is found,
    3535  then NULL is returned.  If Length is 0, then NULL is returned.
    36  
     36
    3737  If Length > 0 and Buffer is NULL, then ASSERT().
    3838  If Buffer is not aligned on a 16-bit boundary, then ASSERT().
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/PeiMemoryLib/ScanMem32Wrapper.c

    r48674 r58466  
    3333  then a pointer to the matching byte in the target buffer is returned.  If no match is found,
    3434  then NULL is returned.  If Length is 0, then NULL is returned.
    35  
     35
    3636  If Length > 0 and Buffer is NULL, then ASSERT().
    3737  If Buffer is not aligned on a 32-bit boundary, then ASSERT().
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/PeiMemoryLib/ScanMem64Wrapper.c

    r48674 r58466  
    3434  then a pointer to the matching byte in the target buffer is returned.  If no match is found,
    3535  then NULL is returned.  If Length is 0, then NULL is returned.
    36  
     36
    3737  If Length > 0 and Buffer is NULL, then ASSERT().
    3838  If Buffer is not aligned on a 64-bit boundary, then ASSERT().
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/PeiMemoryLib/ScanMem8Wrapper.c

    r48674 r58466  
    3434  then a pointer to the matching byte in the target buffer is returned.  If no match is found,
    3535  then NULL is returned.  If Length is 0, then NULL is returned.
    36  
     36
    3737  If Length > 0 and Buffer is NULL, then ASSERT().
    3838  If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
     
    5858  ASSERT (Buffer != NULL);
    5959  ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer));
    60  
     60
    6161  return (VOID*)InternalMemScanMem8 (Buffer, Length, Value);
    6262}
    6363
    6464/**
    65   Scans a target buffer for a UINTN sized value, and returns a pointer to the matching 
     65  Scans a target buffer for a UINTN sized value, and returns a pointer to the matching
    6666  UINTN sized value in the target buffer.
    6767
     
    7070  then a pointer to the matching byte in the target buffer is returned.  If no match is found,
    7171  then NULL is returned.  If Length is 0, then NULL is returned.
    72  
     72
    7373  If Length > 0 and Buffer is NULL, then ASSERT().
    7474  If Buffer is not aligned on a UINTN boundary, then ASSERT().
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/PeiMemoryLib/SetMemWrapper.c

    r48674 r58466  
    3030
    3131  This function fills Length bytes of Buffer with Value, and returns Buffer.
    32  
     32
    3333  If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
    3434
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/PeiMemoryLib/ZeroMemWrapper.c

    r48674 r58466  
    1212    PeiMemoryLib
    1313    UefiMemoryLib
    14    
     14
    1515  Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
    1616  This program and the accompanying materials
     
    3030
    3131  This function fills Length bytes of Buffer with zeros, and returns Buffer.
    32  
     32
    3333  If Length > 0 and Buffer is NULL, then ASSERT().
    3434  If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/PeiPalLib/PeiPalLib.c

    r48674 r58466  
    33
    44  Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
    5   This program and the accompanying materials                         
    6   are licensed and made available under the terms and conditions of the BSD License         
    7   which accompanies this distribution.  The full text of the license may be found at       
    8   http://opensource.org/licenses/bsd-license.php.                                           
     5  This program and the accompanying materials
     6  are licensed and made available under the terms and conditions of the BSD License
     7  which accompanies this distribution.  The full text of the license may be found at
     8  http://opensource.org/licenses/bsd-license.php.
    99
    10   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     
    11   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 
    12    
     10  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
     11  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
     12
    1313**/
    1414
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/PeiPcdLib/PeiPcdLib.c

    r58459 r58466  
    33
    44Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
    5 This program and the accompanying materials                         
    6 are licensed and made available under the terms and conditions of the BSD License         
    7 which accompanies this distribution.  The full text of the license may be found at       
    8 http://opensource.org/licenses/bsd-license.php                                           
    9                                                                                          
    10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     
    11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             
     5This program and the accompanying materials
     6are licensed and made available under the terms and conditions of the BSD License
     7which accompanies this distribution.  The full text of the license may be found at
     8http://opensource.org/licenses/bsd-license.php
     9
     10THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
     11WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
    1212
    1313
     
    3232  Retrieve the PCD_PPI pointer.
    3333
    34   This function is to locate PCD_PPI PPI via PeiService. 
     34  This function is to locate PCD_PPI PPI via PeiService.
    3535  If fail to locate PCD_PPI, then ASSERT_EFI_ERROR().
    36  
     36
    3737  @retval PCD_PPI * The pointer to the PCD_PPI.
    3838
     
    4141GetPcdPpiPointer (
    4242  VOID
    43   ) 
     43  )
    4444{
    4545  EFI_STATUS        Status;
    4646  PCD_PPI           *PcdPpi;
    47  
     47
    4848  Status = PeiServicesLocatePpi (&gPcdPpiGuid, 0, NULL, (VOID **)&PcdPpi);
    4949  ASSERT_EFI_ERROR (Status);
     
    5555  Retrieve the pointer of EFI_PEI_PCD_PPI defined in PI 1.2 Vol 3.
    5656
    57   This function is to locate EFI_PEI_PCD_PPI PPI via PeiService. 
     57  This function is to locate EFI_PEI_PCD_PPI PPI via PeiService.
    5858  If fail to locate EFI_PEI_PCD_PPI, then ASSERT_EFI_ERROR().
    59  
     59
    6060  @retval EFI_PEI_PCD_PPI * The pointer to the EFI_PEI_PCD_PPI.
    6161
     
    6868  EFI_STATUS        Status;
    6969  EFI_PEI_PCD_PPI   *PiPcdPpi;
    70  
     70
    7171  Status = PeiServicesLocatePpi (&gEfiPeiPcdPpiGuid, 0, NULL, (VOID **)&PiPcdPpi);
    7272  ASSERT_EFI_ERROR (Status);
    73  
     73
    7474  return PiPcdPpi;
    75 } 
     75}
    7676
    7777/**
    7878  Retrieve the GET_PCD_INFO_PPI pointer.
    7979
    80   This function is to locate GET_PCD_INFO_PPI PPI via PeiService. 
     80  This function is to locate GET_PCD_INFO_PPI PPI via PeiService.
    8181  If fail to locate GET_PCD_INFO_PPI, then ASSERT_EFI_ERROR().
    8282
     
    8787GetPcdInfoPpiPointer (
    8888  VOID
    89   ) 
     89  )
    9090{
    9191  EFI_STATUS            Status;
    9292  GET_PCD_INFO_PPI      *PcdInfoPpi;
    93  
     93
    9494  Status = PeiServicesLocatePpi (&gGetPcdInfoPpiGuid, 0, NULL, (VOID **)&PcdInfoPpi);
    9595  ASSERT_EFI_ERROR (Status);
     
    101101  Retrieve the pointer of EFI_GET_PCD_INFO_PPI defined in PI 1.2.1 Vol 3.
    102102
    103   This function is to locate EFI_GET_PCD_INFO_PPI PPI via PeiService. 
     103  This function is to locate EFI_GET_PCD_INFO_PPI PPI via PeiService.
    104104  If fail to locate EFI_GET_PCD_INFO_PPI, then ASSERT_EFI_ERROR().
    105105
     
    114114  EFI_STATUS            Status;
    115115  EFI_GET_PCD_INFO_PPI  *PiPcdInfoPpi;
    116  
     116
    117117  Status = PeiServicesLocatePpi (&gEfiGetPcdInfoPpiGuid, 0, NULL, (VOID **)&PiPcdInfoPpi);
    118118  ASSERT_EFI_ERROR (Status);
    119  
     119
    120120  return PiPcdInfoPpi;
    121 } 
     121}
    122122
    123123/**
     
    125125
    126126  Sets the current SKU in the PCD database to the value specified by SkuId.  SkuId is returned.
    127   If SkuId >= PCD_MAX_SKU_ID, then ASSERT(). 
    128 
    129   @param  SkuId   The SKU value that will be used when the PCD service retrieves 
     127  If SkuId >= PCD_MAX_SKU_ID, then ASSERT().
     128
     129  @param  SkuId   The SKU value that will be used when the PCD service retrieves
    130130                  and sets values associated with a PCD token.
    131131
     
    143143
    144144  GetPiPcdPpiPointer()->SetSku (SkuId);
    145  
     145
    146146  return SkuId;
    147147}
     
    151151/**
    152152  This function provides a means by which to retrieve a value for a given PCD token.
    153  
    154   Returns the 8-bit value for the token specified by TokenNumber. 
     153
     154  Returns the 8-bit value for the token specified by TokenNumber.
    155155
    156156  @param[in]  TokenNumber The PCD token number to retrieve a current value for.
    157157
    158   @return Returns the 8-bit value for the token specified by TokenNumber. 
     158  @return Returns the 8-bit value for the token specified by TokenNumber.
    159159
    160160**/
     
    172172/**
    173173  This function provides a means by which to retrieve a value for a given PCD token.
    174  
    175   Returns the 16-bit value for the token specified by TokenNumber. 
     174
     175  Returns the 16-bit value for the token specified by TokenNumber.
    176176
    177177  @param[in]  TokenNumber The PCD token number to retrieve a current value for.
    178178
    179   @return Returns the 16-bit value for the token specified by TokenNumber. 
     179  @return Returns the 16-bit value for the token specified by TokenNumber.
    180180
    181181**/
     
    193193/**
    194194  This function provides a means by which to retrieve a value for a given PCD token.
    195  
    196   Returns the 32-bit value for the token specified by TokenNumber. 
     195
     196  Returns the 32-bit value for the token specified by TokenNumber.
    197197
    198198  @param[in]  TokenNumber The PCD token number to retrieve a current value for.
     
    214214/**
    215215  This function provides a means by which to retrieve a value for a given PCD token.
    216  
     216
    217217  Returns the 64-bit value for the token specified by TokenNumber.
    218218
     
    235235/**
    236236  This function provides a means by which to retrieve a value for a given PCD token.
    237  
     237
    238238  Returns the pointer to the buffer of the token specified by TokenNumber.
    239239
     
    256256/**
    257257  This function provides a means by which to retrieve a value for a given PCD token.
    258  
    259   Returns the Boolean value of the token specified by TokenNumber. 
     258
     259  Returns the Boolean value of the token specified by TokenNumber.
    260260
    261261  @param[in]  TokenNumber The PCD token number to retrieve a current value for.
    262262
    263   @return Returns the Boolean value of the token specified by TokenNumber. 
    264 
    265 **/
    266 BOOLEAN 
     263  @return Returns the Boolean value of the token specified by TokenNumber.
     264
     265**/
     266BOOLEAN
    267267EFIAPI
    268268LibPcdGetBool (
     
    280280  @param[in]  TokenNumber The PCD token number to retrieve a current value for.
    281281
    282   @return Returns the size of the token specified by TokenNumber. 
     282  @return Returns the size of the token specified by TokenNumber.
    283283
    284284**/
     
    296296/**
    297297  This function provides a means by which to retrieve a value for a given PCD token.
    298  
     298
    299299  Returns the 8-bit value for the token specified by TokenNumber and Guid.
    300  
    301   If Guid is NULL, then ASSERT(). 
    302 
    303   @param[in]  Guid         The pointer to a 128-bit unique value that designates 
     300
     301  If Guid is NULL, then ASSERT().
     302
     303  @param[in]  Guid         The pointer to a 128-bit unique value that designates
    304304                           which namespace to retrieve a value from.
    305305  @param[in]  TokenNumber  The PCD token number to retrieve a current value for.
     
    326326
    327327  Returns the 16-bit value for the token specified by TokenNumber and Guid.
    328  
    329   If Guid is NULL, then ASSERT(). 
    330 
    331   @param[in]  Guid         The pointer to a 128-bit unique value that designates 
     328
     329  If Guid is NULL, then ASSERT().
     330
     331  @param[in]  Guid         The pointer to a 128-bit unique value that designates
    332332                           which namespace to retrieve a value from.
    333333  @param[in]  TokenNumber  The PCD token number to retrieve a current value for.
     
    353353/**
    354354  Returns the 32-bit value for the token specified by TokenNumber and Guid.
    355   If Guid is NULL, then ASSERT(). 
    356 
    357   @param[in]  Guid         The pointer to a 128-bit unique value that designates 
     355  If Guid is NULL, then ASSERT().
     356
     357  @param[in]  Guid         The pointer to a 128-bit unique value that designates
    358358                           which namespace to retrieve a value from.
    359359  @param[in]  TokenNumber  The PCD token number to retrieve a current value for.
     
    379379/**
    380380  This function provides a means by which to retrieve a value for a given PCD token.
    381  
     381
    382382  Returns the 64-bit value for the token specified by TokenNumber and Guid.
    383  
    384   If Guid is NULL, then ASSERT(). 
    385 
    386   @param[in]  Guid          The pointer to a 128-bit unique value that designates 
     383
     384  If Guid is NULL, then ASSERT().
     385
     386  @param[in]  Guid          The pointer to a 128-bit unique value that designates
    387387                            which namespace to retrieve a value from.
    388388  @param[in]  TokenNumber   The PCD token number to retrieve a current value for.
     
    406406/**
    407407  This function provides a means by which to retrieve a value for a given PCD token.
    408  
     408
    409409  Returns the pointer to the buffer of token specified by TokenNumber and Guid.
    410  
    411   If Guid is NULL, then ASSERT(). 
    412 
    413   @param[in]  Guid          The pointer to a 128-bit unique value that designates 
     410
     411  If Guid is NULL, then ASSERT().
     412
     413  @param[in]  Guid          The pointer to a 128-bit unique value that designates
    414414                            which namespace to retrieve a value from.
    415415  @param[in]  TokenNumber   The PCD token number to retrieve a current value for.
     
    434434/**
    435435  This function provides a means by which to retrieve a value for a given PCD token.
    436  
    437   Returns the Boolean value of the token specified by TokenNumber and Guid. 
    438  
    439   If Guid is NULL, then ASSERT(). 
    440 
    441   @param[in]  Guid          The pointer to a 128-bit unique value that designates 
     436
     437  Returns the Boolean value of the token specified by TokenNumber and Guid.
     438
     439  If Guid is NULL, then ASSERT().
     440
     441  @param[in]  Guid          The pointer to a 128-bit unique value that designates
    442442                            which namespace to retrieve a value from.
    443443  @param[in]  TokenNumber   The PCD token number to retrieve a current value for.
     
    461461/**
    462462  This function provides a means by which to retrieve the size of a given PCD token.
    463  
    464   Returns the size of the token specified by TokenNumber and Guid. 
    465  
    466   If Guid is NULL, then ASSERT(). 
    467 
    468   @param[in]  Guid          The pointer to a 128-bit unique value that designates 
     463
     464  Returns the size of the token specified by TokenNumber and Guid.
     465
     466  If Guid is NULL, then ASSERT().
     467
     468  @param[in]  Guid          The pointer to a 128-bit unique value that designates
    469469                            which namespace to retrieve a value from.
    470470  @param[in]  TokenNumber   The PCD token number to retrieve a current value for.
     
    488488/**
    489489  This function provides a means by which to set a value for a given PCD token.
    490  
    491   Sets the 8-bit value for the token specified by TokenNumber 
     490
     491  Sets the 8-bit value for the token specified by TokenNumber
    492492  to the value specified by Value.  Value is returned.
    493493
     
    512512
    513513  ASSERT_EFI_ERROR (Status);
    514  
     514
    515515  return Value;
    516516}
     
    520520/**
    521521  This function provides a means by which to set a value for a given PCD token.
    522  
    523   Sets the 16-bit value for the token specified by TokenNumber 
     522
     523  Sets the 16-bit value for the token specified by TokenNumber
    524524  to the value specified by Value.  Value is returned.
    525525
     
    544544
    545545  ASSERT_EFI_ERROR (Status);
    546  
     546
    547547  return Value;
    548548}
     
    552552/**
    553553  This function provides a means by which to set a value for a given PCD token.
    554  
    555   Sets the 32-bit value for the token specified by TokenNumber 
     554
     555  Sets the 32-bit value for the token specified by TokenNumber
    556556  to the value specified by Value.  Value is returned.
    557557
     
    584584/**
    585585  This function provides a means by which to set a value for a given PCD token.
    586  
    587   Sets the 64-bit value for the token specified by TokenNumber 
     586
     587  Sets the 64-bit value for the token specified by TokenNumber
    588588  to the value specified by Value.  Value is returned.
    589589
     
    616616/**
    617617  This function provides a means by which to set a value for a given PCD token.
    618  
    619   Sets a buffer for the token specified by TokenNumber to the value 
    620   specified by Buffer and SizeOfBuffer.  Buffer is returned. 
    621   If SizeOfBuffer is greater than the maximum size support by TokenNumber, 
    622   then set SizeOfBuffer to the maximum size supported by TokenNumber and 
     618
     619  Sets a buffer for the token specified by TokenNumber to the value
     620  specified by Buffer and SizeOfBuffer.  Buffer is returned.
     621  If SizeOfBuffer is greater than the maximum size support by TokenNumber,
     622  then set SizeOfBuffer to the maximum size supported by TokenNumber and
    623623  return NULL to indicate that the set operation was not actually performed,
    624624  or ASSERT() if the set operation was not corretly performed.
    625625
    626   If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to the 
     626  If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to the
    627627  maximum size supported by TokenName and NULL must be returned.
    628  
     628
    629629  If SizeOfBuffer is NULL, then ASSERT().
    630630  If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
    631  
     631
    632632  @param[in]      TokenNumber   The PCD token number to set a current value for.
    633633  @param[in, out] SizeOfBuffer  The size, in bytes, of Buffer.
     
    668668/**
    669669  This function provides a means by which to set a value for a given PCD token.
    670  
    671   Sets the Boolean value for the token specified by TokenNumber 
     670
     671  Sets the Boolean value for the token specified by TokenNumber
    672672  to the value specified by Value.  Value is returned.
    673673
     
    700700/**
    701701  This function provides a means by which to set a value for a given PCD token.
    702  
    703   Sets the 8-bit value for the token specified by TokenNumber and 
     702
     703  Sets the 8-bit value for the token specified by TokenNumber and
    704704  Guid to the value specified by Value. Value is returned.
    705705
     
    707707  If the set operation was not correctly performed, then ASSERT().
    708708
    709   @param[in]  Guid          The pointer to a 128-bit unique value that 
     709  @param[in]  Guid          The pointer to a 128-bit unique value that
    710710                            designates which namespace to set a value from.
    711711  @param[in]  TokenNumber   The PCD token number to set a current value for.
     
    738738/**
    739739  This function provides a means by which to set a value for a given PCD token.
    740  
    741   Sets the 16-bit value for the token specified by TokenNumber and 
     740
     741  Sets the 16-bit value for the token specified by TokenNumber and
    742742  Guid to the value specified by Value. Value is returned.
    743743
     
    745745  If the set operation was not correctly performed, then ASSERT().
    746746
    747   @param[in]  Guid          The pointer to a 128-bit unique value that 
     747  @param[in]  Guid          The pointer to a 128-bit unique value that
    748748                            designates which namespace to set a value from.
    749749  @param[in]  TokenNumber   The PCD token number to set a current value for.
     
    774774/**
    775775  This function provides a means by which to set a value for a given PCD token.
    776  
    777   Sets the 32-bit value for the token specified by TokenNumber and 
     776
     777  Sets the 32-bit value for the token specified by TokenNumber and
    778778  Guid to the value specified by Value. Value is returned.
    779779
     
    781781  If the set operation was not correctly performed, then ASSERT().
    782782
    783   @param[in]  Guid          The pointer to a 128-bit unique value that 
     783  @param[in]  Guid          The pointer to a 128-bit unique value that
    784784                            designates which namespace to set a value from.
    785785  @param[in]  TokenNumber   The PCD token number to set a current value for.
     
    812812/**
    813813  This function provides a means by which to set a value for a given PCD token.
    814  
    815   Sets the 64-bit value for the token specified by TokenNumber and 
     814
     815  Sets the 64-bit value for the token specified by TokenNumber and
    816816  Guid to the value specified by Value. Value is returned.
    817817
     
    819819  If the set operation was not correctly performed, then ASSERT().
    820820
    821   @param[in]  Guid          The pointer to a 128-bit unique value that 
     821  @param[in]  Guid          The pointer to a 128-bit unique value that
    822822                            designates which namespace to set a value from.
    823823  @param[in]  TokenNumber   The PCD token number to set a current value for.
     
    849849/**
    850850  This function provides a means by which to set a value for a given PCD token.
    851  
    852   Sets a buffer for the token specified by TokenNumber to the value specified by 
    853   Buffer and SizeOfBuffer.  Buffer is returned.  If SizeOfBuffer is greater than 
    854   the maximum size support by TokenNumber, then set SizeOfBuffer to the maximum size 
    855   supported by TokenNumber and return NULL to indicate that the set operation 
     851
     852  Sets a buffer for the token specified by TokenNumber to the value specified by
     853  Buffer and SizeOfBuffer.  Buffer is returned.  If SizeOfBuffer is greater than
     854  the maximum size support by TokenNumber, then set SizeOfBuffer to the maximum size
     855  supported by TokenNumber and return NULL to indicate that the set operation
    856856  was not actually performed, or ASSERT() if the set operation was not corretly performed.
    857  
     857
    858858  If Guid is NULL, then ASSERT().
    859859  If SizeOfBuffer is NULL, then ASSERT().
    860860  If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
    861  
    862   @param[in]  Guid              The pointer to a 128-bit unique value that 
     861
     862  @param[in]  Guid              The pointer to a 128-bit unique value that
    863863                                designates which namespace to set a value from.
    864864  @param[in]  TokenNumber       The PCD token number to set a current value for.
     
    902902/**
    903903  This function provides a means by which to set a value for a given PCD token.
    904  
    905   Sets the Boolean value for the token specified by TokenNumber and 
     904
     905  Sets the Boolean value for the token specified by TokenNumber and
    906906  Guid to the value specified by Value. Value is returned.
    907907
     
    909909  If the set operation was not correctly performed, then ASSERT().
    910910
    911   @param[in]  Guid          The pointer to a 128-bit unique value that 
     911  @param[in]  Guid          The pointer to a 128-bit unique value that
    912912                            designates which namespace to set a value from.
    913913  @param[in]  TokenNumber   The PCD token number to set a current value for.
     
    939939/**
    940940  Set up a notification function that is called when a specified token is set.
    941  
    942   When the token specified by TokenNumber and Guid is set, 
    943   then notification function specified by NotificationFunction is called. 
     941
     942  When the token specified by TokenNumber and Guid is set,
     943  then notification function specified by NotificationFunction is called.
    944944  If Guid is NULL, then the default token space is used.
    945945  If NotificationFunction is NULL, then ASSERT().
    946946
    947   @param[in]  Guid                  The pointer to a 128-bit unique value that 
    948                                     designates which namespace to set a value from. 
     947  @param[in]  Guid                  The pointer to a 128-bit unique value that
     948                                    designates which namespace to set a value from.
    949949                                    If NULL, then the default token space is used.
    950950  @param[in]  TokenNumber           The PCD token number to monitor.
    951   @param[in]  NotificationFunction  The function to call when the token 
     951  @param[in]  NotificationFunction  The function to call when the token
    952952                                    specified by Guid and TokenNumber is set.
    953953
     
    976976/**
    977977  Disable a notification function that was established with LibPcdCallbackonSet().
    978  
     978
    979979  Disable a notification function that was previously established with LibPcdCallbackOnSet().
    980980  If NotificationFunction is NULL, then ASSERT().
    981   If LibPcdCallbackOnSet() was not previously called with Guid, TokenNumber, 
     981  If LibPcdCallbackOnSet() was not previously called with Guid, TokenNumber,
    982982  and NotificationFunction, then ASSERT().
    983  
     983
    984984  @param[in]  Guid                 Specify the GUID token space.
    985985  @param[in]  TokenNumber          Specify the token number.
     
    10101010/**
    10111011  Retrieves the next token in a token space.
    1012  
    1013   Retrieves the next PCD token number from the token space specified by Guid. 
    1014   If Guid is NULL, then the default token space is used.  If TokenNumber is 0, 
    1015   then the first token number is returned.  Otherwise, the token number that 
    1016   follows TokenNumber in the token space is returned.  If TokenNumber is the last 
    1017   token number in the token space, then 0 is returned. 
    1018  
     1012
     1013  Retrieves the next PCD token number from the token space specified by Guid.
     1014  If Guid is NULL, then the default token space is used.  If TokenNumber is 0,
     1015  then the first token number is returned.  Otherwise, the token number that
     1016  follows TokenNumber in the token space is returned.  If TokenNumber is the last
     1017  token number in the token space, then 0 is returned.
     1018
    10191019  If TokenNumber is not 0 and is not in the token space specified by Guid, then ASSERT().
    10201020
    1021   @param[in]  Guid        The pointer to a 128-bit unique value that designates which namespace 
     1021  @param[in]  Guid        The pointer to a 128-bit unique value that designates which namespace
    10221022                          to set a value from.  If NULL, then the default token space is used.
    1023   @param[in]  TokenNumber The previous PCD token number.  If 0, then retrieves the first PCD 
     1023  @param[in]  TokenNumber The previous PCD token number.  If 0, then retrieves the first PCD
    10241024                          token number.
    10251025
     
    10271027
    10281028**/
    1029 UINTN           
     1029UINTN
    10301030EFIAPI
    10311031LibPcdGetNextToken (
     
    10451045/**
    10461046  Used to retrieve the list of available PCD token space GUIDs.
    1047  
     1047
    10481048  Returns the PCD token space GUID that follows TokenSpaceGuid in the list of token spaces
    10491049  in the platform.
    10501050  If TokenSpaceGuid is NULL, then a pointer to the first PCD token spaces returned.
    10511051  If TokenSpaceGuid is the last PCD token space GUID in the list, then NULL is returned.
    1052  
     1052
    10531053  @param  TokenSpaceGuid  The pointer to the a PCD token space GUID
    10541054
     
    10711071/**
    10721072  Sets a value of a patchable PCD entry that is type pointer.
    1073  
    1074   Sets the PCD entry specified by PatchVariable to the value specified by Buffer 
    1075   and SizeOfBuffer.  Buffer is returned.  If SizeOfBuffer is greater than 
    1076   MaximumDatumSize, then set SizeOfBuffer to MaximumDatumSize and return 
    1077   NULL to indicate that the set operation was not actually performed. 
    1078   If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to 
     1073
     1074  Sets the PCD entry specified by PatchVariable to the value specified by Buffer
     1075  and SizeOfBuffer.  Buffer is returned.  If SizeOfBuffer is greater than
     1076  MaximumDatumSize, then set SizeOfBuffer to MaximumDatumSize and return
     1077  NULL to indicate that the set operation was not actually performed.
     1078  If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to
    10791079  MaximumDatumSize and NULL must be returned.
    1080  
     1080
    10811081  If PatchVariable is NULL, then ASSERT().
    10821082  If SizeOfBuffer is NULL, then ASSERT().
    10831083  If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT().
    10841084
    1085   @param[in] PatchVariable      A pointer to the global variable in a module that is 
     1085  @param[in] PatchVariable      A pointer to the global variable in a module that is
    10861086                                the target of the set operation.
    10871087  @param[in] MaximumDatumSize   The maximum size allowed for the PCD entry specified by PatchVariable.
    10881088  @param[in, out] SizeOfBuffer  A pointer to the size, in bytes, of Buffer.
    10891089  @param[in] Buffer             A pointer to the buffer to used to set the target variable.
    1090  
     1090
    10911091  @return Return the pointer to the buffer been set.
    10921092
     
    11031103  ASSERT (PatchVariable != NULL);
    11041104  ASSERT (SizeOfBuffer  != NULL);
    1105  
     1105
    11061106  if (*SizeOfBuffer > 0) {
    11071107    ASSERT (Buffer != NULL);
     
    11131113    return NULL;
    11141114  }
    1115    
     1115
    11161116  CopyMem (PatchVariable, Buffer, *SizeOfBuffer);
    1117  
     1117
    11181118  return (VOID *) Buffer;
    11191119}
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/PeiPcdLib/PeiPcdLib.inf

    r58459 r58466  
    33#
    44# There are two PCD PPIs as follows:
    5 #   1) PCD_PPI 
     5#   1) PCD_PPI
    66#      It is EDKII implementation which support Dynamic/DynamicEx Pcds.
    77#   2) EFI_PEI_PCD_PPI
    8 #      It is defined by PI specification 1.2, Vol 3 which only support dynamicEx 
     8#      It is defined by PI specification 1.2, Vol 3 which only support dynamicEx
    99#      type Pcd.
    1010# For dynamicEx type PCD, it is compatible between PCD_PPI and EFI_PEI_PCD_PPI.
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/PeiPciLibPciCfg2/PciLib.c

    r58459 r58466  
    88  text of the license may be found at
    99  http://opensource.org/licenses/bsd-license.php.
    10  
     10
    1111  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
    1212  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
     
    130130
    131131/**
    132   Registers a PCI device so PCI configuration registers may be accessed after 
     132  Registers a PCI device so PCI configuration registers may be accessed after
    133133  SetVirtualAddressMap().
    134  
    135   Registers the PCI device specified by Address so all the PCI configuration registers 
     134
     135  Registers the PCI device specified by Address so all the PCI configuration registers
    136136  associated with that PCI device may be accessed after SetVirtualAddressMap() is called.
    137  
    138   If Address > 0x0FFFFFFF, then ASSERT().
    139 
    140   @param  Address The address that encodes the PCI Bus, Device, Function and
    141                   Register.
    142  
     137
     138  If Address > 0x0FFFFFFF, then ASSERT().
     139
     140  @param  Address The address that encodes the PCI Bus, Device, Function and
     141                  Register.
     142
    143143  @retval RETURN_SUCCESS           The PCI device was registered for runtime access.
    144   @retval RETURN_UNSUPPORTED       An attempt was made to call this function 
     144  @retval RETURN_UNSUPPORTED       An attempt was made to call this function
    145145                                   after ExitBootServices().
    146146  @retval RETURN_UNSUPPORTED       The resources required to access the PCI device
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/PeiPciSegmentLibPciCfg2/PciSegmentLib.c

    r58459 r58466  
    88  text of the license may be found at
    99  http://opensource.org/licenses/bsd-license.php.
    10  
     10
    1111  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
    1212  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
     
    5050  This internal function retrieves PCI CFG2 PPI from PPI database.
    5151
    52   @param  Address       The address that encodes the PCI Segment, Bus, Device, 
     52  @param  Address       The address that encodes the PCI Segment, Bus, Device,
    5353                        Function and Register.
    5454
     
    164164
    165165/**
    166   Register a PCI device so PCI configuration registers may be accessed after 
     166  Register a PCI device so PCI configuration registers may be accessed after
    167167  SetVirtualAddressMap().
    168  
     168
    169169  If any reserved bits in Address are set, then ASSERT().
    170170
    171171  @param  Address The address that encodes the PCI Bus, Device, Function and
    172172                  Register.
    173  
     173
    174174  @retval RETURN_SUCCESS           The PCI device was registered for runtime access.
    175   @retval RETURN_UNSUPPORTED       An attempt was made to call this function 
     175  @retval RETURN_UNSUPPORTED       An attempt was made to call this function
    176176                                   after ExitBootServices().
    177177  @retval RETURN_UNSUPPORTED       The resources required to access the PCI device
     
    196196  Reads and returns the 8-bit PCI configuration register specified by Address.
    197197  This function must guarantee that all PCI read and write operations are serialized.
    198  
    199   If any reserved bits in Address are set, then ASSERT().
    200  
    201   @param  Address   The address that encodes the PCI Segment, Bus, Device, Function, 
     198
     199  If any reserved bits in Address are set, then ASSERT().
     200
     201  @param  Address   The address that encodes the PCI Segment, Bus, Device, Function,
    202202                    and Register.
    203203
     
    221221  Writes the 8-bit PCI configuration register specified by Address with the value specified by Value.
    222222  Value is returned.  This function must guarantee that all PCI read and write operations are serialized.
    223  
     223
    224224  If any reserved bits in Address are set, then ASSERT().
    225225
     
    250250  The value written to the PCI configuration register is returned.
    251251  This function must guarantee that all PCI read and write operations are serialized.
    252  
     252
    253253  If any reserved bits in Address are set, then ASSERT().
    254254
     
    298298  Performs a bitwise AND of an 8-bit PCI configuration register with an 8-bit value,
    299299  followed a  bitwise OR with another 8-bit value.
    300  
     300
    301301  Reads the 8-bit PCI configuration register specified by Address,
    302302  performs a bitwise AND between the read result and the value specified by AndData,
     
    305305  The value written to the PCI configuration register is returned.
    306306  This function must guarantee that all PCI read and write operations are serialized.
    307  
     307
    308308  If any reserved bits in Address are set, then ASSERT().
    309309
     
    533533  Reads and returns the 16-bit PCI configuration register specified by Address.
    534534  This function must guarantee that all PCI read and write operations are serialized.
    535  
     535
    536536  If any reserved bits in Address are set, then ASSERT().
    537537  If Address is not aligned on a 16-bit boundary, then ASSERT().
    538  
     538
    539539  @param  Address   The address that encodes the PCI Segment, Bus, Device, Function, and Register.
    540540
     
    558558  Writes the 16-bit PCI configuration register specified by Address with the value specified by Value.
    559559  Value is returned.  This function must guarantee that all PCI read and write operations are serialized.
    560  
     560
    561561  If any reserved bits in Address are set, then ASSERT().
    562562  If Address is not aligned on a 16-bit boundary, then ASSERT().
     
    619619  The value written to the PCI configuration register is returned.
    620620  This function must guarantee that all PCI read and write operations are serialized.
    621  
     621
    622622  If any reserved bits in Address are set, then ASSERT().
    623623  If Address is not aligned on a 16-bit boundary, then ASSERT().
    624  
     624
    625625  @param  Address   The address that encodes the PCI Segment, Bus, Device, Function, and Register.
    626626  @param  AndData   The value to AND with the PCI configuration register.
     
    642642  Performs a bitwise AND of a 16-bit PCI configuration register with a 16-bit value,
    643643  followed a  bitwise OR with another 16-bit value.
    644  
     644
    645645  Reads the 16-bit PCI configuration register specified by Address,
    646646  performs a bitwise AND between the read result and the value specified by AndData,
     
    649649  The value written to the PCI configuration register is returned.
    650650  This function must guarantee that all PCI read and write operations are serialized.
    651  
     651
    652652  If any reserved bits in Address are set, then ASSERT().
    653653  If Address is not aligned on a 16-bit boundary, then ASSERT().
     
    747747  Reads the 16-bit PCI configuration register specified by Address,
    748748  performs a bitwise OR between the read result and the value specified by OrData,
    749   and writes the result to the 16-bit PCI configuration register specified by Address. 
     749  and writes the result to the 16-bit PCI configuration register specified by Address.
    750750
    751751  If any reserved bits in Address are set, then ASSERT().
     
    791791  This function must guarantee that all PCI read and write operations are serialized.
    792792  Extra left bits in OrData are stripped.
    793  
     793
    794794  If any reserved bits in Address are set, then ASSERT().
    795795  If Address is not aligned on a 16-bit boundary, then ASSERT().
     
    876876  Reads and returns the 32-bit PCI configuration register specified by Address.
    877877  This function must guarantee that all PCI read and write operations are serialized.
    878  
     878
    879879  If any reserved bits in Address are set, then ASSERT().
    880880  If Address is not aligned on a 32-bit boundary, then ASSERT().
    881881
    882   @param  Address   The address that encodes the PCI Segment, Bus, Device, Function, 
     882  @param  Address   The address that encodes the PCI Segment, Bus, Device, Function,
    883883                    and Register.
    884884
     
    902902  Writes the 32-bit PCI configuration register specified by Address with the value specified by Value.
    903903  Value is returned.  This function must guarantee that all PCI read and write operations are serialized.
    904  
     904
    905905  If any reserved bits in Address are set, then ASSERT().
    906906  If Address is not aligned on a 32-bit boundary, then ASSERT().
    907907
    908   @param  Address     The address that encodes the PCI Segment, Bus, Device, 
     908  @param  Address     The address that encodes the PCI Segment, Bus, Device,
    909909                      Function, and Register.
    910910  @param  Value       The value to write.
     
    933933  The value written to the PCI configuration register is returned.
    934934  This function must guarantee that all PCI read and write operations are serialized.
    935  
     935
    936936  If any reserved bits in Address are set, then ASSERT().
    937937  If Address is not aligned on a 32-bit boundary, then ASSERT().
     
    961961  The value written to the PCI configuration register is returned.
    962962  This function must guarantee that all PCI read and write operations are serialized.
    963  
     963
    964964  If any reserved bits in Address are set, then ASSERT().
    965965  If Address is not aligned on a 32-bit boundary, then ASSERT().
    966966
    967   @param  Address   The address that encodes the PCI Segment, Bus, Device, Function, 
     967  @param  Address   The address that encodes the PCI Segment, Bus, Device, Function,
    968968                    and Register.
    969969  @param  AndData   The value to AND with the PCI configuration register.
     
    985985  Performs a bitwise AND of a 32-bit PCI configuration register with a 32-bit value,
    986986  followed a  bitwise OR with another 32-bit value.
    987  
     987
    988988  Reads the 32-bit PCI configuration register specified by Address,
    989989  performs a bitwise AND between the read result and the value specified by AndData,
     
    992992  The value written to the PCI configuration register is returned.
    993993  This function must guarantee that all PCI read and write operations are serialized.
    994  
     994
    995995  If any reserved bits in Address are set, then ASSERT().
    996996  If Address is not aligned on a 32-bit boundary, then ASSERT().
     
    11341134  AND, and writes the result back to the bit field in the 32-bit register.
    11351135
    1136  
     1136
    11371137  Reads the 32-bit PCI configuration register specified by Address, performs a bitwise
    11381138  AND between the read result and the value specified by AndData, and writes the result
     
    12341234  If Size > 0 and Buffer is NULL, then ASSERT().
    12351235
    1236   @param  StartAddress  The starting address that encodes the PCI Segment, Bus, 
     1236  @param  StartAddress  The starting address that encodes the PCI Segment, Bus,
    12371237                        Device, Function and Register.
    12381238  @param  Size          The size in bytes of the transfer.
     
    13331333  If Size > 0 and Buffer is NULL, then ASSERT().
    13341334
    1335   @param  StartAddress  The starting address that encodes the PCI Segment, Bus, 
     1335  @param  StartAddress  The starting address that encodes the PCI Segment, Bus,
    13361336                        Device, Function and Register.
    13371337  @param  Size          The size in bytes of the transfer.
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/PeiResourcePublicationLib/PeiResourcePublicationLib.c

    r48674 r58466  
    33
    44  Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
    5   This program and the accompanying materials                         
    6   are licensed and made available under the terms and conditions of the BSD License         
    7   which accompanies this distribution.  The full text of the license may be found at       
    8   http://opensource.org/licenses/bsd-license.php.                                           
     5  This program and the accompanying materials
     6  are licensed and made available under the terms and conditions of the BSD License
     7  which accompanies this distribution.  The full text of the license may be found at
     8  http://opensource.org/licenses/bsd-license.php.
    99
    10   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     
    11   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             
     10  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
     11  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
    1212
    1313**/
     
    2929  as permanent memory that may be used for general purpose use by software.
    3030  The amount of memory available to software may be less than MemoryLength
    31   if published memory has alignment restrictions. 
     31  if published memory has alignment restrictions.
    3232  If MemoryLength is 0, then ASSERT().
    33   If MemoryLength is greater than (MAX_ADDRESS - MemoryBegin + 1), then ASSERT(). 
     33  If MemoryLength is greater than (MAX_ADDRESS - MemoryBegin + 1), then ASSERT().
    3434
    3535  @param  MemoryBegin               The start address of the memory being declared.
     
    5353
    5454  Status      = PeiServicesInstallPeiMemory (MemoryBegin, MemoryLength);
    55      
     55
    5656  return (RETURN_STATUS) Status;
    5757}
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/PeiServicesLib/PeiServicesLib.c

    r58459 r58466  
    110110  installed or reinstalled.
    111111
    112   @param  NotifyList            A pointer to the list of notification interfaces 
     112  @param  NotifyList            A pointer to the list of notification interfaces
    113113                                that the caller shall install.
    114114
     
    177177  This service enables a PEIM to ascertain the address of the list of HOBs in memory.
    178178
    179   @param  HobList               A pointer to the list of HOBs that the PEI Foundation 
     179  @param  HobList               A pointer to the list of HOBs that the PEI Foundation
    180180                                will initialize.
    181  
     181
    182182  @retval EFI_SUCCESS           The list was successfully returned.
    183183  @retval EFI_NOT_AVAILABLE_YET The HOB list is not yet published.
     
    201201  @param  Type                  The type of HOB to be installed.
    202202  @param  Length                The length of the HOB to be added.
    203   @param  Hob                   The address of a pointer that will contain the 
     203  @param  Hob                   The address of a pointer that will contain the
    204204                                HOB header.
    205205
     
    225225  This service enables PEIMs to discover additional firmware volumes.
    226226
    227   @param  Instance              This instance of the firmware volume to find.  The 
     227  @param  Instance              This instance of the firmware volume to find.  The
    228228                                value 0 is the Boot Firmware Volume (BFV).
    229229  @param  VolumeHandle          Handle of the firmware volume header of the volume
     
    252252
    253253  @param  SearchType            A filter to find files only of this type.
    254   @param  VolumeHandle          The pointer to the firmware volume header of the 
    255                                 volume to search. This parameter must point to a 
    256                                 valid FFS volume. 
     254  @param  VolumeHandle          The pointer to the firmware volume header of the
     255                                volume to search. This parameter must point to a
     256                                valid FFS volume.
    257257  @param  FileHandle            Handle of the current file from which to begin searching.
    258258
     
    280280
    281281  @param  SectionType           The value of the section type to find.
    282   @param  FileHandle            A pointer to the file header that contains the set 
     282  @param  FileHandle            A pointer to the file header that contains the set
    283283                                of sections to be searched.
    284284  @param  SectionData           A pointer to the discovered section, if successful.
     
    307307  @param  SectionType           The value of the section type to find.
    308308  @param  SectionInstance       Section instance to find.
    309   @param  FileHandle            A pointer to the file header that contains the set 
     309  @param  FileHandle            A pointer to the file header that contains the set
    310310                                of sections to be searched.
    311311  @param  SectionData           A pointer to the discovered section, if successful.
     
    389389
    390390  @param  Size                  The number of bytes to allocate from the pool.
    391   @param  Buffer                If the call succeeds, a pointer to a pointer to 
     391  @param  Buffer                If the call succeeds, a pointer to a pointer to
    392392                                the allocate buffer; otherwise, undefined.
    393393
     
    429429
    430430/**
    431   This service is a wrapper for the PEI Service RegisterForShadow(), except the 
    432   pointer to the PEI Services Table has been removed.  See the Platform 
    433   Initialization Pre-EFI Initialization Core Interface Specification for details. 
     431  This service is a wrapper for the PEI Service RegisterForShadow(), except the
     432  pointer to the PEI Services Table has been removed.  See the Platform
     433  Initialization Pre-EFI Initialization Core Interface Specification for details.
    434434
    435435  @param FileHandle             PEIM's file handle. Must be the currently
    436436                                executing PEIM.
    437  
     437
    438438  @retval EFI_SUCCESS           The PEIM was successfully registered for
    439439                                shadowing.
     
    455455
    456456/**
    457   This service is a wrapper for the PEI Service FfsGetFileInfo(), except the pointer to the PEI Services 
    458   Table has been removed.  See the Platform Initialization Pre-EFI Initialization Core Interface 
    459   Specification for details. 
     457  This service is a wrapper for the PEI Service FfsGetFileInfo(), except the pointer to the PEI Services
     458  Table has been removed.  See the Platform Initialization Pre-EFI Initialization Core Interface
     459  Specification for details.
    460460
    461461  @param FileHandle              The handle of the file.
     
    465465
    466466  @retval EFI_SUCCESS             File information returned.
    467  
     467
    468468  @retval EFI_INVALID_PARAMETER   If FileHandle does not
    469469                                  represent a valid file.
    470  
     470
    471471  @retval EFI_INVALID_PARAMETER   FileInfo is NULL.
    472  
    473 **/
    474 EFI_STATUS
    475 EFIAPI 
     472
     473**/
     474EFI_STATUS
     475EFIAPI
    476476PeiServicesFfsGetFileInfo (
    477477  IN CONST  EFI_PEI_FILE_HANDLE   FileHandle,
     
    508508
    509509/**
    510   This service is a wrapper for the PEI Service FfsFindByName(), except the pointer to the PEI Services 
    511   Table has been removed.  See the Platform Initialization Pre-EFI Initialization Core Interface 
    512   Specification for details. 
     510  This service is a wrapper for the PEI Service FfsFindByName(), except the pointer to the PEI Services
     511  Table has been removed.  See the Platform Initialization Pre-EFI Initialization Core Interface
     512  Specification for details.
    513513
    514514  @param FileName                 A pointer to the name of the file to
     
    518518                                  Upon exit, points to the found file's
    519519                                  handle or NULL if it could not be found.
    520   @param FileHandle               The pointer to found file handle 
     520  @param FileHandle               The pointer to found file handle
    521521
    522522  @retval EFI_SUCCESS             File was found.
     
    541541
    542542/**
    543   This service is a wrapper for the PEI Service FfsGetVolumeInfo(), except the pointer to the PEI Services 
    544   Table has been removed.  See the Platform Initialization Pre-EFI Initialization Core Interface 
    545   Specification for details. 
     543  This service is a wrapper for the PEI Service FfsGetVolumeInfo(), except the pointer to the PEI Services
     544  Table has been removed.  See the Platform Initialization Pre-EFI Initialization Core Interface
     545  Specification for details.
    546546
    547547  @param VolumeHandle             Handle of the volume.
     
    551551
    552552  @retval EFI_SUCCESS             File information returned.
    553  
     553
    554554  @retval EFI_INVALID_PARAMETER   If FileHandle does not
    555555                                  represent a valid file.
    556  
     556
    557557  @retval EFI_INVALID_PARAMETER   If FileInfo is NULL.
    558558
     
    611611  )
    612612{
    613   EFI_STATUS                       Status;   
     613  EFI_STATUS                       Status;
    614614  EFI_PEI_FIRMWARE_VOLUME_INFO_PPI *FvInfoPpi;
    615615  EFI_PEI_PPI_DESCRIPTOR           *FvInfoPpiDescriptor;
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/PeiServicesLib/PeiServicesLib.inf

    r58459 r58466  
    2121  MODULE_TYPE                    = PEIM
    2222  VERSION_STRING                 = 1.0
    23   LIBRARY_CLASS                  = PeiServicesLib|SEC PEIM PEI_CORE 
     23  LIBRARY_CLASS                  = PeiServicesLib|SEC PEIM PEI_CORE
    2424  PI_SPECIFICATION_VERSION       = 0x0001000A
    2525
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointer.c

    r58459 r58466  
    11/** @file
    22  PEI Services Table Pointer Library.
    3  
     3
    44  This library is used for PEIM which does executed from flash device directly but
    55  executed in memory.
     
    2323
    2424/**
    25   Caches a pointer PEI Services Table. 
    26  
    27   Caches the pointer to the PEI Services Table specified by PeiServicesTablePointer 
    28   in a CPU specific manner as specified in the CPU binding section of the Platform Initialization 
    29   Pre-EFI Initialization Core Interface Specification. 
    30  
     25  Caches a pointer PEI Services Table.
     26
     27  Caches the pointer to the PEI Services Table specified by PeiServicesTablePointer
     28  in a CPU specific manner as specified in the CPU binding section of the Platform Initialization
     29  Pre-EFI Initialization Core Interface Specification.
     30
    3131  If PeiServicesTablePointer is NULL, then ASSERT().
    32  
     32
    3333  @param    PeiServicesTablePointer   The address of PeiServices pointer.
    3434**/
     
    4646  Retrieves the cached value of the PEI Services Table pointer.
    4747
    48   Returns the cached value of the PEI Services Table pointer in a CPU specific manner 
    49   as specified in the CPU binding section of the Platform Initialization Pre-EFI 
     48  Returns the cached value of the PEI Services Table pointer in a CPU specific manner
     49  as specified in the CPU binding section of the Platform Initialization Pre-EFI
    5050  Initialization Core Interface Specification.
    51  
     51
    5252  If the cached PEI Services Table pointer is NULL, then ASSERT().
    5353
     
    6868/**
    6969  The constructor function caches the pointer to PEI services.
    70  
     70
    7171  The constructor function caches the pointer to PEI services.
    7272  It will always return EFI_SUCCESS.
     
    9090
    9191/**
    92   Perform CPU specific actions required to migrate the PEI Services Table 
     92  Perform CPU specific actions required to migrate the PEI Services Table
    9393  pointer from temporary RAM to permanent RAM.
    9494
    95   For IA32 CPUs, the PEI Services Table pointer is stored in the 4 bytes 
     95  For IA32 CPUs, the PEI Services Table pointer is stored in the 4 bytes
    9696  immediately preceding the Interrupt Descriptor Table (IDT) in memory.
    97   For X64 CPUs, the PEI Services Table pointer is stored in the 8 bytes 
     97  For X64 CPUs, the PEI Services Table pointer is stored in the 8 bytes
    9898  immediately preceding the Interrupt Descriptor Table (IDT) in memory.
    9999  For Itanium and ARM CPUs, a the PEI Services Table Pointer is stored in
    100   a dedicated CPU register.  This means that there is no memory storage 
    101   associated with storing the PEI Services Table pointer, so no additional 
     100  a dedicated CPU register.  This means that there is no memory storage
     101  associated with storing the PEI Services Table pointer, so no additional
    102102  migration actions are required for Itanium or ARM CPUs.
    103103
     
    110110{
    111111  //
    112   //  PEI Services Table pointer is cached in the global variable. No additional 
     112  //  PEI Services Table pointer is cached in the global variable. No additional
    113113  //  migration actions are required.
    114114  //
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointer.c

    r58459 r58466  
    44  According to PI specification, the peiservice pointer is stored prior at IDT
    55  table in IA32 and x64 architecture.
    6  
     6
    77  Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
    8   This program and the accompanying materials                         
    9   are licensed and made available under the terms and conditions of the BSD License         
    10   which accompanies this distribution.  The full text of the license may be found at       
    11   http://opensource.org/licenses/bsd-license.php.                                           
     8  This program and the accompanying materials
     9  are licensed and made available under the terms and conditions of the BSD License
     10  which accompanies this distribution.  The full text of the license may be found at
     11  http://opensource.org/licenses/bsd-license.php.
    1212
    13   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     
    14   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             
     13  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
     14  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
    1515
    1616**/
     
    2626  Retrieves the cached value of the PEI Services Table pointer.
    2727
    28   Returns the cached value of the PEI Services Table pointer in a CPU specific manner 
    29   as specified in the CPU binding section of the Platform Initialization Pre-EFI 
     28  Returns the cached value of the PEI Services Table pointer in a CPU specific manner
     29  as specified in the CPU binding section of the Platform Initialization Pre-EFI
    3030  Initialization Core Interface Specification.
    31  
     31
    3232  If the cached PEI Services Table pointer is NULL, then ASSERT().
    3333
     
    4343  CONST EFI_PEI_SERVICES  **PeiServices;
    4444  IA32_DESCRIPTOR   Idtr;
    45  
     45
    4646  AsmReadIdtr (&Idtr);
    4747  PeiServices = (CONST EFI_PEI_SERVICES **) (*(UINTN*)(Idtr.Base - sizeof (UINTN)));
     
    5151
    5252/**
    53   Caches a pointer PEI Services Table. 
    54  
    55   Caches the pointer to the PEI Services Table specified by PeiServicesTablePointer 
    56   in a CPU specific manner as specified in the CPU binding section of the Platform Initialization 
    57   Pre-EFI Initialization Core Interface Specification. 
     53  Caches a pointer PEI Services Table.
     54
     55  Caches the pointer to the PEI Services Table specified by PeiServicesTablePointer
     56  in a CPU specific manner as specified in the CPU binding section of the Platform Initialization
     57  Pre-EFI Initialization Core Interface Specification.
    5858  The function set the pointer of PEI services immediately preceding the IDT table
    5959  according to PI specification.
    60  
     60
    6161  If PeiServicesTablePointer is NULL, then ASSERT().
    62  
     62
    6363  @param    PeiServicesTablePointer   The address of PeiServices pointer.
    6464**/
     
    7070{
    7171  IA32_DESCRIPTOR        Idtr;
    72  
     72
    7373  ASSERT (PeiServicesTablePointer != NULL);
    7474  AsmReadIdtr (&Idtr);
     
    7777
    7878/**
    79   Perform CPU specific actions required to migrate the PEI Services Table 
     79  Perform CPU specific actions required to migrate the PEI Services Table
    8080  pointer from temporary RAM to permanent RAM.
    8181
    82   For IA32 CPUs, the PEI Services Table pointer is stored in the 4 bytes 
     82  For IA32 CPUs, the PEI Services Table pointer is stored in the 4 bytes
    8383  immediately preceding the Interrupt Descriptor Table (IDT) in memory.
    84   For X64 CPUs, the PEI Services Table pointer is stored in the 8 bytes 
     84  For X64 CPUs, the PEI Services Table pointer is stored in the 8 bytes
    8585  immediately preceding the Interrupt Descriptor Table (IDT) in memory.
    8686  For Itanium and ARM CPUs, a the PEI Services Table Pointer is stored in
    87   a dedicated CPU register.  This means that there is no memory storage 
    88   associated with storing the PEI Services Table pointer, so no additional 
     87  a dedicated CPU register.  This means that there is no memory storage
     88  associated with storing the PEI Services Table pointer, so no additional
    8989  migration actions are required for Itanium or ARM CPUs.
    9090
     
    113113  //
    114114  Status = (*PeiServices)->AllocatePages (
    115                             PeiServices, 
     115                            PeiServices,
    116116                            EfiBootServicesCode,
    117117                            EFI_SIZE_TO_PAGES(Idtr.Limit + 1 + sizeof (UINTN)),
     
    125125  Idtr.Base = (UINTN) IdtBase + sizeof (UINTN);
    126126  AsmWriteIdtr (&Idtr);
    127  
     127
    128128  return;
    129129}
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/PeiServicesTablePointerLibKr7/PeiServicesTablePointer.c

    r58459 r58466  
    2121  Retrieves the cached value of the PEI Services Table pointer.
    2222
    23   Returns the cached value of the PEI Services Table pointer in a CPU specific manner 
    24   as specified in the CPU binding section of the Platform Initialization Pre-EFI 
     23  Returns the cached value of the PEI Services Table pointer in a CPU specific manner
     24  as specified in the CPU binding section of the Platform Initialization Pre-EFI
    2525  Initialization Core Interface Specification.
    26  
     26
    2727  If the cached PEI Services Table pointer is NULL, then ASSERT().
    2828
     
    4545
    4646/**
    47   Caches a pointer PEI Services Table. 
    48  
    49   Caches the pointer to the PEI Services Table specified by PeiServicesTablePointer 
    50   in a CPU specific manner as specified in the CPU binding section of the Platform Initialization 
    51   Pre-EFI Initialization Core Interface Specification. 
    52   The function set the pointer of PEI services in KR7 register 
     47  Caches a pointer PEI Services Table.
     48
     49  Caches the pointer to the PEI Services Table specified by PeiServicesTablePointer
     50  in a CPU specific manner as specified in the CPU binding section of the Platform Initialization
     51  Pre-EFI Initialization Core Interface Specification.
     52  The function set the pointer of PEI services in KR7 register
    5353  according to PI specification.
    54  
     54
    5555  If PeiServicesTablePointer is NULL, then ASSERT().
    56  
     56
    5757  @param    PeiServicesTablePointer   The address of PeiServices pointer.
    5858**/
     
    6666  AsmWriteKr7 ((UINT64)(UINTN)PeiServicesTablePointer);
    6767}
    68  
     68
    6969/**
    70   Perform CPU specific actions required to migrate the PEI Services Table 
     70  Perform CPU specific actions required to migrate the PEI Services Table
    7171  pointer from temporary RAM to permanent RAM.
    7272
    73   For IA32 CPUs, the PEI Services Table pointer is stored in the 4 bytes 
     73  For IA32 CPUs, the PEI Services Table pointer is stored in the 4 bytes
    7474  immediately preceding the Interrupt Descriptor Table (IDT) in memory.
    75   For X64 CPUs, the PEI Services Table pointer is stored in the 8 bytes 
     75  For X64 CPUs, the PEI Services Table pointer is stored in the 8 bytes
    7676  immediately preceding the Interrupt Descriptor Table (IDT) in memory.
    7777  For Itanium and ARM CPUs, a the PEI Services Table Pointer is stored in
    78   a dedicated CPU register.  This means that there is no memory storage 
    79   associated with storing the PEI Services Table pointer, so no additional 
     78  a dedicated CPU register.  This means that there is no memory storage
     79  associated with storing the PEI Services Table pointer, so no additional
    8080  migration actions are required for Itanium or ARM CPUs.
    8181
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/PeiSmbusLibSmbus2Ppi/InternalSmbusLib.h

    r48674 r58466  
    5353  the Length byte, word, or a block of data.
    5454
    55   @param  SmbusOperation  Signifies which particular SMBus hardware protocol 
     55  @param  SmbusOperation  Signifies which particular SMBus hardware protocol
    5656                          instance that it will use to execute the SMBus transactions.
    5757  @param  SmBusAddress    The address that encodes the SMBUS Slave Address,
    5858                          SMBUS Command, SMBUS Data Length, and PEC.
    59   @param  Length          Signifies the number of bytes that this operation will 
    60                           do. The maximum number of bytes can be revision specific 
     59  @param  Length          Signifies the number of bytes that this operation will
     60                          do. The maximum number of bytes can be revision specific
    6161                          and operation specific.
    62   @param  Buffer          Contains the value of data to execute to the SMBus slave 
    63                           device. Not all operations require this argument. The 
     62  @param  Buffer          Contains the value of data to execute to the SMBus slave
     63                          device. Not all operations require this argument. The
    6464                          length of this buffer is identified by Length.
    6565  @param  Status          Return status for the executed command.
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/PeiSmbusLibSmbus2Ppi/PeiSmbusLib.c

    r48674 r58466  
    4747  the Length byte, word, or a block of data.
    4848
    49   @param  SmbusOperation  Signifies which particular SMBus hardware protocol instance 
     49  @param  SmbusOperation  Signifies which particular SMBus hardware protocol instance
    5050                          that it will use to execute the SMBus transactions.
    5151  @param  SmBusAddress    The address that encodes the SMBUS Slave Address,
    5252                          SMBUS Command, SMBUS Data Length, and PEC.
    53   @param  Length          Signifies the number of bytes that this operation will 
    54                           do. The maximum number of bytes can be revision specific 
     53  @param  Length          Signifies the number of bytes that this operation will
     54                          do. The maximum number of bytes can be revision specific
    5555                          and operation specific.
    56   @param  Buffer          Contains the value of data to execute to the SMBus slave 
    57                           device. Not all operations require this argument. The 
     56  @param  Buffer          Contains the value of data to execute to the SMBus slave
     57                          device. Not all operations require this argument. The
    5858                          length of this buffer is identified by Length.
    5959  @param  Status          Return status for the executed command.
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/PeiSmbusLibSmbus2Ppi/PeiSmbusLibSmbus2Ppi.inf

    r58459 r58466  
    4747
    4848[Depex.common.PEIM]
    49   gEfiPeiSmbus2PpiGuid 
     49  gEfiPeiSmbus2PpiGuid
    5050
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/PeiSmbusLibSmbus2Ppi/SmbusLib.c

    r48674 r58466  
    3232                        This is an optional parameter and may be NULL.
    3333                        RETURN_SUCCESS:  The SMBUS command was executed.
    34                         RETURN_TIMEOUT:  A timeout occurred while executing the 
    35                         SMBUS command.
    36                         RETURN_DEVICE_ERROR: The request was not completed because 
    37                         a failure reflected in the Host Status Register bit. 
    38                         Device errors are a result of a transaction collision, 
     34                        RETURN_TIMEOUT:  A timeout occurred while executing the
     35                        SMBUS command.
     36                        RETURN_DEVICE_ERROR: The request was not completed because
     37                        a failure reflected in the Host Status Register bit.
     38                        Device errors are a result of a transaction collision,
    3939                        illegal command field, unclaimed cycle
    4040                        (host initiated), or bus errors (collisions).
     
    7373                        This is an optional parameter and may be NULL.
    7474                        RETURN_SUCCESS: The SMBUS command was executed.
    75                         RETURN_TIMEOUT: A timeout occurred while executing the 
    76                         SMBUS command.
    77                         RETURN_DEVICE_ERROR:  The request was not completed because 
    78                         a failure reflected in the Host Status Register bit.  Device 
    79                         errors are a result of a transaction collision, illegal 
    80                         command field, unclaimed cycle (host initiated), or bus 
     75                        RETURN_TIMEOUT: A timeout occurred while executing the
     76                        SMBUS command.
     77                        RETURN_DEVICE_ERROR:  The request was not completed because
     78                        a failure reflected in the Host Status Register bit.  Device
     79                        errors are a result of a transaction collision, illegal
     80                        command field, unclaimed cycle (host initiated), or bus
    8181                        errors (collisions).
    8282                        RETURN_UNSUPPORTED::  The SMBus operation is not supported.
     
    114114                        This is an optional parameter and may be NULL.
    115115                        RETURN_SUCCESS: The SMBUS command was executed.
    116                         RETURN_TIMEOUT: A timeout occurred while executing the 
    117                         SMBUS command.
    118                         RETURN_DEVICE_ERROR:  The request was not completed because 
    119                         a failure reflected in the Host Status Register bit. 
    120                         Device errors are a result of a transaction collision, 
     116                        RETURN_TIMEOUT: A timeout occurred while executing the
     117                        SMBUS command.
     118                        RETURN_DEVICE_ERROR:  The request was not completed because
     119                        a failure reflected in the Host Status Register bit.
     120                        Device errors are a result of a transaction collision,
    121121                        illegal command field, unclaimed cycle (host initiated),
    122122                        or bus errors (collisions).
     
    162162                        This is an optional parameter and may be NULL.
    163163                        RETURN_SUCCESS: The SMBUS command was executed.
    164                         RETURN_TIMEOUT: A timeout occurred while executing the 
    165                         SMBUS command.
    166                         RETURN_DEVICE_ERROR:  The request was not completed because 
    167                         a failure reflected in the Host Status Register bit.  Device 
    168                         errors are a result of a transaction collision, illegal 
    169                         command field, unclaimed cycle (host initiated), or bus 
     164                        RETURN_TIMEOUT: A timeout occurred while executing the
     165                        SMBUS command.
     166                        RETURN_DEVICE_ERROR:  The request was not completed because
     167                        a failure reflected in the Host Status Register bit.  Device
     168                        errors are a result of a transaction collision, illegal
     169                        command field, unclaimed cycle (host initiated), or bus
    170170                        errors (collisions).
    171171                        RETURN_CRC_ERROR:  The checksum is not correct. (PEC is incorrect.)
     
    210210                        This is an optional parameter and may be NULL.
    211211                        RETURN_SUCCESS: The SMBUS command was executed.
    212                         RETURN_TIMEOUT: A timeout occurred while executing the 
    213                         SMBUS command.
    214                         RETURN_DEVICE_ERROR:  The request was not completed because 
    215                         a failure reflected in the Host Status Register bit. 
    216                         Device errors are a result of a transaction collision, 
     212                        RETURN_TIMEOUT: A timeout occurred while executing the
     213                        SMBUS command.
     214                        RETURN_DEVICE_ERROR:  The request was not completed because
     215                        a failure reflected in the Host Status Register bit.
     216                        Device errors are a result of a transaction collision,
    217217                        illegal command field, unclaimed cycle (host initiated),
    218218                       or bus errors (collisions).
     
    257257                        This is an optional parameter and may be NULL.
    258258                        RETURN_SUCCESS: The SMBUS command was executed.
    259                         RETURN_TIMEOUT: A timeout occurred while executing the 
    260                         SMBUS command.
    261                         RETURN_DEVICE_ERROR:  The request was not completed because 
    262                         a failure reflected in the Host Status Register bit. 
    263                         Device errors are a result of a transaction collision, 
     259                        RETURN_TIMEOUT: A timeout occurred while executing the
     260                        SMBUS command.
     261                        RETURN_DEVICE_ERROR:  The request was not completed because
     262                        a failure reflected in the Host Status Register bit.
     263                        Device errors are a result of a transaction collision,
    264264                        illegal command field, unclaimed cycle (host initiated),
    265265                        or bus errors (collisions).
     
    298298  If Length in SmBusAddress is not zero, then ASSERT().
    299299  If any reserved bits of SmBusAddress are set, then ASSERT().
    300  
    301   @param  SmBusAddress  The address that encodes the SMBUS Slave Address,
    302                         SMBUS Command, SMBUS Data Length, and PEC.
    303   @param  Status        Return status for the executed command.
    304                         This is an optional parameter and may be NULL.
    305                         RETURN_SUCCESS: The SMBUS command was executed.
    306                         RETURN_TIMEOUT: A timeout occurred while executing the 
    307                         SMBUS command.
    308                         RETURN_DEVICE_ERROR:  The request was not completed because 
    309                         a failure reflected in the Host Status Register bit. 
    310                         Device errors are a result of a transaction collision, 
     300
     301  @param  SmBusAddress  The address that encodes the SMBUS Slave Address,
     302                        SMBUS Command, SMBUS Data Length, and PEC.
     303  @param  Status        Return status for the executed command.
     304                        This is an optional parameter and may be NULL.
     305                        RETURN_SUCCESS: The SMBUS command was executed.
     306                        RETURN_TIMEOUT: A timeout occurred while executing the
     307                        SMBUS command.
     308                        RETURN_DEVICE_ERROR:  The request was not completed because
     309                        a failure reflected in the Host Status Register bit.
     310                        Device errors are a result of a transaction collision,
    311311                        illegal command field, unclaimed cycle (host initiated),
    312312                        or bus errors (collisions).
     
    351351                        This is an optional parameter and may be NULL.
    352352                        RETURN_SUCCESS: The SMBUS command was executed.
    353                         RETURN_TIMEOUT: A timeout occurred while executing the 
    354                         SMBUS command.
    355                         RETURN_DEVICE_ERROR:  The request was not completed because 
    356                         a failure reflected in the Host Status Register bit. 
    357                         Device errors are a result of a transaction collision, 
     353                        RETURN_TIMEOUT: A timeout occurred while executing the
     354                        SMBUS command.
     355                        RETURN_DEVICE_ERROR:  The request was not completed because
     356                        a failure reflected in the Host Status Register bit.
     357                        Device errors are a result of a transaction collision,
    358358                        illegal command field, unclaimed cycle (host initiated),
    359359                        or bus errors (collisions).
     
    400400                        This is an optional parameter and may be NULL.
    401401                        RETURN_SUCCESS: The SMBUS command was executed.
    402                         RETURN_TIMEOUT: A timeout occurred while executing the 
    403                         SMBUS command.
    404                         RETURN_DEVICE_ERROR:  The request was not completed because 
    405                         a failure reflected in the Host Status Register bit. 
    406                         Device errors are a result of a transaction collision, 
     402                        RETURN_TIMEOUT: A timeout occurred while executing the
     403                        SMBUS command.
     404                        RETURN_DEVICE_ERROR:  The request was not completed because
     405                        a failure reflected in the Host Status Register bit.
     406                        Device errors are a result of a transaction collision,
    407407                        illegal command field, unclaimed cycle (host initiated),
    408408                        or bus errors (collisions).
     
    449449                        This is an optional parameter and may be NULL.
    450450                        RETURN_SUCCESS: The SMBUS command was executed.
    451                         RETURN_TIMEOUT: A timeout occurred while executing the 
    452                         SMBUS command.
    453                         RETURN_DEVICE_ERROR:  The request was not completed because 
    454                         a failure reflected in the Host Status Register bit. 
    455                         Device errors are a result of a transaction collision, 
    456                         illegal command field, unclaimed cycle (host initiated), 
     451                        RETURN_TIMEOUT: A timeout occurred while executing the
     452                        SMBUS command.
     453                        RETURN_DEVICE_ERROR:  The request was not completed because
     454                        a failure reflected in the Host Status Register bit.
     455                        Device errors are a result of a transaction collision,
     456                        illegal command field, unclaimed cycle (host initiated),
    457457                        or bus errors (collisions).
    458458                        RETURN_CRC_ERROR:  The checksum is not correct. (PEC is incorrect.)
     
    484484  Bytes are written to the SMBUS from Buffer.
    485485  The number of bytes written is returned, and will never return a value larger than 32-bytes.
    486   If Status is not NULL, then the status of the executed command is returned in Status. 
     486  If Status is not NULL, then the status of the executed command is returned in Status.
    487487  If Length in SmBusAddress is zero or greater than 32, then ASSERT().
    488488  If Buffer is NULL, then ASSERT().
     
    494494  @param  Status        Return status for the executed command.
    495495                        This is an optional parameter and may be NULL.
    496                         RETURN_TIMEOUT: A timeout occurred while executing the 
    497                         SMBUS command.
    498                         RETURN_DEVICE_ERROR:  The request was not completed because 
    499                         a failure reflected in the Host Status Register bit. 
    500                         Device errors are a result of a transaction collision, 
    501                         illegal command field, unclaimed cycle (host initiated), 
     496                        RETURN_TIMEOUT: A timeout occurred while executing the
     497                        SMBUS command.
     498                        RETURN_DEVICE_ERROR:  The request was not completed because
     499                        a failure reflected in the Host Status Register bit.
     500                        Device errors are a result of a transaction collision,
     501                        illegal command field, unclaimed cycle (host initiated),
    502502                        or bus errors (collisions).
    503503                        RETURN_CRC_ERROR:  The checksum is not correct (PEC is incorrect)
     
    546546  @param  Status        Return status for the executed command.
    547547                        This is an optional parameter and may be NULL.
    548                         RETURN_TIMEOUT: A timeout occurred while executing the 
    549                         SMBUS command.
    550                         RETURN_DEVICE_ERROR:  The request was not completed because 
    551                         a failure reflected in the Host Status Register bit. 
    552                         Device errors are a result of a transaction collision, 
    553                         illegal command field, unclaimed cycle (host initiated), 
     548                        RETURN_TIMEOUT: A timeout occurred while executing the
     549                        SMBUS command.
     550                        RETURN_DEVICE_ERROR:  The request was not completed because
     551                        a failure reflected in the Host Status Register bit.
     552                        Device errors are a result of a transaction collision,
     553                        illegal command field, unclaimed cycle (host initiated),
    554554                        or bus errors (collisions).
    555555                        RETURN_CRC_ERROR  The checksum is not correct. (PEC is incorrect.)
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/PeimEntryPoint/PeimEntryPoint.c

    r48674 r58466  
    2323  The entry point of PE/COFF Image for a PEIM.
    2424
    25   This function is the entry point for a PEIM.  This function must call ProcessLibraryConstructorList() 
     25  This function is the entry point for a PEIM.  This function must call ProcessLibraryConstructorList()
    2626  and ProcessModuleEntryPointList().  The return value from ProcessModuleEntryPointList() is returned.
    2727  If _gPeimRevision is not zero and PeiServices->Hdr.Revision is less than _gPeimRevison, then ASSERT().
    2828
    29   @param  FileHandle  Handle of the file being invoked. 
     29  @param  FileHandle  Handle of the file being invoked.
    3030  @param  PeiServices Describes the list of possible PEI Services.
    3131
     
    6161/**
    6262  Required by the EBC compiler and identical in functionality to _ModuleEntryPoint().
    63  
     63
    6464  This function is required to call _ModuleEntryPoint() passing in FileHandle and PeiServices.
    6565
    66   @param  FileHandle  Handle of the file being invoked. 
     66  @param  FileHandle  Handle of the file being invoked.
    6767  @param  PeiServices Describes the list of possible PEI Services.
    6868
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf

    r58459 r58466  
    2121  MODULE_TYPE                    = PEIM
    2222  VERSION_STRING                 = 1.0
    23   LIBRARY_CLASS                  = PeimEntryPoint|PEIM 
     23  LIBRARY_CLASS                  = PeimEntryPoint|PEIM
    2424
    2525#
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/SecPeiDxeTimerLibCpu/SecPeiDxeTimerLibCpu.inf

    r58459 r58466  
    44# Timer Library that only uses CPU resources to provide calibrated delays
    55#  on IA-32, x64, and IPF.
    6 # Note: A driver of type DXE_RUNTIME_DRIVER and DXE_SMM_DRIVER can use this TimerLib 
    7 #  in their initialization without any issues. They only have to be careful in 
    8 #  the implementation of runtime services and SMI handlers. 
     6# Note: A driver of type DXE_RUNTIME_DRIVER and DXE_SMM_DRIVER can use this TimerLib
     7#  in their initialization without any issues. They only have to be careful in
     8#  the implementation of runtime services and SMI handlers.
    99#  Because CPU Local APIC and ITC could be programmed by OS, it cannot be
    1010#  used by SMM drivers and runtime drivers, ACPI timer is recommended for SMM
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/SmmIoLibSmmCpuIo2/IoLib.c

    r48674 r58466  
    11/** @file
    22  I/O Library.
    3   The implementation of I/O operation for this library instance 
     3  The implementation of I/O operation for this library instance
    44  are based on EFI_CPU_IO_PROTOCOL.
    5  
     5
    66  Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>
    77  This program and the accompanying materials
     
    119119  @param  Width         The width of the I/O operation.
    120120  @param  Data          The value to write to the I/O port.
    121  
     121
    122122  @return Data read from registers in the EFI system memory space.
    123123
     
    195195
    196196  If Port is not aligned on a 16-bit boundary, then ASSERT().
    197  
     197
    198198  If 16-bit I/O port operations are not supported, then ASSERT().
    199199
     
    253253  This function must guarantee that all I/O read and write operations are
    254254  serialized.
    255  
     255
    256256  If Port is not aligned on a 32-bit boundary, then ASSERT().
    257257
     
    344344
    345345  If Port is not aligned on a 64-bit boundary, then ASSERT().
    346  
     346
    347347  If 64-bit I/O port operations are not supported, then ASSERT().
    348348
     
    421421
    422422  If Address is not aligned on a 16-bit boundary, then ASSERT().
    423  
     423
    424424  If 16-bit MMIO register operations are not supported, then ASSERT().
    425425
     
    450450
    451451  If Address is not aligned on a 16-bit boundary, then ASSERT().
    452  
     452
    453453  If 16-bit MMIO register operations are not supported, then ASSERT().
    454454
     
    479479
    480480  If Address is not aligned on a 32-bit boundary, then ASSERT().
    481  
     481
    482482  If 32-bit MMIO register operations are not supported, then ASSERT().
    483483
     
    508508
    509509  If Address is not aligned on a 32-bit boundary, then ASSERT().
    510  
     510
    511511  If 32-bit MMIO register operations are not supported, then ASSERT().
    512512
     
    537537
    538538  If Address is not aligned on a 64-bit boundary, then ASSERT().
    539  
     539
    540540  If 64-bit MMIO register operations are not supported, then ASSERT().
    541541
     
    566566
    567567  If Address is not aligned on a 64-bit boundary, then ASSERT().
    568  
     568
    569569  If 64-bit MMIO register operations are not supported, then ASSERT().
    570570
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/SmmIoLibSmmCpuIo2/IoLibMmioBuffer.c

    r48674 r58466  
    6868
    6969  If Length is not aligned on a 16-bit boundary, then ASSERT().
    70  
     70
    7171  If Buffer is not aligned on a 16-bit boundary, then ASSERT().
    7272
     
    171171
    172172  If Length is not aligned on a 64-bit boundary, then ASSERT().
    173  
     173
    174174  If Buffer is not aligned on a 64-bit boundary, then ASSERT().
    175175
     
    224224  @param  StartAddress    The starting address for the MMIO region to be copied to.
    225225  @param  Length          The size in bytes of the copy.
    226   @param  Buffer          The pointer to a system memory buffer containing the 
     226  @param  Buffer          The pointer to a system memory buffer containing the
    227227                          data to write.
    228228
     
    271271  @param  StartAddress    The starting address for the MMIO region to be copied to.
    272272  @param  Length          The size in bytes of the copy.
    273   @param  Buffer          The pointer to a system memory buffer containing the 
     273  @param  Buffer          The pointer to a system memory buffer containing the
    274274                          data to write.
    275275
     
    326326  @param  StartAddress    The starting address for the MMIO region to be copied to.
    327327  @param  Length          The size in bytes of the copy.
    328   @param  Buffer          The pointer to a system memory buffer containing the 
     328  @param  Buffer          The pointer to a system memory buffer containing the
    329329                          data to write.
    330330
     
    380380  @param  StartAddress    The starting address for the MMIO region to be copied to.
    381381  @param  Length          The size in bytes of the copy.
    382   @param  Buffer          The pointer to a system memory buffer containing the 
     382  @param  Buffer          The pointer to a system memory buffer containing the
    383383                          data to write.
    384384
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/SmmIoLibSmmCpuIo2/SmmCpuIoLibInternal.h

    r48674 r58466  
    22  Internal include file of SMM CPU IO Library.
    33  It includes all necessary protocol/library class's header file
    4   for implementation of IoLib library instance. It is included 
     4  for implementation of IoLib library instance. It is included
    55  all source code of this library instance.
    6  
     6
    77  Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>
    88  This program and the accompanying materials
     
    104104  @param  Width         The width of the I/O operation.
    105105  @param  Data          The value to write to the I/O port.
    106  
     106
    107107  @return Data read from registers in the EFI system memory space.
    108108
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/SmmLibNull/SmmLibNull.c

    r48674 r58466  
    33
    44  Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>
    5   This program and the accompanying materials                         
    6   are licensed and made available under the terms and conditions of the BSD License         
    7   which accompanies this distribution.  The full text of the license may be found at       
    8   http://opensource.org/licenses/bsd-license.php.                                           
     5  This program and the accompanying materials
     6  are licensed and made available under the terms and conditions of the BSD License
     7  which accompanies this distribution.  The full text of the license may be found at
     8  http://opensource.org/licenses/bsd-license.php.
    99
    10   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     
    11   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             
     10  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
     11  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
    1212
    1313**/
     
    1717
    1818/**
    19   Triggers an SMI at boot time. 
     19  Triggers an SMI at boot time.
    2020
    2121  This function triggers a software SMM interrupt at boot time.
     
    3333
    3434/**
    35   Triggers an SMI at run time. 
     35  Triggers an SMI at run time.
    3636
    3737  This function triggers a software SMM interrupt at run time.
     
    5050
    5151/**
    52   Test if a boot time software SMI happened. 
     52  Test if a boot time software SMI happened.
    5353
    54   This function tests if a software SMM interrupt happened. If a software SMM 
    55   interrupt happened and it was triggered at boot time, it returns TRUE. Otherwise, 
     54  This function tests if a software SMM interrupt happened. If a software SMM
     55  interrupt happened and it was triggered at boot time, it returns TRUE. Otherwise,
    5656  it returns FALSE.
    5757
     
    7171
    7272/**
    73   Test if a run time software SMI happened. 
     73  Test if a run time software SMI happened.
    7474
    75   This function tests if a software SMM interrupt happened. If a software SMM 
    76   interrupt happened and it was triggered at run time, it returns TRUE. Otherwise, 
     75  This function tests if a software SMM interrupt happened. If a software SMM
     76  interrupt happened and it was triggered at run time, it returns TRUE. Otherwise,
    7777  it returns FALSE.
    7878
     
    9191
    9292/**
    93   Clear APM SMI Status Bit; Set the EOS bit. 
    94  
     93  Clear APM SMI Status Bit; Set the EOS bit.
     94
    9595**/
    9696VOID
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/SmmLibNull/SmmLibNull.inf

    r58459 r58466  
    3131[Sources]
    3232  SmmLibNull.c
    33  
     33
    3434
    3535[Packages]
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/SmmMemLib/SmmMemLib.c

    r58464 r58466  
    7373    PhysicalAddressBits = 48;
    7474  }
    75  
    76   //
    77   // Save the maximum support address in one global variable 
     75
     76  //
     77  // Save the maximum support address in one global variable
    7878  //
    7979  mSmmMemLibInternalMaximumSupportAddress = (EFI_PHYSICAL_ADDRESS)(UINTN)(LShiftU64 (1, PhysicalAddressBits) - 1);
     
    9898{
    9999  UINTN  Index;
    100  
     100
    101101  //
    102102  // Check override.
     
    118118    return FALSE;
    119119  }
    120  
     120
    121121  for (Index = 0; Index < mSmmMemLibInternalSmramCount; Index ++) {
    122122    if (((Buffer >= mSmmMemLibInternalSmramRanges[Index].CpuStart) && (Buffer < mSmmMemLibInternalSmramRanges[Index].CpuStart + mSmmMemLibInternalSmramRanges[Index].PhysicalSize)) ||
     
    182182  If the check fails, it returns EFI_SECURITY_VIOLATION.
    183183  The implementation must be reentrant.
    184  
     184
    185185  @param  DestinationBuffer   The pointer to the destination buffer of the memory copy.
    186186  @param  SourceBuffer        The pointer to the source buffer of the memory copy.
     
    215215  If the check fails, it returns EFI_SECURITY_VIOLATION.
    216216  The implementation must be reentrant, and it must handle the case where source buffer overlaps destination buffer.
    217  
     217
    218218  @param  DestinationBuffer   The pointer to the destination buffer of the memory copy.
    219219  @param  SourceBuffer        The pointer to the source buffer of the memory copy.
     
    252252  If the check passes, it fills memory and returns EFI_SUCCESS.
    253253  If the check fails, it returns EFI_SECURITY_VIOLATION.
    254  
     254
    255255  @param  Buffer    The memory to set.
    256256  @param  Length    The number of bytes to set.
    257257  @param  Value     The value with which to fill Length bytes of Buffer.
    258  
     258
    259259  @retval EFI_SECURITY_VIOLATION The Buffer is invalid per processor architecture or overlap with SMRAM.
    260260  @retval EFI_SUCCESS            Memory is set.
     
    296296  EFI_SMM_ACCESS2_PROTOCOL      *SmmAccess;
    297297  UINTN                         Size;
    298  
     298
    299299  //
    300300  // Get SMRAM information
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/SmmMemLib/SmmMemLib.inf

    r58464 r58466  
    66#  all SMRAM range via SMM_ACCESS2_PROTOCOL, including the range for firmware (like SMM Core
    77#  and SMM driver) and/or specific dedicated hardware.
    8 # 
     8#
    99#  Copyright (c) 2015, 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
     
    3737[Sources]
    3838  SmmMemLib.c
    39  
     39
    4040[Packages]
    4141  MdePkg/MdePkg.dec
    42  
     42
    4343[LibraryClasses]
    4444  SmmServicesTableLib
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/SmmMemoryAllocationLib/MemoryAllocationLib.c

    r58459 r58466  
    11/** @file
    2   Support routines for memory allocation routines based 
     2  Support routines for memory allocation routines based
    33  on SMM Services Table services for SMM phase drivers.
    4  
     4
    55  The PI System Management Mode Core Interface Specification only allows the use
    6   of EfiRuntimeServicesCode and EfiRuntimeServicesData memory types for memory 
    7   allocations through the SMM Services Table.  The functions in the Memory 
     6  of EfiRuntimeServicesCode and EfiRuntimeServicesData memory types for memory
     7  allocations through the SMM Services Table.  The functions in the Memory
    88  Allocation Library use EfiBootServicesData as the default memory allocation
    9   type.  For this SMM specific instance of the Memory Allocation Library, 
     9  type.  For this SMM specific instance of the Memory Allocation Library,
    1010  EfiRuntimeServicesData is used as the default memory type for all allocations.
    11   In addition, allocation for the Reserved memory types are not supported and 
     11  In addition, allocation for the Reserved memory types are not supported and
    1212  will always return NULL.
    1313
    1414  Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
    15   This program and the accompanying materials                         
    16   are licensed and made available under the terms and conditions of the BSD License         
    17   which accompanies this distribution.  The full text of the license may be found at       
    18   http://opensource.org/licenses/bsd-license.php.                                           
    19 
    20   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     
    21   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             
     15  This program and the accompanying materials
     16  are licensed and made available under the terms and conditions of the BSD License
     17  which accompanies this distribution.  The full text of the license may be found at
     18  http://opensource.org/licenses/bsd-license.php.
     19
     20  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
     21  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
    2222
    2323**/
     
    3737/**
    3838  The constructor function caches SMRAM ranges that are present in the system.
    39    
     39
    4040  It will ASSERT() if SMM Access2 Protocol doesn't exist.
    4141  It will ASSERT() if SMRAM ranges can't be got.
    42   It will ASSERT() if Resource can't be allocated for cache SMRAM range. 
     42  It will ASSERT() if Resource can't be allocated for cache SMRAM range.
    4343  It will always return EFI_SUCCESS.
    4444
     
    6464  //
    6565  Status = gBS->LocateProtocol (
    66                   &gEfiSmmAccess2ProtocolGuid, 
    67                   NULL, 
     66                  &gEfiSmmAccess2ProtocolGuid,
     67                  NULL,
    6868                  (VOID **)&SmmAccess
    6969                  );
     
    8989
    9090/**
    91   If SMM driver exits with an error, it must call this routine 
     91  If SMM driver exits with an error, it must call this routine
    9292  to free the allocated resource before the exiting.
    9393
     
    126126
    127127  for (Index = 0; Index < mSmramRangeCount; Index ++) {
    128     if (((EFI_PHYSICAL_ADDRESS) (UINTN) Buffer >= mSmramRanges[Index].CpuStart) && 
     128    if (((EFI_PHYSICAL_ADDRESS) (UINTN) Buffer >= mSmramRanges[Index].CpuStart) &&
    129129        ((EFI_PHYSICAL_ADDRESS) (UINTN) Buffer < (mSmramRanges[Index].CpuStart + mSmramRanges[Index].PhysicalSize))) {
    130130      return TRUE;
     
    138138  Allocates one or more 4KB pages of a certain memory type.
    139139
    140   Allocates the number of 4KB pages of a certain memory type and returns a pointer 
    141   to the allocated buffer.  The buffer returned is aligned on a 4KB boundary.  If 
    142   Pages is 0, then NULL is returned.   If there is not enough memory remaining to 
     140  Allocates the number of 4KB pages of a certain memory type and returns a pointer
     141  to the allocated buffer.  The buffer returned is aligned on a 4KB boundary.  If
     142  Pages is 0, then NULL is returned.   If there is not enough memory remaining to
    143143  satisfy the request, then NULL is returned.
    144144
     
    151151VOID *
    152152InternalAllocatePages (
    153   IN EFI_MEMORY_TYPE  MemoryType, 
     153  IN EFI_MEMORY_TYPE  MemoryType,
    154154  IN UINTN            Pages
    155155  )
    156156{
    157157  EFI_STATUS            Status;
    158   EFI_PHYSICAL_ADDRESS  Memory; 
     158  EFI_PHYSICAL_ADDRESS  Memory;
    159159
    160160  if (Pages == 0) {
     
    172172  Allocates one or more 4KB pages of type EfiBootServicesData.
    173173
    174   Allocates the number of 4KB pages of type EfiBootServicesData and returns a pointer 
    175   to the allocated buffer.  The buffer returned is aligned on a 4KB boundary.  If 
    176   Pages is 0, then NULL is returned.  If there is not enough memory remaining to 
     174  Allocates the number of 4KB pages of type EfiBootServicesData and returns a pointer
     175  to the allocated buffer.  The buffer returned is aligned on a 4KB boundary.  If
     176  Pages is 0, then NULL is returned.  If there is not enough memory remaining to
    177177  satisfy the request, then NULL is returned.
    178178
     
    194194  Allocates one or more 4KB pages of type EfiRuntimeServicesData.
    195195
    196   Allocates the number of 4KB pages of type EfiRuntimeServicesData and returns a 
    197   pointer to the allocated buffer.  The buffer returned is aligned on a 4KB boundary. 
    198   If Pages is 0, then NULL is returned.  If there is not enough memory remaining 
     196  Allocates the number of 4KB pages of type EfiRuntimeServicesData and returns a
     197  pointer to the allocated buffer.  The buffer returned is aligned on a 4KB boundary.
     198  If Pages is 0, then NULL is returned.  If there is not enough memory remaining
    199199  to satisfy the request, then NULL is returned.
    200200
     
    216216  Allocates one or more 4KB pages of type EfiReservedMemoryType.
    217217
    218   Allocates the number of 4KB pages of type EfiReservedMemoryType and returns a 
    219   pointer to the allocated buffer.  The buffer returned is aligned on a 4KB boundary. 
    220   If Pages is 0, then NULL is returned.  If there is not enough memory remaining 
     218  Allocates the number of 4KB pages of type EfiReservedMemoryType and returns a
     219  pointer to the allocated buffer.  The buffer returned is aligned on a 4KB boundary.
     220  If Pages is 0, then NULL is returned.  If there is not enough memory remaining
    221221  to satisfy the request, then NULL is returned.
    222222
     
    239239  functions in the Memory Allocation Library.
    240240
    241   Frees the number of 4KB pages specified by Pages from the buffer specified by Buffer. 
    242   Buffer must have been allocated on a previous call to the page allocation services 
    243   of the Memory Allocation Library.  If it is not possible to free allocated pages, 
     241  Frees the number of 4KB pages specified by Pages from the buffer specified by Buffer.
     242  Buffer must have been allocated on a previous call to the page allocation services
     243  of the Memory Allocation Library.  If it is not possible to free allocated pages,
    244244  then this function will perform no actions.
    245  
    246   If Buffer was not allocated with a page allocation function in the Memory Allocation 
     245
     246  If Buffer was not allocated with a page allocation function in the Memory Allocation
    247247  Library, then ASSERT().
    248248  If Pages is zero, then ASSERT().
    249  
     249
    250250  @param  Buffer                The pointer to the buffer of pages to free.
    251251  @param  Pages                 The number of 4 KB pages to free.
     
    281281  Allocates one or more 4KB pages of a certain memory type at a specified alignment.
    282282
    283   Allocates the number of 4KB pages specified by Pages of a certain memory type 
    284   with an alignment specified by Alignment.  The allocated buffer is returned. 
    285   If Pages is 0, then NULL is returned. If there is not enough memory at the 
     283  Allocates the number of 4KB pages specified by Pages of a certain memory type
     284  with an alignment specified by Alignment.  The allocated buffer is returned.
     285  If Pages is 0, then NULL is returned. If there is not enough memory at the
    286286  specified alignment remaining to satisfy the request, then NULL is returned.
    287287  If Alignment is not a power of two and Alignment is not zero, then ASSERT().
     
    290290  @param  MemoryType            The type of memory to allocate.
    291291  @param  Pages                 The number of 4 KB pages to allocate.
    292   @param  Alignment             The requested alignment of the allocation. 
     292  @param  Alignment             The requested alignment of the allocation.
    293293                                Must be a power of two.
    294294                                If Alignment is zero, then byte alignment is used.
     
    299299VOID *
    300300InternalAllocateAlignedPages (
    301   IN EFI_MEMORY_TYPE  MemoryType, 
     301  IN EFI_MEMORY_TYPE  MemoryType,
    302302  IN UINTN            Pages,
    303303  IN UINTN            Alignment
     
    315315  //
    316316  ASSERT ((Alignment & (Alignment - 1)) == 0);
    317  
     317
    318318  if (Pages == 0) {
    319319    return NULL;
     
    329329    //
    330330    ASSERT (RealPages > Pages);
    331  
     331
    332332    Status         = gSmst->SmmAllocatePages (AllocateAnyPages, MemoryType, RealPages, &Memory);
    333333    if (EFI_ERROR (Status)) {
     
    368368  Allocates one or more 4KB pages of type EfiBootServicesData at a specified alignment.
    369369
    370   Allocates the number of 4KB pages specified by Pages of type EfiBootServicesData 
    371   with an alignment specified by Alignment.  The allocated buffer is returned. 
    372   If Pages is 0, then NULL is returned.  If there is not enough memory at the 
     370  Allocates the number of 4KB pages specified by Pages of type EfiBootServicesData
     371  with an alignment specified by Alignment.  The allocated buffer is returned.
     372  If Pages is 0, then NULL is returned.  If there is not enough memory at the
    373373  specified alignment remaining to satisfy the request, then NULL is returned.
    374  
     374
    375375  If Alignment is not a power of two and Alignment is not zero, then ASSERT().
    376376  If Pages plus EFI_SIZE_TO_PAGES (Alignment) overflows, then ASSERT().
    377377
    378378  @param  Pages                 The number of 4 KB pages to allocate.
    379   @param  Alignment             The requested alignment of the allocation. 
     379  @param  Alignment             The requested alignment of the allocation.
    380380                                Must be a power of two.
    381381                                If Alignment is zero, then byte alignment is used.
     
    397397  Allocates one or more 4KB pages of type EfiRuntimeServicesData at a specified alignment.
    398398
    399   Allocates the number of 4KB pages specified by Pages of type EfiRuntimeServicesData 
    400   with an alignment specified by Alignment.  The allocated buffer is returned. 
    401   If Pages is 0, then NULL is returned.  If there is not enough memory at the 
     399  Allocates the number of 4KB pages specified by Pages of type EfiRuntimeServicesData
     400  with an alignment specified by Alignment.  The allocated buffer is returned.
     401  If Pages is 0, then NULL is returned.  If there is not enough memory at the
    402402  specified alignment remaining to satisfy the request, then NULL is returned.
    403  
     403
    404404  If Alignment is not a power of two and Alignment is not zero, then ASSERT().
    405405  If Pages plus EFI_SIZE_TO_PAGES (Alignment) overflows, then ASSERT().
    406406
    407407  @param  Pages                 The number of 4 KB pages to allocate.
    408   @param  Alignment             The requested alignment of the allocation. 
     408  @param  Alignment             The requested alignment of the allocation.
    409409                                Must be a power of two.
    410410                                If Alignment is zero, then byte alignment is used.
     
    426426  Allocates one or more 4KB pages of type EfiReservedMemoryType at a specified alignment.
    427427
    428   Allocates the number of 4KB pages specified by Pages of type EfiReservedMemoryType 
    429   with an alignment specified by Alignment.  The allocated buffer is returned. 
    430   If Pages is 0, then NULL is returned.  If there is not enough memory at the 
     428  Allocates the number of 4KB pages specified by Pages of type EfiReservedMemoryType
     429  with an alignment specified by Alignment.  The allocated buffer is returned.
     430  If Pages is 0, then NULL is returned.  If there is not enough memory at the
    431431  specified alignment remaining to satisfy the request, then NULL is returned.
    432  
     432
    433433  If Alignment is not a power of two and Alignment is not zero, then ASSERT().
    434434  If Pages plus EFI_SIZE_TO_PAGES (Alignment) overflows, then ASSERT().
    435435
    436436  @param  Pages                 The number of 4 KB pages to allocate.
    437   @param  Alignment             The requested alignment of the allocation. 
     437  @param  Alignment             The requested alignment of the allocation.
    438438                                Must be a power of two.
    439439                                If Alignment is zero, then byte alignment is used.
     
    456456  allocation functions in the Memory Allocation Library.
    457457
    458   Frees the number of 4KB pages specified by Pages from the buffer specified by 
    459   Buffer.  Buffer must have been allocated on a previous call to the aligned page 
    460   allocation services of the Memory Allocation Library.  If it is not possible to 
     458  Frees the number of 4KB pages specified by Pages from the buffer specified by
     459  Buffer.  Buffer must have been allocated on a previous call to the aligned page
     460  allocation services of the Memory Allocation Library.  If it is not possible to
    461461  free allocated pages, then this function will perform no actions.
    462  
    463   If Buffer was not allocated with an aligned page allocation function in the 
     462
     463  If Buffer was not allocated with an aligned page allocation function in the
    464464  Memory Allocation Library, then ASSERT().
    465465  If Pages is zero, then ASSERT().
    466  
     466
    467467  @param  Buffer                The pointer to the buffer of pages to free.
    468468  @param  Pages                 The number of 4 KB pages to free.
     
    498498  Allocates a buffer of a certain pool type.
    499499
    500   Allocates the number bytes specified by AllocationSize of a certain pool type 
    501   and returns a pointer to the allocated buffer.  If AllocationSize is 0, then a 
    502   valid buffer of 0 size is returned.  If there is not enough memory remaining to 
     500  Allocates the number bytes specified by AllocationSize of a certain pool type
     501  and returns a pointer to the allocated buffer.  If AllocationSize is 0, then a
     502  valid buffer of 0 size is returned.  If there is not enough memory remaining to
    503503  satisfy the request, then NULL is returned.
    504504
     
    511511VOID *
    512512InternalAllocatePool (
    513   IN EFI_MEMORY_TYPE  MemoryType, 
     513  IN EFI_MEMORY_TYPE  MemoryType,
    514514  IN UINTN            AllocationSize
    515515  )
     
    528528  Allocates a buffer of type EfiBootServicesData.
    529529
    530   Allocates the number bytes specified by AllocationSize of type EfiBootServicesData 
    531   and returns a pointer to the allocated buffer.  If AllocationSize is 0, then a 
    532   valid buffer of 0 size is returned.  If there is not enough memory remaining to 
     530  Allocates the number bytes specified by AllocationSize of type EfiBootServicesData
     531  and returns a pointer to the allocated buffer.  If AllocationSize is 0, then a
     532  valid buffer of 0 size is returned.  If there is not enough memory remaining to
    533533  satisfy the request, then NULL is returned.
    534534
     
    550550  Allocates a buffer of type EfiRuntimeServicesData.
    551551
    552   Allocates the number bytes specified by AllocationSize of type EfiRuntimeServicesData 
    553   and returns a pointer to the allocated buffer.  If AllocationSize is 0, then a 
    554   valid buffer of 0 size is returned.  If there is not enough memory remaining to 
     552  Allocates the number bytes specified by AllocationSize of type EfiRuntimeServicesData
     553  and returns a pointer to the allocated buffer.  If AllocationSize is 0, then a
     554  valid buffer of 0 size is returned.  If there is not enough memory remaining to
    555555  satisfy the request, then NULL is returned.
    556556
     
    572572  Allocates a buffer of type EfiReservedMemoryType.
    573573
    574   Allocates the number bytes specified by AllocationSize of type EfiReservedMemoryType 
    575   and returns a pointer to the allocated buffer.  If AllocationSize is 0, then a 
    576   valid buffer of 0 size is returned.  If there is not enough memory remaining to 
     574  Allocates the number bytes specified by AllocationSize of type EfiReservedMemoryType
     575  and returns a pointer to the allocated buffer.  If AllocationSize is 0, then a
     576  valid buffer of 0 size is returned.  If there is not enough memory remaining to
    577577  satisfy the request, then NULL is returned.
    578578
     
    594594  Allocates and zeros a buffer of a certain pool type.
    595595
    596   Allocates the number bytes specified by AllocationSize of a certain pool type, 
    597   clears the buffer with zeros, and returns a pointer to the allocated buffer. 
    598   If AllocationSize is 0, then a valid buffer of 0 size is returned.  If there is 
     596  Allocates the number bytes specified by AllocationSize of a certain pool type,
     597  clears the buffer with zeros, and returns a pointer to the allocated buffer.
     598  If AllocationSize is 0, then a valid buffer of 0 size is returned.  If there is
    599599  not enough memory remaining to satisfy the request, then NULL is returned.
    600600
     
    607607VOID *
    608608InternalAllocateZeroPool (
    609   IN EFI_MEMORY_TYPE  PoolType, 
     609  IN EFI_MEMORY_TYPE  PoolType,
    610610  IN UINTN            AllocationSize
    611   ) 
     611  )
    612612{
    613613  VOID  *Memory;
     
    623623  Allocates and zeros a buffer of type EfiBootServicesData.
    624624
    625   Allocates the number bytes specified by AllocationSize of type EfiBootServicesData, 
    626   clears the buffer with zeros, and returns a pointer to the allocated buffer. 
    627   If AllocationSize is 0, then a valid buffer of 0 size is returned.  If there is 
     625  Allocates the number bytes specified by AllocationSize of type EfiBootServicesData,
     626  clears the buffer with zeros, and returns a pointer to the allocated buffer.
     627  If AllocationSize is 0, then a valid buffer of 0 size is returned.  If there is
    628628  not enough memory remaining to satisfy the request, then NULL is returned.
    629629
     
    645645  Allocates and zeros a buffer of type EfiRuntimeServicesData.
    646646
    647   Allocates the number bytes specified by AllocationSize of type EfiRuntimeServicesData, 
    648   clears the buffer with zeros, and returns a pointer to the allocated buffer. 
    649   If AllocationSize is 0, then a valid buffer of 0 size is returned.  If there is 
     647  Allocates the number bytes specified by AllocationSize of type EfiRuntimeServicesData,
     648  clears the buffer with zeros, and returns a pointer to the allocated buffer.
     649  If AllocationSize is 0, then a valid buffer of 0 size is returned.  If there is
    650650  not enough memory remaining to satisfy the request, then NULL is returned.
    651651
     
    667667  Allocates and zeros a buffer of type EfiReservedMemoryType.
    668668
    669   Allocates the number bytes specified by AllocationSize of type EfiReservedMemoryType, 
    670   clears the   buffer with zeros, and returns a pointer to the allocated buffer. 
    671   If AllocationSize is 0, then a valid buffer of 0 size is returned.  If there is 
     669  Allocates the number bytes specified by AllocationSize of type EfiReservedMemoryType,
     670  clears the   buffer with zeros, and returns a pointer to the allocated buffer.
     671  If AllocationSize is 0, then a valid buffer of 0 size is returned.  If there is
    672672  not enough memory remaining to satisfy the request, then NULL is returned.
    673673
     
    689689  Copies a buffer to an allocated buffer of a certain pool type.
    690690
    691   Allocates the number bytes specified by AllocationSize of a certain pool type, 
    692   copies AllocationSize bytes from Buffer to the newly allocated buffer, and returns 
    693   a pointer to the allocated buffer.  If AllocationSize is 0, then a valid buffer 
    694   of 0 size is returned.  If there is not enough memory remaining to satisfy the 
     691  Allocates the number bytes specified by AllocationSize of a certain pool type,
     692  copies AllocationSize bytes from Buffer to the newly allocated buffer, and returns
     693  a pointer to the allocated buffer.  If AllocationSize is 0, then a valid buffer
     694  of 0 size is returned.  If there is not enough memory remaining to satisfy the
    695695  request, then NULL is returned. If Buffer is NULL, then ASSERT().
    696   If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). 
     696  If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
    697697
    698698  @param  PoolType              The type of pool to allocate.
     
    705705VOID *
    706706InternalAllocateCopyPool (
    707   IN EFI_MEMORY_TYPE  PoolType, 
     707  IN EFI_MEMORY_TYPE  PoolType,
    708708  IN UINTN            AllocationSize,
    709709  IN CONST VOID       *Buffer
    710   ) 
     710  )
    711711{
    712712  VOID  *Memory;
     
    720720  }
    721721  return Memory;
    722 } 
     722}
    723723
    724724/**
    725725  Copies a buffer to an allocated buffer of type EfiBootServicesData.
    726726
    727   Allocates the number bytes specified by AllocationSize of type EfiBootServicesData, 
    728   copies AllocationSize bytes from Buffer to the newly allocated buffer, and returns 
    729   a pointer to the allocated buffer.  If AllocationSize is 0, then a valid buffer 
    730   of 0 size is returned.  If there is not enough memory remaining to satisfy the 
     727  Allocates the number bytes specified by AllocationSize of type EfiBootServicesData,
     728  copies AllocationSize bytes from Buffer to the newly allocated buffer, and returns
     729  a pointer to the allocated buffer.  If AllocationSize is 0, then a valid buffer
     730  of 0 size is returned.  If there is not enough memory remaining to satisfy the
    731731  request, then NULL is returned.
    732  
     732
    733733  If Buffer is NULL, then ASSERT().
    734   If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). 
     734  If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
    735735
    736736  @param  AllocationSize        The number of bytes to allocate and zero.
     
    753753  Copies a buffer to an allocated buffer of type EfiRuntimeServicesData.
    754754
    755   Allocates the number bytes specified by AllocationSize of type EfiRuntimeServicesData, 
    756   copies AllocationSize bytes from Buffer to the newly allocated buffer, and returns 
    757   a pointer to the allocated buffer.  If AllocationSize is 0, then a valid buffer 
    758   of 0 size is returned.  If there is not enough memory remaining to satisfy the 
     755  Allocates the number bytes specified by AllocationSize of type EfiRuntimeServicesData,
     756  copies AllocationSize bytes from Buffer to the newly allocated buffer, and returns
     757  a pointer to the allocated buffer.  If AllocationSize is 0, then a valid buffer
     758  of 0 size is returned.  If there is not enough memory remaining to satisfy the
    759759  request, then NULL is returned.
    760  
     760
    761761  If Buffer is NULL, then ASSERT().
    762   If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). 
     762  If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
    763763
    764764  @param  AllocationSize        The number of bytes to allocate and zero.
     
    781781  Copies a buffer to an allocated buffer of type EfiReservedMemoryType.
    782782
    783   Allocates the number bytes specified by AllocationSize of type EfiReservedMemoryType, 
    784   copies AllocationSize bytes from Buffer to the newly allocated buffer, and returns 
    785   a pointer to the allocated buffer.  If AllocationSize is 0, then a valid buffer 
    786   of 0 size is returned.  If there is not enough memory remaining to satisfy the 
     783  Allocates the number bytes specified by AllocationSize of type EfiReservedMemoryType,
     784  copies AllocationSize bytes from Buffer to the newly allocated buffer, and returns
     785  a pointer to the allocated buffer.  If AllocationSize is 0, then a valid buffer
     786  of 0 size is returned.  If there is not enough memory remaining to satisfy the
    787787  request, then NULL is returned.
    788  
     788
    789789  If Buffer is NULL, then ASSERT().
    790   If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). 
     790  If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
    791791
    792792  @param  AllocationSize        The number of bytes to allocate and zero.
     
    810810
    811811  Allocates and zeros the number bytes specified by NewSize from memory of the type
    812   specified by PoolType.  If OldBuffer is not NULL, then the smaller of OldSize and 
    813   NewSize bytes are copied from OldBuffer to the newly allocated buffer, and 
    814   OldBuffer is freed.  A pointer to the newly allocated buffer is returned. 
    815   If NewSize is 0, then a valid buffer of 0 size is  returned.  If there is not 
     812  specified by PoolType.  If OldBuffer is not NULL, then the smaller of OldSize and
     813  NewSize bytes are copied from OldBuffer to the newly allocated buffer, and
     814  OldBuffer is freed.  A pointer to the newly allocated buffer is returned.
     815  If NewSize is 0, then a valid buffer of 0 size is  returned.  If there is not
    816816  enough memory remaining to satisfy the request, then NULL is returned.
    817  
    818   If the allocation of the new buffer is successful and the smaller of NewSize 
     817
     818  If the allocation of the new buffer is successful and the smaller of NewSize
    819819  and OldSize is greater than (MAX_ADDRESS - OldBuffer + 1), then ASSERT().
    820820
     
    822822  @param  OldSize        The size, in bytes, of OldBuffer.
    823823  @param  NewSize        The size, in bytes, of the buffer to reallocate.
    824   @param  OldBuffer      The buffer to copy to the allocated buffer.  This is an 
     824  @param  OldBuffer      The buffer to copy to the allocated buffer.  This is an
    825825                         optional parameter that may be NULL.
    826826
     
    830830VOID *
    831831InternalReallocatePool (
    832   IN EFI_MEMORY_TYPE  PoolType, 
     832  IN EFI_MEMORY_TYPE  PoolType,
    833833  IN UINTN            OldSize,
    834834  IN UINTN            NewSize,
     
    850850
    851851  Allocates and zeros the number bytes specified by NewSize from memory of type
    852   EfiBootServicesData.  If OldBuffer is not NULL, then the smaller of OldSize and 
    853   NewSize bytes are copied from OldBuffer to the newly allocated buffer, and 
    854   OldBuffer is freed.  A pointer to the newly allocated buffer is returned. 
    855   If NewSize is 0, then a valid buffer of 0 size is  returned.  If there is not 
     852  EfiBootServicesData.  If OldBuffer is not NULL, then the smaller of OldSize and
     853  NewSize bytes are copied from OldBuffer to the newly allocated buffer, and
     854  OldBuffer is freed.  A pointer to the newly allocated buffer is returned.
     855  If NewSize is 0, then a valid buffer of 0 size is  returned.  If there is not
    856856  enough memory remaining to satisfy the request, then NULL is returned.
    857  
    858   If the allocation of the new buffer is successful and the smaller of NewSize 
     857
     858  If the allocation of the new buffer is successful and the smaller of NewSize
    859859  and OldSize is greater than (MAX_ADDRESS - OldBuffer + 1), then ASSERT().
    860860
    861861  @param  OldSize        The size, in bytes, of OldBuffer.
    862862  @param  NewSize        The size, in bytes, of the buffer to reallocate.
    863   @param  OldBuffer      The buffer to copy to the allocated buffer.  This is an 
     863  @param  OldBuffer      The buffer to copy to the allocated buffer.  This is an
    864864                         optional parameter that may be NULL.
    865865
     
    882882
    883883  Allocates and zeros the number bytes specified by NewSize from memory of type
    884   EfiRuntimeServicesData.  If OldBuffer is not NULL, then the smaller of OldSize 
    885   and NewSize bytes are copied from OldBuffer to the newly allocated buffer, and 
    886   OldBuffer is freed.  A pointer to the newly allocated buffer is returned. 
    887   If NewSize is 0, then a valid buffer of 0 size is  returned.  If there is not 
     884  EfiRuntimeServicesData.  If OldBuffer is not NULL, then the smaller of OldSize
     885  and NewSize bytes are copied from OldBuffer to the newly allocated buffer, and
     886  OldBuffer is freed.  A pointer to the newly allocated buffer is returned.
     887  If NewSize is 0, then a valid buffer of 0 size is  returned.  If there is not
    888888  enough memory remaining to satisfy the request, then NULL is returned.
    889889
    890   If the allocation of the new buffer is successful and the smaller of NewSize 
     890  If the allocation of the new buffer is successful and the smaller of NewSize
    891891  and OldSize is greater than (MAX_ADDRESS - OldBuffer + 1), then ASSERT().
    892892
    893893  @param  OldSize        The size, in bytes, of OldBuffer.
    894894  @param  NewSize        The size, in bytes, of the buffer to reallocate.
    895   @param  OldBuffer      The buffer to copy to the allocated buffer.  This is an 
     895  @param  OldBuffer      The buffer to copy to the allocated buffer.  This is an
    896896                         optional parameter that may be NULL.
    897897
     
    914914
    915915  Allocates and zeros the number bytes specified by NewSize from memory of type
    916   EfiReservedMemoryType.  If OldBuffer is not NULL, then the smaller of OldSize 
    917   and NewSize bytes are copied from OldBuffer to the newly allocated buffer, and 
    918   OldBuffer is freed.  A pointer to the newly allocated buffer is returned. 
    919   If NewSize is 0, then a valid buffer of 0 size is  returned.  If there is not 
     916  EfiReservedMemoryType.  If OldBuffer is not NULL, then the smaller of OldSize
     917  and NewSize bytes are copied from OldBuffer to the newly allocated buffer, and
     918  OldBuffer is freed.  A pointer to the newly allocated buffer is returned.
     919  If NewSize is 0, then a valid buffer of 0 size is  returned.  If there is not
    920920  enough memory remaining to satisfy the request, then NULL is returned.
    921921
    922   If the allocation of the new buffer is successful and the smaller of NewSize 
     922  If the allocation of the new buffer is successful and the smaller of NewSize
    923923  and OldSize is greater than (MAX_ADDRESS - OldBuffer + 1), then ASSERT().
    924924
    925925  @param  OldSize        The size, in bytes, of OldBuffer.
    926926  @param  NewSize        The size, in bytes, of the buffer to reallocate.
    927   @param  OldBuffer      The buffer to copy to the allocated buffer.  This is an 
     927  @param  OldBuffer      The buffer to copy to the allocated buffer.  This is an
    928928                         optional parameter that may be NULL.
    929929
     
    943943
    944944/**
    945   Frees a buffer that was previously allocated with one of the pool allocation 
     945  Frees a buffer that was previously allocated with one of the pool allocation
    946946  functions in the Memory Allocation Library.
    947947
    948   Frees the buffer specified by Buffer.  Buffer must have been allocated on a 
    949   previous call to the pool allocation services of the Memory Allocation Library. 
    950   If it is not possible to free pool resources, then this function will perform 
     948  Frees the buffer specified by Buffer.  Buffer must have been allocated on a
     949  previous call to the pool allocation services of the Memory Allocation Library.
     950  If it is not possible to free pool resources, then this function will perform
    951951  no actions.
    952  
    953   If Buffer was not allocated with a pool allocation function in the Memory 
     952
     953  If Buffer was not allocated with a pool allocation function in the Memory
    954954  Allocation Library, then ASSERT().
    955955
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/SmmMemoryAllocationLib/SmmMemoryAllocationLib.inf

    r58459 r58466  
    22# Instance of Memory Allocation Library using SMM Services Table.
    33#
    4 # Memory Allocation Library that uses services from the SMM Services Table to 
     4# Memory Allocation Library that uses services from the SMM Services Table to
    55# allocate and free memory.
    66#
     
    2323  VERSION_STRING                 = 1.0
    2424  PI_SPECIFICATION_VERSION       = 0x0001000A
    25   LIBRARY_CLASS                  = MemoryAllocationLib|DXE_SMM_DRIVER 
     25  LIBRARY_CLASS                  = MemoryAllocationLib|DXE_SMM_DRIVER
    2626  CONSTRUCTOR                    = SmmMemoryAllocationLibConstructor
    2727  DESTRUCTOR                     = SmmMemoryAllocationLibDestructor
     
    4444
    4545[Protocols]
    46   gEfiSmmAccess2ProtocolGuid    ## CONSUMES 
     46  gEfiSmmAccess2ProtocolGuid    ## CONSUMES
    4747
    4848[Depex]
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/SmmPciLibPciRootBridgeIo/PciLib.c

    r58459 r58466  
    88  text of the license may be found at
    99  http://opensource.org/licenses/bsd-license.php.
    10  
     10
    1111  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
    1212  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
     
    4545// Global varible to cache pointer to PCI Root Bridge I/O protocol.
    4646//
    47 EFI_SMM_PCI_ROOT_BRIDGE_IO_PROTOCOL      *mSmmPciRootBridgeIo = NULL; 
     47EFI_SMM_PCI_ROOT_BRIDGE_IO_PROTOCOL      *mSmmPciRootBridgeIo = NULL;
    4848
    4949/**
    5050  The constructor function caches the pointer to PCI Root Bridge I/O protocol.
    51  
     51
    5252  The constructor function locates PCI Root Bridge I/O protocol from protocol database.
    53   It will ASSERT() if that operation fails and it will always return EFI_SUCCESS. 
     53  It will ASSERT() if that operation fails and it will always return EFI_SUCCESS.
    5454
    5555  @param  ImageHandle   The firmware allocated handle for the EFI image.
    5656  @param  SystemTable   A pointer to the EFI System Table.
    57  
     57
    5858  @retval EFI_SUCCESS   The constructor always returns EFI_SUCCESS.
    5959
     
    6767{
    6868  EFI_STATUS  Status;
    69  
     69
    7070  Status = gSmst->SmmLocateProtocol (&gEfiSmmPciRootBridgeIoProtocolGuid, NULL, (VOID**) &mSmmPciRootBridgeIo);
    7171  ASSERT_EFI_ERROR (Status);
     
    142142
    143143/**
    144   Registers a PCI device so PCI configuration registers may be accessed after 
     144  Registers a PCI device so PCI configuration registers may be accessed after
    145145  SetVirtualAddressMap().
    146  
    147   Registers the PCI device specified by Address so all the PCI configuration registers 
     146
     147  Registers the PCI device specified by Address so all the PCI configuration registers
    148148  associated with that PCI device may be accessed after SetVirtualAddressMap() is called.
    149  
    150   If Address > 0x0FFFFFFF, then ASSERT().
    151 
    152   @param  Address The address that encodes the PCI Bus, Device, Function and
    153                   Register.
    154  
     149
     150  If Address > 0x0FFFFFFF, then ASSERT().
     151
     152  @param  Address The address that encodes the PCI Bus, Device, Function and
     153                  Register.
     154
    155155  @retval RETURN_SUCCESS           The PCI device was registered for runtime access.
    156   @retval RETURN_UNSUPPORTED       An attempt was made to call this function 
     156  @retval RETURN_UNSUPPORTED       An attempt was made to call this function
    157157                                   after ExitBootServices().
    158158  @retval RETURN_UNSUPPORTED       The resources required to access the PCI device
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/SmmPciLibPciRootBridgeIo/SmmPciLibPciRootBridgeIo.inf

    r58459 r58466  
    5050[Protocols]
    5151  gEfiSmmPciRootBridgeIoProtocolGuid               ## CONSUMES
    52  
     52
    5353[Depex.common.DXE_SMM_DRIVER]
    5454  gEfiSmmPciRootBridgeIoProtocolGuid
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/SmmPeriodicSmiLib/SmmPeriodicSmiLib.c

    r48674 r58466  
    6363  UINT64                                   TickPeriod;
    6464  ///
    65   /// The Cpu number that is required to execute DispatchFunction.  If Cpu is 
    66   /// set to PERIODIC_SMI_LIBRARY_ANY_CPU, then DispatchFunction may be executed 
     65  /// The Cpu number that is required to execute DispatchFunction.  If Cpu is
     66  /// set to PERIODIC_SMI_LIBRARY_ANY_CPU, then DispatchFunction may be executed
    6767  /// on any CPU.
    6868  ///
    6969  UINTN                                    Cpu;
    7070  ///
    71   /// The size, in bytes, of the stack allocated for a periodic SMI handler. 
     71  /// The size, in bytes, of the stack allocated for a periodic SMI handler.
    7272  /// This value must be a multiple of EFI_PAGE_SIZE.
    7373  ///
     
    8383  SPIN_LOCK                                DispatchLock;
    8484  ///
    85   /// The rate in Hz of the performance counter that is used to measure the 
     85  /// The rate in Hz of the performance counter that is used to measure the
    8686  /// amount of time that a periodic SMI handler executes.
    8787  ///
    8888  UINT64                                   PerfomanceCounterRate;
    8989  ///
    90   /// The start count value of the performance counter that is used to measure 
     90  /// The start count value of the performance counter that is used to measure
    9191  /// the amount of time that a periodic SMI handler executes.
    9292  ///
    9393  UINT64                                   PerfomanceCounterStartValue;
    9494  ///
    95   /// The end count value of the performance counter that is used to measure 
     95  /// The end count value of the performance counter that is used to measure
    9696  /// the amount of time that a periodic SMI handler executes.
    9797  ///
    9898  UINT64                                   PerfomanceCounterEndValue;
    9999  ///
    100   /// The context record passed into the Register() function of the SMM Periodic 
     100  /// The context record passed into the Register() function of the SMM Periodic
    101101  /// Timer Dispatch Protocol when a periodic SMI handler is enabled.
    102102  ///
    103103  EFI_SMM_PERIODIC_TIMER_REGISTER_CONTEXT  RegisterContext;
    104104  ///
    105   /// The handle returned from the Register() function of the SMM Periodic 
     105  /// The handle returned from the Register() function of the SMM Periodic
    106106  /// Timer Dispatch Protocol when a periodic SMI handler is enabled.
    107107  ///
     
    113113  UINT64                                   DispatchTotalTime;
    114114  ///
    115   /// The performance counter value that was captured the last time that the 
     115  /// The performance counter value that was captured the last time that the
    116116  /// periodic SMI handler called PeriodcSmiExecutionTime().  This allows the
    117117  /// time value returned by PeriodcSmiExecutionTime() to be accurate even when
     
    121121  ///
    122122  /// Buffer used to save the context when control is transfer from this library
    123   /// to an enabled periodic SMI handler.  This saved context is used when the 
    124   /// periodic SMI handler exits or yields. 
     123  /// to an enabled periodic SMI handler.  This saved context is used when the
     124  /// periodic SMI handler exits or yields.
    125125  ///
    126126  BASE_LIBRARY_JUMP_BUFFER                 DispatchJumpBuffer;
    127127  ///
    128   /// Flag that is set to TRUE when a periodic SMI handler requests to yield 
    129   /// using PeriodicSmiYield().  When this flag IS TRUE, YieldJumpBuffer is 
     128  /// Flag that is set to TRUE when a periodic SMI handler requests to yield
     129  /// using PeriodicSmiYield().  When this flag IS TRUE, YieldJumpBuffer is
    130130  /// valid.  When this flag is FALSE, YieldJumpBuffer is not valid.
    131131  ///
    132132  BOOLEAN                                  YieldFlag;
    133133  ///
    134   /// Buffer used to save the context when a periodic SMI handler requests to 
    135   /// yield using PeriodicSmiYield().  This context is used to resume the 
     134  /// Buffer used to save the context when a periodic SMI handler requests to
     135  /// yield using PeriodicSmiYield().  This context is used to resume the
    136136  /// execution of a periodic SMI handler the next time control is transferd
    137137  /// to the periodic SMI handler that yielded.
     
    146146
    147147/**
    148  Macro that returns a pointer to a PERIODIC_SMI_LIBRARY_HANDLER_CONTEXT 
     148 Macro that returns a pointer to a PERIODIC_SMI_LIBRARY_HANDLER_CONTEXT
    149149 structure based on a pointer to a RegisterContext field.
    150150
     
    159159
    160160/**
    161  Macro that returns a pointer to a PERIODIC_SMI_LIBRARY_HANDLER_CONTEXT 
     161 Macro that returns a pointer to a PERIODIC_SMI_LIBRARY_HANDLER_CONTEXT
    162162 structure based on a pointer to a Link field.
    163163
     
    177177
    178178///
    179 /// Pointer to a table of supported periodic SMI tick periods in 100 ns units 
     179/// Pointer to a table of supported periodic SMI tick periods in 100 ns units
    180180/// sorted from largest to smallest terminated by a tick period value of 0.
    181 /// This table is allocated using AllocatePool() in the constructor and filled 
    182 /// in based on the values returned from the SMM Periodic Timer Dispatch 2 Protocol 
     181/// This table is allocated using AllocatePool() in the constructor and filled
     182/// in based on the values returned from the SMM Periodic Timer Dispatch 2 Protocol
    183183/// function GetNextShorterInterval().
    184184///
     
    204204
    205205/**
    206   Internal worker function that returns a pointer to the 
    207   PERIODIC_SMI_LIBRARY_HANDLER_CONTEXT structure associated with the periodic 
    208   SMI handler that is currently being executed.  If a periodic SMI handler is 
     206  Internal worker function that returns a pointer to the
     207  PERIODIC_SMI_LIBRARY_HANDLER_CONTEXT structure associated with the periodic
     208  SMI handler that is currently being executed.  If a periodic SMI handler is
    209209  not currently being executed, the NULL is returned.
    210  
     210
    211211  @retval  NULL   A periodic SMI handler is not currently being executed.
    212212  @retval  other  Pointer to the PERIODIC_SMI_LIBRARY_HANDLER_CONTEXT
    213213                  associated with the active periodic SMI handler.
    214  
     214
    215215**/
    216216PERIODIC_SMI_LIBRARY_HANDLER_CONTEXT *
     
    223223
    224224/**
    225   Internal worker function that returns a pointer to the 
    226   PERIODIC_SMI_LIBRARY_HANDLER_CONTEXT structure associated with the 
     225  Internal worker function that returns a pointer to the
     226  PERIODIC_SMI_LIBRARY_HANDLER_CONTEXT structure associated with the
    227227  DispatchHandle that was returned when the periodic SMI handler was enabled
    228   with PeriodicSmiEnable().  If DispatchHandle is NULL, then the active 
     228  with PeriodicSmiEnable().  If DispatchHandle is NULL, then the active
    229229  periodic SMI handler is returned.  If DispatchHandle is NULL and there is
    230230  no active periodic SMI handler, then NULL is returned.
    231  
    232   @param[in] DispatchHandle  DispatchHandle that was returned when the periodic 
    233                              SMI handler was enabled with PeriodicSmiEnable(). 
     231
     232  @param[in] DispatchHandle  DispatchHandle that was returned when the periodic
     233                             SMI handler was enabled with PeriodicSmiEnable().
    234234                             This is an optional parameter that may be NULL.
    235235                             If this parameter is NULL, then the active periodic
    236236                             SMI handler is returned.
    237  
    238   @retval  NULL   DispatchHandle is NULL and there is no active periodic SMI 
     237
     238  @retval  NULL   DispatchHandle is NULL and there is no active periodic SMI
    239239                  handler.
    240240  @retval  NULL   DispatchHandle does not match any of the periodic SMI handlers
     
    242242  @retval  other  Pointer to the PERIODIC_SMI_LIBRARY_HANDLER_CONTEXT
    243243                  associated with the DispatchHandle.
    244  
     244
    245245**/
    246246PERIODIC_SMI_LIBRARY_HANDLER_CONTEXT *
     
    272272    }
    273273  }
    274  
     274
    275275  //
    276276  // No entries match DispatchHandle, so return NULL
     
    280280
    281281/**
    282   Internal worker function that sets that active periodic SMI handler based on 
    283   the Context used when the periodic SMI handler was registered with the 
    284   SMM Periodic Timer Dispatch 2 Protocol.  If Context is NULL, then the 
     282  Internal worker function that sets that active periodic SMI handler based on
     283  the Context used when the periodic SMI handler was registered with the
     284  SMM Periodic Timer Dispatch 2 Protocol.  If Context is NULL, then the
    285285  state is updated to show that there is not active periodic SMI handler.
    286   A pointer to the active PERIODIC_SMI_LIBRARY_HANDLER_CONTEXT structure 
     286  A pointer to the active PERIODIC_SMI_LIBRARY_HANDLER_CONTEXT structure
    287287  is returned.
    288  
     288
    289289  @retval  NULL   Context is NULL.
    290290  @retval  other  Pointer to the PERIODIC_SMI_LIBRARY_HANDLER_CONTEXT
    291291                  associated with Context.
    292  
     292
    293293**/
    294294PERIODIC_SMI_LIBRARY_HANDLER_CONTEXT *
     
    363363  SMI handler.  If no free entries are available, then additional
    364364  entries are allocated.
    365  
     365
    366366  @retval  NULL   There are not enough resources available to to allocate a free entry.
    367367  @retval  other  Pointer to a free PERIODIC_SMI_LIBRARY_HANDLER_CONTEXT structure.
    368  
     368
    369369**/
    370370PERIODIC_SMI_LIBRARY_HANDLER_CONTEXT *
     
    374374{
    375375  PERIODIC_SMI_LIBRARY_HANDLER_CONTEXT  *PeriodicSmiLibraryHandler;
    376  
     376
    377377  if (IsListEmpty (&gFreePeriodicSmiLibraryHandlers)) {
    378378    if (!EnlargeFreePeriodicSmiLibraryHandlerList ()) {
     
    395395/**
    396396  This function returns a pointer to a table of supported periodic
    397   SMI tick periods in 100 ns units sorted from largest to smallest. 
    398   The table contains a array of UINT64 values terminated by a tick 
     397  SMI tick periods in 100 ns units sorted from largest to smallest.
     398  The table contains a array of UINT64 values terminated by a tick
    399399  period value of 0.  The returned table must be treated as read-only
    400400  data and must not be freed.
    401  
    402   @return  A pointer to a table of UINT64 tick period values in 
    403            100ns units sorted from largest to smallest terminated 
     401
     402  @return  A pointer to a table of UINT64 tick period values in
     403           100ns units sorted from largest to smallest terminated
    404404           by a tick period of 0.
    405  
     405
    406406**/
    407407UINT64 *
     
    439439
    440440  //
    441   // If there is no active periodic SMI handler, then return 0 
     441  // If there is no active periodic SMI handler, then return 0
    442442  //
    443443  PeriodicSmiLibraryHandler = GetActivePeriodicSmiLibraryHandler ();
     
    445445    return 0;
    446446  }
    447  
     447
    448448  //
    449449  // Get the current performance counter value
    450450  //
    451451  Current = GetPerformanceCounter ();
    452  
    453   //
    454   // Count the number of performance counter ticks since the periodic SMI handler 
    455   // was dispatched or the last time this function was called. 
     452
     453  //
     454  // Count the number of performance counter ticks since the periodic SMI handler
     455  // was dispatched or the last time this function was called.
    456456  //
    457457  if (PeriodicSmiLibraryHandler->PerfomanceCounterEndValue > PeriodicSmiLibraryHandler->PerfomanceCounterStartValue) {
     
    474474    }
    475475  }
    476  
    477   //
    478   // Accumulate the total number of performance counter ticks since the periodic 
     476
     477  //
     478  // Accumulate the total number of performance counter ticks since the periodic
    479479  // SMI handler was dispatched or resumed.
    480480  //
    481481  PeriodicSmiLibraryHandler->DispatchTotalTime += Count;
    482  
     482
    483483  //
    484484  // Update the checkpoint value to the current performance counter value
    485485  //
    486486  PeriodicSmiLibraryHandler->DispatchCheckPointTime = Current;
    487  
     487
    488488  //
    489489  // Convert the total number of performance counter ticks to 100 ns units
    490490  //
    491491  return DivU64x64Remainder (
    492            MultU64x32 (PeriodicSmiLibraryHandler->DispatchTotalTime, 10000000), 
    493            PeriodicSmiLibraryHandler->PerfomanceCounterRate, 
     492           MultU64x32 (PeriodicSmiLibraryHandler->DispatchTotalTime, 10000000),
     493           PeriodicSmiLibraryHandler->PerfomanceCounterRate,
    494494           NULL
    495495           );
     
    497497
    498498/**
    499   This function returns control back to the SMM Foundation.  When the next 
     499  This function returns control back to the SMM Foundation.  When the next
    500500  periodic SMI for the currently executing handler is triggered, the periodic
    501501  SMI handler will restarted from its registered DispatchFunction entry point.
    502   If this function is not called from within an enabled periodic SMI handler, 
     502  If this function is not called from within an enabled periodic SMI handler,
    503503  then control is returned to the calling function.
    504504
    505505**/
    506506VOID
    507 EFIAPI 
     507EFIAPI
    508508PeriodicSmiExit (
    509509  VOID
     
    511511{
    512512  PERIODIC_SMI_LIBRARY_HANDLER_CONTEXT  *PeriodicSmiLibraryHandler;
    513  
    514   //
    515   // If there is no active periodic SMI handler, then return 
     513
     514  //
     515  // If there is no active periodic SMI handler, then return
    516516  //
    517517  PeriodicSmiLibraryHandler = GetActivePeriodicSmiLibraryHandler ();
     
    519519    return;
    520520  }
    521  
    522   //
    523   // Perform a long jump back to the point when the currently executing dispatch 
     521
     522  //
     523  // Perform a long jump back to the point when the currently executing dispatch
    524524  // function was dispatched.
    525525  //
    526526  LongJump (&PeriodicSmiLibraryHandler->DispatchJumpBuffer, 1);
    527  
     527
    528528  //
    529529  // Must never return
     
    534534
    535535/**
    536   This function yields control back to the SMM Foundation.  When the next 
     536  This function yields control back to the SMM Foundation.  When the next
    537537  periodic SMI for the currently executing handler is triggered, the periodic
    538   SMI handler will be resumed and this function will return.  Use of this 
     538  SMI handler will be resumed and this function will return.  Use of this
    539539  function requires a seperate stack for the periodic SMI handler.  A non zero
    540   stack size must be specified in PeriodicSmiEnable() for this function to be 
    541   used. 
    542  
     540  stack size must be specified in PeriodicSmiEnable() for this function to be
     541  used.
     542
    543543  If the stack size passed into PeriodicSmiEnable() was zero, the 0 is returned.
    544  
    545   If this function is not called from within an enabled periodic SMI handler, 
     544
     545  If this function is not called from within an enabled periodic SMI handler,
    546546  then 0 is returned.
    547547
     
    551551**/
    552552UINT64
    553 EFIAPI 
     553EFIAPI
    554554PeriodicSmiYield (
    555555  VOID
     
    560560
    561561  //
    562   // If there is no active periodic SMI handler, then return 
     562  // If there is no active periodic SMI handler, then return
    563563  //
    564564  PeriodicSmiLibraryHandler = GetActivePeriodicSmiLibraryHandler ();
     
    566566    return 0;
    567567  }
    568  
    569   //
    570   // If PeriodicSmiYield() is called without an allocated stack, then just return 
     568
     569  //
     570  // If PeriodicSmiYield() is called without an allocated stack, then just return
    571571  // immediately with an elapsed time of 0.
    572572  //
     
    574574    return 0;
    575575  }
    576  
    577   //
    578   // Set a flag so the next periodic SMI event will resume at where SetJump() 
     576
     577  //
     578  // Set a flag so the next periodic SMI event will resume at where SetJump()
    579579  // is called below.
    580580  //
     
    583583  //
    584584  // Save context in YieldJumpBuffer
    585   // 
     585  //
    586586  SetJumpFlag = SetJump (&PeriodicSmiLibraryHandler->YieldJumpBuffer);
    587587  if (SetJumpFlag == 0) {
     
    592592    PeriodicSmiExit ();
    593593  }
    594  
     594
    595595  //
    596596  // We get here when a LongJump is performed from PeriodicSmiDispatchFunctionOnCpu()
    597   // to resume a periodic SMI handler that called PeriodicSmiYield() on the 
     597  // to resume a periodic SMI handler that called PeriodicSmiYield() on the
    598598  // previous time this periodic SMI handler was dispatched.
    599599  //
     
    604604  //
    605605  // Return the amount elapsed time that occured while yielded
    606   // 
     606  //
    607607  return PeriodicSmiLibraryHandler->ElapsedTime;
    608608}
    609609
    610610/**
    611   Internal worker function that transfers control to an enabled periodic SMI 
    612   handler.  If the enabled periodic SMI handler was allocated its own stack, 
    613   then this function is called on that allocated stack through the BaseLin 
     611  Internal worker function that transfers control to an enabled periodic SMI
     612  handler.  If the enabled periodic SMI handler was allocated its own stack,
     613  then this function is called on that allocated stack through the BaseLin
    614614  function SwitchStack().
    615615
     
    628628
    629629  //
    630   // Convert Context1 to PERIODIC_SMI_LIBRARY_HANDLER_CONTEXT * 
    631   // 
     630  // Convert Context1 to PERIODIC_SMI_LIBRARY_HANDLER_CONTEXT *
     631  //
    632632  PeriodicSmiLibraryHandler = (PERIODIC_SMI_LIBRARY_HANDLER_CONTEXT *)Context1;
    633633
    634634  //
    635635  // Dispatch the registered handler passing in the context that was registered
    636   // and the amount of time that has elapsed since the previous time this 
     636  // and the amount of time that has elapsed since the previous time this
    637637  // periodic SMI handler was dispacthed.
    638   // 
     638  //
    639639  PeriodicSmiLibraryHandler->DispatchFunction (
    640640    PeriodicSmiLibraryHandler->Context,
    641641    PeriodicSmiLibraryHandler->ElapsedTime
    642642    );
    643    
     643
    644644  //
    645645  // If this DispatchFunction() returns, then unconditially call PeriodicSmiExit()
    646   // to perform a LongJump() back to PeriodicSmiDispatchFunctionOnCpu(). The 
     646  // to perform a LongJump() back to PeriodicSmiDispatchFunctionOnCpu(). The
    647647  // LongJump() will resume exection on the original stack.
    648   // 
     648  //
    649649  PeriodicSmiExit ();
    650650}
    651651
    652652/**
    653   Internal worker function that transfers control to an enabled periodic SMI 
    654   handler on the specified logial CPU.  This function determines if the periodic 
    655   SMI handler yielded and needs to be resumed.  It also and switches to an 
     653  Internal worker function that transfers control to an enabled periodic SMI
     654  handler on the specified logial CPU.  This function determines if the periodic
     655  SMI handler yielded and needs to be resumed.  It also and switches to an
    656656  allocated stack if one was allocated in PeriodicSmiEnable().
    657657
    658658  @param[in] PeriodicSmiLibraryHandler  A pointer to the context for the periodic
    659659                                        SMI handler to execute.
    660  
     660
    661661**/
    662662VOID
     
    667667{
    668668  //
    669   // Save context in DispatchJumpBuffer.  The intial call to SetJump() always 
    670   // returns 0.  If this is the initial call, then either resume from a prior 
    671   // call to PeriodicSmiYield() or call the DispatchFunction registerd in 
     669  // Save context in DispatchJumpBuffer.  The intial call to SetJump() always
     670  // returns 0.  If this is the initial call, then either resume from a prior
     671  // call to PeriodicSmiYield() or call the DispatchFunction registerd in
    672672  // PeriodicSmiEnable() using an allocated stack if one was specified.
    673   // 
     673  //
    674674  if (SetJump (&PeriodicSmiLibraryHandler->DispatchJumpBuffer) != 0) {
    675675    return;
    676676  }
    677  
    678   //
    679   // Capture the performance counter value just before the periodic SMI handler 
    680   // is resumed so the amount of time the periodic SMI handler executes can be 
     677
     678  //
     679  // Capture the performance counter value just before the periodic SMI handler
     680  // is resumed so the amount of time the periodic SMI handler executes can be
    681681  // calculated.
    682682  //
    683683  PeriodicSmiLibraryHandler->DispatchTotalTime      = 0;
    684684  PeriodicSmiLibraryHandler->DispatchCheckPointTime = GetPerformanceCounter();
    685  
     685
    686686  if (PeriodicSmiLibraryHandler->YieldFlag) {
    687687    //
    688     // Perform a long jump back to the point where the previously dispatched 
    689     // function called PeriodicSmiYield(). 
     688    // Perform a long jump back to the point where the previously dispatched
     689    // function called PeriodicSmiYield().
    690690    //
    691691    LongJump (&PeriodicSmiLibraryHandler->YieldJumpBuffer, 1);
    692692  } else if (PeriodicSmiLibraryHandler->Stack == NULL) {
    693693    //
    694     // If Stack is NULL then call DispatchFunction using current stack passing 
    695     // in the context that was registered and the amount of time that has 
     694    // If Stack is NULL then call DispatchFunction using current stack passing
     695    // in the context that was registered and the amount of time that has
    696696    // elapsed since the previous time this periodic SMI handler was dispacthed.
    697     // 
     697    //
    698698    PeriodicSmiLibraryHandler->DispatchFunction (
    699699      PeriodicSmiLibraryHandler->Context,
    700700      PeriodicSmiLibraryHandler->ElapsedTime
    701701      );
    702      
     702
    703703    //
    704704    // If this DispatchFunction() returns, then unconditially call PeriodicSmiExit()
    705705    // to perform a LongJump() back to this function.
    706     // 
     706    //
    707707    PeriodicSmiExit ();
    708708  } else {
     
    716716      (UINT8 *)PeriodicSmiLibraryHandler->Stack + PeriodicSmiLibraryHandler->StackSize
    717717      );
    718   }   
     718  }
    719719
    720720  //
     
    726726
    727727/**
    728   Internal worker function that transfers control to an enabled periodic SMI 
    729   handler on the specified logial CPU.  This worker function is only called 
    730   using the SMM Services Table function SmmStartupThisAp() to execute the 
    731   periodic SMI handler on a logical CPU that is different than the one that is 
     728  Internal worker function that transfers control to an enabled periodic SMI
     729  handler on the specified logial CPU.  This worker function is only called
     730  using the SMM Services Table function SmmStartupThisAp() to execute the
     731  periodic SMI handler on a logical CPU that is different than the one that is
    732732  running the SMM Foundation.  When the periodic SMI handler returns, a lock is
    733733  released to notify the CPU that is running the SMM Foundation that the periodic
     
    744744{
    745745  PERIODIC_SMI_LIBRARY_HANDLER_CONTEXT  *PeriodicSmiLibraryHandler;
    746  
     746
    747747  //
    748748  // Get context
    749   // 
     749  //
    750750  PeriodicSmiLibraryHandler = (PERIODIC_SMI_LIBRARY_HANDLER_CONTEXT  *)Buffer;
    751751
    752752  //
    753753  // Execute dispatch function on the currently excuting logical CPU
    754   // 
     754  //
    755755  PeriodicSmiDispatchFunctionOnCpu (PeriodicSmiLibraryHandler);
    756  
     756
    757757  //
    758758  // Release the dispatch spin lock
     
    765765  was enabled using PeriodicSmiEnable().
    766766
    767   @param[in]     DispatchHandle  The unique handle assigned to this handler by 
     767  @param[in]     DispatchHandle  The unique handle assigned to this handler by
    768768                                 SmiHandlerRegister().
    769   @param[in]     Context         Points to an optional handler context which was 
     769  @param[in]     Context         Points to an optional handler context which was
    770770                                 specified when the handler was registered.
    771771  @param[in, out] CommBuffer     A pointer to a collection of data in memory that
    772                                  will be conveyed from a non-SMM environment into 
     772                                 will be conveyed from a non-SMM environment into
    773773                                 an SMM environment.
    774774  @param[in, out] CommBufferSize The size of the CommBuffer.
     
    781781                                              handlers should still be called.
    782782  @retval EFI_INTERRUPT_PENDING               The interrupt could not be quiesced.
    783  
     783
    784784**/
    785785EFI_STATUS
     
    795795  EFI_SMM_PERIODIC_TIMER_CONTEXT        *TimerContext;
    796796  EFI_STATUS                            Status;
    797  
     797
    798798  //
    799799  // Set the active periodic SMI handler
    800   // 
     800  //
    801801  PeriodicSmiLibraryHandler = SetActivePeriodicSmiLibraryHandler (Context);
    802802  if (PeriodicSmiLibraryHandler == NULL) {
    803803    return EFI_NOT_FOUND;
    804804  }
    805  
     805
    806806  //
    807807  // Retrieve the elapsed time since the last time this periodic SMI handler was called
     
    830830    //
    831831    AcquireSpinLock (&PeriodicSmiLibraryHandler->DispatchLock);
    832  
    833     //
    834     // Execute the periodic SMI handler on the CPU that was specified in 
     832
     833    //
     834    // Execute the periodic SMI handler on the CPU that was specified in
    835835    // PeriodicSmiEnable().
    836836    //
     
    848848      }
    849849    }
    850    
     850
    851851    //
    852852    // Release the spin lock for the periodic SMI handler.
     
    861861    ReclaimPeriodicSmiLibraryHandler (PeriodicSmiLibraryHandler);
    862862  }
    863  
     863
    864864  //
    865865  // Update state to show that there is no active periodic SMI handler
    866   // 
     866  //
    867867  SetActivePeriodicSmiLibraryHandler (NULL);
    868868
    869869  return EFI_SUCCESS;
    870870}
    871  
     871
    872872/**
    873873  This function enables a periodic SMI handler.
    874  
    875   @param[in, out] DispatchHandle   A pointer to the handle associated with the 
    876                                    enabled periodic SMI handler.  This is an 
    877                                    optional parameter that may be NULL.  If it is 
    878                                    NULL, then the handle will not be returned, 
    879                                    which means that the periodic SMI handler can 
     874
     875  @param[in, out] DispatchHandle   A pointer to the handle associated with the
     876                                   enabled periodic SMI handler.  This is an
     877                                   optional parameter that may be NULL.  If it is
     878                                   NULL, then the handle will not be returned,
     879                                   which means that the periodic SMI handler can
    880880                                   never be disabled.
    881881  @param[in]     DispatchFunction  A pointer to a periodic SMI handler function.
    882882  @param[in]     Context           Optional content to pass into DispatchFunction.
    883   @param[in]     TickPeriod        The requested tick period in 100ns units that 
     883  @param[in]     TickPeriod        The requested tick period in 100ns units that
    884884                                   control should be givien to the periodic SMI
    885885                                   handler.  Must be one of the supported values
    886886                                   returned by PeriodicSmiSupportedPickPeriod().
    887887  @param[in]     Cpu               Specifies the CPU that is required to execute
    888                                    the periodic SMI handler.  If Cpu is 
    889                                    PERIODIC_SMI_LIBRARY_ANY_CPU, then the periodic 
    890                                    SMI handler will always be executed on the SMST 
    891                                    CurrentlyExecutingCpu, which may vary across 
    892                                    periodic SMIs.  If Cpu is between 0 and the SMST 
     888                                   the periodic SMI handler.  If Cpu is
     889                                   PERIODIC_SMI_LIBRARY_ANY_CPU, then the periodic
     890                                   SMI handler will always be executed on the SMST
     891                                   CurrentlyExecutingCpu, which may vary across
     892                                   periodic SMIs.  If Cpu is between 0 and the SMST
    893893                                   NumberOfCpus, then the periodic SMI will always
    894894                                   be executed on the requested CPU.
     
    896896                                   use by the periodic SMI handler.  If 0, then the
    897897                                   default stack will be used.
    898                            
     898
    899899  @retval EFI_INVALID_PARAMETER  DispatchFunction is NULL.
    900   @retval EFI_UNSUPPORTED        TickPeriod is not a supported tick period.  The 
    901                                  supported tick periods can be retrieved using 
     900  @retval EFI_UNSUPPORTED        TickPeriod is not a supported tick period.  The
     901                                 supported tick periods can be retrieved using
    902902                                 PeriodicSmiSupportedTickPeriod().
    903   @retval EFI_INVALID_PARAMETER  Cpu is not PERIODIC_SMI_LIBRARY_ANY_CPU or in 
     903  @retval EFI_INVALID_PARAMETER  Cpu is not PERIODIC_SMI_LIBRARY_ANY_CPU or in
    904904                                 the range 0 to SMST NumberOfCpus.
    905   @retval EFI_OUT_OF_RESOURCES   There are not enough resources to enable the 
     905  @retval EFI_OUT_OF_RESOURCES   There are not enough resources to enable the
    906906                                 periodic SMI handler.
    907   @retval EFI_OUT_OF_RESOURCES   There are not enough resources to allocate the 
     907  @retval EFI_OUT_OF_RESOURCES   There are not enough resources to allocate the
    908908                                 stack speficied by StackSize.
    909909  @retval EFI_SUCCESS            The periodic SMI handler was enabled.
    910  
    911 **/
    912 EFI_STATUS 
     910
     911**/
     912EFI_STATUS
    913913EFIAPI
    914914PeriodicSmiEnable (
     
    927927  //
    928928  // Make sure all the input parameters are valid
    929   // 
     929  //
    930930  if (DispatchFunction == NULL) {
    931931    return EFI_INVALID_PARAMETER;
    932932  }
    933  
     933
    934934  for (Index = 0; gSmiTickPeriodTable[Index] != 0; Index++) {
    935935    if (gSmiTickPeriodTable[Index] == TickPeriod) {
    936936      break;
    937937    }
    938   } 
     938  }
    939939  if (gSmiTickPeriodTable[Index] == 0) {
    940940    return EFI_UNSUPPORTED;
    941941  }
    942  
     942
    943943  if (Cpu != PERIODIC_SMI_LIBRARY_ANY_CPU && Cpu >= gSmst->NumberOfCpus) {
    944944    return EFI_INVALID_PARAMETER;
     
    947947  //
    948948  // Find a free periodic SMI handler entry
    949   // 
     949  //
    950950  PeriodicSmiLibraryHandler = FindFreePeriodicSmiLibraryHandler();
    951951  if (PeriodicSmiLibraryHandler == NULL) {
     
    989989    return EFI_OUT_OF_RESOURCES;
    990990  }
    991  
     991
    992992  //
    993993  // Return the registered handle if the optional DispatchHandle parameter is not NULL
     
    996996    *DispatchHandle = PeriodicSmiLibraryHandler->DispatchHandle;
    997997  }
    998   return EFI_SUCCESS;                                         
     998  return EFI_SUCCESS;
    999999}
    10001000
     
    10021002  This function disables a periodic SMI handler that has been previously
    10031003  enabled with PeriodicSmiEnable().
    1004  
    1005   @param[in] DispatchHandle  A handle associated with a previously enabled periodic 
     1004
     1005  @param[in] DispatchHandle  A handle associated with a previously enabled periodic
    10061006                             SMI handler.  This is an optional parameter that may
    10071007                             be NULL.  If it is NULL, then the active periodic SMI
     
    10091009
    10101010  @retval FALSE  DispatchHandle is NULL and there is no active periodic SMI handler.
    1011   @retval FALSE  The periodic SMI handler specified by DispatchHandle has 
     1011  @retval FALSE  The periodic SMI handler specified by DispatchHandle has
    10121012                 not been enabled with PeriodicSmiEnable().
    1013   @retval TRUE   The periodic SMI handler specified by DispatchHandle has 
     1013  @retval TRUE   The periodic SMI handler specified by DispatchHandle has
    10141014                 been disabled.  If DispatchHandle is NULL, then the active
    10151015                 periodic SMI handler has been disabled.
    1016  
    1017 **/
    1018 BOOLEAN 
     1016
     1017**/
     1018BOOLEAN
    10191019EFIAPI
    10201020PeriodicSmiDisable (
     
    10321032    return FALSE;
    10331033  }
    1034  
     1034
    10351035  //
    10361036  // Unregister the periodic SMI handler from the SMM Periodic Timer Dispatch 2 Protocol
     
    10581058
    10591059/**
    1060   This constructor function caches the pointer to the SMM Periodic Timer 
     1060  This constructor function caches the pointer to the SMM Periodic Timer
    10611061  Dispatch 2 Protocol and collects the list SMI tick rates that the hardware
    10621062  supports.
     
    10911091
    10921092  //
    1093   // Count the number of periodic SMI tick intervals that the SMM Periodic Timer 
     1093  // Count the number of periodic SMI tick intervals that the SMM Periodic Timer
    10941094  // Dipatch 2 Protocol supports.
    10951095  //
     
    11011101                                           &SmiTickInterval
    11021102                                           );
    1103     Count++;                                           
    1104   } while (SmiTickInterval != NULL);                                           
     1103    Count++;
     1104  } while (SmiTickInterval != NULL);
    11051105
    11061106  //
    11071107  // Allocate a buffer for the table of supported periodic SMI tick periods.
    1108   // 
     1108  //
    11091109  gSmiTickPeriodTable = AllocateZeroPool (Count * sizeof (UINT64));
    11101110  ASSERT (gSmiTickPeriodTable != NULL);
    1111  
     1111
    11121112  //
    11131113  // Fill in the table of supported periodic SMI tick periods.
     
    11361136
    11371137/**
    1138   The constructor function caches the pointer to the SMM Periodic Timer Dispatch 2 
     1138  The constructor function caches the pointer to the SMM Periodic Timer Dispatch 2
    11391139  Protocol and collects the list SMI tick rates that the hardware supports.
    11401140
     
    11741174  // Free all the periodic SMI handler entries
    11751175  //
    1176   for (Link = GetFirstNode (&gFreePeriodicSmiLibraryHandlers); !IsNull (&gFreePeriodicSmiLibraryHandlers, Link);) {   
     1176  for (Link = GetFirstNode (&gFreePeriodicSmiLibraryHandlers); !IsNull (&gFreePeriodicSmiLibraryHandlers, Link);) {
    11771177    PeriodicSmiLibraryHandler = PERIODIC_SMI_LIBRARY_HANDLER_CONTEXT_FROM_LINK (Link);
    11781178    Link = RemoveEntryList (Link);
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/SmmPeriodicSmiLib/SmmPeriodicSmiLib.inf

    r58459 r58466  
    2525  CONSTRUCTOR                    = SmmPeriodicSmiLibConstructor
    2626  DESTRUCTOR                     = SmmPeriodicSmiLibDestructor
    27  
     27
    2828#
    2929#  VALID_ARCHITECTURES           = IA32 X64
     
    4444  MemoryAllocationLib
    4545  SmmServicesTableLib
    46  
     46
    4747[Protocols]
    4848  gEfiSmmPeriodicTimerDispatch2ProtocolGuid  ## CONSUMES
    49  
     49
    5050[Depex]
    5151  gEfiSmmPeriodicTimerDispatch2ProtocolGuid
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/SmmServicesTableLib/SmmServicesTableLib.c

    r48674 r58466  
    4141  //
    4242  // Retrieve SMM Base2 Protocol,  Do not use gBS from UefiBootServicesTableLib on purpose
    43   // to prevent inclusion of gBS, gST, and gImageHandle from SMM Drivers unless the 
    44   // SMM driver explicity declares that dependency. 
     43  // to prevent inclusion of gBS, gST, and gImageHandle from SMM Drivers unless the
     44  // SMM driver explicity declares that dependency.
    4545  //
    4646  Status = SystemTable->BootServices->LocateProtocol (
     
    7272
    7373/**
    74   This function allows the caller to determine if the driver is executing in 
     74  This function allows the caller to determine if the driver is executing in
    7575  System Management Mode(SMM).
    7676
    77   This function returns TRUE if the driver is executing in SMM and FALSE if the 
     77  This function returns TRUE if the driver is executing in SMM and FALSE if the
    7878  driver is not executing in SMM.
    7979
    8080  @retval  TRUE  The driver is executing in System Management Mode (SMM).
    81   @retval  FALSE The driver is not executing in System Management Mode (SMM). 
     81  @retval  FALSE The driver is not executing in System Management Mode (SMM).
    8282
    8383**/
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/UefiApplicationEntryPoint/ApplicationEntryPoint.c

    r48674 r58466  
    7979/**
    8080  Invokes the library destructors for all dependent libraries and terminates
    81   the UEFI Application. 
     81  the UEFI Application.
    8282
    8383  This function calls ProcessLibraryDestructorList() and the EFI Boot Service Exit()
     
    8585
    8686  @param  Status  Status returned by the application that is exiting.
    87  
     87
    8888**/
    8989VOID
     
    101101
    102102/**
    103   Required by the EBC compiler and identical in functionality to _ModuleEntryPoint(). 
     103  Required by the EBC compiler and identical in functionality to _ModuleEntryPoint().
    104104
    105105  @param  ImageHandle  The image handle of the UEFI Application.
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.c

    r48674 r58466  
    11/** @file
    2   This library retrieve the EFI_BOOT_SERVICES pointer from EFI system table in 
     2  This library retrieve the EFI_BOOT_SERVICES pointer from EFI system table in
    33  library's constructor.
    44
     
    2626/**
    2727  The constructor function caches the pointer of Boot Services Table.
    28    
     28
    2929  The constructor function caches the pointer of Boot Services Table through System Table.
    3030  It will ASSERT() if the pointer of System Table is NULL.
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf

    r58459 r58466  
    11## @file
    22# UEFI Boot Services Table Library implementation.
    3 # 
     3#
    44# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
    55#
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/UefiDebugLibConOut/DebugLib.c

    r58459 r58466  
    33
    44  Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
    5   This program and the accompanying materials                         
    6   are licensed and made available under the terms and conditions of the BSD License         
    7   which accompanies this distribution.  The full text of the license may be found at       
    8   http://opensource.org/licenses/bsd-license.php.                                           
    9 
    10   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     
    11   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             
     5  This program and the accompanying materials
     6  are licensed and made available under the terms and conditions of the BSD License
     7  which accompanies this distribution.  The full text of the license may be found at
     8  http://opensource.org/licenses/bsd-license.php.
     9
     10  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
     11  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
    1212
    1313**/
     
    2424
    2525//
    26 // Define the maximum debug and assert message length that this library supports 
     26// Define the maximum debug and assert message length that this library supports
    2727//
    2828#define MAX_DEBUG_MESSAGE_LENGTH  0x100
     
    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
     
    3939  @param  ErrorLevel  The error level of the debug message.
    4040  @param  Format      Format string for the debug message to print.
    41   @param  ...         A variable argument list whose contents are accessed 
     41  @param  ...         A variable argument list whose contents are accessed
    4242                      based on the format string specified by Format.
    4343
     
    8484
    8585/**
    86   Prints an assert message containing a filename, line number, and description. 
     86  Prints an assert message containing a filename, line number, and description.
    8787  This may be followed by a breakpoint or a dead loop.
    8888
    8989  Print a message of the form "ASSERT <FileName>(<LineNumber>): <Description>\n"
    90   to the debug output device.  If DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED bit of 
    91   PcdDebugProperyMask is set then CpuBreakpoint() is called. Otherwise, if 
    92   DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED bit of PcdDebugProperyMask is set then 
    93   CpuDeadLoop() is called.  If neither of these bits are set, then this function 
     90  to the debug output device.  If DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED bit of
     91  PcdDebugProperyMask is set then CpuBreakpoint() is called. Otherwise, if
     92  DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED bit of PcdDebugProperyMask is set then
     93  CpuDeadLoop() is called.  If neither of these bits are set, then this function
    9494  returns immediately after the message is printed to the debug output device.
    9595  DebugAssert() must actively prevent recursion.  If DebugAssert() is called while
     
    9999  If Description is NULL, then a <Description> string of "(NULL) Description" is printed.
    100100
    101   @param  FileName     The pointer to the name of the source file that generated 
     101  @param  FileName     The pointer to the name of the source file that generated
    102102                       the assert condition.
    103   @param  LineNumber   The line number in the source file that generated the 
     103  @param  LineNumber   The line number in the source file that generated the
    104104                       assert condition
    105105  @param  Description  The pointer to the description of the assert condition.
     
    120120  //
    121121  UnicodeSPrintAsciiFormat (
    122     Buffer, 
    123     sizeof (Buffer), 
    124     "ASSERT %a(%d): %a\n", 
    125     FileName, 
    126     LineNumber, 
     122    Buffer,
     123    sizeof (Buffer),
     124    "ASSERT %a(%d): %a\n",
     125    FileName,
     126    LineNumber,
    127127    Description
    128128    );
    129    
     129
    130130  //
    131131  // Send the print string to the Console Output device
     
    149149  Fills a target buffer with PcdDebugClearMemoryValue, and returns the target buffer.
    150150
    151   This function fills Length bytes of Buffer with the value specified by 
     151  This function fills Length bytes of Buffer with the value specified by
    152152  PcdDebugClearMemoryValue, and returns Buffer.
    153153
    154154  If Buffer is NULL, then ASSERT().
    155   If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). 
     155  If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
    156156
    157157  @param   Buffer  The pointer to the target buffer to be filled with PcdDebugClearMemoryValue.
    158   @param   Length  The number of bytes in Buffer to fill with zeros PcdDebugClearMemoryValue. 
     158  @param   Length  The number of bytes in Buffer to fill with zeros PcdDebugClearMemoryValue.
    159159
    160160  @return  Buffer  The pointer to the target buffer filled with PcdDebugClearMemoryValue.
     
    183183  Returns TRUE if ASSERT() macros are enabled.
    184184
    185   This function returns TRUE if the DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit of 
     185  This function returns TRUE if the DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit of
    186186  PcdDebugProperyMask is set.  Otherwise FALSE is returned.
    187187
     
    200200
    201201
    202 /** 
     202/**
    203203  Returns TRUE if DEBUG() macros are enabled.
    204204
    205   This function returns TRUE if the DEBUG_PROPERTY_DEBUG_PRINT_ENABLED bit of 
     205  This function returns TRUE if the DEBUG_PROPERTY_DEBUG_PRINT_ENABLED bit of
    206206  PcdDebugProperyMask is set.  Otherwise FALSE is returned.
    207207
     
    220220
    221221
    222 /** 
     222/**
    223223  Returns TRUE if DEBUG_CODE() macros are enabled.
    224224
    225   This function returns TRUE if the DEBUG_PROPERTY_DEBUG_CODE_ENABLED bit of 
     225  This function returns TRUE if the DEBUG_PROPERTY_DEBUG_CODE_ENABLED bit of
    226226  PcdDebugProperyMask is set.  Otherwise FALSE is returned.
    227227
     
    240240
    241241
    242 /** 
     242/**
    243243  Returns TRUE if DEBUG_CLEAR_MEMORY() macro is enabled.
    244244
    245   This function returns TRUE if the DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of 
     245  This function returns TRUE if the DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of
    246246  PcdDebugProperyMask is set.  Otherwise FALSE is returned.
    247247
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/UefiDebugLibConOut/UefiDebugLibConOut.inf

    r58459 r58466  
    2323  MODULE_TYPE                    = UEFI_DRIVER
    2424  VERSION_STRING                 = 1.0
    25   LIBRARY_CLASS                  = DebugLib|DXE_CORE DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER 
     25  LIBRARY_CLASS                  = DebugLib|DXE_CORE DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER
    2626
    2727
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/UefiDebugLibStdErr/DebugLib.c

    r58459 r58466  
    33
    44  Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
    5   This program and the accompanying materials                         
    6   are licensed and made available under the terms and conditions of the BSD License         
    7   which accompanies this distribution.  The full text of the license may be found at       
    8   http://opensource.org/licenses/bsd-license.php.                                           
    9 
    10   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     
    11   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             
     5  This program and the accompanying materials
     6  are licensed and made available under the terms and conditions of the BSD License
     7  which accompanies this distribution.  The full text of the license may be found at
     8  http://opensource.org/licenses/bsd-license.php.
     9
     10  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
     11  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
    1212
    1313**/
     
    2525
    2626//
    27 // Define the maximum debug and assert message length that this library supports 
     27// Define the maximum debug and assert message length that this library supports
    2828//
    2929#define MAX_DEBUG_MESSAGE_LENGTH  0x100
     
    3333  Prints a debug message to the debug output device if the specified error level is enabled.
    3434
    35   If any bit in ErrorLevel is also set in DebugPrintErrorLevelLib function 
    36   GetDebugPrintErrorLevel (), then print the message specified by Format and the 
     35  If any bit in ErrorLevel is also set in DebugPrintErrorLevelLib function
     36  GetDebugPrintErrorLevel (), then print the message specified by Format and the
    3737  associated variable argument list to the debug output device.
    3838
     
    4141  @param  ErrorLevel  The error level of the debug message.
    4242  @param  Format      The format string for the debug message to print.
    43   @param  ...         The variable argument list whose contents are accessed 
     43  @param  ...         The variable argument list whose contents are accessed
    4444                      based on the format string specified by Format.
    4545
     
    8585
    8686/**
    87   Prints an assert message containing a filename, line number, and description. 
     87  Prints an assert message containing a filename, line number, and description.
    8888  This may be followed by a breakpoint or a dead loop.
    8989
    9090  Print a message of the form "ASSERT <FileName>(<LineNumber>): <Description>\n"
    91   to the debug output device.  If DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED bit of 
    92   PcdDebugProperyMask is set then CpuBreakpoint() is called. Otherwise, if 
    93   DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED bit of PcdDebugProperyMask is set then 
    94   CpuDeadLoop() is called.  If neither of these bits are set, then this function 
     91  to the debug output device.  If DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED bit of
     92  PcdDebugProperyMask is set then CpuBreakpoint() is called. Otherwise, if
     93  DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED bit of PcdDebugProperyMask is set then
     94  CpuDeadLoop() is called.  If neither of these bits are set, then this function
    9595  returns immediately after the message is printed to the debug output device.
    9696  DebugAssert() must actively prevent recursion.  If DebugAssert() is called while
     
    100100  If Description is NULL, then a <Description> string of "(NULL) Description" is printed.
    101101
    102   @param  FileName     The pointer to the name of the source file that generated 
     102  @param  FileName     The pointer to the name of the source file that generated
    103103                       the assert condition.
    104   @param  LineNumber   The line number in the source file that generated the 
     104  @param  LineNumber   The line number in the source file that generated the
    105105                       assert condition
    106106  @param  Description  The pointer to the description of the assert condition.
     
    121121  //
    122122  UnicodeSPrintAsciiFormat (
    123     Buffer, 
     123    Buffer,
    124124    sizeof (Buffer),
    125     "ASSERT %a(%d): %a\n", 
    126     FileName, 
    127     LineNumber, 
     125    "ASSERT %a(%d): %a\n",
     126    FileName,
     127    LineNumber,
    128128    Description
    129129    );
    130    
     130
    131131  //
    132132  // Send the print string to the Standard Error device
     
    150150  Fills a target buffer with PcdDebugClearMemoryValue, and returns the target buffer.
    151151
    152   This function fills Length bytes of Buffer with the value specified by 
     152  This function fills Length bytes of Buffer with the value specified by
    153153  PcdDebugClearMemoryValue, and returns Buffer.
    154154
    155155  If Buffer is NULL, then ASSERT().
    156   If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). 
     156  If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
    157157
    158158  @param   Buffer  The pointer to the target buffer to be filled with PcdDebugClearMemoryValue.
    159   @param   Length  The number of bytes in Buffer to fill with zeros PcdDebugClearMemoryValue. 
     159  @param   Length  The number of bytes in Buffer to fill with zeros PcdDebugClearMemoryValue.
    160160
    161161  @return  Buffer  The pointer to the target buffer filled with PcdDebugClearMemoryValue.
     
    184184  Returns TRUE if ASSERT() macros are enabled.
    185185
    186   This function returns TRUE if the DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit of 
     186  This function returns TRUE if the DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit of
    187187  PcdDebugProperyMask is set.  Otherwise FALSE is returned.
    188188
     
    201201
    202202
    203 /** 
     203/**
    204204  Returns TRUE if DEBUG() macros are enabled.
    205205
    206   This function returns TRUE if the DEBUG_PROPERTY_DEBUG_PRINT_ENABLED bit of 
     206  This function returns TRUE if the DEBUG_PROPERTY_DEBUG_PRINT_ENABLED bit of
    207207  PcdDebugProperyMask is set.  Otherwise FALSE is returned.
    208208
     
    221221
    222222
    223 /** 
     223/**
    224224  Returns TRUE if DEBUG_CODE() macros are enabled.
    225225
    226   This function returns TRUE if the DEBUG_PROPERTY_DEBUG_CODE_ENABLED bit of 
     226  This function returns TRUE if the DEBUG_PROPERTY_DEBUG_CODE_ENABLED bit of
    227227  PcdDebugProperyMask is set.  Otherwise FALSE is returned.
    228228
     
    241241
    242242
    243 /** 
     243/**
    244244  Returns TRUE if DEBUG_CLEAR_MEMORY() macro is enabled.
    245245
    246   This function returns TRUE if the DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of 
     246  This function returns TRUE if the DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of
    247247  PcdDebugProperyMask is set.  Otherwise FALSE is returned.
    248248
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/UefiDebugLibStdErr/UefiDebugLibStdErr.inf

    r58459 r58466  
    2323  MODULE_TYPE                    = UEFI_DRIVER
    2424  VERSION_STRING                 = 1.0
    25   LIBRARY_CLASS                  = DebugLib|DXE_CORE DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER 
     25  LIBRARY_CLASS                  = DebugLib|DXE_CORE DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER
    2626
    2727
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/UefiDevicePathLib/DevicePathFromText.c

    r58464 r58466  
    280280    Str ++;
    281281  }
    282  
     282
    283283  return (BOOLEAN) (*Str == L'x' || *Str == L'X');
    284284}
     
    410410    Str ++;
    411411  }
    412  
     412
    413413  if (IS_HYPHEN (*Str)) {
    414414    Str++;
     
    416416    return EFI_UNSUPPORTED;
    417417  }
    418  
     418
    419419  //
    420420  // Get the second UINT16 data
     
    430430    return EFI_UNSUPPORTED;
    431431  }
    432  
     432
    433433  //
    434434  // Get the third UINT16 data
     
    447447  //
    448448  // Get the following 8 bytes data
    449   // 
     449  //
    450450  StrToBuf (&Guid->Data4[0], 2, Str);
    451451  //
     
    11301130      SetDevicePathNodeLength (AcpiAdr, Length + sizeof (UINT32));
    11311131    }
    1132    
     1132
    11331133    (&AcpiAdr->ADR)[Index] = (UINT32) Strtoi (DisplayDeviceStr);
    11341134  }
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c

    r58464 r58466  
    5454  UnicodeVSPrint (&Str->Str[Str->Count], Str->Capacity - Str->Count * sizeof (CHAR16), Fmt, Args);
    5555  Str->Count += Count;
    56  
     56
    5757  VA_END (Args);
    5858  return Str->Str;
     
    401401  //
    402402  // Converts EISA identification to string.
    403   // 
     403  //
    404404  UnicodeSPrint (
    405405    HIDText,
     
    12681268    return ;
    12691269  }
    1270  
     1270
    12711271  UefiDevicePathLibCatPrint (Str, L",");
    12721272  CatNetworkProtocol (Str, IPDevPath->Protocol);
     
    20442044      }
    20452045    }
    2046    
     2046
    20472047    AlignedNode = AllocateCopyPool (DevicePathNodeLength (Node), Node);
    20482048    //
     
    20512051    ToText (&Str, AlignedNode, DisplayOnly, AllowShortcuts);
    20522052    FreePool (AlignedNode);
    2053    
     2053
    20542054    //
    20552055    // Next device path node
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/UefiDevicePathLib/DevicePathUtilities.c

    r58464 r58466  
    1010
    1111  Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
    12   This program and the accompanying materials                         
    13   are licensed and made available under the terms and conditions of the BSD License         
    14   which accompanies this distribution.  The full text of the license may be found at       
    15   http://opensource.org/licenses/bsd-license.php.                                           
    16 
    17   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     
    18   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             
     12  This program and the accompanying materials
     13  are licensed and made available under the terms and conditions of the BSD License
     14  which accompanies this distribution.  The full text of the license may be found at
     15  http://opensource.org/licenses/bsd-license.php.
     16
     17  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
     18  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
    1919
    2020**/
     
    136136  Returns the 16-bit Length field of a device path node.
    137137
    138   Returns the 16-bit Length field of the device path node specified by Node. 
     138  Returns the 16-bit Length field of the device path node specified by Node.
    139139  Node is not required to be aligned on a 16-bit boundary, so it is recommended
    140   that a function such as ReadUnaligned16() be used to extract the contents of 
     140  that a function such as ReadUnaligned16() be used to extract the contents of
    141141  the Length field.
    142142
     
    161161  Returns a pointer to the next node in a device path.
    162162
    163   Returns a pointer to the device path node that follows the device path node 
     163  Returns a pointer to the device path node that follows the device path node
    164164  specified by Node.
    165165
     
    168168  @param  Node      A pointer to a device path node data structure.
    169169
    170   @return a pointer to the device path node that follows the device path node 
     170  @return a pointer to the device path node that follows the device path node
    171171  specified by Node.
    172172
     
    184184/**
    185185  Determines if a device path node is an end node of a device path.
    186   This includes nodes that are the end of a device path instance and nodes that 
     186  This includes nodes that are the end of a device path instance and nodes that
    187187  are the end of an entire device path.
    188188
    189   Determines if the device path node specified by Node is an end node of a device path. 
    190   This includes nodes that are the end of a device path instance and nodes that are the 
    191   end of an entire device path.  If Node represents an end node of a device path, 
     189  Determines if the device path node specified by Node is an end node of a device path.
     190  This includes nodes that are the end of a device path instance and nodes that are the
     191  end of an entire device path.  If Node represents an end node of a device path,
    192192  then TRUE is returned.  Otherwise, FALSE is returned.
    193193
     
    196196  @param  Node      A pointer to a device path node data structure.
    197197
    198   @retval TRUE      The device path node specified by Node is an end node of a 
     198  @retval TRUE      The device path node specified by Node is an end node of a
    199199                    device path.
    200   @retval FALSE     The device path node specified by Node is not an end node of 
     200  @retval FALSE     The device path node specified by Node is not an end node of
    201201                    a device path.
    202  
     202
    203203**/
    204204BOOLEAN
     
    215215  Determines if a device path node is an end node of an entire device path.
    216216
    217   Determines if a device path node specified by Node is an end node of an entire 
    218   device path. If Node represents the end of an entire device path, then TRUE is 
     217  Determines if a device path node specified by Node is an end node of an entire
     218  device path. If Node represents the end of an entire device path, then TRUE is
    219219  returned.  Otherwise, FALSE is returned.
    220220
     
    223223  @param  Node      A pointer to a device path node data structure.
    224224
    225   @retval TRUE      The device path node specified by Node is the end of an entire 
     225  @retval TRUE      The device path node specified by Node is the end of an entire
    226226                    device path.
    227   @retval FALSE     The device path node specified by Node is not the end of an 
     227  @retval FALSE     The device path node specified by Node is not the end of an
    228228                    entire device path.
    229229
     
    242242  Determines if a device path node is an end node of a device path instance.
    243243
    244   Determines if a device path node specified by Node is an end node of a device 
    245   path instance. If Node represents the end of a device path instance, then TRUE 
     244  Determines if a device path node specified by Node is an end node of a device
     245  path instance. If Node represents the end of a device path instance, then TRUE
    246246  is returned.  Otherwise, FALSE is returned.
    247247
     
    250250  @param  Node      A pointer to a device path node data structure.
    251251
    252   @retval TRUE      The device path node specified by Node is the end of a device 
     252  @retval TRUE      The device path node specified by Node is the end of a device
    253253                    path instance.
    254   @retval FALSE     The device path node specified by Node is not the end of a 
     254  @retval FALSE     The device path node specified by Node is not the end of a
    255255                    device path instance.
    256256
     
    269269  Sets the length, in bytes, of a device path node.
    270270
    271   Sets the length of the device path node specified by Node to the value specified 
    272   by NodeLength.  NodeLength is returned.  Node is not required to be aligned on 
     271  Sets the length of the device path node specified by Node to the value specified
     272  by NodeLength.  NodeLength is returned.  Node is not required to be aligned on
    273273  a 16-bit boundary, so it is recommended that a function such as WriteUnaligned16()
    274274  be used to set the contents of the Length field.
     
    299299  Fills in all the fields of a device path node that is the end of an entire device path.
    300300
    301   Fills in all the fields of a device path node specified by Node so Node represents 
    302   the end of an entire device path.  The Type field of Node is set to 
    303   END_DEVICE_PATH_TYPE, the SubType field of Node is set to 
    304   END_ENTIRE_DEVICE_PATH_SUBTYPE, and the Length field of Node is set to 
    305   END_DEVICE_PATH_LENGTH.  Node is not required to be aligned on a 16-bit boundary, 
    306   so it is recommended that a function such as WriteUnaligned16() be used to set 
    307   the contents of the Length field. 
    308 
    309   If Node is NULL, then ASSERT(). 
     301  Fills in all the fields of a device path node specified by Node so Node represents
     302  the end of an entire device path.  The Type field of Node is set to
     303  END_DEVICE_PATH_TYPE, the SubType field of Node is set to
     304  END_ENTIRE_DEVICE_PATH_SUBTYPE, and the Length field of Node is set to
     305  END_DEVICE_PATH_LENGTH.  Node is not required to be aligned on a 16-bit boundary,
     306  so it is recommended that a function such as WriteUnaligned16() be used to set
     307  the contents of the Length field.
     308
     309  If Node is NULL, then ASSERT().
    310310
    311311  @param  Node      A pointer to a device path node data structure.
     
    325325  Returns the size of a device path in bytes.
    326326
    327   This function returns the size, in bytes, of the device path data structure 
     327  This function returns the size, in bytes, of the device path data structure
    328328  specified by DevicePath including the end of device path node.
    329329  If DevicePath is NULL or invalid, then 0 is returned.
     
    368368  Creates a new copy of an existing device path.
    369369
    370   This function allocates space for a new copy of the device path specified by DevicePath. 
    371   If DevicePath is NULL, then NULL is returned.  If the memory is successfully 
    372   allocated, then the contents of DevicePath are copied to the newly allocated 
    373   buffer, and a pointer to that buffer is returned.  Otherwise, NULL is returned. 
    374   The memory for the new device path is allocated from EFI boot services memory. 
    375   It is the responsibility of the caller to free the memory allocated. 
    376  
     370  This function allocates space for a new copy of the device path specified by DevicePath.
     371  If DevicePath is NULL, then NULL is returned.  If the memory is successfully
     372  allocated, then the contents of DevicePath are copied to the newly allocated
     373  buffer, and a pointer to that buffer is returned.  Otherwise, NULL is returned.
     374  The memory for the new device path is allocated from EFI boot services memory.
     375  It is the responsibility of the caller to free the memory allocated.
     376
    377377  @param  DevicePath    A pointer to a device path data structure.
    378378
    379379  @retval NULL          DevicePath is NULL or invalid.
    380380  @retval Others        A pointer to the duplicated device path.
    381  
     381
    382382**/
    383383EFI_DEVICE_PATH_PROTOCOL *
     
    407407  Creates a new device path by appending a second device path to a first device path.
    408408
    409   This function creates a new device path by appending a copy of SecondDevicePath 
    410   to a copy of FirstDevicePath in a newly allocated buffer.  Only the end-of-device-path 
    411   device node from SecondDevicePath is retained. The newly created device path is 
    412   returned. If FirstDevicePath is NULL, then it is ignored, and a duplicate of 
    413   SecondDevicePath is returned.  If SecondDevicePath is NULL, then it is ignored, 
    414   and a duplicate of FirstDevicePath is returned. If both FirstDevicePath and 
    415   SecondDevicePath are NULL, then a copy of an end-of-device-path is returned. 
    416  
     409  This function creates a new device path by appending a copy of SecondDevicePath
     410  to a copy of FirstDevicePath in a newly allocated buffer.  Only the end-of-device-path
     411  device node from SecondDevicePath is retained. The newly created device path is
     412  returned. If FirstDevicePath is NULL, then it is ignored, and a duplicate of
     413  SecondDevicePath is returned.  If SecondDevicePath is NULL, then it is ignored,
     414  and a duplicate of FirstDevicePath is returned. If both FirstDevicePath and
     415  SecondDevicePath are NULL, then a copy of an end-of-device-path is returned.
     416
    417417  If there is not enough memory for the newly allocated buffer, then NULL is returned.
    418   The memory for the new device path is allocated from EFI boot services memory. 
     418  The memory for the new device path is allocated from EFI boot services memory.
    419419  It is the responsibility of the caller to free the memory allocated.
    420420
    421421  @param  FirstDevicePath            A pointer to a device path data structure.
    422422  @param  SecondDevicePath           A pointer to a device path data structure.
    423  
     423
    424424  @retval NULL      If there is not enough memory for the newly allocated buffer.
    425425  @retval NULL      If FirstDevicePath or SecondDevicePath is invalid.
     
    482482  Creates a new path by appending the device node to the device path.
    483483
    484   This function creates a new device path by appending a copy of the device node 
    485   specified by DevicePathNode to a copy of the device path specified by DevicePath 
    486   in an allocated buffer. The end-of-device-path device node is moved after the 
     484  This function creates a new device path by appending a copy of the device node
     485  specified by DevicePathNode to a copy of the device path specified by DevicePath
     486  in an allocated buffer. The end-of-device-path device node is moved after the
    487487  end of the appended device node.
    488488  If DevicePathNode is NULL then a copy of DevicePath is returned.
    489   If DevicePath is NULL then a copy of DevicePathNode, followed by an end-of-device 
     489  If DevicePath is NULL then a copy of DevicePathNode, followed by an end-of-device
    490490  path device node is returned.
    491   If both DevicePathNode and DevicePath are NULL then a copy of an end-of-device-path 
     491  If both DevicePathNode and DevicePath are NULL then a copy of an end-of-device-path
    492492  device node is returned.
    493   If there is not enough memory to allocate space for the new device path, then 
    494   NULL is returned. 
    495   The memory is allocated from EFI boot services memory. It is the responsibility 
     493  If there is not enough memory to allocate space for the new device path, then
     494  NULL is returned.
     495  The memory is allocated from EFI boot services memory. It is the responsibility
    496496  of the caller to free the memory allocated.
    497497
     
    501501  @retval NULL      If there is not enough memory for the new device path.
    502502  @retval Others    A pointer to the new device path if success.
    503                     A copy of DevicePathNode followed by an end-of-device-path node 
     503                    A copy of DevicePathNode followed by an end-of-device-path node
    504504                    if both FirstDevicePath and SecondDevicePath are NULL.
    505                     A copy of an end-of-device-path node if both FirstDevicePath 
     505                    A copy of an end-of-device-path node if both FirstDevicePath
    506506                    and SecondDevicePath are NULL.
    507507
     
    550550  Creates a new device path by appending the specified device path instance to the specified device
    551551  path.
    552  
    553   This function creates a new device path by appending a copy of the device path 
    554   instance specified by DevicePathInstance to a copy of the device path specified 
     552
     553  This function creates a new device path by appending a copy of the device path
     554  instance specified by DevicePathInstance to a copy of the device path specified
    555555  by DevicePath in a allocated buffer.
    556   The end-of-device-path device node is moved after the end of the appended device 
    557   path instance and a new end-of-device-path-instance node is inserted between. 
     556  The end-of-device-path device node is moved after the end of the appended device
     557  path instance and a new end-of-device-path-instance node is inserted between.
    558558  If DevicePath is NULL, then a copy if DevicePathInstance is returned.
    559559  If DevicePathInstance is NULL, then NULL is returned.
    560560  If DevicePath or DevicePathInstance is invalid, then NULL is returned.
    561   If there is not enough memory to allocate space for the new device path, then 
    562   NULL is returned. 
    563   The memory is allocated from EFI boot services memory. It is the responsibility 
     561  If there is not enough memory to allocate space for the new device path, then
     562  NULL is returned.
     563  The memory is allocated from EFI boot services memory. It is the responsibility
    564564  of the caller to free the memory allocated.
    565  
     565
    566566  @param  DevicePath                 A pointer to a device path data structure.
    567567  @param  DevicePathInstance         A pointer to a device path instance.
     
    599599  NewDevicePath = AllocatePool (SrcSize + InstanceSize);
    600600  if (NewDevicePath != NULL) {
    601    
     601
    602602    TempDevicePath = CopyMem (NewDevicePath, DevicePath, SrcSize);;
    603  
     603
    604604    while (!IsDevicePathEnd (TempDevicePath)) {
    605605      TempDevicePath = NextDevicePathNode (TempDevicePath);
    606606    }
    607    
     607
    608608    TempDevicePath->SubType  = END_INSTANCE_DEVICE_PATH_SUBTYPE;
    609609    TempDevicePath           = NextDevicePathNode (TempDevicePath);
     
    618618  instance.
    619619
    620   This function creates a copy of the current device path instance. It also updates 
    621   DevicePath to point to the next device path instance in the device path (or NULL 
     620  This function creates a copy of the current device path instance. It also updates
     621  DevicePath to point to the next device path instance in the device path (or NULL
    622622  if no more) and updates Size to hold the size of the device path instance copy.
    623623  If DevicePath is NULL, then NULL is returned.
    624624  If DevicePath points to a invalid device path, then NULL is returned.
    625   If there is not enough memory to allocate space for the new device path, then 
    626   NULL is returned. 
    627   The memory is allocated from EFI boot services memory. It is the responsibility 
     625  If there is not enough memory to allocate space for the new device path, then
     626  NULL is returned.
     627  The memory is allocated from EFI boot services memory. It is the responsibility
    628628  of the caller to free the memory allocated.
    629629  If Size is NULL, then ASSERT().
    630  
    631   @param  DevicePath                 On input, this holds the pointer to the current 
    632                                      device path instance. On output, this holds 
    633                                      the pointer to the next device path instance 
     630
     631  @param  DevicePath                 On input, this holds the pointer to the current
     632                                     device path instance. On output, this holds
     633                                     the pointer to the next device path instance
    634634                                     or NULL if there are no more device path
    635                                      instances in the device path pointer to a 
     635                                     instances in the device path pointer to a
    636636                                     device path data structure.
    637   @param  Size                       On output, this holds the size of the device 
    638                                      path instance, in bytes or zero, if DevicePath 
     637  @param  Size                       On output, this holds the size of the device
     638                                     path instance, in bytes or zero, if DevicePath
    639639                                     is NULL.
    640640
     
    676676  //
    677677  *Size = ((UINTN) DevPath - (UINTN) (*DevicePath)) + sizeof (EFI_DEVICE_PATH_PROTOCOL);
    678  
     678
    679679  //
    680680  // Make a copy and return the device path instance
     
    701701  Creates a device node.
    702702
    703   This function creates a new device node in a newly allocated buffer of size 
    704   NodeLength and initializes the device path node header with NodeType and NodeSubType. 
     703  This function creates a new device node in a newly allocated buffer of size
     704  NodeLength and initializes the device path node header with NodeType and NodeSubType.
    705705  The new device path node is returned.
    706   If NodeLength is smaller than a device path header, then NULL is returned. 
    707   If there is not enough memory to allocate space for the new device path, then 
    708   NULL is returned. 
    709   The memory is allocated from EFI boot services memory. It is the responsibility 
     706  If NodeLength is smaller than a device path header, then NULL is returned.
     707  If there is not enough memory to allocate space for the new device path, then
     708  NULL is returned.
     709  The memory is allocated from EFI boot services memory. It is the responsibility
    710710  of the caller to free the memory allocated.
    711711
     
    733733    return NULL;
    734734  }
    735  
     735
    736736  DevicePath = AllocateZeroPool (NodeLength);
    737737  if (DevicePath != NULL) {
     
    755755
    756756  @retval  TRUE                      DevicePath is multi-instance.
    757   @retval  FALSE                     DevicePath is not multi-instance, or DevicePath 
     757  @retval  FALSE                     DevicePath is not multi-instance, or DevicePath
    758758                                     is NULL or invalid.
    759759
     
    791791  Retrieves the device path protocol from a handle.
    792792
    793   This function returns the device path protocol from the handle specified by Handle. 
    794   If Handle is NULL or Handle does not contain a device path protocol, then NULL 
     793  This function returns the device path protocol from the handle specified by Handle.
     794  If Handle is NULL or Handle does not contain a device path protocol, then NULL
    795795  is returned.
    796  
    797   @param  Handle                     The handle from which to retrieve the device 
     796
     797  @param  Handle                     The handle from which to retrieve the device
    798798                                     path protocol.
    799799
     
    831831  The memory for the new device path is allocated from EFI boot services memory. It is the responsibility
    832832  of the caller to free the memory allocated.
    833  
     833
    834834  If FileName is NULL, then ASSERT().
    835835  If FileName is not aligned on a 16-bit boundary, then ASSERT().
    836836
    837   @param  Device                     A pointer to a device handle.  This parameter 
     837  @param  Device                     A pointer to a device handle.  This parameter
    838838                                     is optional and may be NULL.
    839839  @param  FileName                   A pointer to a Null-terminated Unicode string.
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.c

    r58459 r58466  
    1010
    1111  Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
    12   This program and the accompanying materials                         
    13   are licensed and made available under the terms and conditions of the BSD License         
    14   which accompanies this distribution.  The full text of the license may be found at       
    15   http://opensource.org/licenses/bsd-license.php.                                           
    16 
    17   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     
    18   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             
     12  This program and the accompanying materials
     13  are licensed and made available under the terms and conditions of the BSD License
     14  which accompanies this distribution.  The full text of the license may be found at
     15  http://opensource.org/licenses/bsd-license.php.
     16
     17  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
     18  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
    1919
    2020**/
     
    2626  Returns the size of a device path in bytes.
    2727
    28   This function returns the size, in bytes, of the device path data structure 
     28  This function returns the size, in bytes, of the device path data structure
    2929  specified by DevicePath including the end of device path node.
    3030  If DevicePath is NULL or invalid, then 0 is returned.
     
    4848  Creates a new copy of an existing device path.
    4949
    50   This function allocates space for a new copy of the device path specified by DevicePath. 
    51   If DevicePath is NULL, then NULL is returned.  If the memory is successfully 
    52   allocated, then the contents of DevicePath are copied to the newly allocated 
    53   buffer, and a pointer to that buffer is returned.  Otherwise, NULL is returned. 
    54   The memory for the new device path is allocated from EFI boot services memory. 
    55   It is the responsibility of the caller to free the memory allocated. 
    56  
     50  This function allocates space for a new copy of the device path specified by DevicePath.
     51  If DevicePath is NULL, then NULL is returned.  If the memory is successfully
     52  allocated, then the contents of DevicePath are copied to the newly allocated
     53  buffer, and a pointer to that buffer is returned.  Otherwise, NULL is returned.
     54  The memory for the new device path is allocated from EFI boot services memory.
     55  It is the responsibility of the caller to free the memory allocated.
     56
    5757  @param  DevicePath    A pointer to a device path data structure.
    5858
    5959  @retval NULL          DevicePath is NULL or invalid.
    6060  @retval Others        A pointer to the duplicated device path.
    61  
     61
    6262**/
    6363EFI_DEVICE_PATH_PROTOCOL *
     
    7373  Creates a new device path by appending a second device path to a first device path.
    7474
    75   This function creates a new device path by appending a copy of SecondDevicePath 
    76   to a copy of FirstDevicePath in a newly allocated buffer.  Only the end-of-device-path 
    77   device node from SecondDevicePath is retained. The newly created device path is 
    78   returned. If FirstDevicePath is NULL, then it is ignored, and a duplicate of 
    79   SecondDevicePath is returned.  If SecondDevicePath is NULL, then it is ignored, 
    80   and a duplicate of FirstDevicePath is returned. If both FirstDevicePath and 
    81   SecondDevicePath are NULL, then a copy of an end-of-device-path is returned. 
    82  
     75  This function creates a new device path by appending a copy of SecondDevicePath
     76  to a copy of FirstDevicePath in a newly allocated buffer.  Only the end-of-device-path
     77  device node from SecondDevicePath is retained. The newly created device path is
     78  returned. If FirstDevicePath is NULL, then it is ignored, and a duplicate of
     79  SecondDevicePath is returned.  If SecondDevicePath is NULL, then it is ignored,
     80  and a duplicate of FirstDevicePath is returned. If both FirstDevicePath and
     81  SecondDevicePath are NULL, then a copy of an end-of-device-path is returned.
     82
    8383  If there is not enough memory for the newly allocated buffer, then NULL is returned.
    84   The memory for the new device path is allocated from EFI boot services memory. 
     84  The memory for the new device path is allocated from EFI boot services memory.
    8585  It is the responsibility of the caller to free the memory allocated.
    8686
    8787  @param  FirstDevicePath            A pointer to a device path data structure.
    8888  @param  SecondDevicePath           A pointer to a device path data structure.
    89  
     89
    9090  @retval NULL      If there is not enough memory for the newly allocated buffer.
    9191  @retval NULL      If FirstDevicePath or SecondDevicePath is invalid.
     
    107107  Creates a new path by appending the device node to the device path.
    108108
    109   This function creates a new device path by appending a copy of the device node 
    110   specified by DevicePathNode to a copy of the device path specified by DevicePath 
    111   in an allocated buffer. The end-of-device-path device node is moved after the 
     109  This function creates a new device path by appending a copy of the device node
     110  specified by DevicePathNode to a copy of the device path specified by DevicePath
     111  in an allocated buffer. The end-of-device-path device node is moved after the
    112112  end of the appended device node.
    113113  If DevicePathNode is NULL then a copy of DevicePath is returned.
    114   If DevicePath is NULL then a copy of DevicePathNode, followed by an end-of-device 
     114  If DevicePath is NULL then a copy of DevicePathNode, followed by an end-of-device
    115115  path device node is returned.
    116   If both DevicePathNode and DevicePath are NULL then a copy of an end-of-device-path 
     116  If both DevicePathNode and DevicePath are NULL then a copy of an end-of-device-path
    117117  device node is returned.
    118   If there is not enough memory to allocate space for the new device path, then 
    119   NULL is returned. 
    120   The memory is allocated from EFI boot services memory. It is the responsibility 
     118  If there is not enough memory to allocate space for the new device path, then
     119  NULL is returned.
     120  The memory is allocated from EFI boot services memory. It is the responsibility
    121121  of the caller to free the memory allocated.
    122122
     
    126126  @retval NULL      If there is not enough memory for the new device path.
    127127  @retval Others    A pointer to the new device path if success.
    128                     A copy of DevicePathNode followed by an end-of-device-path node 
     128                    A copy of DevicePathNode followed by an end-of-device-path node
    129129                    if both FirstDevicePath and SecondDevicePath are NULL.
    130                     A copy of an end-of-device-path node if both FirstDevicePath 
     130                    A copy of an end-of-device-path node if both FirstDevicePath
    131131                    and SecondDevicePath are NULL.
    132132
     
    145145  Creates a new device path by appending the specified device path instance to the specified device
    146146  path.
    147  
    148   This function creates a new device path by appending a copy of the device path 
    149   instance specified by DevicePathInstance to a copy of the device path specified 
     147
     148  This function creates a new device path by appending a copy of the device path
     149  instance specified by DevicePathInstance to a copy of the device path specified
    150150  by DevicePath in a allocated buffer.
    151   The end-of-device-path device node is moved after the end of the appended device 
    152   path instance and a new end-of-device-path-instance node is inserted between. 
     151  The end-of-device-path device node is moved after the end of the appended device
     152  path instance and a new end-of-device-path-instance node is inserted between.
    153153  If DevicePath is NULL, then a copy if DevicePathInstance is returned.
    154154  If DevicePathInstance is NULL, then NULL is returned.
    155155  If DevicePath or DevicePathInstance is invalid, then NULL is returned.
    156   If there is not enough memory to allocate space for the new device path, then 
    157   NULL is returned. 
    158   The memory is allocated from EFI boot services memory. It is the responsibility 
     156  If there is not enough memory to allocate space for the new device path, then
     157  NULL is returned.
     158  The memory is allocated from EFI boot services memory. It is the responsibility
    159159  of the caller to free the memory allocated.
    160  
     160
    161161  @param  DevicePath                 A pointer to a device path data structure.
    162162  @param  DevicePathInstance         A pointer to a device path instance.
     
    179179  instance.
    180180
    181   This function creates a copy of the current device path instance. It also updates 
    182   DevicePath to point to the next device path instance in the device path (or NULL 
     181  This function creates a copy of the current device path instance. It also updates
     182  DevicePath to point to the next device path instance in the device path (or NULL
    183183  if no more) and updates Size to hold the size of the device path instance copy.
    184184  If DevicePath is NULL, then NULL is returned.
    185185  If DevicePath points to a invalid device path, then NULL is returned.
    186   If there is not enough memory to allocate space for the new device path, then 
    187   NULL is returned. 
    188   The memory is allocated from EFI boot services memory. It is the responsibility 
     186  If there is not enough memory to allocate space for the new device path, then
     187  NULL is returned.
     188  The memory is allocated from EFI boot services memory. It is the responsibility
    189189  of the caller to free the memory allocated.
    190190  If Size is NULL, then ASSERT().
    191  
    192   @param  DevicePath                 On input, this holds the pointer to the current 
    193                                      device path instance. On output, this holds 
    194                                      the pointer to the next device path instance 
     191
     192  @param  DevicePath                 On input, this holds the pointer to the current
     193                                     device path instance. On output, this holds
     194                                     the pointer to the next device path instance
    195195                                     or NULL if there are no more device path
    196                                      instances in the device path pointer to a 
     196                                     instances in the device path pointer to a
    197197                                     device path data structure.
    198   @param  Size                       On output, this holds the size of the device 
    199                                      path instance, in bytes or zero, if DevicePath 
     198  @param  Size                       On output, this holds the size of the device
     199                                     path instance, in bytes or zero, if DevicePath
    200200                                     is NULL.
    201201
     
    216216  Creates a device node.
    217217
    218   This function creates a new device node in a newly allocated buffer of size 
    219   NodeLength and initializes the device path node header with NodeType and NodeSubType. 
     218  This function creates a new device node in a newly allocated buffer of size
     219  NodeLength and initializes the device path node header with NodeType and NodeSubType.
    220220  The new device path node is returned.
    221   If NodeLength is smaller than a device path header, then NULL is returned. 
    222   If there is not enough memory to allocate space for the new device path, then 
    223   NULL is returned. 
    224   The memory is allocated from EFI boot services memory. It is the responsibility 
     221  If NodeLength is smaller than a device path header, then NULL is returned.
     222  If there is not enough memory to allocate space for the new device path, then
     223  NULL is returned.
     224  The memory is allocated from EFI boot services memory. It is the responsibility
    225225  of the caller to free the memory allocated.
    226226
     
    254254
    255255  @retval  TRUE                      DevicePath is multi-instance.
    256   @retval  FALSE                     DevicePath is not multi-instance, or DevicePath 
     256  @retval  FALSE                     DevicePath is not multi-instance, or DevicePath
    257257                                     is NULL or invalid.
    258258
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.h

    r58464 r58466  
    155155  Returns the size of a device path in bytes.
    156156
    157   This function returns the size, in bytes, of the device path data structure 
     157  This function returns the size, in bytes, of the device path data structure
    158158  specified by DevicePath including the end of device path node.
    159159  If DevicePath is NULL or invalid, then 0 is returned.
     
    174174  Creates a new copy of an existing device path.
    175175
    176   This function allocates space for a new copy of the device path specified by DevicePath. 
    177   If DevicePath is NULL, then NULL is returned.  If the memory is successfully 
    178   allocated, then the contents of DevicePath are copied to the newly allocated 
    179   buffer, and a pointer to that buffer is returned.  Otherwise, NULL is returned. 
    180   The memory for the new device path is allocated from EFI boot services memory. 
    181   It is the responsibility of the caller to free the memory allocated. 
    182  
     176  This function allocates space for a new copy of the device path specified by DevicePath.
     177  If DevicePath is NULL, then NULL is returned.  If the memory is successfully
     178  allocated, then the contents of DevicePath are copied to the newly allocated
     179  buffer, and a pointer to that buffer is returned.  Otherwise, NULL is returned.
     180  The memory for the new device path is allocated from EFI boot services memory.
     181  It is the responsibility of the caller to free the memory allocated.
     182
    183183  @param  DevicePath    A pointer to a device path data structure.
    184184
    185185  @retval NULL          DevicePath is NULL or invalid.
    186186  @retval Others        A pointer to the duplicated device path.
    187  
     187
    188188**/
    189189EFI_DEVICE_PATH_PROTOCOL *
     
    196196  Creates a new device path by appending a second device path to a first device path.
    197197
    198   This function creates a new device path by appending a copy of SecondDevicePath 
    199   to a copy of FirstDevicePath in a newly allocated buffer.  Only the end-of-device-path 
    200   device node from SecondDevicePath is retained. The newly created device path is 
    201   returned. If FirstDevicePath is NULL, then it is ignored, and a duplicate of 
    202   SecondDevicePath is returned.  If SecondDevicePath is NULL, then it is ignored, 
    203   and a duplicate of FirstDevicePath is returned. If both FirstDevicePath and 
    204   SecondDevicePath are NULL, then a copy of an end-of-device-path is returned. 
    205  
     198  This function creates a new device path by appending a copy of SecondDevicePath
     199  to a copy of FirstDevicePath in a newly allocated buffer.  Only the end-of-device-path
     200  device node from SecondDevicePath is retained. The newly created device path is
     201  returned. If FirstDevicePath is NULL, then it is ignored, and a duplicate of
     202  SecondDevicePath is returned.  If SecondDevicePath is NULL, then it is ignored,
     203  and a duplicate of FirstDevicePath is returned. If both FirstDevicePath and
     204  SecondDevicePath are NULL, then a copy of an end-of-device-path is returned.
     205
    206206  If there is not enough memory for the newly allocated buffer, then NULL is returned.
    207   The memory for the new device path is allocated from EFI boot services memory. 
     207  The memory for the new device path is allocated from EFI boot services memory.
    208208  It is the responsibility of the caller to free the memory allocated.
    209209
    210210  @param  FirstDevicePath            A pointer to a device path data structure.
    211211  @param  SecondDevicePath           A pointer to a device path data structure.
    212  
     212
    213213  @retval NULL      If there is not enough memory for the newly allocated buffer.
    214214  @retval NULL      If FirstDevicePath or SecondDevicePath is invalid.
     
    227227  Creates a new path by appending the device node to the device path.
    228228
    229   This function creates a new device path by appending a copy of the device node 
    230   specified by DevicePathNode to a copy of the device path specified by DevicePath 
    231   in an allocated buffer. The end-of-device-path device node is moved after the 
     229  This function creates a new device path by appending a copy of the device node
     230  specified by DevicePathNode to a copy of the device path specified by DevicePath
     231  in an allocated buffer. The end-of-device-path device node is moved after the
    232232  end of the appended device node.
    233233  If DevicePathNode is NULL then a copy of DevicePath is returned.
    234   If DevicePath is NULL then a copy of DevicePathNode, followed by an end-of-device 
     234  If DevicePath is NULL then a copy of DevicePathNode, followed by an end-of-device
    235235  path device node is returned.
    236   If both DevicePathNode and DevicePath are NULL then a copy of an end-of-device-path 
     236  If both DevicePathNode and DevicePath are NULL then a copy of an end-of-device-path
    237237  device node is returned.
    238   If there is not enough memory to allocate space for the new device path, then 
    239   NULL is returned. 
    240   The memory is allocated from EFI boot services memory. It is the responsibility 
     238  If there is not enough memory to allocate space for the new device path, then
     239  NULL is returned.
     240  The memory is allocated from EFI boot services memory. It is the responsibility
    241241  of the caller to free the memory allocated.
    242242
     
    246246  @retval NULL      If there is not enough memory for the new device path.
    247247  @retval Others    A pointer to the new device path if success.
    248                     A copy of DevicePathNode followed by an end-of-device-path node 
     248                    A copy of DevicePathNode followed by an end-of-device-path node
    249249                    if both FirstDevicePath and SecondDevicePath are NULL.
    250                     A copy of an end-of-device-path node if both FirstDevicePath 
     250                    A copy of an end-of-device-path node if both FirstDevicePath
    251251                    and SecondDevicePath are NULL.
    252252
     
    262262  Creates a new device path by appending the specified device path instance to the specified device
    263263  path.
    264  
    265   This function creates a new device path by appending a copy of the device path 
    266   instance specified by DevicePathInstance to a copy of the device path specified 
     264
     265  This function creates a new device path by appending a copy of the device path
     266  instance specified by DevicePathInstance to a copy of the device path specified
    267267  by DevicePath in a allocated buffer.
    268   The end-of-device-path device node is moved after the end of the appended device 
    269   path instance and a new end-of-device-path-instance node is inserted between. 
     268  The end-of-device-path device node is moved after the end of the appended device
     269  path instance and a new end-of-device-path-instance node is inserted between.
    270270  If DevicePath is NULL, then a copy if DevicePathInstance is returned.
    271271  If DevicePathInstance is NULL, then NULL is returned.
    272272  If DevicePath or DevicePathInstance is invalid, then NULL is returned.
    273   If there is not enough memory to allocate space for the new device path, then 
    274   NULL is returned. 
    275   The memory is allocated from EFI boot services memory. It is the responsibility 
     273  If there is not enough memory to allocate space for the new device path, then
     274  NULL is returned.
     275  The memory is allocated from EFI boot services memory. It is the responsibility
    276276  of the caller to free the memory allocated.
    277  
     277
    278278  @param  DevicePath                 A pointer to a device path data structure.
    279279  @param  DevicePathInstance         A pointer to a device path instance.
     
    293293  instance.
    294294
    295   This function creates a copy of the current device path instance. It also updates 
    296   DevicePath to point to the next device path instance in the device path (or NULL 
     295  This function creates a copy of the current device path instance. It also updates
     296  DevicePath to point to the next device path instance in the device path (or NULL
    297297  if no more) and updates Size to hold the size of the device path instance copy.
    298298  If DevicePath is NULL, then NULL is returned.
    299299  If DevicePath points to a invalid device path, then NULL is returned.
    300   If there is not enough memory to allocate space for the new device path, then 
    301   NULL is returned. 
    302   The memory is allocated from EFI boot services memory. It is the responsibility 
     300  If there is not enough memory to allocate space for the new device path, then
     301  NULL is returned.
     302  The memory is allocated from EFI boot services memory. It is the responsibility
    303303  of the caller to free the memory allocated.
    304304  If Size is NULL, then ASSERT().
    305  
    306   @param  DevicePath                 On input, this holds the pointer to the current 
    307                                      device path instance. On output, this holds 
    308                                      the pointer to the next device path instance 
     305
     306  @param  DevicePath                 On input, this holds the pointer to the current
     307                                     device path instance. On output, this holds
     308                                     the pointer to the next device path instance
    309309                                     or NULL if there are no more device path
    310                                      instances in the device path pointer to a 
     310                                     instances in the device path pointer to a
    311311                                     device path data structure.
    312   @param  Size                       On output, this holds the size of the device 
    313                                      path instance, in bytes or zero, if DevicePath 
     312  @param  Size                       On output, this holds the size of the device
     313                                     path instance, in bytes or zero, if DevicePath
    314314                                     is NULL.
    315315
     
    327327  Creates a device node.
    328328
    329   This function creates a new device node in a newly allocated buffer of size 
    330   NodeLength and initializes the device path node header with NodeType and NodeSubType. 
     329  This function creates a new device node in a newly allocated buffer of size
     330  NodeLength and initializes the device path node header with NodeType and NodeSubType.
    331331  The new device path node is returned.
    332   If NodeLength is smaller than a device path header, then NULL is returned. 
    333   If there is not enough memory to allocate space for the new device path, then 
    334   NULL is returned. 
    335   The memory is allocated from EFI boot services memory. It is the responsibility 
     332  If NodeLength is smaller than a device path header, then NULL is returned.
     333  If there is not enough memory to allocate space for the new device path, then
     334  NULL is returned.
     335  The memory is allocated from EFI boot services memory. It is the responsibility
    336336  of the caller to free the memory allocated.
    337337
     
    362362
    363363  @retval  TRUE                      DevicePath is multi-instance.
    364   @retval  FALSE                     DevicePath is not multi-instance, or DevicePath 
     364  @retval  FALSE                     DevicePath is not multi-instance, or DevicePath
    365365                                     is NULL or invalid.
    366366
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/UefiDevicePathLib/UefiDevicePathLibOptionalDevicePathProtocol.c

    r58464 r58466  
    1010
    1111  Copyright (c) 2013, Intel Corporation. All rights reserved.<BR>
    12   This program and the accompanying materials                         
    13   are licensed and made available under the terms and conditions of the BSD License         
    14   which accompanies this distribution.  The full text of the license may be found at       
    15   http://opensource.org/licenses/bsd-license.php.                                           
    16 
    17   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     
    18   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             
     12  This program and the accompanying materials
     13  are licensed and made available under the terms and conditions of the BSD License
     14  which accompanies this distribution.  The full text of the license may be found at
     15  http://opensource.org/licenses/bsd-license.php.
     16
     17  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
     18  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
    1919
    2020**/
     
    3030  The constructor function caches the pointer to DevicePathUtilites protocol,
    3131  DevicePathToText protocol and DevicePathFromText protocol.
    32  
     32
    3333  The constructor function locates these three protocols from protocol database.
    3434  It will caches the pointer to local protocol instance if that operation fails
    35   and it will always return EFI_SUCCESS. 
     35  and it will always return EFI_SUCCESS.
    3636
    3737  @param  ImageHandle   The firmware allocated handle for the EFI image.
    3838  @param  SystemTable   A pointer to the EFI System Table.
    39  
     39
    4040  @retval EFI_SUCCESS   The constructor always returns EFI_SUCCESS.
    4141
     
    6363  Returns the size of a device path in bytes.
    6464
    65   This function returns the size, in bytes, of the device path data structure 
     65  This function returns the size, in bytes, of the device path data structure
    6666  specified by DevicePath including the end of device path node.
    6767  If DevicePath is NULL or invalid, then 0 is returned.
     
    8989  Creates a new copy of an existing device path.
    9090
    91   This function allocates space for a new copy of the device path specified by DevicePath. 
    92   If DevicePath is NULL, then NULL is returned.  If the memory is successfully 
    93   allocated, then the contents of DevicePath are copied to the newly allocated 
    94   buffer, and a pointer to that buffer is returned.  Otherwise, NULL is returned. 
    95   The memory for the new device path is allocated from EFI boot services memory. 
    96   It is the responsibility of the caller to free the memory allocated. 
    97  
     91  This function allocates space for a new copy of the device path specified by DevicePath.
     92  If DevicePath is NULL, then NULL is returned.  If the memory is successfully
     93  allocated, then the contents of DevicePath are copied to the newly allocated
     94  buffer, and a pointer to that buffer is returned.  Otherwise, NULL is returned.
     95  The memory for the new device path is allocated from EFI boot services memory.
     96  It is the responsibility of the caller to free the memory allocated.
     97
    9898  @param  DevicePath    A pointer to a device path data structure.
    9999
    100100  @retval NULL          DevicePath is NULL or invalid.
    101101  @retval Others        A pointer to the duplicated device path.
    102  
     102
    103103**/
    104104EFI_DEVICE_PATH_PROTOCOL *
     
    118118  Creates a new device path by appending a second device path to a first device path.
    119119
    120   This function creates a new device path by appending a copy of SecondDevicePath 
    121   to a copy of FirstDevicePath in a newly allocated buffer.  Only the end-of-device-path 
    122   device node from SecondDevicePath is retained. The newly created device path is 
    123   returned. If FirstDevicePath is NULL, then it is ignored, and a duplicate of 
    124   SecondDevicePath is returned.  If SecondDevicePath is NULL, then it is ignored, 
    125   and a duplicate of FirstDevicePath is returned. If both FirstDevicePath and 
    126   SecondDevicePath are NULL, then a copy of an end-of-device-path is returned. 
    127  
     120  This function creates a new device path by appending a copy of SecondDevicePath
     121  to a copy of FirstDevicePath in a newly allocated buffer.  Only the end-of-device-path
     122  device node from SecondDevicePath is retained. The newly created device path is
     123  returned. If FirstDevicePath is NULL, then it is ignored, and a duplicate of
     124  SecondDevicePath is returned.  If SecondDevicePath is NULL, then it is ignored,
     125  and a duplicate of FirstDevicePath is returned. If both FirstDevicePath and
     126  SecondDevicePath are NULL, then a copy of an end-of-device-path is returned.
     127
    128128  If there is not enough memory for the newly allocated buffer, then NULL is returned.
    129   The memory for the new device path is allocated from EFI boot services memory. 
     129  The memory for the new device path is allocated from EFI boot services memory.
    130130  It is the responsibility of the caller to free the memory allocated.
    131131
    132132  @param  FirstDevicePath            A pointer to a device path data structure.
    133133  @param  SecondDevicePath           A pointer to a device path data structure.
    134  
     134
    135135  @retval NULL      If there is not enough memory for the newly allocated buffer.
    136136  @retval NULL      If FirstDevicePath or SecondDevicePath is invalid.
     
    156156  Creates a new path by appending the device node to the device path.
    157157
    158   This function creates a new device path by appending a copy of the device node 
    159   specified by DevicePathNode to a copy of the device path specified by DevicePath 
    160   in an allocated buffer. The end-of-device-path device node is moved after the 
     158  This function creates a new device path by appending a copy of the device node
     159  specified by DevicePathNode to a copy of the device path specified by DevicePath
     160  in an allocated buffer. The end-of-device-path device node is moved after the
    161161  end of the appended device node.
    162162  If DevicePathNode is NULL then a copy of DevicePath is returned.
    163   If DevicePath is NULL then a copy of DevicePathNode, followed by an end-of-device 
     163  If DevicePath is NULL then a copy of DevicePathNode, followed by an end-of-device
    164164  path device node is returned.
    165   If both DevicePathNode and DevicePath are NULL then a copy of an end-of-device-path 
     165  If both DevicePathNode and DevicePath are NULL then a copy of an end-of-device-path
    166166  device node is returned.
    167   If there is not enough memory to allocate space for the new device path, then 
    168   NULL is returned. 
    169   The memory is allocated from EFI boot services memory. It is the responsibility 
     167  If there is not enough memory to allocate space for the new device path, then
     168  NULL is returned.
     169  The memory is allocated from EFI boot services memory. It is the responsibility
    170170  of the caller to free the memory allocated.
    171171
     
    175175  @retval NULL      If there is not enough memory for the new device path.
    176176  @retval Others    A pointer to the new device path if success.
    177                     A copy of DevicePathNode followed by an end-of-device-path node 
     177                    A copy of DevicePathNode followed by an end-of-device-path node
    178178                    if both FirstDevicePath and SecondDevicePath are NULL.
    179                     A copy of an end-of-device-path node if both FirstDevicePath 
     179                    A copy of an end-of-device-path node if both FirstDevicePath
    180180                    and SecondDevicePath are NULL.
    181181
     
    198198  Creates a new device path by appending the specified device path instance to the specified device
    199199  path.
    200  
    201   This function creates a new device path by appending a copy of the device path 
    202   instance specified by DevicePathInstance to a copy of the device path specified 
     200
     201  This function creates a new device path by appending a copy of the device path
     202  instance specified by DevicePathInstance to a copy of the device path specified
    203203  by DevicePath in a allocated buffer.
    204   The end-of-device-path device node is moved after the end of the appended device 
    205   path instance and a new end-of-device-path-instance node is inserted between. 
     204  The end-of-device-path device node is moved after the end of the appended device
     205  path instance and a new end-of-device-path-instance node is inserted between.
    206206  If DevicePath is NULL, then a copy if DevicePathInstance is returned.
    207207  If DevicePathInstance is NULL, then NULL is returned.
    208208  If DevicePath or DevicePathInstance is invalid, then NULL is returned.
    209   If there is not enough memory to allocate space for the new device path, then 
    210   NULL is returned. 
    211   The memory is allocated from EFI boot services memory. It is the responsibility 
     209  If there is not enough memory to allocate space for the new device path, then
     210  NULL is returned.
     211  The memory is allocated from EFI boot services memory. It is the responsibility
    212212  of the caller to free the memory allocated.
    213  
     213
    214214  @param  DevicePath                 A pointer to a device path data structure.
    215215  @param  DevicePathInstance         A pointer to a device path instance.
     
    236236  instance.
    237237
    238   This function creates a copy of the current device path instance. It also updates 
    239   DevicePath to point to the next device path instance in the device path (or NULL 
     238  This function creates a copy of the current device path instance. It also updates
     239  DevicePath to point to the next device path instance in the device path (or NULL
    240240  if no more) and updates Size to hold the size of the device path instance copy.
    241241  If DevicePath is NULL, then NULL is returned.
    242242  If DevicePath points to a invalid device path, then NULL is returned.
    243   If there is not enough memory to allocate space for the new device path, then 
    244   NULL is returned. 
    245   The memory is allocated from EFI boot services memory. It is the responsibility 
     243  If there is not enough memory to allocate space for the new device path, then
     244  NULL is returned.
     245  The memory is allocated from EFI boot services memory. It is the responsibility
    246246  of the caller to free the memory allocated.
    247247  If Size is NULL, then ASSERT().
    248  
    249   @param  DevicePath                 On input, this holds the pointer to the current 
    250                                      device path instance. On output, this holds 
    251                                      the pointer to the next device path instance 
     248
     249  @param  DevicePath                 On input, this holds the pointer to the current
     250                                     device path instance. On output, this holds
     251                                     the pointer to the next device path instance
    252252                                     or NULL if there are no more device path
    253                                      instances in the device path pointer to a 
     253                                     instances in the device path pointer to a
    254254                                     device path data structure.
    255   @param  Size                       On output, this holds the size of the device 
    256                                      path instance, in bytes or zero, if DevicePath 
     255  @param  Size                       On output, this holds the size of the device
     256                                     path instance, in bytes or zero, if DevicePath
    257257                                     is NULL.
    258258
     
    277277  Creates a device node.
    278278
    279   This function creates a new device node in a newly allocated buffer of size 
    280   NodeLength and initializes the device path node header with NodeType and NodeSubType. 
     279  This function creates a new device node in a newly allocated buffer of size
     280  NodeLength and initializes the device path node header with NodeType and NodeSubType.
    281281  The new device path node is returned.
    282   If NodeLength is smaller than a device path header, then NULL is returned. 
    283   If there is not enough memory to allocate space for the new device path, then 
    284   NULL is returned. 
    285   The memory is allocated from EFI boot services memory. It is the responsibility 
     282  If NodeLength is smaller than a device path header, then NULL is returned.
     283  If there is not enough memory to allocate space for the new device path, then
     284  NULL is returned.
     285  The memory is allocated from EFI boot services memory. It is the responsibility
    286286  of the caller to free the memory allocated.
    287287
     
    319319
    320320  @retval  TRUE                      DevicePath is multi-instance.
    321   @retval  FALSE                     DevicePath is not multi-instance, or DevicePath 
     321  @retval  FALSE                     DevicePath is not multi-instance, or DevicePath
    322322                                     is NULL or invalid.
    323323
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/UefiDevicePathLibDevicePathProtocol/UefiDevicePathLib.c

    r58459 r58466  
    4747/**
    4848  The constructor function caches the pointer to DevicePathUtilites protocol.
    49  
     49
    5050  The constructor function locates DevicePathUtilities protocol from protocol database.
    51   It will ASSERT() if that operation fails and it will always return EFI_SUCCESS. 
     51  It will ASSERT() if that operation fails and it will always return EFI_SUCCESS.
    5252
    5353  @param  ImageHandle   The firmware allocated handle for the EFI image.
    5454  @param  SystemTable   A pointer to the EFI System Table.
    55  
     55
    5656  @retval EFI_SUCCESS   The constructor always returns EFI_SUCCESS.
    5757
     
    178178  Returns the 16-bit Length field of a device path node.
    179179
    180   Returns the 16-bit Length field of the device path node specified by Node. 
     180  Returns the 16-bit Length field of the device path node specified by Node.
    181181  Node is not required to be aligned on a 16-bit boundary, so it is recommended
    182   that a function such as ReadUnaligned16() be used to extract the contents of 
     182  that a function such as ReadUnaligned16() be used to extract the contents of
    183183  the Length field.
    184184
     
    203203  Returns a pointer to the next node in a device path.
    204204
    205   Returns a pointer to the device path node that follows the device path node 
     205  Returns a pointer to the device path node that follows the device path node
    206206  specified by Node.
    207207
     
    210210  @param  Node      A pointer to a device path node data structure.
    211211
    212   @return a pointer to the device path node that follows the device path node 
     212  @return a pointer to the device path node that follows the device path node
    213213  specified by Node.
    214214
     
    226226/**
    227227  Determines if a device path node is an end node of a device path.
    228   This includes nodes that are the end of a device path instance and nodes that 
     228  This includes nodes that are the end of a device path instance and nodes that
    229229  are the end of an entire device path.
    230230
    231   Determines if the device path node specified by Node is an end node of a device path. 
    232   This includes nodes that are the end of a device path instance and nodes that are the 
    233   end of an entire device path.  If Node represents an end node of a device path, 
     231  Determines if the device path node specified by Node is an end node of a device path.
     232  This includes nodes that are the end of a device path instance and nodes that are the
     233  end of an entire device path.  If Node represents an end node of a device path,
    234234  then TRUE is returned.  Otherwise, FALSE is returned.
    235235
     
    239239
    240240  @retval TRUE      The device path node specified by Node is an end node of a device path.
    241   @retval FALSE     The device path node specified by Node is not an end node of 
     241  @retval FALSE     The device path node specified by Node is not an end node of
    242242                    a device path.
    243  
     243
    244244**/
    245245BOOLEAN
     
    256256  Determines if a device path node is an end node of an entire device path.
    257257
    258   Determines if a device path node specified by Node is an end node of an entire 
     258  Determines if a device path node specified by Node is an end node of an entire
    259259  device path.
    260   If Node represents the end of an entire device path, then TRUE is returned. 
     260  If Node represents the end of an entire device path, then TRUE is returned.
    261261  Otherwise, FALSE is returned.
    262262
     
    282282  Determines if a device path node is an end node of a device path instance.
    283283
    284   Determines if a device path node specified by Node is an end node of a device 
     284  Determines if a device path node specified by Node is an end node of a device
    285285  path instance.
    286   If Node represents the end of a device path instance, then TRUE is returned. 
     286  If Node represents the end of a device path instance, then TRUE is returned.
    287287  Otherwise, FALSE is returned.
    288288
     
    291291  @param  Node      A pointer to a device path node data structure.
    292292
    293   @retval TRUE      The device path node specified by Node is the end of a device 
     293  @retval TRUE      The device path node specified by Node is the end of a device
    294294  path instance.
    295   @retval FALSE     The device path node specified by Node is not the end of a 
     295  @retval FALSE     The device path node specified by Node is not the end of a
    296296  device path instance.
    297297
     
    310310  Sets the length, in bytes, of a device path node.
    311311
    312   Sets the length of the device path node specified by Node to the value specified 
    313   by NodeLength.  NodeLength is returned.  Node is not required to be aligned on 
     312  Sets the length of the device path node specified by Node to the value specified
     313  by NodeLength.  NodeLength is returned.  Node is not required to be aligned on
    314314  a 16-bit boundary, so it is recommended that a function such as WriteUnaligned16()
    315315  be used to set the contents of the Length field.
     
    340340  Fills in all the fields of a device path node that is the end of an entire device path.
    341341
    342   Fills in all the fields of a device path node specified by Node so Node represents 
    343   the end of an entire device path.  The Type field of Node is set to 
    344   END_DEVICE_PATH_TYPE, the SubType field of Node is set to 
    345   END_ENTIRE_DEVICE_PATH_SUBTYPE, and the Length field of Node is set to 
    346   END_DEVICE_PATH_LENGTH.  Node is not required to be aligned on a 16-bit boundary, 
    347   so it is recommended that a function such as WriteUnaligned16() be used to set 
    348   the contents of the Length field. 
    349 
    350   If Node is NULL, then ASSERT(). 
     342  Fills in all the fields of a device path node specified by Node so Node represents
     343  the end of an entire device path.  The Type field of Node is set to
     344  END_DEVICE_PATH_TYPE, the SubType field of Node is set to
     345  END_ENTIRE_DEVICE_PATH_SUBTYPE, and the Length field of Node is set to
     346  END_DEVICE_PATH_LENGTH.  Node is not required to be aligned on a 16-bit boundary,
     347  so it is recommended that a function such as WriteUnaligned16() be used to set
     348  the contents of the Length field.
     349
     350  If Node is NULL, then ASSERT().
    351351
    352352  @param  Node      A pointer to a device path node data structure.
     
    366366  Returns the size of a device path in bytes.
    367367
    368   This function returns the size, in bytes, of the device path data structure 
     368  This function returns the size, in bytes, of the device path data structure
    369369  specified by DevicePath including the end of device path node.
    370370  If DevicePath is NULL or invalid, then 0 is returned.
     
    388388  Creates a new copy of an existing device path.
    389389
    390   This function allocates space for a new copy of the device path specified by 
    391   DevicePath.  If DevicePath is NULL, then NULL is returned. 
     390  This function allocates space for a new copy of the device path specified by
     391  DevicePath.  If DevicePath is NULL, then NULL is returned.
    392392  If the memory is successfully allocated, then the
    393393  contents of DevicePath are copied to the newly allocated buffer, and a pointer to that buffer
    394   is returned.  Otherwise, NULL is returned. 
    395   The memory for the new device path is allocated from EFI boot services memory. 
    396   It is the responsibility of the caller to free the memory allocated. 
    397  
     394  is returned.  Otherwise, NULL is returned.
     395  The memory for the new device path is allocated from EFI boot services memory.
     396  It is the responsibility of the caller to free the memory allocated.
     397
    398398  @param  DevicePath                 A pointer to a device path data structure.
    399399
    400400  @retval NULL    If DevicePath is NULL or invalid.
    401401  @retval Others  A pointer to the duplicated device path.
    402  
     402
    403403**/
    404404EFI_DEVICE_PATH_PROTOCOL *
     
    416416  This function creates a new device path by appending a copy of SecondDevicePath to a copy of
    417417  FirstDevicePath in a newly allocated buffer.  Only the end-of-device-path device node from
    418   SecondDevicePath is retained. The newly created device path is returned. 
    419   If FirstDevicePath is NULL, then it is ignored, and a duplicate of SecondDevicePath is returned. 
    420   If SecondDevicePath is NULL, then it is ignored, and a duplicate of FirstDevicePath is returned. 
     418  SecondDevicePath is retained. The newly created device path is returned.
     419  If FirstDevicePath is NULL, then it is ignored, and a duplicate of SecondDevicePath is returned.
     420  If SecondDevicePath is NULL, then it is ignored, and a duplicate of FirstDevicePath is returned.
    421421  If both FirstDevicePath and SecondDevicePath are NULL, then a copy of an end-of-device-path is
    422   returned. 
     422  returned.
    423423  If there is not enough memory for the newly allocated buffer, then NULL is returned.
    424424  The memory for the new device path is allocated from EFI boot services memory. It is the
     
    427427  @param  FirstDevicePath            A pointer to a device path data structure.
    428428  @param  SecondDevicePath           A pointer to a device path data structure.
    429  
     429
    430430  @retval NULL      If there is not enough memory for the newly allocated buffer.
    431431  @retval NULL      If FirstDevicePath or SecondDevicePath is invalid.
    432432  @retval Others    A pointer to the new device path if success.
    433                     Or a copy an end-of-device-path if both FirstDevicePath and 
     433                    Or a copy an end-of-device-path if both FirstDevicePath and
    434434                    SecondDevicePath are NULL.
    435435
     
    448448  Creates a new path by appending the device node to the device path.
    449449
    450   This function creates a new device path by appending a copy of the device node 
    451   specified by DevicePathNode to a copy of the device path specified by DevicePath 
     450  This function creates a new device path by appending a copy of the device node
     451  specified by DevicePathNode to a copy of the device path specified by DevicePath
    452452  in an allocated buffer.
    453453  The end-of-device-path device node is moved after the end of the appended device node.
    454454  If DevicePathNode is NULL then a copy of DevicePath is returned.
    455   If DevicePath is NULL then a copy of DevicePathNode, followed by an end-of-device 
     455  If DevicePath is NULL then a copy of DevicePathNode, followed by an end-of-device
    456456  path device node is returned.
    457   If both DevicePathNode and DevicePath are NULL then a copy of an end-of-device-path 
     457  If both DevicePathNode and DevicePath are NULL then a copy of an end-of-device-path
    458458  device node is returned.
    459   If there is not enough memory to allocate space for the new device path, then 
    460   NULL is returned. 
    461   The memory is allocated from EFI boot services memory. It is the responsibility 
     459  If there is not enough memory to allocate space for the new device path, then
     460  NULL is returned.
     461  The memory is allocated from EFI boot services memory. It is the responsibility
    462462  of the caller to free the memory allocated.
    463463
     
    467467  @retval NULL      If there is not enough memory for the new device path.
    468468  @retval Others    A pointer to the new device path if success.
    469                     A copy of DevicePathNode followed by an end-of-device-path node 
     469                    A copy of DevicePathNode followed by an end-of-device-path node
    470470                    if both FirstDevicePath and SecondDevicePath are NULL.
    471                     A copy of an end-of-device-path node if both FirstDevicePath 
     471                    A copy of an end-of-device-path node if both FirstDevicePath
    472472                    and SecondDevicePath are NULL.
    473473
     
    484484
    485485/**
    486   Creates a new device path by appending the specified device path instance to 
     486  Creates a new device path by appending the specified device path instance to
    487487  the specified device path.
    488  
    489   This function creates a new device path by appending a copy of the device path 
    490   instance specified by DevicePathInstance to a copy of the device path specified 
     488
     489  This function creates a new device path by appending a copy of the device path
     490  instance specified by DevicePathInstance to a copy of the device path specified
    491491  by DevicePath in a allocated buffer.
    492   The end-of-device-path device node is moved after the end of the appended device 
    493   path instance and a new end-of-device-path-instance node is inserted between. 
     492  The end-of-device-path device node is moved after the end of the appended device
     493  path instance and a new end-of-device-path-instance node is inserted between.
    494494  If DevicePath is NULL, then a copy if DevicePathInstance is returned.
    495495  If DevicePathInstance is NULL, then NULL is returned.
    496496  If DevicePath or DevicePathInstance is invalid, then NULL is returned.
    497   If there is not enough memory to allocate space for the new device path, then 
    498   NULL is returned.   
    499   The memory is allocated from EFI boot services memory. It is the responsibility 
     497  If there is not enough memory to allocate space for the new device path, then
     498  NULL is returned.
     499  The memory is allocated from EFI boot services memory. It is the responsibility
    500500  of the caller to free the memory allocated.
    501  
     501
    502502  @param  DevicePath                 A pointer to a device path data structure.
    503503  @param  DevicePathInstance         A pointer to a device path instance.
     
    517517
    518518/**
    519   Creates a copy of the current device path instance and returns a pointer to the 
     519  Creates a copy of the current device path instance and returns a pointer to the
    520520  next device path instance.
    521521
    522   This function creates a copy of the current device path instance. It also updates 
    523   DevicePath to point to the next device path instance in the device path (or NULL 
     522  This function creates a copy of the current device path instance. It also updates
     523  DevicePath to point to the next device path instance in the device path (or NULL
    524524  if no more) and updates Size to hold the size of the device path instance copy.
    525525  If DevicePath is NULL, then NULL is returned.
    526   If there is not enough memory to allocate space for the new device path, then 
    527   NULL is returned. 
    528   The memory is allocated from EFI boot services memory. It is the responsibility 
     526  If there is not enough memory to allocate space for the new device path, then
     527  NULL is returned.
     528  The memory is allocated from EFI boot services memory. It is the responsibility
    529529  of the caller to free the memory allocated.
    530530  If Size is NULL, then ASSERT().
    531  
    532   @param  DevicePath                 On input, this holds the pointer to the current 
    533                                      device path instance. On output, this holds 
    534                                      the pointer to the next device path instance 
     531
     532  @param  DevicePath                 On input, this holds the pointer to the current
     533                                     device path instance. On output, this holds
     534                                     the pointer to the next device path instance
    535535                                     or NULL if there are no more device path
    536                                      instances in the device path pointer to a 
     536                                     instances in the device path pointer to a
    537537                                     device path data structure.
    538   @param  Size                       On output, this holds the size of the device 
    539                                      path instance, in bytes or zero, if DevicePath 
     538  @param  Size                       On output, this holds the size of the device
     539                                     path instance, in bytes or zero, if DevicePath
    540540                                     is NULL.
    541541
     
    557557  Creates a device node.
    558558
    559   This function creates a new device node in a newly allocated buffer of size 
    560   NodeLength and initializes the device path node header with NodeType and NodeSubType. 
     559  This function creates a new device node in a newly allocated buffer of size
     560  NodeLength and initializes the device path node header with NodeType and NodeSubType.
    561561  The new device path node is returned.
    562   If NodeLength is smaller than a device path header, then NULL is returned. 
    563   If there is not enough memory to allocate space for the new device path, then 
    564   NULL is returned. 
    565   The memory is allocated from EFI boot services memory. It is the responsibility 
     562  If NodeLength is smaller than a device path header, then NULL is returned.
     563  If there is not enough memory to allocate space for the new device path, then
     564  NULL is returned.
     565  The memory is allocated from EFI boot services memory. It is the responsibility
    566566  of the caller to free the memory allocated.
    567567
     
    595595
    596596  @retval  TRUE                      DevicePath is multi-instance.
    597   @retval  FALSE                     DevicePath is not multi-instance, or DevicePath 
     597  @retval  FALSE                     DevicePath is not multi-instance, or DevicePath
    598598                                     is NULL or invalid.
    599599
     
    611611  Retrieves the device path protocol from a handle.
    612612
    613   This function returns the device path protocol from the handle specified by Handle. 
    614   If Handle is NULL or Handle does not contain a device path protocol, then NULL 
     613  This function returns the device path protocol from the handle specified by Handle.
     614  If Handle is NULL or Handle does not contain a device path protocol, then NULL
    615615  is returned.
    616  
    617   @param  Handle                     The handle from which to retrieve the device 
     616
     617  @param  Handle                     The handle from which to retrieve the device
    618618                                     path protocol.
    619619
     
    644644  Allocates a device path for a file and appends it to an existing device path.
    645645
    646   If Device is a valid device handle that contains a device path protocol, then 
    647   a device path for the file specified by FileName  is allocated and appended to 
    648   the device path associated with the handle Device.  The allocated device path 
    649   is returned.  If Device is NULL or Device is a handle that does not support the 
    650   device path protocol, then a device path containing a single device path node 
     646  If Device is a valid device handle that contains a device path protocol, then
     647  a device path for the file specified by FileName  is allocated and appended to
     648  the device path associated with the handle Device.  The allocated device path
     649  is returned.  If Device is NULL or Device is a handle that does not support the
     650  device path protocol, then a device path containing a single device path node
    651651  for the file specified by FileName is allocated and returned.
    652   The memory for the new device path is allocated from EFI boot services memory. 
     652  The memory for the new device path is allocated from EFI boot services memory.
    653653  It is the responsibility of the caller to free the memory allocated.
    654  
     654
    655655  If FileName is NULL, then ASSERT().
    656656  If FileName is not aligned on a 16-bit boundary, then ASSERT().
    657657
    658   @param  Device                     A pointer to a device handle.  This parameter 
     658  @param  Device                     A pointer to a device handle.  This parameter
    659659                                     is optional and may be NULL.
    660660  @param  FileName                   A pointer to a Null-terminated Unicode string.
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/UefiDriverEntryPoint/DriverEntryPoint.c

    r48674 r58466  
    2828  Unloads an image from memory.
    2929
    30   This function is a callback that a driver registers to do cleanup 
     30  This function is a callback that a driver registers to do cleanup
    3131  when the UnloadImage boot service function is called.
    3232
     
    6666
    6767/**
    68   The entry point of PE/COFF Image for a DXE Driver, DXE Runtime Driver, DXE SMM 
    69   Driver, or UEFI Driver. 
     68  The entry point of PE/COFF Image for a DXE Driver, DXE Runtime Driver, DXE SMM
     69  Driver, or UEFI Driver.
    7070
    7171  This function is the entry point for a DXE Driver, DXE Runtime Driver, DXE SMM Driver,
    7272  or UEFI Driver.  This function must call ProcessLibraryConstructorList() and
    7373  ProcessModuleEntryPointList(). If the return status from ProcessModuleEntryPointList()
    74   is an error status, then ProcessLibraryDestructorList() must be called. The return 
    75   value from ProcessModuleEntryPointList() is returned. If _gDriverUnloadImageCount 
    76   is greater than zero, then an unload handler must be registered for this image 
     74  is an error status, then ProcessLibraryDestructorList() must be called. The return
     75  value from ProcessModuleEntryPointList() is returned. If _gDriverUnloadImageCount
     76  is greater than zero, then an unload handler must be registered for this image
    7777  and the unload handler must invoke ProcessModuleUnloadList().
    78   If _gUefiDriverRevision is not zero and SystemTable->Hdr.Revision is less than 
     78  If _gUefiDriverRevision is not zero and SystemTable->Hdr.Revision is less than
    7979  _gUefiDriverRevison, then return EFI_INCOMPATIBLE_VERSION.
    8080
    8181
    82   @param  ImageHandle  The image handle of the DXE Driver, DXE Runtime Driver, 
     82  @param  ImageHandle  The image handle of the DXE Driver, DXE Runtime Driver,
    8383                       DXE SMM Driver, or UEFI Driver.
    8484  @param  SystemTable  A pointer to the EFI System Table.
    8585
    86   @retval  EFI_SUCCESS               The DXE Driver, DXE Runtime Driver, DXE SMM 
     86  @retval  EFI_SUCCESS               The DXE Driver, DXE Runtime Driver, DXE SMM
    8787                                     Driver, or UEFI Driver exited normally.
    88   @retval  EFI_INCOMPATIBLE_VERSION  _gUefiDriverRevision is greater than 
     88  @retval  EFI_INCOMPATIBLE_VERSION  _gUefiDriverRevision is greater than
    8989                                    SystemTable->Hdr.Revision.
    9090  @retval  Other                     Return value from ProcessModuleEntryPointList().
     
    148148
    149149/**
    150   Required by the EBC compiler and identical in functionality to _ModuleEntryPoint(). 
     150  Required by the EBC compiler and identical in functionality to _ModuleEntryPoint().
    151151
    152152  This function is required to call _ModuleEntryPoint() passing in ImageHandle,
    153153  and SystemTable.
    154154
    155   @param  ImageHandle  The image handle of the DXE Driver, DXE Runtime Driver, DXE 
     155  @param  ImageHandle  The image handle of the DXE Driver, DXE Runtime Driver, DXE
    156156                       SMM Driver, or UEFI Driver.
    157157  @param  SystemTable  A pointer to the EFI System Table.
    158158
    159   @retval  EFI_SUCCESS               The DXE Driver, DXE Runtime Driver, DXE SMM 
     159  @retval  EFI_SUCCESS               The DXE Driver, DXE Runtime Driver, DXE SMM
    160160                                     Driver, or UEFI Driver exited normally.
    161   @retval  EFI_INCOMPATIBLE_VERSION  _gUefiDriverRevision is greater than 
     161  @retval  EFI_INCOMPATIBLE_VERSION  _gUefiDriverRevision is greater than
    162162                                     SystemTable->Hdr.Revision.
    163163  @retval  Other                     Return value from ProcessModuleEntryPointList().
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/UefiLib/Console.c

    r58459 r58466  
    33
    44  Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
    5   This program and the accompanying materials                         
    6   are licensed and made available under the terms and conditions of the BSD License         
    7   which accompanies this distribution.  The full text of the license may be found at       
    8   http://opensource.org/licenses/bsd-license.php.                                           
    9 
    10   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     
    11   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             
     5  This program and the accompanying materials
     6  are licensed and made available under the terms and conditions of the BSD License
     7  which accompanies this distribution.  The full text of the license may be found at
     8  http://opensource.org/licenses/bsd-license.php.
     9
     10  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
     11  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
    1212
    1313**/
     
    3232  {(CHAR16)0x1FFF,  1},
    3333  /*
    34    * Merge the blocks and replace them with the above entry as they fall to 
     34   * Merge the blocks and replace them with the above entry as they fall to
    3535   * the same category and they are all narrow glyph. This will reduce search
    3636   * time and table size. The merge will omit the reserved code.
     
    7979  {(CHAR16)0x2FFF,  1},
    8080  /*
    81    * Merge the blocks and replace them with the above entry as they fall to 
     81   * Merge the blocks and replace them with the above entry as they fall to
    8282   * the same category and they are all narrow glyph. This will reduce search
    8383   * time and table size. The merge will omit the reserved code.
     
    111111  {(CHAR16)0x33FF,  2},
    112112  /*
    113    * Merge the blocks and replace them with the above entry as they fall to 
     113   * Merge the blocks and replace them with the above entry as they fall to
    114114   * the same category and they are all wide glyph. This will reduce search
    115115   * time and table size. The merge will omit the reserved code.
     
    134134  {(CHAR16)0x9FFF,  2},
    135135  /*
    136    * Merge the blocks and replace them with the above entry as they fall to 
     136   * Merge the blocks and replace them with the above entry as they fall to
    137137   * the same category and they are all wide glyph. This will reduce search
    138138   * time and table size. The merge will omit the reserved code.
     
    140140   * Remove the above item if below is un-commented.
    141141   *
    142   {(CHAR16)0x4DFF,  0},       // Reserved. 0x3400-0x4DBF as CJK unified ideographs 
     142  {(CHAR16)0x4DFF,  0},       // Reserved. 0x3400-0x4DBF as CJK unified ideographs
    143143                      // extension A in ver3.0. 0x3400-0x4DFF
    144144  {(CHAR16)0x9FFF,  2},       // CJK unified ideographs. 0x4E00-0x9FFF
     
    156156  {(CHAR16)0xD7FF,  2},
    157157  /*
    158    * Merge the blocks and replace them with the above entry as they fall to 
     158   * Merge the blocks and replace them with the above entry as they fall to
    159159   * the same category and they are all wide glyph. This will reduce search
    160160   * time and table size. The merge will omit the reserved code.
     
    252252  Computes the display length of a Null-terminated Unicode String.
    253253
    254   This function computes and returns the display length of the Null-terminated 
    255   Unicode string specified by String.  If String is NULL then 0 is returned. If 
    256   any of the widths of the Unicode characters in String can not be determined, 
    257   then 0 is returned. The display width of String can be computed by summing the 
    258   display widths of each Unicode character in String.  Unicode characters that 
    259   are narrow glyphs have a width of 1, and Unicode characters that are width glyphs 
     254  This function computes and returns the display length of the Null-terminated
     255  Unicode string specified by String.  If String is NULL then 0 is returned. If
     256  any of the widths of the Unicode characters in String can not be determined,
     257  then 0 is returned. The display width of String can be computed by summing the
     258  display widths of each Unicode character in String.  Unicode characters that
     259  are narrow glyphs have a width of 1, and Unicode characters that are width glyphs
    260260  have a width of 2.  If String is not aligned on a 16-bit boundary, then ASSERT().
    261261
     
    263263
    264264  @return The display length of the Null-terminated Unicode string specified by String.
    265  
     265
    266266**/
    267267UINTN
     
    293293
    294294/**
    295   Count the storage space of a Unicode string. 
     295  Count the storage space of a Unicode string.
    296296
    297297  This function handles the Unicode string with NARROW_CHAR
     
    304304  @param LimitLen        Whether need to limit the string length.
    305305  @param MaxWidth        The max length this function supported.
    306   @param Offset          The max index of the string can be show out. 
     306  @param Offset          The max index of the string can be show out.
    307307
    308308  @return Storage space for the input string.
     
    376376
    377377/**
    378   Draws a dialog box to the console output device specified by 
     378  Draws a dialog box to the console output device specified by
    379379  ConOut defined in the EFI_SYSTEM_TABLE and waits for a keystroke
    380   from the console input device specified by ConIn defined in the 
     380  from the console input device specified by ConIn defined in the
    381381  EFI_SYSTEM_TABLE.
    382382
     
    385385
    386386  @param[in]   Attribute  Specifies the foreground and background color of the popup.
    387   @param[out]  Key        A pointer to the EFI_KEY value of the key that was 
     387  @param[out]  Key        A pointer to the EFI_KEY value of the key that was
    388388                          pressed.  This is an optional parameter that may be NULL.
    389389                          If it is NULL then no wait for a keypress will be performed.
    390390  @param[in]  ...         The variable argument list that contains pointers to Null-
    391                           terminated Unicode strings to display in the dialog box. 
     391                          terminated Unicode strings to display in the dialog box.
    392392                          The variable argument list is terminated by a NULL.
    393393
     
    396396EFIAPI
    397397CreatePopUp (
    398   IN  UINTN          Attribute,               
     398  IN  UINTN          Attribute,
    399399  OUT EFI_INPUT_KEY  *Key,      OPTIONAL
    400400  ...
     
    418418
    419419  //
    420   // Determine the length of the longest line in the popup and the the total 
     420  // Determine the length of the longest line in the popup and the the total
    421421  // number of lines in the popup
    422422  //
     
    444444  //
    445445  ConOut = gST->ConOut;
    446  
     446
    447447  //
    448448  // Save the current console cursor position and attributes
     
    484484
    485485  //
    486   // Draw top of popup box   
     486  // Draw top of popup box
    487487  //
    488488  SetMem16 (Line, (MaxLength + 2) * 2, BOXDRAW_HORIZONTAL);
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/UefiLib/UefiDriverModel.c

    r58459 r58466  
    88  which accompanies this distribution.  The full text of the license may be found at
    99  http://opensource.org/licenses/bsd-license.php.
    10  
     10
    1111  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
    1212  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
    1313
    14 **/ 
     14**/
    1515
    1616
     
    1919/**
    2020  Installs and completes the initialization of a Driver Binding Protocol instance.
    21  
     21
    2222  Installs the Driver Binding Protocol specified by DriverBinding onto the handle
    2323  specified by DriverBindingHandle. If DriverBindingHandle is NULL, then DriverBinding
    2424  is installed onto a newly created handle. DriverBindingHandle is typically the same
    2525  as the driver's ImageHandle, but it can be different if the driver produces multiple
    26   Driver Binding Protocols. 
    27   If DriverBinding is NULL, then ASSERT(). 
     26  Driver Binding Protocols.
     27  If DriverBinding is NULL, then ASSERT().
    2828  If DriverBinding can not be installed onto a handle, then ASSERT().
    2929
     
    8181  then the protocols are  installed onto a newly created handle. DriverBindingHandle
    8282  is typically the same as the driver's ImageHandle, but it can be different if the
    83   driver produces multiple Driver Binding Protocols. 
    84   If DriverBinding is NULL, then ASSERT(). 
     83  driver produces multiple Driver Binding Protocols.
     84  If DriverBinding is NULL, then ASSERT().
    8585  If the installation fails, then ASSERT().
    86  
     86
    8787  @param  ImageHandle          The image handle of the driver.
    8888  @param  SystemTable          The EFI System Table that was passed to the driver's entry point.
     
    119119  DriverBinding->ImageHandle         = ImageHandle;
    120120  DriverBinding->DriverBindingHandle = DriverBindingHandle;
    121  
     121
    122122  if (DriverDiagnostics == NULL || FeaturePcdGet(PcdDriverDiagnosticsDisable)) {
    123123    if (DriverConfiguration == NULL) {
     
    211211  DriverBindingHandle.  If DriverBindingHandle is NULL, then the protocols are installed
    212212  onto a newly created handle.  DriverBindingHandle is typically the same as the driver's
    213   ImageHandle, but it can be different if the driver produces multiple Driver Binding Protocols. 
    214   If DriverBinding is NULL, then ASSERT(). 
     213  ImageHandle, but it can be different if the driver produces multiple Driver Binding Protocols.
     214  If DriverBinding is NULL, then ASSERT().
    215215  If the installation fails, then ASSERT().
    216216
     
    300300  optional Driver Diagnostic, and optional Driver Diagnostic 2 Protocols onto the driver's DriverBindingHandle.
    301301  DriverBindingHandle is typically the same as the driver's ImageHandle, but it can be different if the driver
    302   produces multiple Driver Binding Protocols. 
    303   If DriverBinding is NULL, then ASSERT(). 
     302  produces multiple Driver Binding Protocols.
     303  If DriverBinding is NULL, then ASSERT().
    304304  If the installation fails, then ASSERT().
    305305
     
    338338  EFI_STATUS  Status;
    339339
    340   ASSERT (DriverBinding != NULL); 
     340  ASSERT (DriverBinding != NULL);
    341341
    342342  //
     
    345345  DriverBinding->ImageHandle         = ImageHandle;
    346346  DriverBinding->DriverBindingHandle = DriverBindingHandle;
    347  
     347
    348348  if (DriverConfiguration2 == NULL) {
    349349    if (DriverConfiguration == NULL) {
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/UefiLib/UefiLib.c

    r58459 r58466  
    11/** @file
    2   The UEFI Library provides functions and macros that simplify the development of 
    3   UEFI Drivers and UEFI Applications.  These functions and macros help manage EFI 
    4   events, build simple locks utilizing EFI Task Priority Levels (TPLs), install 
    5   EFI Driver Model related protocols, manage Unicode string tables for UEFI Drivers, 
     2  The UEFI Library provides functions and macros that simplify the development of
     3  UEFI Drivers and UEFI Applications.  These functions and macros help manage EFI
     4  events, build simple locks utilizing EFI Task Priority Levels (TPLs), install
     5  EFI Driver Model related protocols, manage Unicode string tables for UEFI Drivers,
    66  and print messages on the console output and standard error devices.
    77
     
    2121
    2222/**
    23   Empty constructor function that is required to resolve dependencies between 
     23  Empty constructor function that is required to resolve dependencies between
    2424  libraries.
    25  
     25
    2626    ** DO NOT REMOVE **
    27  
     27
    2828  @param  ImageHandle   The firmware allocated handle for the EFI image.
    2929  @param  SystemTable   A pointer to the EFI System Table.
    30  
     30
    3131  @retval EFI_SUCCESS   The constructor executed correctly.
    3232
     
    7070  Retrieves a pointer to the system configuration table from the EFI System Table
    7171  based on a specified GUID.
    72  
     72
    7373  This function searches the list of configuration tables stored in the EFI System Table
    7474  for a table with a GUID that matches TableGuid.  If a match is found, then a pointer to
     
    119119  then the notification function is still executed one time. In addition, every time a protocol
    120120  of type ProtocolGuid instance is installed or reinstalled, the notification function is also
    121   executed. This function returns the notification event that was created. 
     121  executed. This function returns the notification event that was created.
    122122  If ProtocolGuid is NULL, then ASSERT().
    123123  If NotifyTpl is not a legal TPL value, then ASSERT().
     
    132132  @param  Registration    A pointer to a memory location to receive the registration value.
    133133                          This value is passed to LocateHandle() to obtain new handles that
    134                           have been added that support the ProtocolGuid-specified protocol. 
     134                          have been added that support the ProtocolGuid-specified protocol.
    135135
    136136  @return The notification event that was created.
     
    193193  This function creates an event using NotifyTpl, NoifyFunction, and NotifyContext.
    194194  This event is signaled with EfiNamedEventSignal(). This provides the ability for one or more
    195   listeners on the same event named by the GUID specified by Name. 
     195  listeners on the same event named by the GUID specified by Name.
    196196  If Name is NULL, then ASSERT().
    197197  If NotifyTpl is not a legal TPL value, then ASSERT().
     
    201201  @param  NotifyTpl             Supplies the task priority level of the event notifications.
    202202  @param  NotifyFunction        Supplies the function to notify when the event is signaled.
    203   @param  NotifyContext         The context parameter to pass to NotifyFunction. 
     203  @param  NotifyContext         The context parameter to pass to NotifyFunction.
    204204  @param  Registration          A pointer to a memory location to receive the registration value.
    205205
     
    225225  ASSERT (NotifyFunction != NULL);
    226226  ASSERT (NotifyTpl <= TPL_HIGH_LEVEL);
    227  
     227
    228228  //
    229229  // Create event
     
    305305}
    306306
    307 /** 
     307/**
    308308  Returns the current TPL.
    309309
    310   This function returns the current TPL.  There is no EFI service to directly 
    311   retrieve the current TPL. Instead, the RaiseTPL() function is used to raise 
    312   the TPL to TPL_HIGH_LEVEL.  This will return the current TPL.  The TPL level 
    313   can then immediately be restored back to the current TPL level with a call 
     310  This function returns the current TPL.  There is no EFI service to directly
     311  retrieve the current TPL. Instead, the RaiseTPL() function is used to raise
     312  the TPL to TPL_HIGH_LEVEL.  This will return the current TPL.  The TPL level
     313  can then immediately be restored back to the current TPL level with a call
    314314  to RestoreTPL().
    315315
     
    335335  Initializes a basic mutual exclusion lock.
    336336
    337   This function initializes a basic mutual exclusion lock to the released state 
    338   and returns the lock.  Each lock provides mutual exclusion access at its task 
     337  This function initializes a basic mutual exclusion lock to the released state
     338  and returns the lock.  Each lock provides mutual exclusion access at its task
    339339  priority level.  Since there is no preemption or multiprocessor support in EFI,
    340340  acquiring the lock only consists of raising to the locks TPL.
     
    367367  Acquires ownership of a lock.
    368368
    369   This function raises the system's current task priority level to the task 
    370   priority level of the mutual exclusion lock.  Then, it places the lock in the 
     369  This function raises the system's current task priority level to the task
     370  priority level of the mutual exclusion lock.  Then, it places the lock in the
    371371  acquired state.
    372372  If Lock is NULL, then ASSERT().
     
    433433  Releases ownership of a lock.
    434434
    435   This function transitions a mutual exclusion lock from the acquired state to 
    436   the released state, and restores the system's task priority level to its 
     435  This function transitions a mutual exclusion lock from the acquired state to
     436  the released state, and restores the system's task priority level to its
    437437  previous level.
    438438  If Lock is NULL, then ASSERT().
     
    468468  is performed by evaluating if the the protocol specified by ProtocolGuid is
    469469  present on ControllerHandle and is was opened by DriverBindingHandle with an
    470   attribute of EFI_OPEN_PROTOCOL_BY_DRIVER. 
     470  attribute of EFI_OPEN_PROTOCOL_BY_DRIVER.
    471471  If ProtocolGuid is NULL, then ASSERT().
    472472
     
    531531  If ProtocolGuid is NULL, then ASSERT().
    532532
    533   @param  ControllerHandle     A handle for a (parent) controller to test. 
     533  @param  ControllerHandle     A handle for a (parent) controller to test.
    534534  @param  ChildHandle          A child handle to test.
    535535  @param  ProtocolGuid         Supplies the protocol that the child controller
    536                                opens on its parent controller. 
     536                               opens on its parent controller.
    537537
    538538  @retval EFI_SUCCESS          ChildHandle is a child of the ControllerHandle.
     
    593593  is returned in UnicodeString.
    594594
    595   @param  Language                A pointer to the ISO 639-2 language code for the 
     595  @param  Language                A pointer to the ISO 639-2 language code for the
    596596                                  Unicode string to look up and return.
    597   @param  SupportedLanguages      A pointer to the set of ISO 639-2 language codes 
    598                                   that the Unicode string table supports.  Language 
     597  @param  SupportedLanguages      A pointer to the set of ISO 639-2 language codes
     598                                  that the Unicode string table supports.  Language
    599599                                  must be a member of this set.
    600600  @param  UnicodeStringTable      A pointer to the table of Unicode strings.
     
    602602                                  that matches the language specified by Language.
    603603
    604   @retval EFI_SUCCESS             The Unicode string that matches the language 
     604  @retval EFI_SUCCESS             The Unicode string that matches the language
    605605                                  specified by Language was found
    606                                   in the table of Unicode strings UnicodeStringTable, 
     606                                  in the table of Unicode strings UnicodeStringTable,
    607607                                  and it was returned in UnicodeString.
    608608  @retval EFI_INVALID_PARAMETER   Language is NULL.
     
    610610  @retval EFI_UNSUPPORTED         SupportedLanguages is NULL.
    611611  @retval EFI_UNSUPPORTED         UnicodeStringTable is NULL.
    612   @retval EFI_UNSUPPORTED         The language specified by Language is not a 
     612  @retval EFI_UNSUPPORTED         The language specified by Language is not a
    613613                                  member of SupportedLanguages.
    614   @retval EFI_UNSUPPORTED         The language specified by Language is not 
     614  @retval EFI_UNSUPPORTED         The language specified by Language is not
    615615                                  supported by UnicodeStringTable.
    616616
     
    685685                               not assumed to be Null-terminated, and only the first three
    686686                               characters are used. If Iso639Language is FALSE, then this ASCII
    687                                string must be Null-terminated. 
     687                               string must be Null-terminated.
    688688  @param  SupportedLanguages   A pointer to a Null-terminated ASCII string that contains a
    689689                               set of ISO 639-2 or RFC 4646 language codes that the Unicode
     
    705705                                  was found in the table of Unicode strings UnicodeStringTable, and
    706706                                  it was returned in UnicodeString.
    707   @retval  EFI_INVALID_PARAMETER  Language is NULL. 
    708   @retval  EFI_INVALID_PARAMETER  UnicodeString is NULL. 
    709   @retval  EFI_UNSUPPORTED        SupportedLanguages is NULL. 
    710   @retval  EFI_UNSUPPORTED        UnicodeStringTable is NULL. 
    711   @retval  EFI_UNSUPPORTED        The language specified by Language is not a member of SupportedLanguages. 
     707  @retval  EFI_INVALID_PARAMETER  Language is NULL.
     708  @retval  EFI_INVALID_PARAMETER  UnicodeString is NULL.
     709  @retval  EFI_UNSUPPORTED        SupportedLanguages is NULL.
     710  @retval  EFI_UNSUPPORTED        UnicodeStringTable is NULL.
     711  @retval  EFI_UNSUPPORTED        The language specified by Language is not a member of SupportedLanguages.
    712712  @retval  EFI_UNSUPPORTED        The language specified by Language is not supported by UnicodeStringTable.
    713713
     
    795795  This function adds a Unicode string to UnicodeStringTable.
    796796
    797   If Language is a member of SupportedLanguages then UnicodeString is added to 
    798   UnicodeStringTable.  New buffers are allocated for both Language and 
    799   UnicodeString.  The contents of Language and UnicodeString are copied into 
    800   these new buffers.  These buffers are automatically freed when 
     797  If Language is a member of SupportedLanguages then UnicodeString is added to
     798  UnicodeStringTable.  New buffers are allocated for both Language and
     799  UnicodeString.  The contents of Language and UnicodeString are copied into
     800  these new buffers.  These buffers are automatically freed when
    801801  FreeUnicodeStringTable() is called.
    802802
    803   @param  Language                A pointer to the ISO 639-2 language code for the Unicode 
     803  @param  Language                A pointer to the ISO 639-2 language code for the Unicode
    804804                                  string to add.
    805805  @param  SupportedLanguages      A pointer to the set of ISO 639-2 language codes
     
    809809  @param  UnicodeString           A pointer to the Unicode string to add.
    810810
    811   @retval EFI_SUCCESS             The Unicode string that matches the language 
    812                                   specified by Language was found in the table of 
    813                                   Unicode strings UnicodeStringTable, and it was 
     811  @retval EFI_SUCCESS             The Unicode string that matches the language
     812                                  specified by Language was found in the table of
     813                                  Unicode strings UnicodeStringTable, and it was
    814814                                  returned in UnicodeString.
    815815  @retval EFI_INVALID_PARAMETER   Language is NULL.
     
    817817  @retval EFI_INVALID_PARAMETER   UnicodeString is an empty string.
    818818  @retval EFI_UNSUPPORTED         SupportedLanguages is NULL.
    819   @retval EFI_ALREADY_STARTED     A Unicode string with language Language is 
     819  @retval EFI_ALREADY_STARTED     A Unicode string with language Language is
    820820                                  already present in UnicodeStringTable.
    821   @retval EFI_OUT_OF_RESOURCES    There is not enough memory to add another 
     821  @retval EFI_OUT_OF_RESOURCES    There is not enough memory to add another
    822822                                  Unicode string to UnicodeStringTable.
    823   @retval EFI_UNSUPPORTED         The language specified by Language is not a 
     823  @retval EFI_UNSUPPORTED         The language specified by Language is not a
    824824                                  member of SupportedLanguages.
    825825
     
    984984  @param  UnicodeStringTable  A pointer to the table of Unicode strings. Type EFI_UNICODE_STRING_TABLE
    985985                              is defined in "Related Definitions".
    986   @param  UnicodeString       A pointer to the Unicode string to add. 
     986  @param  UnicodeString       A pointer to the Unicode string to add.
    987987  @param  Iso639Language      Specifies the supported language code format. If it is TRUE,
    988988                              then Language and SupportedLanguages follow ISO 639-2 language code format.
     
    991991  @retval EFI_SUCCESS            The Unicode string that matches the language specified by
    992992                                 Language was found in the table of Unicode strings UnicodeStringTable,
    993                                  and it was returned in UnicodeString. 
    994   @retval EFI_INVALID_PARAMETER  Language is NULL. 
    995   @retval EFI_INVALID_PARAMETER  UnicodeString is NULL. 
    996   @retval EFI_INVALID_PARAMETER  UnicodeString is an empty string. 
    997   @retval EFI_UNSUPPORTED        SupportedLanguages is NULL. 
     993                                 and it was returned in UnicodeString.
     994  @retval EFI_INVALID_PARAMETER  Language is NULL.
     995  @retval EFI_INVALID_PARAMETER  UnicodeString is NULL.
     996  @retval EFI_INVALID_PARAMETER  UnicodeString is an empty string.
     997  @retval EFI_UNSUPPORTED        SupportedLanguages is NULL.
    998998  @retval EFI_ALREADY_STARTED    A Unicode string with language Language is already present in
    999                                  UnicodeStringTable. 
    1000   @retval EFI_OUT_OF_RESOURCES   There is not enough memory to add another Unicode string UnicodeStringTable. 
     999                                 UnicodeStringTable.
     1000  @retval EFI_OUT_OF_RESOURCES   There is not enough memory to add another Unicode string UnicodeStringTable.
    10011001  @retval EFI_UNSUPPORTED        The language specified by Language is not a member of SupportedLanguages.
    10021002
     
    10821082        for (Index = 0; LanguageString[Index] != 0 && LanguageString[Index] != ';'; Index++);
    10831083
    1084         if (AsciiStrnCmp (Language, LanguageString, Index) == 0) { 
     1084        if (AsciiStrnCmp (Language, LanguageString, Index) == 0) {
    10851085          return EFI_ALREADY_STARTED;
    10861086        }
     
    11641164
    11651165  If UnicodeStringTable is NULL, then EFI_SUCCESS is returned.
    1166   Otherwise, each language code, and each Unicode string in the Unicode string 
     1166  Otherwise, each language code, and each Unicode string in the Unicode string
    11671167  table are freed, and EFI_SUCCESS is returned.
    11681168
     
    12181218  [ATTENTION] This function will be deprecated for security reason.
    12191219
    1220   Returns a pointer to an allocated buffer that contains the contents of a 
    1221   variable retrieved through the UEFI Runtime Service GetVariable().  The 
     1220  Returns a pointer to an allocated buffer that contains the contents of a
     1221  variable retrieved through the UEFI Runtime Service GetVariable().  The
    12221222  returned buffer is allocated using AllocatePool().  The caller is responsible
    12231223  for freeing this buffer with FreePool().
     
    12811281  [ATTENTION] This function will be deprecated for security reason.
    12821282
    1283   Returns a pointer to an allocated buffer that contains the contents of a 
    1284   variable retrieved through the UEFI Runtime Service GetVariable().  This 
     1283  Returns a pointer to an allocated buffer that contains the contents of a
     1284  variable retrieved through the UEFI Runtime Service GetVariable().  This
    12851285  function always uses the EFI_GLOBAL_VARIABLE GUID to retrieve variables.
    1286   The returned buffer is allocated using AllocatePool().  The caller is 
     1286  The returned buffer is allocated using AllocatePool().  The caller is
    12871287  responsible for freeing this buffer with FreePool().
    12881288
     
    13071307
    13081308/**
    1309   Returns the status whether get the variable success. The function retrieves 
    1310   variable  through the UEFI Runtime Service GetVariable().  The 
     1309  Returns the status whether get the variable success. The function retrieves
     1310  variable  through the UEFI Runtime Service GetVariable().  The
    13111311  returned buffer is allocated using AllocatePool().  The caller is responsible
    13121312  for freeing this buffer with FreePool().
     
    13481348    *Size  = 0;
    13491349  }
    1350  
     1350
    13511351  Status = gRT->GetVariable ((CHAR16 *) Name, (EFI_GUID *) Guid, NULL, &BufferSize, *Value);
    13521352  if (Status != EFI_BUFFER_TOO_SMALL) {
     
    13801380
    13811381/**
    1382   Returns a pointer to an allocated buffer that contains the contents of a 
    1383   variable retrieved through the UEFI Runtime Service GetVariable().  This 
     1382  Returns a pointer to an allocated buffer that contains the contents of a
     1383  variable retrieved through the UEFI Runtime Service GetVariable().  This
    13841384  function always uses the EFI_GLOBAL_VARIABLE GUID to retrieve variables.
    1385   The returned buffer is allocated using AllocatePool().  The caller is 
     1385  The returned buffer is allocated using AllocatePool().  The caller is
    13861386  responsible for freeing this buffer with FreePool().
    13871387
     
    14101410
    14111411/**
    1412   Returns a pointer to an allocated buffer that contains the best matching language 
    1413   from a set of supported languages. 
    1414  
    1415   This function supports both ISO 639-2 and RFC 4646 language codes, but language 
    1416   code types may not be mixed in a single call to this function.  The language 
    1417   code returned is allocated using AllocatePool().  The caller is responsible for 
     1412  Returns a pointer to an allocated buffer that contains the best matching language
     1413  from a set of supported languages.
     1414
     1415  This function supports both ISO 639-2 and RFC 4646 language codes, but language
     1416  code types may not be mixed in a single call to this function.  The language
     1417  code returned is allocated using AllocatePool().  The caller is responsible for
    14181418  freeing the allocated buffer using FreePool().  This function supports a variable
    1419   argument list that allows the caller to pass in a prioritized list of language 
    1420   codes to test against all the language codes in SupportedLanguages. 
     1419  argument list that allows the caller to pass in a prioritized list of language
     1420  codes to test against all the language codes in SupportedLanguages.
    14211421
    14221422  If SupportedLanguages is NULL, then ASSERT().
    14231423
    14241424  @param[in]  SupportedLanguages  A pointer to a Null-terminated ASCII string that
    1425                                   contains a set of language codes in the format 
     1425                                  contains a set of language codes in the format
    14261426                                  specified by Iso639Language.
    14271427  @param[in]  Iso639Language      If TRUE, then all language codes are assumed to be
    14281428                                  in ISO 639-2 format.  If FALSE, then all language
    14291429                                  codes are assumed to be in RFC 4646 language format
    1430   @param[in]  ...                 A variable argument list that contains pointers to 
     1430  @param[in]  ...                 A variable argument list that contains pointers to
    14311431                                  Null-terminated ASCII strings that contain one or more
    14321432                                  language codes in the format specified by Iso639Language.
    14331433                                  The first language code from each of these language
    14341434                                  code lists is used to determine if it is an exact or
    1435                                   close match to any of the language codes in 
     1435                                  close match to any of the language codes in
    14361436                                  SupportedLanguages.  Close matches only apply to RFC 4646
    14371437                                  language codes, and the matching algorithm from RFC 4647
    1438                                   is used to determine if a close match is present.  If 
     1438                                  is used to determine if a close match is present.  If
    14391439                                  an exact or close match is found, then the matching
    14401440                                  language code from SupportedLanguages is returned.  If
    14411441                                  no matches are found, then the next variable argument
    1442                                   parameter is evaluated.  The variable argument list 
     1442                                  parameter is evaluated.  The variable argument list
    14431443                                  is terminated by a NULL.
    14441444
    14451445  @retval NULL   The best matching language could not be found in SupportedLanguages.
    1446   @retval NULL   There are not enough resources available to return the best matching 
     1446  @retval NULL   There are not enough resources available to return the best matching
    14471447                 language.
    1448   @retval Other  A pointer to a Null-terminated ASCII string that is the best matching 
     1448  @retval Other  A pointer to a Null-terminated ASCII string that is the best matching
    14491449                 language in SupportedLanguages.
    14501450
     
    14531453EFIAPI
    14541454GetBestLanguage (
    1455   IN CONST CHAR8  *SupportedLanguages, 
     1455  IN CONST CHAR8  *SupportedLanguages,
    14561456  IN BOOLEAN      Iso639Language,
    14571457  ...
     
    15321532      } else {
    15331533        //
    1534         // If RFC 4646 mode, then trim Language from the right to the next '-' character 
     1534        // If RFC 4646 mode, then trim Language from the right to the next '-' character
    15351535        //
    15361536        for (LanguageLength--; LanguageLength > 0 && Language[LanguageLength] != '-'; LanguageLength--);
     
    15411541
    15421542  //
    1543   // No matches were found 
     1543  // No matches were found
    15441544  //
    15451545  return NULL;
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/UefiLib/UefiLib.inf

    r58459 r58466  
    22# Instance of UEFI Library.
    33#
    4 # The UEFI Library provides functions and macros that simplify the development of 
    5 #  UEFI Drivers and UEFI Applications.  These functions and macros help manage EFI 
    6 #  events, build simple locks utilizing EFI Task Priority Levels (TPLs), install 
    7 #  EFI Driver Model related protocols, manage Unicode string tables for UEFI Drivers, 
     4# The UEFI Library provides functions and macros that simplify the development of
     5#  UEFI Drivers and UEFI Applications.  These functions and macros help manage EFI
     6#  events, build simple locks utilizing EFI Task Priority Levels (TPLs), install
     7#  EFI Driver Model related protocols, manage Unicode string tables for UEFI Drivers,
    88#  and print messages on the console output and standard error devices.
    99#
     
    5858  DevicePathLib
    5959  UefiRuntimeServicesTableLib
    60  
     60
    6161[Guids]
    6262  gEfiEventReadyToBootGuid                      ## SOMETIMES_CONSUMES  ## Event
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/UefiLib/UefiLibPrint.c

    r48674 r58466  
    9191}
    9292
    93 /** 
    94   Prints a formatted Unicode string to the console output device specified by 
     93/**
     94  Prints a formatted Unicode string to the console output device specified by
    9595  ConOut defined in the EFI_SYSTEM_TABLE.
    9696
    97   This function prints a formatted Unicode string to the console output device 
    98   specified by ConOut in EFI_SYSTEM_TABLE and returns the number of Unicode 
    99   characters that printed to ConOut.  If the length of the formatted Unicode 
    100   string is greater than PcdUefiLibMaxPrintBufferSize, then only the first 
     97  This function prints a formatted Unicode string to the console output device
     98  specified by ConOut in EFI_SYSTEM_TABLE and returns the number of Unicode
     99  characters that printed to ConOut.  If the length of the formatted Unicode
     100  string is greater than PcdUefiLibMaxPrintBufferSize, then only the first
    101101  PcdUefiLibMaxPrintBufferSize characters are sent to ConOut.
    102102  If Format is NULL, then ASSERT().
     
    105105
    106106  @param Format   A Null-terminated Unicode format string.
    107   @param ...      A Variable argument list whose contents are accessed based 
     107  @param ...      A Variable argument list whose contents are accessed based
    108108                  on the format string specified by Format.
    109  
     109
    110110  @return The number of Unicode characters printed to ConOut.
    111111
     
    130130}
    131131
    132 /** 
    133   Prints a formatted Unicode string to the console output device specified by 
     132/**
     133  Prints a formatted Unicode string to the console output device specified by
    134134  StdErr defined in the EFI_SYSTEM_TABLE.
    135135
    136   This function prints a formatted Unicode string to the console output device 
    137   specified by StdErr in EFI_SYSTEM_TABLE and returns the number of Unicode 
    138   characters that printed to StdErr.  If the length of the formatted Unicode 
    139   string is greater than PcdUefiLibMaxPrintBufferSize, then only the first 
     136  This function prints a formatted Unicode string to the console output device
     137  specified by StdErr in EFI_SYSTEM_TABLE and returns the number of Unicode
     138  characters that printed to StdErr.  If the length of the formatted Unicode
     139  string is greater than PcdUefiLibMaxPrintBufferSize, then only the first
    140140  PcdUefiLibMaxPrintBufferSize characters are sent to StdErr.
    141141  If Format is NULL, then ASSERT().
     
    144144
    145145  @param Format   A Null-terminated Unicode format string.
    146   @param ...      Variable argument list whose contents are accessed based 
     146  @param ...      Variable argument list whose contents are accessed based
    147147                  on the format string specified by Format.
    148  
     148
    149149  @return The number of Unicode characters printed to StdErr.
    150150
     
    226226}
    227227
    228 /** 
    229   Prints a formatted ASCII string to the console output device specified by 
     228/**
     229  Prints a formatted ASCII string to the console output device specified by
    230230  ConOut defined in the EFI_SYSTEM_TABLE.
    231231
    232   This function prints a formatted ASCII string to the console output device 
    233   specified by ConOut in EFI_SYSTEM_TABLE and returns the number of ASCII 
    234   characters that printed to ConOut.  If the length of the formatted ASCII 
    235   string is greater than PcdUefiLibMaxPrintBufferSize, then only the first 
     232  This function prints a formatted ASCII string to the console output device
     233  specified by ConOut in EFI_SYSTEM_TABLE and returns the number of ASCII
     234  characters that printed to ConOut.  If the length of the formatted ASCII
     235  string is greater than PcdUefiLibMaxPrintBufferSize, then only the first
    236236  PcdUefiLibMaxPrintBufferSize characters are sent to ConOut.
    237237  If Format is NULL, then ASSERT().
     
    239239
    240240  @param Format   A Null-terminated ASCII format string.
    241   @param ...      Variable argument list whose contents are accessed based 
     241  @param ...      Variable argument list whose contents are accessed based
    242242                  on the format string specified by Format.
    243  
     243
    244244  @return The number of ASCII characters printed to ConOut.
    245245
     
    265265}
    266266
    267 /** 
    268   Prints a formatted ASCII string to the console output device specified by 
     267/**
     268  Prints a formatted ASCII string to the console output device specified by
    269269  StdErr defined in the EFI_SYSTEM_TABLE.
    270270
    271   This function prints a formatted ASCII string to the console output device 
    272   specified by StdErr in EFI_SYSTEM_TABLE and returns the number of ASCII 
    273   characters that printed to StdErr.  If the length of the formatted ASCII 
    274   string is greater than PcdUefiLibMaxPrintBufferSize, then only the first 
     271  This function prints a formatted ASCII string to the console output device
     272  specified by StdErr in EFI_SYSTEM_TABLE and returns the number of ASCII
     273  characters that printed to StdErr.  If the length of the formatted ASCII
     274  string is greater than PcdUefiLibMaxPrintBufferSize, then only the first
    275275  PcdUefiLibMaxPrintBufferSize characters are sent to StdErr.
    276276  If Format is NULL, then ASSERT().
     
    278278
    279279  @param Format   A Null-terminated ASCII format string.
    280   @param ...      Variable argument list whose contents are accessed based 
     280  @param ...      Variable argument list whose contents are accessed based
    281281                  on the format string specified by Format.
    282  
     282
    283283  @return The number of ASCII characters printed to ConErr.
    284284
     
    372372
    373373  ConsoleHandle = gST->ConsoleOutHandle;
    374  
     374
    375375  ASSERT( ConsoleHandle != NULL);
    376376
     
    554554
    555555/**
    556   Prints a formatted Unicode string to a graphics console device specified by 
     556  Prints a formatted Unicode string to a graphics console device specified by
    557557  ConsoleOutputHandle defined in the EFI_SYSTEM_TABLE at the given (X,Y) coordinates.
    558558
    559   This function prints a formatted Unicode string to the graphics console device 
    560   specified by ConsoleOutputHandle in EFI_SYSTEM_TABLE and returns the number of 
    561   Unicode characters displayed, not including partial characters that may be clipped 
     559  This function prints a formatted Unicode string to the graphics console device
     560  specified by ConsoleOutputHandle in EFI_SYSTEM_TABLE and returns the number of
     561  Unicode characters displayed, not including partial characters that may be clipped
    562562  by the right edge of the display.  If the length of the formatted Unicode string is
    563   greater than PcdUefiLibMaxPrintBufferSize, then at most the first 
     563  greater than PcdUefiLibMaxPrintBufferSize, then at most the first
    564564  PcdUefiLibMaxPrintBufferSize characters are printed.The EFI_HII_FONT_PROTOCOL
    565   StringToImage() service is used to convert the string to a bitmap using the glyphs 
    566   registered with the HII database. No wrapping is performed, so any portions of the 
    567   string the fall outside the active display region will not be displayed. Please see 
     565  StringToImage() service is used to convert the string to a bitmap using the glyphs
     566  registered with the HII database. No wrapping is performed, so any portions of the
     567  string the fall outside the active display region will not be displayed. Please see
    568568  Section 27.2.6 of the UEFI Specification for a description of the supported string
    569569  format including the set of control codes supported by the StringToImage() service.
    570570
    571   If a graphics console device is not associated with the ConsoleOutputHandle 
     571  If a graphics console device is not associated with the ConsoleOutputHandle
    572572  defined in the EFI_SYSTEM_TABLE then no string is printed, and 0 is returned.
    573   If the EFI_HII_FONT_PROTOCOL is not present in the handle database, then no 
     573  If the EFI_HII_FONT_PROTOCOL is not present in the handle database, then no
    574574  string is printed, and 0 is returned.
    575575  If Format is NULL, then ASSERT().
     
    584584                       in the EFI_SYSTEM_TABLE is used.
    585585  @param  BackGround   The background color of the string being printed.  This is
    586                        an optional parameter that may be NULL.  If it is NULL, 
     586                       an optional parameter that may be NULL.  If it is NULL,
    587587                       then the background color of the current ConOut device
    588588                       in the EFI_SYSTEM_TABLE is used.
    589   @param  Format       A Null-terminated Unicode format string.  See Print Library 
     589  @param  Format       A Null-terminated Unicode format string.  See Print Library
    590590                       for the supported format string syntax.
    591   @param  ...          A Variable argument list whose contents are accessed based on 
    592                        the format string specified by Format.         
     591  @param  ...          A Variable argument list whose contents are accessed based on
     592                       the format string specified by Format.
    593593
    594594  @return  The number of Unicode characters printed.
     
    634634
    635635/**
    636   Prints a formatted ASCII string to a graphics console device specified by 
     636  Prints a formatted ASCII string to a graphics console device specified by
    637637  ConsoleOutputHandle defined in the EFI_SYSTEM_TABLE at the given (X,Y) coordinates.
    638638
    639   This function prints a formatted ASCII string to the graphics console device 
    640   specified by ConsoleOutputHandle in EFI_SYSTEM_TABLE and returns the number of 
    641   ASCII characters displayed, not including partial characters that may be clipped 
     639  This function prints a formatted ASCII string to the graphics console device
     640  specified by ConsoleOutputHandle in EFI_SYSTEM_TABLE and returns the number of
     641  ASCII characters displayed, not including partial characters that may be clipped
    642642  by the right edge of the display.  If the length of the formatted ASCII string is
    643   greater than PcdUefiLibMaxPrintBufferSize, then at most the first 
     643  greater than PcdUefiLibMaxPrintBufferSize, then at most the first
    644644  PcdUefiLibMaxPrintBufferSize characters are printed.The EFI_HII_FONT_PROTOCOL
    645   StringToImage() service is used to convert the string to a bitmap using the glyphs 
    646   registered with the HII database. No wrapping is performed, so any portions of the 
    647   string the fall outside the active display region will not be displayed. Please see 
     645  StringToImage() service is used to convert the string to a bitmap using the glyphs
     646  registered with the HII database. No wrapping is performed, so any portions of the
     647  string the fall outside the active display region will not be displayed. Please see
    648648  Section 27.2.6 of the UEFI Specification for a description of the supported string
    649649  format including the set of control codes supported by the StringToImage() service.
    650650
    651   If a graphics console device is not associated with the ConsoleOutputHandle 
     651  If a graphics console device is not associated with the ConsoleOutputHandle
    652652  defined in the EFI_SYSTEM_TABLE then no string is printed, and 0 is returned.
    653   If the EFI_HII_FONT_PROTOCOL is not present in the handle database, then no 
     653  If the EFI_HII_FONT_PROTOCOL is not present in the handle database, then no
    654654  string is printed, and 0 is returned.
    655655  If Format is NULL, then ASSERT().
     
    663663                       in the EFI_SYSTEM_TABLE is used.
    664664  @param  BackGround   The background color of the string being printed.  This is
    665                        an optional parameter that may be NULL.  If it is NULL, 
     665                       an optional parameter that may be NULL.  If it is NULL,
    666666                       then the background color of the current ConOut device
    667667                       in the EFI_SYSTEM_TABLE is used.
    668   @param  Format       A Null-terminated ASCII format string.  See Print Library 
     668  @param  Format       A Null-terminated ASCII format string.  See Print Library
    669669                       for the supported format string syntax.
    670   @param  ...          Variable argument list whose contents are accessed based on 
    671                        the format string specified by Format.         
     670  @param  ...          Variable argument list whose contents are accessed based on
     671                       the format string specified by Format.
    672672
    673673  @return  The number of ASCII characters printed.
     
    711711}
    712712
    713 /** 
     713/**
    714714  Appends a formatted Unicode string to a Null-terminated Unicode string
    715  
    716   This function appends a formatted Unicode string to the Null-terminated 
     715
     716  This function appends a formatted Unicode string to the Null-terminated
    717717  Unicode string specified by String.   String is optional and may be NULL.
    718   Storage for the formatted Unicode string returned is allocated using 
     718  Storage for the formatted Unicode string returned is allocated using
    719719  AllocatePool().  The pointer to the appended string is returned.  The caller
    720720  is responsible for freeing the returned string.
    721  
     721
    722722  If String is not NULL and not aligned on a 16-bit boundary, then ASSERT().
    723723  If FormatString is NULL, then ASSERT().
    724724  If FormatString is not aligned on a 16-bit boundary, then ASSERT().
    725  
     725
    726726  @param[in] String         A Null-terminated Unicode string.
    727727  @param[in] FormatString   A Null-terminated Unicode format string.
     
    729729
    730730  @retval NULL    There was not enough available memory.
    731   @return         Null-terminated Unicode string is that is the formatted 
     731  @return         Null-terminated Unicode string is that is the formatted
    732732                  string appended to String.
    733733**/
     
    772772}
    773773
    774 /** 
     774/**
    775775  Appends a formatted Unicode string to a Null-terminated Unicode string
    776  
    777   This function appends a formatted Unicode string to the Null-terminated 
     776
     777  This function appends a formatted Unicode string to the Null-terminated
    778778  Unicode string specified by String.   String is optional and may be NULL.
    779   Storage for the formatted Unicode string returned is allocated using 
     779  Storage for the formatted Unicode string returned is allocated using
    780780  AllocatePool().  The pointer to the appended string is returned.  The caller
    781781  is responsible for freeing the returned string.
    782  
     782
    783783  If String is not NULL and not aligned on a 16-bit boundary, then ASSERT().
    784784  If FormatString is NULL, then ASSERT().
    785785  If FormatString is not aligned on a 16-bit boundary, then ASSERT().
    786  
     786
    787787  @param[in] String         A Null-terminated Unicode string.
    788788  @param[in] FormatString   A Null-terminated Unicode format string.
    789   @param[in] ...            The variable argument list whose contents are 
    790                             accessed based on the format string specified by 
     789  @param[in] ...            The variable argument list whose contents are
     790                            accessed based on the format string specified by
    791791                            FormatString.
    792792
    793793  @retval NULL    There was not enough available memory.
    794   @return         Null-terminated Unicode string is that is the formatted 
     794  @return         Null-terminated Unicode string is that is the formatted
    795795                  string appended to String.
    796796**/
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/UefiLib/UefiNotTiano.c

    r58459 r58466  
    2727  This empty function ensures that EVT_NOTIFY_SIGNAL_ALL is error
    2828  checked correctly since it is now mapped into CreateEventEx() in UEFI 2.0.
    29  
     29
    3030  @param  Event                 Event whose notification function is being invoked.
    3131  @param  Context               The pointer to the notification function's context,
     
    7676/**
    7777  Create an EFI event in the Legacy Boot Event Group and allows
    78   the caller to specify a notification function. 
    79  
     78  the caller to specify a notification function.
     79
    8080  This function abstracts the creation of the Legacy Boot Event.
    8181  The Framework moved from a proprietary to UEFI 2.0 based mechanism.
     
    142142
    143143  Prior to UEFI 2.0 this was done via a non-standard UEFI extension, and this library
    144   abstracts the implementation mechanism of this event from the caller.   
    145   This function abstracts the creation of the Ready to Boot Event.  The Framework 
    146   moved from a proprietary to UEFI 2.0-based mechanism.  This library abstracts 
    147   the caller from how this event is created to prevent the code form having to 
     144  abstracts the implementation mechanism of this event from the caller.
     145  This function abstracts the creation of the Ready to Boot Event.  The Framework
     146  moved from a proprietary to UEFI 2.0-based mechanism.  This library abstracts
     147  the caller from how this event is created to prevent the code form having to
    148148  change with the version of the specification supported.
    149149  If ReadyToBootEvent is NULL, then ASSERT().
     
    171171/**
    172172  Create an EFI event in the Ready To Boot Event Group and allows
    173   the caller to specify a notification function. 
    174  
     173  the caller to specify a notification function.
     174
    175175  This function abstracts the creation of the Ready to Boot Event.
    176176  The Framework moved from a proprietary to UEFI 2.0 based mechanism.
     
    236236/**
    237237  Create, Signal, and Close the Ready to Boot event using EfiSignalEventReadyToBoot().
    238  
     238
    239239  This function abstracts the signaling of the Ready to Boot Event. The Framework moved
    240240  from a proprietary to UEFI 2.0 based mechanism. This library abstracts the caller
     
    286286
    287287/**
    288   Check to see if the Firmware Volume (FV) Media Device Path is valid 
    289  
    290   The Framework FwVol Device Path changed to conform to the UEFI 2.0 specification. 
     288  Check to see if the Firmware Volume (FV) Media Device Path is valid
     289
     290  The Framework FwVol Device Path changed to conform to the UEFI 2.0 specification.
    291291  This library function abstracts validating a device path node.
    292   Check the MEDIA_FW_VOL_FILEPATH_DEVICE_PATH data structure to see if it's valid. 
    293   If it is valid, then return the GUID file name from the device path node.  Otherwise, 
    294   return NULL.  This device path changed in the DXE CIS version 0.92 in a non back ward 
    295   compatible way to not conflict with the UEFI 2.0 specification.  This function abstracts 
     292  Check the MEDIA_FW_VOL_FILEPATH_DEVICE_PATH data structure to see if it's valid.
     293  If it is valid, then return the GUID file name from the device path node.  Otherwise,
     294  return NULL.  This device path changed in the DXE CIS version 0.92 in a non back ward
     295  compatible way to not conflict with the UEFI 2.0 specification.  This function abstracts
    296296  the differences from the caller.
    297297  If FvDevicePathNode is NULL, then ASSERT().
     
    322322/**
    323323  Initialize a Firmware Volume (FV) Media Device Path node.
    324  
    325   The Framework FwVol Device Path changed to conform to the UEFI 2.0 specification. 
    326   This library function abstracts initializing a device path node. 
    327   Initialize the MEDIA_FW_VOL_FILEPATH_DEVICE_PATH data structure.  This device 
    328   path changed in the DXE CIS version 0.92 in a non back ward compatible way to 
    329   not conflict with the UEFI 2.0 specification.  This function abstracts the 
     324
     325  The Framework FwVol Device Path changed to conform to the UEFI 2.0 specification.
     326  This library function abstracts initializing a device path node.
     327  Initialize the MEDIA_FW_VOL_FILEPATH_DEVICE_PATH data structure.  This device
     328  path changed in the DXE CIS version 0.92 in a non back ward compatible way to
     329  not conflict with the UEFI 2.0 specification.  This function abstracts the
    330330  differences from the caller.
    331331  If FvDevicePathNode is NULL, then ASSERT().
    332332  If NameGuid is NULL, then ASSERT().
    333  
     333
    334334  @param  FvDevicePathNode  The pointer to a FV device path node to initialize
    335335  @param  NameGuid          FV file name to use in FvDevicePathNode
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/UefiMemoryAllocationLib/MemoryAllocationLib.c

    r58459 r58466  
    11/** @file
    2   Support routines for memory allocation routines based 
     2  Support routines for memory allocation routines based
    33  on boot services for Dxe phase drivers.
    44
    55  Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
    6   This program and the accompanying materials                         
    7   are licensed and made available under the terms and conditions of the BSD License         
    8   which accompanies this distribution.  The full text of the license may be found at       
    9   http://opensource.org/licenses/bsd-license.php.                                           
    10 
    11   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     
    12   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             
     6  This program and the accompanying materials
     7  are licensed and made available under the terms and conditions of the BSD License
     8  which accompanies this distribution.  The full text of the license may be found at
     9  http://opensource.org/licenses/bsd-license.php.
     10
     11  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
     12  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
    1313
    1414**/
     
    3838VOID *
    3939InternalAllocatePages (
    40   IN EFI_MEMORY_TYPE  MemoryType, 
     40  IN EFI_MEMORY_TYPE  MemoryType,
    4141  IN UINTN            Pages
    4242  )
    4343{
    4444  EFI_STATUS            Status;
    45   EFI_PHYSICAL_ADDRESS  Memory; 
     45  EFI_PHYSICAL_ADDRESS  Memory;
    4646
    4747  if (Pages == 0) {
     
    130130  Allocation Library.  If it is not possible to free allocated pages, then this function will
    131131  perform no actions.
    132  
     132
    133133  If Buffer was not allocated with a page allocation function in the Memory Allocation Library,
    134134  then ASSERT().
    135135  If Pages is zero, then ASSERT().
    136  
     136
    137137  @param  Buffer                The pointer to the buffer of pages to free.
    138138  @param  Pages                 The number of 4 KB pages to free.
     
    173173VOID *
    174174InternalAllocateAlignedPages (
    175   IN EFI_MEMORY_TYPE  MemoryType, 
     175  IN EFI_MEMORY_TYPE  MemoryType,
    176176  IN UINTN            Pages,
    177177  IN UINTN            Alignment
     
    189189  //
    190190  ASSERT ((Alignment & (Alignment - 1)) == 0);
    191  
     191
    192192  if (Pages == 0) {
    193193    return NULL;
     
    203203    //
    204204    ASSERT (RealPages > Pages);
    205  
     205
    206206    Status         = gBS->AllocatePages (AllocateAnyPages, MemoryType, RealPages, &Memory);
    207207    if (EFI_ERROR (Status)) {
     
    246246  returned.  If there is not enough memory at the specified alignment remaining to satisfy the
    247247  request, then NULL is returned.
    248  
     248
    249249  If Alignment is not a power of two and Alignment is not zero, then ASSERT().
    250250  If Pages plus EFI_SIZE_TO_PAGES (Alignment) overflows, then ASSERT().
     
    274274  returned.  If there is not enough memory at the specified alignment remaining to satisfy the
    275275  request, then NULL is returned.
    276  
     276
    277277  If Alignment is not a power of two and Alignment is not zero, then ASSERT().
    278278  If Pages plus EFI_SIZE_TO_PAGES (Alignment) overflows, then ASSERT().
     
    302302  returned.  If there is not enough memory at the specified alignment remaining to satisfy the
    303303  request, then NULL is returned.
    304  
     304
    305305  If Alignment is not a power of two and Alignment is not zero, then ASSERT().
    306306  If Pages plus EFI_SIZE_TO_PAGES (Alignment) overflows, then ASSERT().
     
    329329  Frees the number of 4KB pages specified by Pages from the buffer specified by Buffer.  Buffer
    330330  must have been allocated on a previous call to the aligned page allocation services of the Memory
    331   Allocation Library.  If it is not possible to free allocated pages, then this function will 
     331  Allocation Library.  If it is not possible to free allocated pages, then this function will
    332332  perform no actions.
    333  
     333
    334334  If Buffer was not allocated with an aligned page allocation function in the Memory Allocation
    335335  Library, then ASSERT().
    336336  If Pages is zero, then ASSERT().
    337  
     337
    338338  @param  Buffer                The pointer to the buffer of pages to free.
    339339  @param  Pages                 The number of 4 KB pages to free.
     
    369369VOID *
    370370InternalAllocatePool (
    371   IN EFI_MEMORY_TYPE  MemoryType, 
     371  IN EFI_MEMORY_TYPE  MemoryType,
    372372  IN UINTN            AllocationSize
    373373  )
     
    462462VOID *
    463463InternalAllocateZeroPool (
    464   IN EFI_MEMORY_TYPE  PoolType, 
     464  IN EFI_MEMORY_TYPE  PoolType,
    465465  IN UINTN            AllocationSize
    466   ) 
     466  )
    467467{
    468468  VOID  *Memory;
     
    549549  is not enough memory remaining to satisfy the request, then NULL is returned.
    550550  If Buffer is NULL, then ASSERT().
    551   If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). 
     551  If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
    552552
    553553  @param  PoolType              The type of pool to allocate.
     
    560560VOID *
    561561InternalAllocateCopyPool (
    562   IN EFI_MEMORY_TYPE  PoolType, 
     562  IN EFI_MEMORY_TYPE  PoolType,
    563563  IN UINTN            AllocationSize,
    564564  IN CONST VOID       *Buffer
    565   ) 
     565  )
    566566{
    567567  VOID  *Memory;
     
    575575  }
    576576  return Memory;
    577 } 
     577}
    578578
    579579/**
     
    584584  allocated buffer.  If AllocationSize is 0, then a valid buffer of 0 size is returned.  If there
    585585  is not enough memory remaining to satisfy the request, then NULL is returned.
    586  
     586
    587587  If Buffer is NULL, then ASSERT().
    588   If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). 
     588  If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
    589589
    590590  @param  AllocationSize        The number of bytes to allocate and zero.
     
    611611  allocated buffer.  If AllocationSize is 0, then a valid buffer of 0 size is returned.  If there
    612612  is not enough memory remaining to satisfy the request, then NULL is returned.
    613  
     613
    614614  If Buffer is NULL, then ASSERT().
    615   If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). 
     615  If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
    616616
    617617  @param  AllocationSize        The number of bytes to allocate and zero.
     
    638638  allocated buffer.  If AllocationSize is 0, then a valid buffer of 0 size is returned.  If there
    639639  is not enough memory remaining to satisfy the request, then NULL is returned.
    640  
     640
    641641  If Buffer is NULL, then ASSERT().
    642   If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). 
     642  If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
    643643
    644644  @param  AllocationSize        The number of bytes to allocate and zero.
     
    662662
    663663  Allocates and zeros the number bytes specified by NewSize from memory of the type
    664   specified by PoolType.  If OldBuffer is not NULL, then the smaller of OldSize and 
    665   NewSize bytes are copied from OldBuffer to the newly allocated buffer, and 
    666   OldBuffer is freed.  A pointer to the newly allocated buffer is returned. 
    667   If NewSize is 0, then a valid buffer of 0 size is  returned.  If there is not 
     664  specified by PoolType.  If OldBuffer is not NULL, then the smaller of OldSize and
     665  NewSize bytes are copied from OldBuffer to the newly allocated buffer, and
     666  OldBuffer is freed.  A pointer to the newly allocated buffer is returned.
     667  If NewSize is 0, then a valid buffer of 0 size is  returned.  If there is not
    668668  enough memory remaining to satisfy the request, then NULL is returned.
    669  
     669
    670670  If the allocation of the new buffer is successful and the smaller of NewSize and OldSize
    671671  is greater than (MAX_ADDRESS - OldBuffer + 1), then ASSERT().
     
    674674  @param  OldSize        The size, in bytes, of OldBuffer.
    675675  @param  NewSize        The size, in bytes, of the buffer to reallocate.
    676   @param  OldBuffer      The buffer to copy to the allocated buffer.  This is an optional 
     676  @param  OldBuffer      The buffer to copy to the allocated buffer.  This is an optional
    677677                         parameter that may be NULL.
    678678
     
    682682VOID *
    683683InternalReallocatePool (
    684   IN EFI_MEMORY_TYPE  PoolType, 
     684  IN EFI_MEMORY_TYPE  PoolType,
    685685  IN UINTN            OldSize,
    686686  IN UINTN            NewSize,
     
    702702
    703703  Allocates and zeros the number bytes specified by NewSize from memory of type
    704   EfiBootServicesData.  If OldBuffer is not NULL, then the smaller of OldSize and 
    705   NewSize bytes are copied from OldBuffer to the newly allocated buffer, and 
    706   OldBuffer is freed.  A pointer to the newly allocated buffer is returned. 
    707   If NewSize is 0, then a valid buffer of 0 size is  returned.  If there is not 
     704  EfiBootServicesData.  If OldBuffer is not NULL, then the smaller of OldSize and
     705  NewSize bytes are copied from OldBuffer to the newly allocated buffer, and
     706  OldBuffer is freed.  A pointer to the newly allocated buffer is returned.
     707  If NewSize is 0, then a valid buffer of 0 size is  returned.  If there is not
    708708  enough memory remaining to satisfy the request, then NULL is returned.
    709  
     709
    710710  If the allocation of the new buffer is successful and the smaller of NewSize and OldSize
    711711  is greater than (MAX_ADDRESS - OldBuffer + 1), then ASSERT().
     
    713713  @param  OldSize        The size, in bytes, of OldBuffer.
    714714  @param  NewSize        The size, in bytes, of the buffer to reallocate.
    715   @param  OldBuffer      The buffer to copy to the allocated buffer.  This is an optional 
     715  @param  OldBuffer      The buffer to copy to the allocated buffer.  This is an optional
    716716                         parameter that may be NULL.
    717717
     
    734734
    735735  Allocates and zeros the number bytes specified by NewSize from memory of type
    736   EfiRuntimeServicesData.  If OldBuffer is not NULL, then the smaller of OldSize and 
    737   NewSize bytes are copied from OldBuffer to the newly allocated buffer, and 
    738   OldBuffer is freed.  A pointer to the newly allocated buffer is returned. 
    739   If NewSize is 0, then a valid buffer of 0 size is  returned.  If there is not 
     736  EfiRuntimeServicesData.  If OldBuffer is not NULL, then the smaller of OldSize and
     737  NewSize bytes are copied from OldBuffer to the newly allocated buffer, and
     738  OldBuffer is freed.  A pointer to the newly allocated buffer is returned.
     739  If NewSize is 0, then a valid buffer of 0 size is  returned.  If there is not
    740740  enough memory remaining to satisfy the request, then NULL is returned.
    741741
     
    745745  @param  OldSize        The size, in bytes, of OldBuffer.
    746746  @param  NewSize        The size, in bytes, of the buffer to reallocate.
    747   @param  OldBuffer      The buffer to copy to the allocated buffer.  This is an optional 
     747  @param  OldBuffer      The buffer to copy to the allocated buffer.  This is an optional
    748748                         parameter that may be NULL.
    749749
     
    766766
    767767  Allocates and zeros the number bytes specified by NewSize from memory of type
    768   EfiReservedMemoryType.  If OldBuffer is not NULL, then the smaller of OldSize and 
    769   NewSize bytes are copied from OldBuffer to the newly allocated buffer, and 
    770   OldBuffer is freed.  A pointer to the newly allocated buffer is returned. 
    771   If NewSize is 0, then a valid buffer of 0 size is  returned.  If there is not 
     768  EfiReservedMemoryType.  If OldBuffer is not NULL, then the smaller of OldSize and
     769  NewSize bytes are copied from OldBuffer to the newly allocated buffer, and
     770  OldBuffer is freed.  A pointer to the newly allocated buffer is returned.
     771  If NewSize is 0, then a valid buffer of 0 size is  returned.  If there is not
    772772  enough memory remaining to satisfy the request, then NULL is returned.
    773773
     
    777777  @param  OldSize        The size, in bytes, of OldBuffer.
    778778  @param  NewSize        The size, in bytes, of the buffer to reallocate.
    779   @param  OldBuffer      The buffer to copy to the allocated buffer.  This is an optional 
     779  @param  OldBuffer      The buffer to copy to the allocated buffer.  This is an optional
    780780                         parameter that may be NULL.
    781781
     
    801801  pool allocation services of the Memory Allocation Library.  If it is not possible to free pool
    802802  resources, then this function will perform no actions.
    803  
     803
    804804  If Buffer was not allocated with a pool allocation function in the Memory Allocation Library,
    805805  then ASSERT().
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/UefiMemoryLib/CompareMemWrapper.c

    r48674 r58466  
    3232  value returned is the first mismatched byte in SourceBuffer subtracted from the first
    3333  mismatched byte in DestinationBuffer.
    34  
     34
    3535  If Length > 0 and DestinationBuffer is NULL, then ASSERT().
    3636  If Length > 0 and SourceBuffer is NULL, then ASSERT().
     
    4545  @retval Non-zero          The first mismatched byte in SourceBuffer subtracted from the first
    4646                            mismatched byte in DestinationBuffer.
    47                            
     47
    4848**/
    4949INTN
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/UefiMemoryLib/CopyMemWrapper.c

    r48674 r58466  
    33
    44  The following BaseMemoryLib instances contain the same copy of this file:
    5  
     5
    66    BaseMemoryLib
    77    BaseMemoryLibMmx
     
    3232  DestinationBuffer.  The implementation must be reentrant, and it must handle the case
    3333  where SourceBuffer overlaps DestinationBuffer.
    34  
     34
    3535  If Length is greater than (MAX_ADDRESS - DestinationBuffer + 1), then ASSERT().
    3636  If Length is greater than (MAX_ADDRESS - SourceBuffer + 1), then ASSERT().
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/UefiMemoryLib/MemLibGuid.c

    r48674 r58466  
    33
    44  The following BaseMemoryLib instances contain the same copy of this file:
    5  
     5
    66    BaseMemoryLib
    77    BaseMemoryLibMmx
     
    3131  This function copies the contents of the 128-bit GUID specified by SourceGuid to
    3232  DestinationGuid, and returns DestinationGuid.
    33  
     33
    3434  If DestinationGuid is NULL, then ASSERT().
    3535  If SourceGuid is NULL, then ASSERT().
     
    6464  This function compares Guid1 to Guid2.  If the GUIDs are identical then TRUE is returned.
    6565  If there are any bit differences in the two GUIDs, then FALSE is returned.
    66  
     66
    6767  If Guid1 is NULL, then ASSERT().
    6868  If Guid2 is NULL, then ASSERT().
     
    104104  GUID in the target buffer is returned.  If no match is found, then NULL is returned.
    105105  If Length is 0, then NULL is returned.
    106  
     106
    107107  If Length > 0 and Buffer is NULL, then ASSERT().
    108108  If Buffer is not aligned on a 32-bit boundary, then ASSERT().
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/UefiMemoryLib/ScanMem16Wrapper.c

    r48674 r58466  
    3434  then a pointer to the matching byte in the target buffer is returned.  If no match is found,
    3535  then NULL is returned.  If Length is 0, then NULL is returned.
    36  
     36
    3737  If Length > 0 and Buffer is NULL, then ASSERT().
    3838  If Buffer is not aligned on a 16-bit boundary, then ASSERT().
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/UefiMemoryLib/ScanMem32Wrapper.c

    r48674 r58466  
    3333  then a pointer to the matching byte in the target buffer is returned.  If no match is found,
    3434  then NULL is returned.  If Length is 0, then NULL is returned.
    35  
     35
    3636  If Length > 0 and Buffer is NULL, then ASSERT().
    3737  If Buffer is not aligned on a 32-bit boundary, then ASSERT().
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/UefiMemoryLib/ScanMem64Wrapper.c

    r48674 r58466  
    3434  then a pointer to the matching byte in the target buffer is returned.  If no match is found,
    3535  then NULL is returned.  If Length is 0, then NULL is returned.
    36  
     36
    3737  If Length > 0 and Buffer is NULL, then ASSERT().
    3838  If Buffer is not aligned on a 64-bit boundary, then ASSERT().
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/UefiMemoryLib/ScanMem8Wrapper.c

    r48674 r58466  
    3434  then a pointer to the matching byte in the target buffer is returned.  If no match is found,
    3535  then NULL is returned.  If Length is 0, then NULL is returned.
    36  
     36
    3737  If Length > 0 and Buffer is NULL, then ASSERT().
    3838  If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
     
    5858  ASSERT (Buffer != NULL);
    5959  ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer));
    60  
     60
    6161  return (VOID*)InternalMemScanMem8 (Buffer, Length, Value);
    6262}
    6363
    6464/**
    65   Scans a target buffer for a UINTN sized value, and returns a pointer to the matching 
     65  Scans a target buffer for a UINTN sized value, and returns a pointer to the matching
    6666  UINTN sized value in the target buffer.
    6767
     
    7070  then a pointer to the matching byte in the target buffer is returned.  If no match is found,
    7171  then NULL is returned.  If Length is 0, then NULL is returned.
    72  
     72
    7373  If Length > 0 and Buffer is NULL, then ASSERT().
    7474  If Buffer is not aligned on a UINTN boundary, then ASSERT().
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/UefiMemoryLib/SetMemWrapper.c

    r48674 r58466  
    3030
    3131  This function fills Length bytes of Buffer with Value, and returns Buffer.
    32  
     32
    3333  If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
    3434
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/UefiMemoryLib/UefiMemoryLib.inf

    r58459 r58466  
    2424  MODULE_TYPE                    = UEFI_DRIVER
    2525  VERSION_STRING                 = 1.0
    26   LIBRARY_CLASS                  = BaseMemoryLib|DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER 
     26  LIBRARY_CLASS                  = BaseMemoryLib|DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER
    2727
    2828
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/UefiMemoryLib/ZeroMemWrapper.c

    r48674 r58466  
    1212    PeiMemoryLib
    1313    UefiMemoryLib
    14    
     14
    1515  Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
    1616  This program and the accompanying materials
     
    3030
    3131  This function fills Length bytes of Buffer with zeros, and returns Buffer.
    32  
     32
    3333  If Length > 0 and Buffer is NULL, then ASSERT().
    3434  If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/UefiPalLib/UefiPalLib.c

    r48674 r58466  
    99  text of the license may be found at
    1010  http://opensource.org/licenses/bsd-license.php.
    11  
     11
    1212  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
    1313  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/UefiPciLibPciRootBridgeIo/PciLib.c

    r58459 r58466  
    88  text of the license may be found at
    99  http://opensource.org/licenses/bsd-license.php.
    10  
     10
    1111  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
    1212  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
     
    4747// Global varible to cache pointer to PCI Root Bridge I/O protocol.
    4848//
    49 EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL      *mPciRootBridgeIo = NULL; 
     49EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL      *mPciRootBridgeIo = NULL;
    5050
    5151/**
    5252  The constructor function caches the pointer to PCI Root Bridge I/O protocol.
    53  
     53
    5454  The constructor function locates PCI Root Bridge I/O protocol from protocol database.
    55   It will ASSERT() if that operation fails and it will always return EFI_SUCCESS. 
     55  It will ASSERT() if that operation fails and it will always return EFI_SUCCESS.
    5656
    5757  @param  ImageHandle   The firmware allocated handle for the EFI image.
    5858  @param  SystemTable   A pointer to the EFI System Table.
    59  
     59
    6060  @retval EFI_SUCCESS   The constructor always returns EFI_SUCCESS.
    6161
     
    6969{
    7070  EFI_STATUS  Status;
    71  
     71
    7272  Status = gBS->LocateProtocol (&gEfiPciRootBridgeIoProtocolGuid, NULL, (VOID**) &mPciRootBridgeIo);
    7373  ASSERT_EFI_ERROR (Status);
     
    144144
    145145/**
    146   Registers a PCI device so PCI configuration registers may be accessed after 
     146  Registers a PCI device so PCI configuration registers may be accessed after
    147147  SetVirtualAddressMap().
    148  
    149   Registers the PCI device specified by Address so all the PCI configuration registers 
     148
     149  Registers the PCI device specified by Address so all the PCI configuration registers
    150150  associated with that PCI device may be accessed after SetVirtualAddressMap() is called.
    151  
    152   If Address > 0x0FFFFFFF, then ASSERT().
    153 
    154   @param  Address The address that encodes the PCI Bus, Device, Function and
    155                   Register.
    156  
     151
     152  If Address > 0x0FFFFFFF, then ASSERT().
     153
     154  @param  Address The address that encodes the PCI Bus, Device, Function and
     155                  Register.
     156
    157157  @retval RETURN_SUCCESS           The PCI device was registered for runtime access.
    158   @retval RETURN_UNSUPPORTED       An attempt was made to call this function 
     158  @retval RETURN_UNSUPPORTED       An attempt was made to call this function
    159159                                   after ExitBootServices().
    160160  @retval RETURN_UNSUPPORTED       The resources required to access the PCI device
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/UefiPciSegmentLibPciRootBridgeIo/PciSegmentLib.c

    r58459 r58466  
    88  text of the license may be found at
    99  http://opensource.org/licenses/bsd-license.php.
    10  
     10
    1111  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
    1212  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
     
    2424/**
    2525  The constructor function caches data of PCI Root Bridge I/O Protocol instances.
    26  
     26
    2727  The constructor function locates PCI Root Bridge I/O protocol instances,
    2828  and caches the protocol instances, together with their segment numbers and bus ranges.
    29   It will ASSERT() if that related operation fails and it will always return EFI_SUCCESS. 
     29  It will ASSERT() if that related operation fails and it will always return EFI_SUCCESS.
    3030
    3131  @param  ImageHandle   The firmware allocated handle for the EFI image.
    3232  @param  SystemTable   A pointer to the EFI System Table.
    33  
     33
    3434  @retval EFI_SUCCESS   The constructor always returns EFI_SUCCESS.
    3535
     
    4646  UINTN                                HandleCount;
    4747  EFI_HANDLE                           *HandleBuffer;
    48   EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL      *PciRootBridgeIo; 
     48  EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL      *PciRootBridgeIo;
    4949  EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR    *Descriptors;
    5050
     
    104104/**
    105105  The destructor function frees memory allocated by constructor.
    106  
     106
    107107  The destructor function frees memory for data of protocol instances allocated by constructor.
    108   It will ASSERT() if that related operation fails and it will always return EFI_SUCCESS. 
     108  It will ASSERT() if that related operation fails and it will always return EFI_SUCCESS.
    109109
    110110  @param  ImageHandle   The firmware allocated handle for the EFI image.
    111111  @param  SystemTable   A pointer to the EFI System Table.
    112  
     112
    113113  @retval EFI_SUCCESS   The constructor always returns EFI_SUCCESS.
    114114
     
    160160        return mPciRootBridgeData[Index].PciRootBridgeIo;
    161161      }
    162     }   
     162    }
    163163  }
    164164  return NULL;
     
    186186{
    187187  UINT32                               Data;
    188   EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL      *PciRootBridgeIo; 
     188  EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL      *PciRootBridgeIo;
    189189
    190190  PciRootBridgeIo = PciSegmentLibSearchForRootBridge (Address);
     
    225225  )
    226226{
    227   EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL      *PciRootBridgeIo; 
     227  EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL      *PciRootBridgeIo;
    228228
    229229  PciRootBridgeIo = PciSegmentLibSearchForRootBridge (Address);
     
    242242
    243243/**
    244   Register a PCI device so PCI configuration registers may be accessed after 
     244  Register a PCI device so PCI configuration registers may be accessed after
    245245  SetVirtualAddressMap().
    246  
     246
    247247  If any reserved bits in Address are set, then ASSERT().
    248248
    249249  @param  Address The address that encodes the PCI Bus, Device, Function and
    250250                  Register.
    251  
     251
    252252  @retval RETURN_SUCCESS           The PCI device was registered for runtime access.
    253   @retval RETURN_UNSUPPORTED       An attempt was made to call this function 
     253  @retval RETURN_UNSUPPORTED       An attempt was made to call this function
    254254                                   after ExitBootServices().
    255255  @retval RETURN_UNSUPPORTED       The resources required to access the PCI device
     
    274274  Reads and returns the 8-bit PCI configuration register specified by Address.
    275275  This function must guarantee that all PCI read and write operations are serialized.
    276  
    277   If any reserved bits in Address are set, then ASSERT().
    278  
     276
     277  If any reserved bits in Address are set, then ASSERT().
     278
    279279  @param  Address   The address that encodes the PCI Segment, Bus, Device, Function, and Register.
    280280
     
    298298  Writes the 8-bit PCI configuration register specified by Address with the value specified by Value.
    299299  Value is returned.  This function must guarantee that all PCI read and write operations are serialized.
    300  
     300
    301301  If any reserved bits in Address are set, then ASSERT().
    302302
     
    327327  The value written to the PCI configuration register is returned.
    328328  This function must guarantee that all PCI read and write operations are serialized.
    329  
     329
    330330  If any reserved bits in Address are set, then ASSERT().
    331331
     
    375375  Performs a bitwise AND of an 8-bit PCI configuration register with an 8-bit value,
    376376  followed a  bitwise OR with another 8-bit value.
    377  
     377
    378378  Reads the 8-bit PCI configuration register specified by Address,
    379379  performs a bitwise AND between the read result and the value specified by AndData,
     
    382382  The value written to the PCI configuration register is returned.
    383383  This function must guarantee that all PCI read and write operations are serialized.
    384  
     384
    385385  If any reserved bits in Address are set, then ASSERT().
    386386
     
    610610  Reads and returns the 16-bit PCI configuration register specified by Address.
    611611  This function must guarantee that all PCI read and write operations are serialized.
    612  
     612
    613613  If any reserved bits in Address are set, then ASSERT().
    614614  If Address is not aligned on a 16-bit boundary, then ASSERT().
    615  
     615
    616616  @param  Address   The address that encodes the PCI Segment, Bus, Device, Function, and Register.
    617617
     
    635635  Writes the 16-bit PCI configuration register specified by Address with the value specified by Value.
    636636  Value is returned.  This function must guarantee that all PCI read and write operations are serialized.
    637  
     637
    638638  If any reserved bits in Address are set, then ASSERT().
    639639  If Address is not aligned on a 16-bit boundary, then ASSERT().
     
    696696  The value written to the PCI configuration register is returned.
    697697  This function must guarantee that all PCI read and write operations are serialized.
    698  
     698
    699699  If any reserved bits in Address are set, then ASSERT().
    700700  If Address is not aligned on a 16-bit boundary, then ASSERT().
    701  
     701
    702702  @param  Address   The address that encodes the PCI Segment, Bus, Device, Function, and Register.
    703703  @param  AndData   The value to AND with the PCI configuration register.
     
    719719  Performs a bitwise AND of a 16-bit PCI configuration register with a 16-bit value,
    720720  followed a  bitwise OR with another 16-bit value.
    721  
     721
    722722  Reads the 16-bit PCI configuration register specified by Address,
    723723  performs a bitwise AND between the read result and the value specified by AndData,
     
    726726  The value written to the PCI configuration register is returned.
    727727  This function must guarantee that all PCI read and write operations are serialized.
    728  
     728
    729729  If any reserved bits in Address are set, then ASSERT().
    730730  If Address is not aligned on a 16-bit boundary, then ASSERT().
     
    824824  Reads the 16-bit PCI configuration register specified by Address,
    825825  performs a bitwise OR between the read result and the value specified by OrData,
    826   and writes the result to the 16-bit PCI configuration register specified by Address. 
     826  and writes the result to the 16-bit PCI configuration register specified by Address.
    827827
    828828  If any reserved bits in Address are set, then ASSERT().
     
    868868  This function must guarantee that all PCI read and write operations are serialized.
    869869  Extra left bits in OrData are stripped.
    870  
     870
    871871  If any reserved bits in Address are set, then ASSERT().
    872872  If Address is not aligned on a 16-bit boundary, then ASSERT().
     
    953953  Reads and returns the 32-bit PCI configuration register specified by Address.
    954954  This function must guarantee that all PCI read and write operations are serialized.
    955  
     955
    956956  If any reserved bits in Address are set, then ASSERT().
    957957  If Address is not aligned on a 32-bit boundary, then ASSERT().
     
    978978  Writes the 32-bit PCI configuration register specified by Address with the value specified by Value.
    979979  Value is returned.  This function must guarantee that all PCI read and write operations are serialized.
    980  
     980
    981981  If any reserved bits in Address are set, then ASSERT().
    982982  If Address is not aligned on a 32-bit boundary, then ASSERT().
     
    10081008  The value written to the PCI configuration register is returned.
    10091009  This function must guarantee that all PCI read and write operations are serialized.
    1010  
     1010
    10111011  If any reserved bits in Address are set, then ASSERT().
    10121012  If Address is not aligned on a 32-bit boundary, then ASSERT().
     
    10361036  The value written to the PCI configuration register is returned.
    10371037  This function must guarantee that all PCI read and write operations are serialized.
    1038  
     1038
    10391039  If any reserved bits in Address are set, then ASSERT().
    10401040  If Address is not aligned on a 32-bit boundary, then ASSERT().
     
    10591059  Performs a bitwise AND of a 32-bit PCI configuration register with a 32-bit value,
    10601060  followed a  bitwise OR with another 32-bit value.
    1061  
     1061
    10621062  Reads the 32-bit PCI configuration register specified by Address,
    10631063  performs a bitwise AND between the read result and the value specified by AndData,
     
    10661066  The value written to the PCI configuration register is returned.
    10671067  This function must guarantee that all PCI read and write operations are serialized.
    1068  
     1068
    10691069  If any reserved bits in Address are set, then ASSERT().
    10701070  If Address is not aligned on a 32-bit boundary, then ASSERT().
     
    12071207  AND, and writes the result back to the bit field in the 32-bit register.
    12081208
    1209  
     1209
    12101210  Reads the 32-bit PCI configuration register specified by Address, performs a bitwise
    12111211  AND between the read result and the value specified by AndData, and writes the result
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/UefiPciSegmentLibPciRootBridgeIo/PciSegmentLib.h

    r48674 r58466  
    88  text of the license may be found at
    99  http://opensource.org/licenses/bsd-license.php.
    10  
     10
    1111  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
    1212  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/UefiRuntimeLib/RuntimeLib.c

    r48674 r58466  
    44  This library hides the global variable for the EFI Runtime Services so the
    55  caller does not need to deal with the possibility of being called from an
    6   OS virtual address space. All pointer values are different for a virtual 
     6  OS virtual address space. All pointer values are different for a virtual
    77  mapping than from the normal physical mapping at boot services time.
    88
     
    126126
    127127/**
    128   If a runtime driver exits with an error, it must call this routine 
     128  If a runtime driver exits with an error, it must call this routine
    129129  to free the allocated resource before the exiting.
    130130  It will ASSERT() if gBS is NULL.
     
    181181
    182182/**
    183   This function allows the caller to determine if UEFI SetVirtualAddressMap() has been called. 
     183  This function allows the caller to determine if UEFI SetVirtualAddressMap() has been called.
    184184
    185185  This function returns TRUE after all the EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE functions have
     
    467467  may create and manage its own variables without the risk of name conflicts by using a unique VendorGuid.
    468468
    469   @param  VariableName The name of the vendor's variable; it's a Null-Terminated 
     469  @param  VariableName The name of the vendor's variable; it's a Null-Terminated
    470470                       Unicode String
    471471  @param  VendorGuid   Unify identifier for vendor.
     
    531531
    532532/**
    533   This service is a wrapper for the UEFI Runtime Service ConvertPointer(). 
     533  This service is a wrapper for the UEFI Runtime Service ConvertPointer().
    534534
    535535  The ConvertPointer() function is used by an EFI component during the SetVirtualAddressMap() operation.
     
    563563
    564564  For IA32, x64, and EBC, this service is a wrapper for the UEFI Runtime Service
    565   ConvertPointer().  See the UEFI Specification for details. 
     565  ConvertPointer().  See the UEFI Specification for details.
    566566  For IPF, this function interprets Address as a pointer to an EFI_PLABEL structure
    567567  and both the EntryPoint and GP fields of an EFI_PLABEL are converted from physical
     
    615615  LIST_ENTRY  *Link;
    616616  LIST_ENTRY  *NextLink;
    617  
     617
    618618  //
    619619  // For NULL List, return EFI_SUCCESS
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf

    r58459 r58466  
    4545  UefiRuntimeServicesTableLib
    4646  DebugLib
    47  
     47
    4848[Guids]
    4949  gEfiEventExitBootServicesGuid             ## CONSUMES ## Event
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/UefiSalLib/UefiSalLib.c

    r48674 r58466  
    99  text of the license may be found at
    1010  http://opensource.org/licenses/bsd-license.php.
    11  
     11
    1212  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
    1313  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
     
    2929/**
    3030  Makes a SAL procedure call.
    31  
    32   This is a wrapper function to make a SAL procedure call. 
     31
     32  This is a wrapper function to make a SAL procedure call.
    3333  No parameter checking is performed on the 8 input parameters,
    3434  but there are some common rules that the caller should follow
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/UefiScsiLib/UefiScsiLib.c

    r58459 r58466  
    33
    44  Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
    5   This program and the accompanying materials                         
    6   are licensed and made available under the terms and conditions of the BSD License         
    7   which accompanies this distribution.  The full text of the license may be found at       
    8   http://opensource.org/licenses/bsd-license.php.                                           
    9 
    10   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     
    11   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             
     5  This program and the accompanying materials
     6  are licensed and made available under the terms and conditions of the BSD License
     7  which accompanies this distribution.  The full text of the license may be found at
     8  http://opensource.org/licenses/bsd-license.php.
     9
     10  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
     11  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
    1212
    1313**/
     
    1919#include <Library/UefiScsiLib.h>
    2020#include <Library/BaseMemoryLib.h>
    21  
     21
    2222#include <IndustryStandard/Scsi.h>
    23  
    24  
     23
     24
    2525  //
    2626  // Max bytes needed to represent ID of a SCSI device
    2727  //
    2828#define EFI_SCSI_TARGET_MAX_BYTES (0x10)
    29  
     29
    3030  //
    3131  // bit5..7 are for Logical unit number
     
    3333  //
    3434#define EFI_SCSI_LOGICAL_UNIT_NUMBER_MASK 0xe0
    35  
     35
    3636  //
    3737  // Scsi Command Length
     
    7171  @param[in, out] SenseDataLength   On input, a pointer to the length in bytes of
    7272                                    the SenseData buffer. On output, a pointer to
    73                                     the number of bytes written to the SenseData buffer. 
     73                                    the number of bytes written to the SenseData buffer.
    7474  @param[out]     HostAdapterStatus The status of the SCSI Host Controller that produces
    7575                                    the SCSI bus containing the SCSI target specified by
     
    8181                                    on the SCSI Host Controller. See the EFI SCSI I/O
    8282                                    Protocol in the UEFI Specification for details on
    83                                     the possible return values. 
     83                                    the possible return values.
    8484
    8585  @retval EFI_SUCCESS          The command was executed successfully.
     
    187187                                         is optional and may be NULL.
    188188  @param[in, out] SenseDataLength        On input, the length in bytes of the SenseData buffer.
    189                                          On output, the number of bytes written to the SenseData buffer. 
     189                                         On output, the number of bytes written to the SenseData buffer.
    190190  @param[out]     HostAdapterStatus      The status of the SCSI Host Controller that
    191191                                         produces the SCSI bus containing the SCSI
     
    199199                                         See the EFI SCSI I/O Protocol in the UEFI
    200200                                         Specification for details on the possible
    201                                          return values. 
     201                                         return values.
    202202  @param[in, out] InquiryDataBuffer      A pointer to inquiry data that was generated
    203203                                         by the execution of the SCSI Request Packet.
    204204                                         This buffer must be allocated by the caller.
    205205                                         If InquiryDataLength is 0, then this parameter
    206                                          is optional and may be NULL. 
     206                                         is optional and may be NULL.
    207207  @param[in, out] InquiryDataLength      On input, a pointer to the length in bytes
    208208                                         of the InquiryDataBuffer buffer.
     
    334334                                         is optional and may be NULL.
    335335  @param[in, out] SenseDataLength        On input, the length in bytes of the SenseData buffer.
    336                                          On output, the number of bytes written to the SenseData buffer. 
     336                                         On output, the number of bytes written to the SenseData buffer.
    337337  @param[out]     HostAdapterStatus      The status of the SCSI Host Controller that
    338338                                         produces the SCSI bus containing the SCSI
     
    346346                                         See the EFI SCSI I/O Protocol in the UEFI
    347347                                         Specification for details on the possible
    348                                          return values. 
     348                                         return values.
    349349  @param[in, out] InquiryDataBuffer      A pointer to inquiry data that was generated
    350350                                         by the execution of the SCSI Request Packet.
    351351                                         This buffer must be allocated by the caller.
    352352                                         If InquiryDataLength is 0, then this parameter
    353                                          is optional and may be NULL. 
     353                                         is optional and may be NULL.
    354354  @param[in, out] InquiryDataLength      On input, a pointer to the length in bytes
    355355                                         of the InquiryDataBuffer buffer.
     
    359359                                         data is returned in InquiryDataBuffer.
    360360                                         If FALSE, then the standard inquiry data is
    361                                          returned in InquiryDataBuffer. 
     361                                         returned in InquiryDataBuffer.
    362362
    363363  @retval EFI_SUCCESS          The command executed successfully. See HostAdapterStatus,
     
    443443                                     is optional and may be NULL.
    444444  @param[in, out]  SenseDataLength   On input, the length in bytes of the SenseData buffer.
    445                                      On output, the number of bytes written to the SenseData buffer. 
     445                                     On output, the number of bytes written to the SenseData buffer.
    446446  @param[out]     HostAdapterStatus  The status of the SCSI Host Controller that
    447447                                     produces the SCSI bus containing the SCSI target
     
    459459                                     buffer must be allocated by the caller. If
    460460                                     DataLength is 0, then this parameter is optional
    461                                      and may be NULL. 
     461                                     and may be NULL.
    462462  @param[in, out]  DataLength        On input, a pointer to the length in bytes of
    463463                                     the DataBuffer buffer.  On output, a pointer
    464464                                     to the number of bytes written to the DataBuffer
    465                                      buffer. 
     465                                     buffer.
    466466  @param[in]      DBDField           Specifies the DBD field of the CDB for this SCSI Command.
    467   @param[in]      PageControl        Specifies the PC field of the CDB for this SCSI Command. 
    468   @param[in]      PageCode           Specifies the Page Control field of the CDB for this SCSI Command. 
     467  @param[in]      PageControl        Specifies the PC field of the CDB for this SCSI Command.
     468  @param[in]      PageCode           Specifies the Page Control field of the CDB for this SCSI Command.
    469469
    470470  @retval EFI_SUCCESS               The command executed successfully.
     
    880880  @retval  EFI_BAD_BUFFER_SIZE  The SCSI Request Packet was executed, but the entire DataBuffer could
    881881                                not be transferred. The actual number of bytes transferred is returned in DataLength.
    882   @retval  EFI_NOT_READY        The SCSI Request Packet could not be sent because there are too many 
     882  @retval  EFI_NOT_READY        The SCSI Request Packet could not be sent because there are too many
    883883                                SCSI Command Packets already queued.
    884884  @retval  EFI_DEVICE_ERROR     A device error occurred while attempting to send SCSI Request Packet.
    885   @retval  EFI_UNSUPPORTED      The command described by the SCSI Request Packet is not supported by 
     885  @retval  EFI_UNSUPPORTED      The command described by the SCSI Request Packet is not supported by
    886886                                the SCSI initiator(i.e., SCSI  Host Controller)
    887887  @retval  EFI_TIMEOUT          A timeout occurred while waiting for the SCSI Request Packet to execute.
     
    978978  @retval  EFI_BAD_BUFFER_SIZE  The SCSI Request Packet was executed, but the entire DataBuffer could
    979979                                not be transferred. The actual number of bytes transferred is returned in DataLength.
    980   @retval  EFI_NOT_READY        The SCSI Request Packet could not be sent because there are too many 
     980  @retval  EFI_NOT_READY        The SCSI Request Packet could not be sent because there are too many
    981981                                SCSI Command Packets already queued.
    982982  @retval  EFI_DEVICE_ERROR     A device error occurred while attempting to send SCSI Request Packet.
    983   @retval  EFI_UNSUPPORTED      The command described by the SCSI Request Packet is not supported by 
     983  @retval  EFI_UNSUPPORTED      The command described by the SCSI Request Packet is not supported by
    984984                                the SCSI initiator(i.e., SCSI  Host Controller)
    985985  @retval  EFI_TIMEOUT          A timeout occurred while waiting for the SCSI Request Packet to execute.
     
    10761076  @retval  EFI_BAD_BUFFER_SIZE  The SCSI Request Packet was executed, but the entire DataBuffer could
    10771077                                not be transferred. The actual number of bytes transferred is returned in DataLength.
    1078   @retval  EFI_NOT_READY        The SCSI Request Packet could not be sent because there are too many 
     1078  @retval  EFI_NOT_READY        The SCSI Request Packet could not be sent because there are too many
    10791079                                SCSI Command Packets already queued.
    10801080  @retval  EFI_DEVICE_ERROR     A device error occurred while attempting to send SCSI Request Packet.
    1081   @retval  EFI_UNSUPPORTED      The command described by the SCSI Request Packet is not supported by 
     1081  @retval  EFI_UNSUPPORTED      The command described by the SCSI Request Packet is not supported by
    10821082                                the SCSI initiator(i.e., SCSI  Host Controller)
    10831083  @retval  EFI_TIMEOUT          A timeout occurred while waiting for the SCSI Request Packet to execute.
     
    11741174  @retval  EFI_BAD_BUFFER_SIZE  The SCSI Request Packet was executed, but the entire DataBuffer could
    11751175                                not be transferred. The actual number of bytes transferred is returned in DataLength.
    1176   @retval  EFI_NOT_READY        The SCSI Request Packet could not be sent because there are too many 
     1176  @retval  EFI_NOT_READY        The SCSI Request Packet could not be sent because there are too many
    11771177                                SCSI Command Packets already queued.
    11781178  @retval  EFI_DEVICE_ERROR     A device error occurred while attempting to send SCSI Request Packet.
    1179   @retval  EFI_UNSUPPORTED      The command described by the SCSI Request Packet is not supported by 
     1179  @retval  EFI_UNSUPPORTED      The command described by the SCSI Request Packet is not supported by
    11801180                                the SCSI initiator(i.e., SCSI  Host Controller)
    11811181  @retval  EFI_TIMEOUT          A timeout occurred while waiting for the SCSI Request Packet to execute.
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/UefiScsiLib/UefiScsiLib.inf

    r58459 r58466  
    2424  MODULE_TYPE                    = UEFI_DRIVER
    2525  VERSION_STRING                 = 1.0
    26   LIBRARY_CLASS                  = UefiScsiLib|DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER 
     26  LIBRARY_CLASS                  = UefiScsiLib|DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER
    2727
    2828
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/UefiUsbLib/Hid.c

    r48674 r58466  
    33  The library provides USB HID Class standard and specific requests defined
    44  in USB HID Firmware Specification 7 section : Requests.
    5  
     5
    66  Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.<BR>
    77  This program and the accompanying materials
     
    99  which accompanies this distribution.  The full text of the license may be found at
    1010  http://opensource.org/licenses/bsd-license.php.
    11  
     11
    1212  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
    1313  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
     
    1717#include "UefiUsbLibInternal.h"
    1818
    19 // 
     19//
    2020//  Hid RequestType Bits specifying characteristics of request.
    2121//  Valid values are 10100001b (0xa1) or 00100001b (0x21).
     
    229229
    230230  ASSERT (UsbIo != NULL);
    231  
     231
    232232  //
    233233  // Fill Device request packet
     
    335335  EFI_STATUS              Result;
    336336  EFI_USB_DEVICE_REQUEST  Request;
    337  
     337
    338338  ASSERT (UsbIo != NULL);
    339339  ASSERT (Duration != NULL);
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/UefiUsbLib/UefiUsbLibInternal.h

    r48674 r58466  
    11/** @file
    2  
     2
    33  Common header file shared by all source files.
    44
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/UefiUsbLib/UsbDxeLib.c

    r48674 r58466  
    11/** @file
    22
    3   The library provides the USB Standard Device Requests defined 
     3  The library provides the USB Standard Device Requests defined
    44  in Usb specification 9.4 section.
    5  
     5
    66  Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.<BR>
    77  This program and the accompanying materials are
     
    1010  text of the license may be found at
    1111  http://opensource.org/licenses/bsd-license.php.
    12  
     12
    1313  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
    1414  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
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