--- /dev/null
+/** @file\r
+ \r
+ X64 platform related code to support FtwLite.\r
+ \r
+Copyright (c) 2006 - 2008, Intel Corporation \r
+All rights reserved. This program and the accompanying materials \r
+are licensed and made available under the terms and conditions of the BSD License \r
+which accompanies this distribution. 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
+\r
+**/\r
+\r
+\r
+#include <FtwLite.h>\r
+\r
+//\r
+// MACROs for boot block update\r
+//\r
+#define BOOT_BLOCK_BASE\r
+\r
+/**\r
+\r
+ Get swap state.\r
+\r
+\r
+ @param FtwLiteDevice Calling context\r
+ @param SwapState Swap state\r
+\r
+ @retval EFI_SUCCESS State successfully read.\r
+\r
+**/\r
+EFI_STATUS\r
+GetSwapState (\r
+ IN EFI_FTW_LITE_DEVICE *FtwLiteDevice,\r
+ OUT BOOLEAN *SwapState\r
+ )\r
+{\r
+ return EFI_SUCCESS;\r
+}\r
+\r
+/**\r
+ Set swap state.\r
+\r
+\r
+ @param FtwLiteDevice Indicates a pointer to the calling context.\r
+ @param TopSwap New swap state\r
+\r
+ @retval EFI_SUCCESS The function completed successfully\r
+ Note:\r
+ the Top-Swap bit (bit 13, D31: F0, Offset D4h). Note that\r
+ software will not be able to clear the Top-Swap bit until the system is\r
+ rebooted without GNT[A]# being pulled down.\r
+\r
+**/\r
+EFI_STATUS\r
+SetSwapState (\r
+ IN EFI_FTW_LITE_DEVICE *FtwLiteDevice,\r
+ IN BOOLEAN TopSwap\r
+ )\r
+{\r
+ return EFI_SUCCESS;\r
+}\r
+\r
+/**\r
+\r
+ Check whether the block is a boot block.\r
+\r
+\r
+ @param FtwLiteDevice Calling context\r
+ @param FvBlock Fvb protocol instance\r
+ @param Lba Lba value\r
+\r
+ @retval FALSE This is a boot block.\r
+ @retval TRUE This is not a boot block.\r
+\r
+**/\r
+BOOLEAN\r
+IsBootBlock (\r
+ EFI_FTW_LITE_DEVICE *FtwLiteDevice,\r
+ EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *FvBlock,\r
+ EFI_LBA Lba\r
+ )\r
+{\r
+ return FALSE;\r
+}\r
+\r
+/**\r
+ Copy the content of spare block to a boot block. Size is FTW_BLOCK_SIZE.\r
+ Spare block is accessed by FTW backup FVB protocol interface. LBA is\r
+ FtwLiteDevice->FtwSpareLba.\r
+ Boot block is accessed by BootFvb protocol interface. LBA is 0.\r
+\r
+\r
+ @param FtwLiteDevice The private data of FTW_LITE driver\r
+\r
+ @retval EFI_SUCCESS Spare block content is copied to boot block\r
+ @retval EFI_INVALID_PARAMETER Input parameter error\r
+ @retval EFI_OUT_OF_RESOURCES Allocate memory error\r
+ @retval EFI_ABORTED The function could not complete successfully\r
+ Notes:\r
+\r
+**/\r
+EFI_STATUS\r
+FlushSpareBlockToBootBlock (\r
+ EFI_FTW_LITE_DEVICE *FtwLiteDevice\r
+ )\r
+{\r
+ return EFI_SUCCESS;\r
+}\r