]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/BaseS3BootScriptLibNull/BootScriptLib.c
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / MdePkg / Library / BaseS3BootScriptLibNull / BootScriptLib.c
index bb075db7d22c771a1e79dbec73fd2bfc6dc30938..6436b95001339a3214b3bde0cf93d9c775e3ca5e 100644 (file)
@@ -1,25 +1,17 @@
 /** @file\r
-  Null function implementation for EFI S3 boot script. \r
+  Null function implementation for EFI S3 boot script.\r
 \r
-  Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
-  This program and the accompanying materials\r
-  are licensed and made available under the terms and conditions\r
-  of the BSD License which accompanies this distribution.  The\r
-  full text of the license may be found at\r
-  http://opensource.org/licenses/bsd-license.php\r
-\r
-  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+  SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
 \r
-\r
 #include <Base.h>\r
 #include <Library/S3BootScriptLib.h>\r
 \r
 /**\r
-  Save I/O write to boot script \r
+  Save I/O write to boot script\r
 \r
   @param Width  the width of the I/O operations.Enumerated in S3_BOOT_SCRIPT_LIB_WIDTH.\r
   @param Address The base address of the I/O operations.\r
 RETURN_STATUS\r
 EFIAPI\r
 S3BootScriptSaveIoWrite (\r
-  IN  S3_BOOT_SCRIPT_LIB_WIDTH             Width,\r
-  IN  UINT64                            Address,\r
-  IN  UINTN                             Count,\r
-  IN  VOID                              *Buffer\r
+  IN  S3_BOOT_SCRIPT_LIB_WIDTH  Width,\r
+  IN  UINT64                    Address,\r
+  IN  UINTN                     Count,\r
+  IN  VOID                      *Buffer\r
   )\r
 {\r
-       return RETURN_SUCCESS;\r
+  return RETURN_SUCCESS;\r
 }\r
 \r
 /**\r
@@ -55,13 +47,13 @@ S3BootScriptSaveIoWrite (
 RETURN_STATUS\r
 EFIAPI\r
 S3BootScriptSaveIoReadWrite (\r
-  IN  S3_BOOT_SCRIPT_LIB_WIDTH             Width,\r
-  IN  UINT64                           Address,\r
-  IN  VOID                            *Data,\r
-  IN  VOID                            *DataMask\r
+  IN  S3_BOOT_SCRIPT_LIB_WIDTH  Width,\r
+  IN  UINT64                    Address,\r
+  IN  VOID                      *Data,\r
+  IN  VOID                      *DataMask\r
   )\r
 {\r
-       return RETURN_SUCCESS;\r
+  return RETURN_SUCCESS;\r
 }\r
 \r
 /**\r
@@ -78,14 +70,15 @@ S3BootScriptSaveIoReadWrite (
 RETURN_STATUS\r
 EFIAPI\r
 S3BootScriptSaveMemWrite (\r
-  IN  S3_BOOT_SCRIPT_LIB_WIDTH              Width,\r
-  IN  UINT64                            Address,\r
-  IN  UINTN                             Count,\r
-  IN  VOID                              *Buffer\r
+  IN  S3_BOOT_SCRIPT_LIB_WIDTH  Width,\r
+  IN  UINT64                    Address,\r
+  IN  UINTN                     Count,\r
+  IN  VOID                      *Buffer\r
   )\r
 {\r
-       return RETURN_SUCCESS;\r
+  return RETURN_SUCCESS;\r
 }\r
+\r
 /**\r
   Adds a record for a memory modify operation into a specified boot script table.\r
 \r
@@ -100,14 +93,15 @@ S3BootScriptSaveMemWrite (
 RETURN_STATUS\r
 EFIAPI\r
 S3BootScriptSaveMemReadWrite (\r
-  IN  S3_BOOT_SCRIPT_LIB_WIDTH             Width,\r
-  IN  UINT64                            Address,\r
-  IN  VOID                              *Data,\r
-  IN  VOID                              *DataMask\r
+  IN  S3_BOOT_SCRIPT_LIB_WIDTH  Width,\r
+  IN  UINT64                    Address,\r
+  IN  VOID                      *Data,\r
+  IN  VOID                      *DataMask\r
   )\r
 {\r
-       return RETURN_SUCCESS;\r
+  return RETURN_SUCCESS;\r
 }\r
+\r
 /**\r
   Adds a record for a PCI configuration space write operation into a specified boot script table.\r
 \r
@@ -122,13 +116,13 @@ S3BootScriptSaveMemReadWrite (
 RETURN_STATUS\r
 EFIAPI\r
 S3BootScriptSavePciCfgWrite (\r
-  IN  S3_BOOT_SCRIPT_LIB_WIDTH             Width,\r
-  IN  UINT64                           Address,\r
-  IN  UINTN                            Count,\r
-  IN  VOID                            *Buffer\r
+  IN  S3_BOOT_SCRIPT_LIB_WIDTH  Width,\r
+  IN  UINT64                    Address,\r
+  IN  UINTN                     Count,\r
+  IN  VOID                      *Buffer\r
   )\r
 {\r
-       return RETURN_SUCCESS;\r
+  return RETURN_SUCCESS;\r
 }\r
 \r
 /**\r
@@ -145,14 +139,15 @@ S3BootScriptSavePciCfgWrite (
 RETURN_STATUS\r
 EFIAPI\r
 S3BootScriptSavePciCfgReadWrite (\r
-  IN  S3_BOOT_SCRIPT_LIB_WIDTH          Width,\r
-  IN  UINT64                            Address,\r
-  IN  VOID                              *Data,\r
-  IN  VOID                              *DataMask\r
+  IN  S3_BOOT_SCRIPT_LIB_WIDTH  Width,\r
+  IN  UINT64                    Address,\r
+  IN  VOID                      *Data,\r
+  IN  VOID                      *DataMask\r
   )\r
 {\r
-       return RETURN_SUCCESS;\r
+  return RETURN_SUCCESS;\r
 }\r
+\r
 /**\r
   Adds a record for a PCI configuration space modify operation into a specified boot script table.\r
 \r
@@ -168,15 +163,16 @@ S3BootScriptSavePciCfgReadWrite (
 RETURN_STATUS\r
 EFIAPI\r
 S3BootScriptSavePciCfg2Write (\r
-  IN S3_BOOT_SCRIPT_LIB_WIDTH        Width,\r
-  IN UINT16                          Segment,\r
-  IN UINT64                          Address,\r
-  IN UINTN                           Count,\r
-  IN VOID                           *Buffer\r
+  IN S3_BOOT_SCRIPT_LIB_WIDTH  Width,\r
+  IN UINT16                    Segment,\r
+  IN UINT64                    Address,\r
+  IN UINTN                     Count,\r
+  IN VOID                      *Buffer\r
   )\r
 {\r
-       return RETURN_SUCCESS;\r
+  return RETURN_SUCCESS;\r
 }\r
+\r
 /**\r
   Adds a record for a PCI configuration space modify operation into a specified boot script table.\r
 \r
@@ -192,15 +188,16 @@ S3BootScriptSavePciCfg2Write (
 RETURN_STATUS\r
 EFIAPI\r
 S3BootScriptSavePciCfg2ReadWrite (\r
-  IN S3_BOOT_SCRIPT_LIB_WIDTH            Width,\r
-  IN UINT16                          Segment,\r
-  IN UINT64                          Address,\r
-  IN VOID                           *Data,\r
-  IN VOID                           *DataMask\r
+  IN S3_BOOT_SCRIPT_LIB_WIDTH  Width,\r
+  IN UINT16                    Segment,\r
+  IN UINT64                    Address,\r
+  IN VOID                      *Data,\r
+  IN VOID                      *DataMask\r
   )\r
-{ \r
-       return RETURN_SUCCESS;\r
+{\r
+  return RETURN_SUCCESS;\r
 }\r
+\r
 /**\r
   Adds a record for an SMBus command execution into a specified boot script table.\r
 \r
@@ -209,76 +206,84 @@ S3BootScriptSavePciCfg2ReadWrite (
                         transactions.\r
   @param Length         A pointer to signify the number of bytes that this operation will do.\r
   @param Buffer         Contains the value of data to execute to the SMBUS slave device.\r
-  \r
+\r
   @retval RETURN_OUT_OF_RESOURCES  Not enough memory for the table do operation.\r
   @retval RETURN_SUCCESS           Opcode is added.\r
 **/\r
 RETURN_STATUS\r
 EFIAPI\r
 S3BootScriptSaveSmbusExecute (\r
-  IN  UINTN                             SmBusAddress, \r
-  IN  EFI_SMBUS_OPERATION               Operation,\r
-  IN  UINTN                             *Length,\r
-  IN  VOID                              *Buffer\r
+  IN  UINTN                SmBusAddress,\r
+  IN  EFI_SMBUS_OPERATION  Operation,\r
+  IN  UINTN                *Length,\r
+  IN  VOID                 *Buffer\r
   )\r
 {\r
-       return RETURN_SUCCESS;\r
+  return RETURN_SUCCESS;\r
 }\r
