]>
Commit | Line | Data |
---|---|---|
1e354c03 | 1 | /** @file\r |
5f597758 LG |
2 | Fault tolerant write lite protocol defines only one interface to write \r |
3 | the buffer to the fault tolerant storage.\r | |
88f20127 | 4 | \r |
1e354c03 | 5 | Copyright (c) 2006 - 2008, Intel Corporation. <BR>\r |
88f20127 | 6 | All rights reserved. This program and the accompanying materials\r |
7 | are licensed and made available under the terms and conditions of the BSD License\r | |
8 | which accompanies this distribution. The full text of the license may be found at\r | |
9 | http://opensource.org/licenses/bsd-license.php\r | |
10 | \r | |
11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
12 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
13 | \r | |
1e354c03 | 14 | **/\r |
88f20127 | 15 | \r |
16 | #ifndef __FW_FAULT_TOLERANT_WRITE_LITE_PROTOCOL_H__\r | |
17 | #define __FW_FAULT_TOLERANT_WRITE_LITE_PROTOCOL_H__\r | |
18 | \r | |
19 | #define EFI_FTW_LITE_PROTOCOL_GUID \\r | |
20 | { 0x3f557189, 0x8dae, 0x45ae, {0xa0, 0xb3, 0x2b, 0x99, 0xca, 0x7a, 0xa7, 0xa0 } }\r | |
21 | \r | |
22 | //\r | |
23 | // Forward reference for pure ANSI compatability\r | |
24 | //\r | |
25 | typedef struct _EFI_FTW_LITE_PROTOCOL EFI_FTW_LITE_PROTOCOL;\r | |
26 | \r | |
27 | //\r | |
28 | // Protocol API definitions\r | |
29 | //\r | |
1e354c03 | 30 | /**\r |
31 | Starts a target block update. This records information about the write\r | |
32 | in fault tolerant storage and will complete the write in a recoverable\r | |
33 | manner, ensuring at all times that either the original contents or\r | |
34 | the modified contents are available.\r | |
88f20127 | 35 | \r |
5f597758 | 36 | @param This The pointer to this protocol instance. \r |
1e354c03 | 37 | @param FvBlockHandle The handle of FVB protocol that provides services \r |
38 | for reading, writing, and erasing the target \r | |
39 | block. \r | |
40 | @param Lba The logical block address of the target block. \r | |
41 | @param Offset The offset within the target block to place the \r | |
42 | data. \r | |
43 | @param Length The number of bytes to write to the target block. \r | |
44 | @param Buffer The data to write. \r | |
45 | \r | |
46 | @retval EFI_SUCCESS The function completed successfully \r | |
47 | @retval EFI_ABORTED The function could not complete successfully. \r | |
5f597758 | 48 | @retval EFI_BAD_BUFFER_SIZE The input data can't fit within the target block. \r |
1e354c03 | 49 | @retval EFI_ACCESS_DENIED No writes have been allocated. \r |
5f597758 LG |
50 | @retval EFI_OUT_OF_RESOURCES Cannot allocate enough memory resource.\r |
51 | @retval EFI_NOT_FOUND Cannot find FVB protocol by handle.\r | |
52 | \r | |
1e354c03 | 53 | **/\r |
88f20127 | 54 | typedef\r |
55 | EFI_STATUS\r | |
7d839888 | 56 | (EFIAPI * EFI_FTW_LITE_WRITE)(\r |
88f20127 | 57 | IN EFI_FTW_LITE_PROTOCOL *This,\r |
58 | IN EFI_HANDLE FvbHandle,\r | |
59 | IN EFI_LBA Lba,\r | |
60 | IN UINTN Offset,\r | |
61 | IN UINTN *NumBytes,\r | |
62 | IN VOID *Buffer\r | |
1e354c03 | 63 | )\r |
64 | ;\r | |
88f20127 | 65 | \r |
66 | //\r | |
67 | // Protocol declaration\r | |
68 | //\r | |
69 | struct _EFI_FTW_LITE_PROTOCOL {\r | |
70 | EFI_FTW_LITE_WRITE Write;\r | |
71 | };\r | |
72 | \r | |
73 | extern EFI_GUID gEfiFaultTolerantWriteLiteProtocolGuid;\r | |
74 | \r | |
75 | #endif\r |