]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Include/Protocol/FaultTolerantWriteLite.h
Remove the tailing ',' to ensure the code pass EBC's -Za option (Enforces strict...
[mirror_edk2.git] / MdeModulePkg / Include / Protocol / FaultTolerantWriteLite.h
1 /** @file
2 This is a simple fault tolerant write driver, based on PlatformFd library.
3 And it only supports write BufferSize <= SpareAreaLength.
4
5 Copyright (c) 2006 - 2008, Intel Corporation. <BR>
6 All rights reserved. This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
10
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13
14 **/
15
16 #ifndef __FW_FAULT_TOLERANT_WRITE_LITE_PROTOCOL_H__
17 #define __FW_FAULT_TOLERANT_WRITE_LITE_PROTOCOL_H__
18
19 #define EFI_FTW_LITE_PROTOCOL_GUID \
20 { 0x3f557189, 0x8dae, 0x45ae, {0xa0, 0xb3, 0x2b, 0x99, 0xca, 0x7a, 0xa7, 0xa0 } }
21
22 //
23 // Forward reference for pure ANSI compatability
24 //
25 typedef struct _EFI_FTW_LITE_PROTOCOL EFI_FTW_LITE_PROTOCOL;
26
27 //
28 // Protocol API definitions
29 //
30 /**
31 Starts a target block update. This records information about the write
32 in fault tolerant storage and will complete the write in a recoverable
33 manner, ensuring at all times that either the original contents or
34 the modified contents are available.
35
36 @param This Calling context
37 @param FvBlockHandle The handle of FVB protocol that provides services
38 for reading, writing, and erasing the target
39 block.
40 @param Lba The logical block address of the target block.
41 @param Offset The offset within the target block to place the
42 data.
43 @param Length The number of bytes to write to the target block.
44 @param Buffer The data to write.
45
46 @retval EFI_SUCCESS The function completed successfully
47 @retval EFI_ABORTED The function could not complete successfully.
48 @retval EFI_BAD_BUFFER_SIZE The write would span a block boundary, which is
49 not a valid action.
50 @retval EFI_ACCESS_DENIED No writes have been allocated.
51 @retval EFI_NOT_READY The last write has not been completed. Restart ()
52 must be called to complete it.
53
54 **/
55 typedef
56 EFI_STATUS
57 (EFIAPI * EFI_FTW_LITE_WRITE) (
58 IN EFI_FTW_LITE_PROTOCOL *This,
59 IN EFI_HANDLE FvbHandle,
60 IN EFI_LBA Lba,
61 IN UINTN Offset,
62 IN UINTN *NumBytes,
63 IN VOID *Buffer
64 )
65 ;
66
67 //
68 // Protocol declaration
69 //
70 struct _EFI_FTW_LITE_PROTOCOL {
71 EFI_FTW_LITE_WRITE Write;
72 };
73
74 extern EFI_GUID gEfiFaultTolerantWriteLiteProtocolGuid;
75
76 #endif