+\r
 /**\r
   Adds a record for an execution stall on the processor into a specified boot script table.\r
 \r
   @param Duration   Duration in microseconds of the stall\r
-  \r
+\r
   @retval RETURN_OUT_OF_RESOURCES  Not enough memory for the table do operation.\r
   @retval RETURN_SUCCESS           Opcode is added.\r
 **/\r
 RETURN_STATUS\r
 EFIAPI\r
 S3BootScriptSaveStall (\r
-  IN  UINTN                             Duration\r
+  IN  UINTN  Duration\r
   )\r
 {\r
-       return RETURN_SUCCESS;\r
+  return RETURN_SUCCESS;\r
 }\r
+\r
 /**\r
   Adds a record for dispatching specified arbitrary code into a specified boot script table.\r
 \r
   @param EntryPoint   Entry point of the code to be dispatched.\r
-  \r
+\r
   @retval RETURN_OUT_OF_RESOURCES   Not enough memory for the table do operation.\r
   @retval RETURN_SUCCESS            Opcode is added.\r
 **/\r
 RETURN_STATUS\r
 EFIAPI\r
 S3BootScriptSaveDispatch (\r
-  IN  VOID *EntryPoint\r
+  IN  VOID  *EntryPoint\r
   )\r
 {\r
   return RETURN_SUCCESS;\r
 }\r
