]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Include/Protocol/SwapAddressRange.h
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / MdeModulePkg / Include / Protocol / SwapAddressRange.h
index d5bd801adaf8f282975d58aea4954b4b087cba11..053987767a0474e2754d6aadac75b3536820d046 100644 (file)
@@ -1,18 +1,12 @@
 /** @file\r
-The EFI_SWAP_ADDRESS_RANGE_PROTOCOL is used to abstract the swap operation of boot block \r
-and backup block of FV. This swap is especially needed when updating the boot block of FV. If a \r
-power failure happens during the boot block update, the swapped backup block (now the boot block) \r
-can boot the machine with the old boot block backed up in it. The swap operation is platform dependent, so \r
+The EFI_SWAP_ADDRESS_RANGE_PROTOCOL is used to abstract the swap operation of boot block\r
+and backup block of FV. This swap is especially needed when updating the boot block of FV. If a\r
+power failure happens during the boot block update, the swapped backup block (now the boot block)\r
+can boot the machine with the old boot block backed up in it. The swap operation is platform dependent, so\r
 other protocols such as FTW (Fault Tolerant Write) should use this protocol instead of handling hardware directly.\r
 \r
-Copyright (c) 2009 - 2010, Intel Corporation.  All rights reserved. <BR>\r
-This program and the accompanying materials are licensed and made available under \r
-the terms and conditions of the BSD License that accompanies this distribution.  \r
-The 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
+Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
+SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
 \r
@@ -27,7 +21,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 //\r
 // Forward reference for pure ANSI compatability\r
 //\r
-typedef struct _EFI_SWAP_ADDRESS_RANGE_PROTOCOL  EFI_SWAP_ADDRESS_RANGE_PROTOCOL;\r
+typedef struct _EFI_SWAP_ADDRESS_RANGE_PROTOCOL EFI_SWAP_ADDRESS_RANGE_PROTOCOL;\r
 \r
 #define EFI_UNSUPPORT_LOCK  0\r
 #define EFI_SOFTWARE_LOCK   1\r
@@ -40,17 +34,17 @@ typedef UINT8 EFI_SWAP_LOCK_CAPABILITY;
 //\r
 \r
 /**\r
-  This function gets the address range location of \r
-  boot block and backup block. \r
+  This function gets the address range location of\r
+  boot block and backup block.\r
 \r
-  @param This             Indicates the calling context.  \r
+  @param This             Indicates the calling context.\r
   @param BootBlockBase    The base address of current boot block.\r
   @param BootBlockSize    The size (in bytes) of current boot block.\r
   @param BackupBlockBase  The base address of current backup block.\r
   @param BackupBlockSize  The size (in bytes) of current backup block.\r
 \r
   @retval EFI_SUCCESS  The call was successful.\r
-    \r
+\r
 **/\r
 typedef\r
 EFI_STATUS\r
@@ -65,12 +59,12 @@ EFI_STATUS
 /**\r
   This service checks if the boot block and backup block has been swapped.\r
 \r
-  @param This          Indicates the calling context.  \r
-  @param SwapState     True if the boot block and backup block has been swapped. \r
+  @param This          Indicates the calling context.\r
+  @param SwapState     True if the boot block and backup block has been swapped.\r
                        False if the boot block and backup block has not been swapped.\r
 \r
   @retval EFI_SUCCESS  The call was successful.\r
-    \r
+\r
 **/\r
 typedef\r
 EFI_STATUS\r
@@ -82,15 +76,15 @@ EFI_STATUS
 /**\r
   This service swaps the boot block and backup block, or swaps them back.\r
 \r
-  It also acquires and releases software swap lock during operation. The setting of the new swap state \r
+  It also acquires and releases software swap lock during operation. The setting of the new swap state\r
   is not affected by the old swap state.\r
 \r
-  @param This            Indicates the calling context.  \r
+  @param This            Indicates the calling context.\r
   @param NewSwapState    True to swap real boot block and backup block, False to swap them back.\r
 \r
   @retval EFI_SUCCESS  The call was successful.\r
   @retval EFI_ABORTED  Set swap state error.\r
-    \r
+\r
 **/\r
 typedef\r
 EFI_STATUS\r
