EDK2 doxygen online documents - Firmware Encoding Index 1
EDK2 doxygen online documents - Firmware Encoding Index

EdkCompatibilityPkg/Foundation/Protocol/FaultTolerantWriteLite/FaultTolerantWriteLite.h

Go to the documentation of this file.
00001 /*++
00002 
00003 Copyright (c) 2004, Intel Corporation. All rights reserved.<BR>
00004 This program and the accompanying materials                          
00005 are licensed and made available under the terms and conditions of the BSD License         
00006 which accompanies this distribution.  The full text of the license may be found at        
00007 http://opensource.org/licenses/bsd-license.php                                            
00008                                                                                           
00009 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     
00010 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             
00011 
00012 Module Name:
00013 
00014   FaultTolerantWriteLite.h
00015 
00016 Abstract:
00017 
00018   This is a simple fault tolerant write driver, based on PlatformFd library.
00019   And it only supports write BufferSize <= SpareAreaLength.
00020 
00021 --*/
00022 
00023 #ifndef _FW_FAULT_TOLERANT_WRITE_LITE_PROTOCOL_H_
00024 #define _FW_FAULT_TOLERANT_WRITE_LITE_PROTOCOL_H_
00025 
00026 #define EFI_FTW_LITE_PROTOCOL_GUID \
00027 { 0x3f557189, 0x8dae, 0x45ae, {0xa0, 0xb3, 0x2b, 0x99, 0xca, 0x7a, 0xa7, 0xa0} }
00028 
00029 //
00030 // Forward reference for pure ANSI compatability
00031 //
00032 EFI_FORWARD_DECLARATION (EFI_FTW_LITE_PROTOCOL);
00033 
00034 //
00035 // Protocol API definitions
00036 //
00037 
00038 typedef
00039 EFI_STATUS
00040 (EFIAPI * EFI_FTW_LITE_WRITE) (
00041   IN EFI_FTW_LITE_PROTOCOL             *This,
00042   IN EFI_HANDLE                        FvbHandle,
00043   IN EFI_LBA                           Lba,
00044   IN UINTN                             Offset,
00045   IN UINTN                             *NumBytes,
00046   IN VOID                              *Buffer
00047   );
00048 /*++
00049 
00050 Routine Description:
00051 
00052   Starts a target block update. This records information about the write 
00053   in fault tolerant storage and will complete the write in a recoverable 
00054   manner, ensuring at all times that either the original contents or 
00055   the modified contents are available.
00056 
00057 Arguments:
00058 
00059   This             - Calling context
00060   FvBlockHandle    - The handle of FVB protocol that provides services for 
00061                      reading, writing, and erasing the target block.
00062   Lba              - The logical block address of the target block.  
00063   Offset           - The offset within the target block to place the data.
00064   Length           - The number of bytes to write to the target block.
00065   Buffer           - The data to write.
00066 
00067 Returns:
00068 
00069   EFI_SUCCESS          - The function completed successfully
00070   EFI_ABORTED          - The function could not complete successfully.
00071   EFI_BAD_BUFFER_SIZE  - The write would span a block boundary, 
00072                          which is not a valid action.
00073   EFI_ACCESS_DENIED    - No writes have been allocated.
00074   EFI_NOT_READY        - The last write has not been completed.  
00075                          Restart () must be called to complete it.
00076 
00077 --*/
00078 
00079 //
00080 // Protocol declaration
00081 //
00082 struct _EFI_FTW_LITE_PROTOCOL {
00083   EFI_FTW_LITE_WRITE               Write;
00084 };
00085 
00086 extern EFI_GUID gEfiFaultTolerantWriteLiteProtocolGuid;
00087 
00088 #endif
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Defines