+\r
 /**\r
   Adds a record for dispatching specified arbitrary code into a specified boot script table.\r
 \r
   @param EntryPoint   Entry point of the code to be dispatched.\r
   @param Context      Argument to be passed into the EntryPoint of the code to be dispatched.\r
-  \r
+\r
   @retval RETURN_OUT_OF_RESOURCES  Not enough memory for the table do operation.\r
   @retval RETURN_SUCCESS           Opcode is added.\r
 **/\r
 RETURN_STATUS\r
 EFIAPI\r
 S3BootScriptSaveDispatch2 (\r
-  IN  VOID                              *EntryPoint,\r
-  IN  VOID                              *Context\r
+  IN  VOID  *EntryPoint,\r
+  IN  VOID  *Context\r
   )\r
 {\r
-       return RETURN_SUCCESS;\r
+  return RETURN_SUCCESS;\r
 }\r
 \r
 /**\r
   Adds a record for memory reads of the memory location and continues when the exit criteria is\r
   satisfied or after a defined duration.\r
-  \r
+\r
+  Please aware, below interface is different with PI specification, Vol 5:\r
+  EFI_S3_SAVE_STATE_PROTOCOL.Write() for EFI_BOOT_SCRIPT_MEM_POLL_OPCODE.\r
+  "Duration" below is microseconds, while "Delay" in PI specification means\r
+  the number of 100ns units to poll.\r
+\r
   @param Width     The width of the memory operations.\r
   @param Address   The base address of the memory operations.\r
   @param BitMask   A pointer to the bit mask to be AND-ed with the data read from the register.\r
@@ -293,24 +298,24 @@ S3BootScriptSaveDispatch2 (
 RETURN_STATUS\r
 EFIAPI\r
 S3BootScriptSaveMemPoll (\r
-  IN  S3_BOOT_SCRIPT_LIB_WIDTH             Width,\r
-  IN  UINT64                            Address,\r
-  IN  VOID                              *BitMask,\r
-  IN  VOID                              *BitValue,\r
-  IN  UINTN                             Duration,\r
-  IN  UINTN                             LoopTimes\r
+  IN  S3_BOOT_SCRIPT_LIB_WIDTH  Width,\r
+  IN  UINT64                    Address,\r
+  IN  VOID                      *BitMask,\r
+  IN  VOID                      *BitValue,\r
+  IN  UINTN                     Duration,\r
+  IN  UINT64                    LoopTimes\r
   )\r
 {\r
-       return RETURN_SUCCESS;\r
+  return RETURN_SUCCESS;\r
 }\r
 \r
 /**\r
   Store arbitrary information in the boot script table. This opcode is a no-op on dispatch and is only\r
   used for debugging script issues.\r
-  \r
+\r
   @param InformationLength   Length of the data in bytes\r
   @param Information       Information to be logged in the boot scrpit\r
\r
+\r
   @retval RETURN_UNSUPPORTED   If  entering runtime, this method will not support.\r
   @retval RETURN_OUT_OF_RESOURCES  Not enough memory for the table do operation.\r
   @retval RETURN_SUCCESS           Opcode is added.\r
@@ -319,17 +324,18 @@ S3BootScriptSaveMemPoll (
 RETURN_STATUS\r
 EFIAPI\r
 S3BootScriptSaveInformation (\r
-  IN  UINT32                   InformationLength, \r
-  IN  VOID                    *Information\r
+  IN  UINT32  InformationLength,\r
+  IN  VOID    *Information\r
   )\r
 {\r
-       return RETURN_SUCCESS;\r
+  return RETURN_SUCCESS;\r
 }\r
+\r
 /**\r
   Adds a record for I/O reads the I/O location and continues when the exit criteria is satisfied or after a\r
   defined duration.\r
-  \r
-  @param  Width                 The width of the I/O operations. \r
+\r
+  @param  Width                 The width of the I/O operations.\r
   @param  Address               The base address of the I/O operations.\r
   @param  Data                  The comparison value used for the polling exit criteria.\r
   @param  DataMask              Mask used for the polling criteria. The bits in the bytes below Width which are zero\r
@@ -344,21 +350,21 @@ S3BootScriptSaveInformation (
 RETURN_STATUS\r
 EFIAPI\r
 S3BootScriptSaveIoPoll (\r
-  IN S3_BOOT_SCRIPT_LIB_WIDTH       Width,\r
-  IN UINT64                     Address,\r
+  IN S3_BOOT_SCRIPT_LIB_WIDTH  Width,\r
+  IN UINT64                    Address,\r
   IN VOID                      *Data,\r
-  IN VOID                      *DataMask, \r
-  IN UINT64                     Delay   \r
+  IN VOID                      *DataMask,\r
+  IN UINT64                    Delay\r
   )\r
 {\r
-       return RETURN_SUCCESS;\r
+  return RETURN_SUCCESS;\r
 }\r
 \r
 /**\r
   Adds a record for PCI configuration space reads and continues when the exit criteria is satisfied or\r
   after a defined duration.\r
 \r
-  @param  Width                 The width of the I/O operations. \r
+  @param  Width                 The width of the I/O operations.\r
   @param  Address               The address within the PCI configuration space.\r
   @param  Data                  The comparison value used for the polling exit criteria.\r
   @param  DataMask              Mask used for the polling criteria. The bits in the bytes below Width which are zero\r
@@ -373,20 +379,21 @@ S3BootScriptSaveIoPoll (
 RETURN_STATUS\r
 EFIAPI\r
 S3BootScriptSavePciPoll (\r
-   IN S3_BOOT_SCRIPT_LIB_WIDTH   Width,\r
-   IN UINT64                     Address,\r
-   IN VOID                      *Data,\r
-   IN VOID                      *DataMask,\r
-   IN UINT64                     Delay\r
- )\r
+  IN S3_BOOT_SCRIPT_LIB_WIDTH  Width,\r
+  IN UINT64                    Address,\r
+  IN VOID                      *Data,\r
+  IN VOID                      *DataMask,\r
+  IN UINT64                    Delay\r
 )\r
 {\r
-       return RETURN_SUCCESS;\r
+  return RETURN_SUCCESS;\r
 }\r
+\r
 /**\r
   Adds a record for PCI configuration space reads and continues when the exit criteria is satisfied or\r
   after a defined duration.\r
 \r
-  @param  Width                 The width of the I/O operations. \r
+  @param  Width                 The width of the I/O operations.\r
   @param  Segment               The PCI segment number for Address.\r
   @param  Address               The address within the PCI configuration space.\r
   @param  Data                  The comparison value used for the polling exit criteria.\r
@@ -398,23 +405,24 @@ S3BootScriptSavePciPoll (
  @retval RETURN_OUT_OF_RESOURCES  Not enough memory for the table do operation.\r
  @retval RETURN_SUCCESS           Opcode is added.\r
  @note   A known Limitations in the implementation: When interpreting the opcode  EFI_BOOT_SCRIPT_PCI_CONFIG2_WRITE_OPCODE\r
-         EFI_BOOT_SCRIPT_PCI_CONFIG2_READ_WRITE_OPCODE and EFI_BOOT_SCRIPT_PCI_CONFIG2_POLL_OPCODE, the 'Segment' parameter is assumed as \r
+         EFI_BOOT_SCRIPT_PCI_CONFIG2_READ_WRITE_OPCODE and EFI_BOOT_SCRIPT_PCI_CONFIG2_POLL_OPCODE, the 'Segment' parameter is assumed as\r
          Zero, or else, assert.\r
 \r
 **/\r
 RETURN_STATUS\r
 EFIAPI\r
 S3BootScriptSavePci2Poll (\r
-   IN S3_BOOT_SCRIPT_LIB_WIDTH      Width,\r
-   IN UINT16                        Segment,\r
-   IN UINT64                        Address,\r
-   IN VOID                         *Data,\r
-   IN VOID                         *DataMask,\r
-   IN UINT64                        Delay\r
+  IN S3_BOOT_SCRIPT_LIB_WIDTH  Width,\r
+  IN UINT16                    Segment,\r
+  IN UINT64                    Address,\r
+  IN VOID                      *Data,\r
+  IN VOID                      *DataMask,\r
+  IN UINT64                    Delay\r
   )\r
 {\r
-       return RETURN_SUCCESS;\r
+  return RETURN_SUCCESS;\r
 }\r
