]> git.proxmox.com Git - mirror_edk2.git/commitdiff
modify coding style to pass ecc tool
authoreric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 15 Jul 2008 09:25:54 +0000 (09:25 +0000)
committereric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 15 Jul 2008 09:25:54 +0000 (09:25 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5475 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Universal/FirmwareVolume/FaultTolerantWriteDxe/FtwLite.inf
MdeModulePkg/Universal/FirmwareVolume/FaultTolerantWriteDxe/X64/X64FtwMisc.c [new file with mode: 0644]

index 6882c0ade18ca2282ab809fbd8b0ac205909dab7..3ec4321071fe7038e7e2c5fcac326fec43fdd778 100644 (file)
@@ -41,7 +41,7 @@
   Ia32/Ia32FtwMisc.c\r
 \r
 [Sources.X64]\r
-  x64/x64FtwMisc.c\r
+  X64/X64FtwMisc.c\r
 \r
 [Sources.IPF]\r
   Ipf/IpfFtwMisc.c\r
diff --git a/MdeModulePkg/Universal/FirmwareVolume/FaultTolerantWriteDxe/X64/X64FtwMisc.c b/MdeModulePkg/Universal/FirmwareVolume/FaultTolerantWriteDxe/X64/X64FtwMisc.c
new file mode 100644 (file)
index 0000000..0474d78
--- /dev/null
@@ -0,0 +1,112 @@
+/** @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