@@ -99,19 +93,17 @@ EFI_STATUS
   IN BOOLEAN                                    NewSwapState\r
   );\r
 \r
-\r
-\r
 /**\r
   This service checks if a Real Time Clock (RTC) power failure happened.\r
 \r
-  If parameter RtcPowerFailed is true after the function returns, RTC power supply failed or was removed. \r
+  If parameter RtcPowerFailed is true after the function returns, RTC power supply failed or was removed.\r
   It is recommended to check RTC power status before calling GetSwapState().\r
 \r
-  @param This             Indicates the calling context.  \r
-  @param RtcPowerFailed   True if the RTC (Real Time Clock) power failed or was removed. \r
+  @param This             Indicates the calling context.\r
+  @param RtcPowerFailed   True if the RTC (Real Time Clock) power failed or was removed.\r
 \r
   @retval EFI_SUCCESS The call was successful.\r
-    \r
+\r
 **/\r
 typedef\r
 EFI_STATUS\r
@@ -121,15 +113,15 @@ EFI_STATUS
   );\r
 \r
 /**\r
-  This service returns all lock methods for swap operations that the current platform \r
+  This service returns all lock methods for swap operations that the current platform\r
   supports. Could be software lock, hardware lock, or unsupport lock.\r
   Note that software and hardware lock methods can be used simultaneously.\r
 \r
   @param This             Indicates the calling context.\r
-  @param LockCapability   The current lock method for swap operations. \r
+  @param LockCapability   The current lock method for swap operations.\r
 \r
   @retval EFI_SUCCESS The call was successful.\r
-    \r
+\r
 **/\r
 typedef\r
 EFI_STATUS\r
@@ -138,8 +130,6 @@ EFI_STATUS
   OUT EFI_SWAP_LOCK_CAPABILITY                  *LockCapability\r
   );\r
 \r
-\r
-\r
 /**\r
   This service is used to acquire or release appointed kind of lock for Swap Address Range operations.\r
 \r
@@ -150,7 +140,7 @@ EFI_STATUS
   @param NewLockState      True to acquire lock; False to release lock.\r
 \r
   @retval EFI_SUCCESS The call was successful.\r
-    \r
+\r
 **/\r
 typedef\r
 EFI_STATUS\r
@@ -161,14 +151,14 @@ EFI_STATUS
   );\r
 \r
 struct _EFI_SWAP_ADDRESS_RANGE_PROTOCOL {\r
-  EFI_GET_RANGE_LOCATION        GetRangeLocation;       // has output parameters for base and length\r
-  EFI_GET_SWAP_STATE            GetSwapState;           // are ranges swapped or not\r
-  EFI_SET_SWAP_STATE            SetSwapState;           // swap or unswap ranges\r
-  EFI_GET_RTC_POWER_STATUS      GetRtcPowerStatus;      // checks RTC battery, or whatever...\r
-  EFI_GET_SWAP_LOCK_CAPABILITY  GetSwapLockCapability;  // Get TOP_SWAP lock capability,\r
-  EFI_SET_SWAP_LOCK             SetSwapLock;            // Set TOP_SWAP lock state\r
+  EFI_GET_RANGE_LOCATION          GetRangeLocation;      // has output parameters for base and length\r
+  EFI_GET_SWAP_STATE              GetSwapState;          // are ranges swapped or not\r
+  EFI_SET_SWAP_STATE              SetSwapState;          // swap or unswap ranges\r
+  EFI_GET_RTC_POWER_STATUS        GetRtcPowerStatus;     // checks RTC battery, or whatever...\r
+  EFI_GET_SWAP_LOCK_CAPABILITY    GetSwapLockCapability; // Get TOP_SWAP lock capability,\r
+  EFI_SET_SWAP_LOCK               SetSwapLock;           // Set TOP_SWAP lock state\r
 };\r
 \r
-extern EFI_GUID gEfiSwapAddressRangeProtocolGuid;\r
+extern EFI_GUID  gEfiSwapAddressRangeProtocolGuid;\r
 \r
 #endif\r