+\r
 /**\r
   Save ASCII string information specified by Buffer to\r
   boot script with opcode EFI_BOOT_SCRIPT_INFORMATION_OPCODE\r
@@ -428,60 +436,63 @@ S3BootScriptSavePci2Poll (
 RETURN_STATUS\r
 EFIAPI\r
 S3BootScriptSaveInformationAsciiString (\r
-  IN  CONST CHAR8               *String\r
+  IN  CONST CHAR8  *String\r
   )\r
 {\r
-       return RETURN_SUCCESS;\r
+  return RETURN_SUCCESS;\r
 }\r
+\r
 /**\r
-  This is an function to close the S3 boot script table. The function could only be called in \r
-  BOOT time phase. To comply with the Framework spec definition on \r
+  This is an function to close the S3 boot script table. The function could only be called in\r
+  BOOT time phase. To comply with the Framework spec definition on\r
   EFI_BOOT_SCRIPT_SAVE_PROTOCOL.CloseTable(), this function will fulfill following things:\r
   1. Closes the specified boot script table\r
-  2. It allocates a new memory pool to duplicate all the boot scripts in the specified table. \r
-     Once this function is called, the table maintained by the library will be destroyed \r
+  2. It allocates a new memory pool to duplicate all the boot scripts in the specified table.\r
+     Once this function is called, the table maintained by the library will be destroyed\r
      after it is copied into the allocated pool.\r
-  3. Any attempts to add a script record after calling this function will cause a new table \r
+  3. Any attempts to add a script record after calling this function will cause a new table\r
      to be created by the library.\r
-  4. The base address of the allocated pool will be returned in Address. Note that after \r
+  4. The base address of the allocated pool will be returned in Address. Note that after\r
      using the boot script table, the CALLER is responsible for freeing the pool that is allocated\r
-     by this function. \r
+     by this function.\r
 \r
   In Spec PI1.1, this EFI_BOOT_SCRIPT_SAVE_PROTOCOL.CloseTable() is retired. By then it is not\r
   necessary to provide this API in BootScriptLib. To provides this API for now is only to meet\r
   the requirement from Framework Spec.\r
-  \r
-  If anyone does call CloseTable() on a real platform, then the caller is responsible for figuring out \r
-  how to get the script to run on an S3 resume because the boot script maintained by the lib will be \r
+\r
+  If anyone does call CloseTable() on a real platform, then the caller is responsible for figuring out\r
+  how to get the script to run on an S3 resume because the boot script maintained by the lib will be\r
   destroyed.\r
\r
-  @return the base address of the new copy of the boot script table.   \r
+\r
+  @return the base address of the new copy of the boot script table.\r
 \r
 **/\r
