]> git.proxmox.com Git - mirror_edk2.git/blame - ArmPlatformPkg/FileSystem/BootMonFs/BootMonFsApi.h
BaseTools/Upt: Fix several bugs
[mirror_edk2.git] / ArmPlatformPkg / FileSystem / BootMonFs / BootMonFsApi.h
CommitLineData
94e0955d
OM
1/** @file\r
2*\r
3* Copyright (c) 2012-2014, ARM Limited. All rights reserved.\r
4*\r
5* This program and the accompanying materials\r
6* are licensed and made available under the terms and conditions of the BSD License\r
7* which accompanies this distribution. The full text of the license may be found at\r
8* http://opensource.org/licenses/bsd-license.php\r
9*\r
10* THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11* WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12*\r
13**/\r
14\r
15#ifndef __BOOTMON_FS_API_H\r
16#define __BOOTMON_FS_API_H\r
17\r
18#include <Protocol/SimpleFileSystem.h>\r
19\r
94e0955d
OM
20EFI_STATUS\r
21BootMonFsInitialize (\r
22 IN BOOTMON_FS_INSTANCE *Instance\r
23 );\r
24\r
25UINT32\r
26BootMonFsChecksum (\r
27 IN VOID *Data,\r
28 IN UINT32 Size\r
29 );\r
30\r
31EFI_STATUS\r
32BootMonFsComputeFooterChecksum (\r
33 IN OUT HW_IMAGE_DESCRIPTION *Footer\r
34 );\r
35\r
36EFIAPI\r
37EFI_STATUS\r
38OpenBootMonFsOpenVolume (\r
39 IN EFI_SIMPLE_FILE_SYSTEM_PROTOCOL *This,\r
40 OUT EFI_FILE_PROTOCOL **Root\r
41 );\r
42\r
43UINT32\r
44BootMonFsGetImageLength (\r
45 IN BOOTMON_FS_FILE *File\r
46 );\r
47\r
48UINTN\r
49BootMonFsGetPhysicalSize (\r
50 IN BOOTMON_FS_FILE* File\r
51 );\r
52\r
53EFI_STATUS\r
54BootMonFsCreateFile (\r
55 IN BOOTMON_FS_INSTANCE *Instance,\r
56 OUT BOOTMON_FS_FILE **File\r
57 );\r
58\r
59EFIAPI\r
60EFI_STATUS\r
61BootMonFsGetInfo (\r
62 IN EFI_FILE_PROTOCOL *This,\r
63 IN EFI_GUID *InformationType,\r
64 IN OUT UINTN *BufferSize,\r
65 OUT VOID *Buffer\r
66 );\r
67\r
68EFIAPI\r
69EFI_STATUS\r
70BootMonFsReadDirectory (\r
71 IN EFI_FILE_PROTOCOL *This,\r
72 IN OUT UINTN *BufferSize,\r
73 OUT VOID *Buffer\r
74 );\r
75\r
76EFIAPI\r
77EFI_STATUS\r
78BootMonFsFlushDirectory (\r
79 IN EFI_FILE_PROTOCOL *This\r
80 );\r
81\r
82EFIAPI\r
83EFI_STATUS\r
84BootMonFsFlushFile (\r
85 IN EFI_FILE_PROTOCOL *This\r
86 );\r
87\r
88EFIAPI\r
89EFI_STATUS\r
90BootMonFsCloseFile (\r
91 IN EFI_FILE_PROTOCOL *This\r
92 );\r
93\r
94EFIAPI\r
95EFI_STATUS\r
96BootMonFsOpenFile (\r
97 IN EFI_FILE_PROTOCOL *This,\r
98 OUT EFI_FILE_PROTOCOL **NewHandle,\r
99 IN CHAR16 *FileName,\r
100 IN UINT64 OpenMode,\r
101 IN UINT64 Attributes\r
102 );\r
103\r
104\r
105EFIAPI\r
106EFI_STATUS\r
107BootMonFsReadFile (\r
108 IN EFI_FILE_PROTOCOL *This,\r
109 IN OUT UINTN *BufferSize,\r
110 OUT VOID *Buffer\r
111 );\r
112\r
113EFIAPI\r
114EFI_STATUS\r
115BootMonFsSetDirPosition (\r
116 IN EFI_FILE_PROTOCOL *This,\r
117 IN UINT64 Position\r
118 );\r
119\r
120EFIAPI\r
121EFI_STATUS\r
122BootMonFsGetPosition (\r
123 IN EFI_FILE_PROTOCOL *This,\r
124 OUT UINT64 *Position\r
125 );\r
126\r
127EFIAPI\r
128EFI_STATUS\r
129BootMonFsWriteFile (\r
130 IN EFI_FILE_PROTOCOL *This,\r
131 IN OUT UINTN *BufferSize,\r
132 IN VOID *Buffer\r
133 );\r
134\r
135EFIAPI\r
136EFI_STATUS\r
137BootMonFsDeleteFail (\r
138 IN EFI_FILE_PROTOCOL *This\r
139 );\r
140\r
141EFIAPI\r
142EFI_STATUS\r
143BootMonFsDelete (\r
144 IN EFI_FILE_PROTOCOL *This\r
145 );\r
146\r
147EFIAPI\r
148EFI_STATUS\r
149BootMonFsSetPosition (\r
150 IN EFI_FILE_PROTOCOL *This,\r
151 IN UINT64 Position\r
152 );\r
153\r
154EFIAPI\r
155EFI_STATUS\r
156BootMonFsGetPosition(\r
157 IN EFI_FILE_PROTOCOL *This,\r
158 OUT UINT64 *Position\r
159 );\r
160\r
161//\r
162// UNSUPPORTED OPERATIONS\r
163//\r
164\r
165EFIAPI\r
166EFI_STATUS\r
167BootMonFsGetPositionUnsupported (\r
168 IN EFI_FILE_PROTOCOL *This,\r
169 OUT UINT64 *Position\r
170 );\r
171\r
172EFIAPI\r
173EFI_STATUS\r
174BootMonFsSetInfo (\r
175 IN EFI_FILE_PROTOCOL *This,\r
176 IN EFI_GUID *InformationType,\r
177 IN UINTN BufferSize,\r
178 IN VOID *Buffer\r
179 );\r
180\r
181//\r
182// Directory API\r
183//\r
184\r
185EFI_STATUS\r
186BootMonFsOpenDirectory (\r
187 OUT EFI_FILE_PROTOCOL **NewHandle,\r
188 IN CHAR16 *FileName,\r
189 IN BOOTMON_FS_INSTANCE *Volume\r
190 );\r
191\r
192//\r
193// Internal API\r
194//\r
195EFI_STATUS\r
196BootMonGetFileFromAsciiFileName (\r
197 IN BOOTMON_FS_INSTANCE *Instance,\r
198 IN CHAR8* AsciiFileName,\r
199 OUT BOOTMON_FS_FILE **File\r
200 );\r
201\r
202EFI_STATUS\r
203BootMonGetFileFromPosition (\r
204 IN BOOTMON_FS_INSTANCE *Instance,\r
205 IN UINTN Position,\r
206 OUT BOOTMON_FS_FILE **File\r
207 );\r
208\r
209#endif\r