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 EFI_FIRMWARE_VOLUME_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
->GetVolumeAttributes (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 EFI_FIRMWARE_VOLUME_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
;