-UINT8*\r
+UINT8 *\r
 EFIAPI\r
 S3BootScriptCloseTable (\r
   VOID\r
   )\r
 {\r
-       return 0;\r
+  return 0;\r
 }\r
+\r
 /**\r
   Executes the S3 boot script table.\r
 \r
   @param RETURN_SUCCESS           The boot script table was executed successfully.\r
-  @param RETURN_UNSUPPORTED       Invalid script table or opcode.  \r
+  @param RETURN_UNSUPPORTED       Invalid script table or opcode.\r
 **/\r
 RETURN_STATUS\r
 EFIAPI\r
 S3BootScriptExecute (\r
-   VOID\r
+  VOID\r
   )\r
 {\r
-       return RETURN_SUCCESS;\r
+  return RETURN_SUCCESS;\r
 }\r
+\r
 /**\r
-  Move the last boot script entry to the position \r
+  Move the last boot script entry to the position\r
 \r
   @param  BeforeOrAfter         Specifies whether the opcode is stored before (TRUE) or after (FALSE) the position\r
                                 in the boot script table specified by Position. If Position is NULL or points to\r
@@ -498,19 +509,20 @@ S3BootScriptExecute (
 RETURN_STATUS\r
 EFIAPI\r
 S3BootScriptMoveLastOpcode (\r
-  IN     BOOLEAN                        BeforeOrAfter,\r
-  IN OUT VOID                         **Position OPTIONAL\r
-)\r
+  IN     BOOLEAN  BeforeOrAfter,\r
+  IN OUT VOID     **Position OPTIONAL\r
+  )\r
 {\r
-       return RETURN_SUCCESS;\r
+  return RETURN_SUCCESS;\r
 }\r
+\r
 /**\r
   Find a label within the boot script table and, if not present, optionally create it.\r
 \r
   @param  BeforeOrAfter         Specifies whether the opcode is stored before (TRUE)\r
-                                or after (FALSE) the position in the boot script table \r
+                                or after (FALSE) the position in the boot script table\r
                                 specified by Position.\r
-  @param  CreateIfNotFound      Specifies whether the label will be created if the label \r
+  @param  CreateIfNotFound      Specifies whether the label will be created if the label\r
                                 does not exists (TRUE) or not (FALSE).\r
   @param  Position              On entry, specifies the position in the boot script table\r
                                 where the opcode will be inserted, either before or after,\r
@@ -521,22 +533,23 @@ S3BootScriptMoveLastOpcode (
   @retval EFI_SUCCESS           The operation succeeded. A record was added into the\r
                                 specified script table.\r
   @retval EFI_INVALID_PARAMETER The parameter is illegal or the given boot script is not supported.\r
-                                If the opcode is unknow or not supported because of the PCD \r
+                                If the opcode is unknow or not supported because of the PCD\r
                                 Feature Flags.\r
   @retval EFI_OUT_OF_RESOURCES  There is insufficient memory to store the boot script.\r
 \r
 **/\r
 RETURN_STATUS\r
