]> git.proxmox.com Git - mirror_edk2.git/blob - EdkCompatibilityPkg/Foundation/Framework/Protocol/FirmwareVolume2/FirmwareVolume2.h
Maintainers.txt: Remove EdkCompatibilityPkg information
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Framework / Protocol / FirmwareVolume2 / FirmwareVolume2.h
1 /*++
2
3 Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
4 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 FirmwareVolume2.h
15
16 Abstract:
17
18 PI 1.0 spec definition.
19
20 --*/
21
22 #ifndef __FIRMWARE_VOLUME2_H__
23 #define __FIRMWARE_VOLUME2_H__
24 #include "EfiImageFormat.h"
25 #include "EfiFirmwareVolume.h"
26
27 //
28 // Firmware Volume Protocol GUID definition
29 //
30 #define EFI_FIRMWARE_VOLUME2_PROTOCOL_GUID \
31 { 0x220e73b6, 0x6bdb, 0x4413, {0x84, 0x5, 0xb9, 0x74, 0xb1, 0x8, 0x61, 0x9a} }
32
33
34 EFI_FORWARD_DECLARATION (EFI_FIRMWARE_VOLUME2_PROTOCOL);
35
36
37 //
38 // ************************************************************
39 // EFI_FV2_ATTRIBUTES bit definitions
40 // ************************************************************
41 //
42 #define EFI_FV2_READ_DISABLE_CAP 0x0000000000000001
43 #define EFI_FV2_READ_ENABLE_CAP 0x0000000000000002
44 #define EFI_FV2_READ_STATUS 0x0000000000000004
45
46 #define EFI_FV2_WRITE_DISABLE_CAP 0x0000000000000008
47 #define EFI_FV2_WRITE_ENABLE_CAP 0x0000000000000010
48 #define EFI_FV2_WRITE_STATUS 0x0000000000000020
49
50 #define EFI_FV2_LOCK_CAP 0x0000000000000040
51 #define EFI_FV2_LOCK_STATUS 0x0000000000000080
52 #define EFI_FV2_WRITE_POLICY_RELIABLE 0x0000000000000100
53
54 #define EFI_FV2_READ_LOCK_CAP 0x0000000000001000
55 #define EFI_FV2_READ_LOCK_STATUS 0x0000000000002000
56 #define EFI_FV2_WRITE_LOCK_CAP 0x0000000000004000
57 #define EFI_FV2_WRITE_LOCK_STATUS 0x0000000000008000
58 #define EFI_FV2_ALIGNMENT 0x00000000001F0000
59
60
61 #define EFI_FV2_ALIGNMENT_1 0x0000000000000000
62 #define EFI_FV2_ALIGNMENT_2 0x0000000000010000
63 #define EFI_FV2_ALIGNMENT_4 0x0000000000020000
64 #define EFI_FV2_ALIGNMENT_8 0x0000000000030000
65 #define EFI_FV2_ALIGNMENT_16 0x0000000000040000
66 #define EFI_FV2_ALIGNMENT_32 0x0000000000050000
67 #define EFI_FV2_ALIGNMENT_64 0x0000000000060000
68 #define EFI_FV2_ALIGNMENT_128 0x0000000000070000
69 #define EFI_FV2_ALIGNMENT_256 0x0000000000080000
70 #define EFI_FV2_ALIGNMENT_512 0x0000000000090000
71 #define EFI_FV2_ALIGNMENT_1K 0x00000000000A0000
72 #define EFI_FV2_ALIGNMENT_2K 0x00000000000B0000
73 #define EFI_FV2_ALIGNMENT_4K 0x00000000000C0000
74 #define EFI_FV2_ALIGNMENT_8K 0x00000000000D0000
75 #define EFI_FV2_ALIGNMENT_16K 0x00000000000E0000
76 #define EFI_FV2_ALIGNMENT_32K 0x00000000000F0000
77 #define EFI_FV2_ALIGNMENT_64K 0x0000000000100000
78 #define EFI_FV2_ALIGNMENT_128K 0x0000000000110000
79 #define EFI_FV2_ALIGNMENT_256K 0x0000000000120000
80 #define EFI_FV2_ALIGNMENT_512K 0x0000000000130000
81 #define EFI_FV2_ALIGNMENT_1M 0x0000000000140000
82 #define EFI_FV2_ALIGNMENT_2M 0x0000000000150000
83 #define EFI_FV2_ALIGNMENT_4M 0x0000000000160000
84 #define EFI_FV2_ALIGNMENT_8M 0x0000000000170000
85 #define EFI_FV2_ALIGNMENT_16M 0x0000000000180000
86 #define EFI_FV2_ALIGNMENT_32M 0x0000000000190000
87 #define EFI_FV2_ALIGNMENT_64M 0x00000000001A0000
88 #define EFI_FV2_ALIGNMENT_128M 0x00000000001B0000
89 #define EFI_FV2_ALIGNMENT_256M 0x00000000001C0000
90 #define EFI_FV2_ALIGNMENT_512M 0x00000000001D0000
91 #define EFI_FV2_ALIGNMENT_1G 0x00000000001E0000
92 #define EFI_FV2_ALIGNMENT_2G 0x00000000001F0000
93
94 #define EFI_FV_FILE_ATTRIB_FIXED 0x00000100
95 #define EFI_FV_FILE_ATTRIB_MEMORY_MAPPED 0x00000200
96
97
98 //
99 // Protocol API definitions
100 //
101
102 typedef
103 EFI_STATUS
104 (EFIAPI *EFI_FV_GET_ATTRIBUTES) (
105 IN CONST EFI_FIRMWARE_VOLUME2_PROTOCOL *This,
106 OUT EFI_FV_ATTRIBUTES *Attributes
107 );
108
109 typedef
110 EFI_STATUS
111 (EFIAPI *EFI_FV_SET_ATTRIBUTES) (
112 IN CONST EFI_FIRMWARE_VOLUME2_PROTOCOL *This,
113 IN OUT EFI_FV_ATTRIBUTES *Attributes
114 );
115
116 typedef
117 EFI_STATUS
118 (EFIAPI *EFI_FV_READ_FILE) (
119 IN CONST EFI_FIRMWARE_VOLUME2_PROTOCOL *This,
120 IN CONST EFI_GUID *NameGuid,
121 IN OUT VOID **Buffer,
122 IN OUT UINTN *BufferSize,
123 OUT EFI_FV_FILETYPE *FoundType,
124 OUT EFI_FV_FILE_ATTRIBUTES *FileAttributes,
125 OUT UINT32 *AuthenticationStatus
126 );
127
128 typedef
129 EFI_STATUS
130 (EFIAPI *EFI_FV_READ_SECTION) (
131 IN CONST EFI_FIRMWARE_VOLUME2_PROTOCOL *This,
132 IN CONST EFI_GUID *NameGuid,
133 IN EFI_SECTION_TYPE SectionType,
134 IN UINTN SectionInstance,
135 IN OUT VOID **Buffer,
136 IN OUT UINTN *BufferSize,
137 OUT UINT32 *AuthenticationStatus
138 );
139
140
141 typedef
142 EFI_STATUS
143 (EFIAPI *EFI_FV_WRITE_FILE) (
144 IN CONST EFI_FIRMWARE_VOLUME2_PROTOCOL *This,
145 IN UINT32 NumberOfFiles,
146 IN EFI_FV_WRITE_POLICY WritePolicy,
147 IN EFI_FV_WRITE_FILE_DATA *FileData
148 );
149
150 typedef
151 EFI_STATUS
152 (EFIAPI *EFI_FV_GET_NEXT_FILE) (
153 IN CONST EFI_FIRMWARE_VOLUME2_PROTOCOL *This,
154 IN OUT VOID *Key,
155 IN OUT EFI_FV_FILETYPE *FileType,
156 OUT EFI_GUID *NameGuid,
157 OUT EFI_FV_FILE_ATTRIBUTES *Attributes,
158 OUT UINTN *Size
159 );
160
161 typedef
162 EFI_STATUS
163 (EFIAPI *EFI_FV_GET_INFO) (
164 IN CONST EFI_FIRMWARE_VOLUME2_PROTOCOL *This,
165 IN CONST EFI_GUID *InformationType,
166 IN OUT UINTN *BufferSize,
167 OUT VOID *Buffer
168 );
169
170 typedef
171 EFI_STATUS
172 (EFIAPI *EFI_FV_SET_INFO) (
173 IN CONST EFI_FIRMWARE_VOLUME2_PROTOCOL *This,
174 IN CONST EFI_GUID *InformationType,
175 IN UINTN BufferSize,
176 IN CONST VOID *Buffer
177 );
178
179
180 struct _EFI_FIRMWARE_VOLUME2_PROTOCOL {
181 EFI_FV_GET_ATTRIBUTES GetVolumeAttributes;
182 EFI_FV_SET_ATTRIBUTES SetVolumeAttributes;
183 EFI_FV_READ_FILE ReadFile;
184 EFI_FV_READ_SECTION ReadSection;
185 EFI_FV_WRITE_FILE WriteFile;
186 EFI_FV_GET_NEXT_FILE GetNextFile;
187 UINT32 KeySize;
188 EFI_HANDLE ParentHandle;
189 EFI_FV_GET_INFO GetInfo;
190 EFI_FV_SET_INFO SetInfo;
191 };
192
193 extern EFI_GUID gEfiFirmwareVolume2ProtocolGuid;
194
195 #endif