4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync/** @file
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync The EFI_SMM_SWAP_ADDRESS_RANGE_PROTOCOL is related to EDK II-specific implementation
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync and used to abstract the swap operation of boot block and backup block of FV in EFI
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync SMM environment. This swap is especially needed when updating the boot block of FV.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If a power failure happens during the boot block update, the swapped backup block
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync (now the boot block) can boot the machine with the old boot block backed up in it.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync The swap operation is platform dependent, so other protocols such as SMM FTW (Fault
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Tolerant Write) should use this protocol instead of handling hardware directly.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncCopyright (c) 2010, Intel Corporation. All rights reserved.<BR>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncThis program and the accompanying materials are licensed and made available under
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncthe terms and conditions of the BSD License that accompanies this distribution.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncThe full text of the license may be found at
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsynchttp://opensource.org/licenses/bsd-license.php.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncTHE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncWITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync**/
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync#ifndef __SMM_SWAP_ADDRESS_RANGE_H__
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync#define __SMM_SWAP_ADDRESS_RANGE_H__
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync#include <Protocol/SwapAddressRange.h>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync#define EFI_SMM_SWAP_ADDRESS_RANGE_PROTOCOL_GUID \
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync { \
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync 0x67c4f112, 0x3385, 0x4e55, { 0x9c, 0x5b, 0xc0, 0x5b, 0x71, 0x7c, 0x42, 0x28 } \
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync }
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync//
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync// SMM Swap Address Range protocol structure is the same as Swap Address Range protocol.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync// The SMM one is intend to run in SMM environment, which means it can be used by
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync// SMM drivers after ExitPmAuth.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync//
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsynctypedef EFI_SWAP_ADDRESS_RANGE_PROTOCOL EFI_SMM_SWAP_ADDRESS_RANGE_PROTOCOL;
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncextern EFI_GUID gEfiSmmSwapAddressRangeProtocolGuid;
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync#endif