3 Copyright (c) 2006, 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
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.
18 Implements get/set firmware volume attributes
26 FvGetVolumeAttributes (
27 IN CONST EFI_FIRMWARE_VOLUME2_PROTOCOL
*This
,
28 OUT EFI_FV_ATTRIBUTES
*Attributes
33 Retrieves attributes, insures positive polarity of attribute bits, returns
34 resulting attributes in output parameter
37 This - Calling context
38 Attributes - output buffer which contains attributes
41 EFI_SUCCESS - Successfully got volume attributes
47 EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL
*Fvb
;
48 EFI_FVB_ATTRIBUTES FvbAttributes
;
50 FvDevice
= FV_DEVICE_FROM_THIS (This
);
53 if (FvDevice
->CachedFv
== NULL
) {
54 Status
= FvCheck (FvDevice
);
55 if (EFI_ERROR (Status
)) {
61 // First get the Firmware Volume Block Attributes
63 Status
= Fvb
->GetAttributes (Fvb
, &FvbAttributes
);
66 // Mask out Fvb bits that are not defined in FV
68 FvbAttributes
&= 0xfffff0ff;
70 *Attributes
= (EFI_FV_ATTRIBUTES
)FvbAttributes
;
78 FvSetVolumeAttributes (
79 IN CONST EFI_FIRMWARE_VOLUME2_PROTOCOL
*This
,
80 IN OUT EFI_FV_ATTRIBUTES
*Attributes
85 Sets current attributes for volume
88 This - Calling context
89 Attributes - At input, contains attributes to be set. At output contains
93 EFI_UNSUPPORTED - Could not be set.
97 return EFI_UNSUPPORTED
;
103 IN CONST EFI_FIRMWARE_VOLUME2_PROTOCOL
*This
,
104 IN CONST EFI_GUID
*InformationType
,
105 IN OUT UINTN
*BufferSize
,
111 Return information of type InformationType for the requested firmware
115 This - Pointer to EFI_FIRMWARE_VOLUME2_PROTOCOL.
116 InformationType - InformationType for requested.
117 BufferSize - On input, size of Buffer.On output, the amount of
118 data returned in Buffer.
119 Buffer - A poniter to the data buffer to return.
121 EFI_SUCCESS - Successfully got volume Information.
125 return EFI_UNSUPPORTED
;
132 IN CONST EFI_FIRMWARE_VOLUME2_PROTOCOL
*This
,
133 IN CONST EFI_GUID
*InformationType
,
135 IN CONST VOID
*Buffer
140 Set information of type InformationType for the requested firmware
144 This - Pointer to EFI_FIRMWARE_VOLUME2_PROTOCOL.
145 InformationType - InformationType for requested.
146 BufferSize - On input, size of Buffer.On output, the amount of
147 data returned in Buffer.
148 Buffer - A poniter to the data buffer to return.
150 EFI_SUCCESS - Successfully set volume Information.
154 return EFI_UNSUPPORTED
;