-EFIAPI \r
+EFIAPI\r
 S3BootScriptLabel (\r
-  IN       BOOLEAN                      BeforeOrAfter,\r
-  IN       BOOLEAN                      CreateIfNotFound,\r
-  IN OUT   VOID                       **Position OPTIONAL,\r
-  IN CONST CHAR8                       *Label\r
+  IN       BOOLEAN  BeforeOrAfter,\r
+  IN       BOOLEAN  CreateIfNotFound,\r
+  IN OUT   VOID     **Position OPTIONAL,\r
+  IN CONST CHAR8    *Label\r
   )\r
 {\r
-       return RETURN_SUCCESS;\r
+  return RETURN_SUCCESS;\r
 }\r
+\r
 /**\r
   Compare two positions in the boot script table and return their relative position.\r
   @param  Position1             The positions in the boot script table to compare\r
@@ -546,18 +559,18 @@ S3BootScriptLabel (
   @retval EFI_SUCCESS           The operation succeeded. A record was added into the\r
                                 specified script table.\r
   @retval EFI_INVALID_PARAMETER The parameter is illegal or the given boot script is not supported.\r
-                                If the opcode is unknow or not supported because of the PCD \r
+                                If the opcode is unknow or not supported because of the PCD\r
                                 Feature Flags.\r
   @retval EFI_OUT_OF_RESOURCES  There is insufficient memory to store the boot script.\r
 \r
 **/\r
 RETURN_STATUS\r
-EFIAPI \r
+EFIAPI\r
 S3BootScriptCompare (\r
-  IN  UINT8                       *Position1,\r
-  IN  UINT8                       *Position2,\r
-  OUT UINTN                       *RelativePosition\r
+  IN  UINT8  *Position1,\r
+  IN  UINT8  *Position2,\r
+  OUT UINTN  *RelativePosition\r
   )\r
 {\r
-       return RETURN_SUCCESS;\r
+  return RETURN_SUCCESS;\r
 }\r