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