summaryrefslogtreecommitdiff
path: root/MdeModulePkg
diff options
context:
space:
mode:
authoreric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524>2008-07-15 09:25:54 +0000
committereric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524>2008-07-15 09:25:54 +0000
commitb4d95a4da04176aff909a5479775b1b8a31e3939 (patch)
treedf6f1ad2796acebc5195e418fe1ca75559f574a3 /MdeModulePkg
parent1dd7b78263b059465102665b05e856566d68161e (diff)
downloadedk2-platforms-b4d95a4da04176aff909a5479775b1b8a31e3939.tar.xz
modify coding style to pass ecc tool
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5475 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg')
-rw-r--r--MdeModulePkg/Universal/FirmwareVolume/FaultTolerantWriteDxe/FtwLite.inf2
-rw-r--r--MdeModulePkg/Universal/FirmwareVolume/FaultTolerantWriteDxe/X64/X64FtwMisc.c112
2 files changed, 113 insertions, 1 deletions
diff --git a/MdeModulePkg/Universal/FirmwareVolume/FaultTolerantWriteDxe/FtwLite.inf b/MdeModulePkg/Universal/FirmwareVolume/FaultTolerantWriteDxe/FtwLite.inf
index 6882c0ade1..3ec4321071 100644
--- a/MdeModulePkg/Universal/FirmwareVolume/FaultTolerantWriteDxe/FtwLite.inf
+++ b/MdeModulePkg/Universal/FirmwareVolume/FaultTolerantWriteDxe/FtwLite.inf
@@ -41,7 +41,7 @@
Ia32/Ia32FtwMisc.c
[Sources.X64]
- x64/x64FtwMisc.c
+ X64/X64FtwMisc.c
[Sources.IPF]
Ipf/IpfFtwMisc.c
diff --git a/MdeModulePkg/Universal/FirmwareVolume/FaultTolerantWriteDxe/X64/X64FtwMisc.c b/MdeModulePkg/Universal/FirmwareVolume/FaultTolerantWriteDxe/X64/X64FtwMisc.c
new file mode 100644
index 0000000000..0474d78546
--- /dev/null
+++ b/MdeModulePkg/Universal/FirmwareVolume/FaultTolerantWriteDxe/X64/X64FtwMisc.c
@@ -0,0 +1,112 @@
+/** @file
+
+ X64 platform related code to support FtwLite.
+
+Copyright (c) 2006 - 2008, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+**/
+
+
+#include <FtwLite.h>
+
+//
+// MACROs for boot block update
+//
+#define BOOT_BLOCK_BASE
+
+/**
+
+ Get swap state.
+
+
+ @param FtwLiteDevice Calling context
+ @param SwapState Swap state
+
+ @retval EFI_SUCCESS State successfully read.
+
+**/
+EFI_STATUS
+GetSwapState (
+ IN EFI_FTW_LITE_DEVICE *FtwLiteDevice,
+ OUT BOOLEAN *SwapState
+ )
+{
+ return EFI_SUCCESS;
+}
+
+/**
+ Set swap state.
+
+
+ @param FtwLiteDevice Indicates a pointer to the calling context.
+ @param TopSwap New swap state
+
+ @retval EFI_SUCCESS The function completed successfully
+ Note:
+ the Top-Swap bit (bit 13, D31: F0, Offset D4h). Note that
+ software will not be able to clear the Top-Swap bit until the system is
+ rebooted without GNT[A]# being pulled down.
+
+**/
+EFI_STATUS
+SetSwapState (
+ IN EFI_FTW_LITE_DEVICE *FtwLiteDevice,
+ IN BOOLEAN TopSwap
+ )
+{
+ return EFI_SUCCESS;
+}
+
+/**
+
+ Check whether the block is a boot block.
+
+
+ @param FtwLiteDevice Calling context
+ @param FvBlock Fvb protocol instance
+ @param Lba Lba value
+
+ @retval FALSE This is a boot block.
+ @retval TRUE This is not a boot block.
+
+**/
+BOOLEAN
+IsBootBlock (
+ EFI_FTW_LITE_DEVICE *FtwLiteDevice,
+ EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *FvBlock,
+ EFI_LBA Lba
+ )
+{
+ return FALSE;
+}
+
+/**
+ Copy the content of spare block to a boot block. Size is FTW_BLOCK_SIZE.
+ Spare block is accessed by FTW backup FVB protocol interface. LBA is
+ FtwLiteDevice->FtwSpareLba.
+ Boot block is accessed by BootFvb protocol interface. LBA is 0.
+
+
+ @param FtwLiteDevice The private data of FTW_LITE driver
+
+ @retval EFI_SUCCESS Spare block content is copied to boot block
+ @retval EFI_INVALID_PARAMETER Input parameter error
+ @retval EFI_OUT_OF_RESOURCES Allocate memory error
+ @retval EFI_ABORTED The function could not complete successfully
+ Notes:
+
+**/
+EFI_STATUS
+FlushSpareBlockToBootBlock (
+ EFI_FTW_LITE_DEVICE *FtwLiteDevice
+ )
+{
+ return EFI_SUCCESS;
+}