-/*++\r
+/** @file\r
+ Implements get/set firmware volume attributes\r
\r
-Copyright (c) 2006, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution. The full text of the license may be found at \r
-http://opensource.org/licenses/bsd-license.php \r
- \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
+Copyright (c) 2006 - 2008, Intel Corporation. <BR>\r
+All rights reserved. This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution. The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
\r
-Module Name:\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
- FwVolAttrib.c\r
+**/\r
\r
-Abstract:\r
+#include "DxeMain.h"\r
+#include "FwVolDriver.h"\r
\r
- Implements get/set firmware volume attributes\r
\r
---*/\r
+/**\r
+ Retrieves attributes, insures positive polarity of attribute bits, returns\r
+ resulting attributes in output parameter.\r
+\r
+ @param This Calling context\r
+ @param Attributes output buffer which contains attributes\r
\r
-#include <DxeMain.h>\r
+ @retval EFI_SUCCESS Successfully got volume attributes\r
\r
+**/\r
EFI_STATUS\r
EFIAPI\r
FvGetVolumeAttributes (\r
- IN EFI_FIRMWARE_VOLUME_PROTOCOL *This,\r
- OUT EFI_FV_ATTRIBUTES *Attributes\r
+ IN CONST EFI_FIRMWARE_VOLUME2_PROTOCOL *This,\r
+ OUT EFI_FV_ATTRIBUTES *Attributes\r
)\r
-/*++\r
-\r
-Routine Description:\r
- Retrieves attributes, insures positive polarity of attribute bits, returns\r
- resulting attributes in output parameter\r
-\r
-Arguments:\r
- This - Calling context\r
- Attributes - output buffer which contains attributes\r
-\r
-Returns:\r
- EFI_SUCCESS - Successfully got volume attributes\r
-\r
---*/\r
{\r
EFI_STATUS Status;\r
FV_DEVICE *FvDevice;\r
EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *Fvb;\r
- EFI_FVB_ATTRIBUTES FvbAttributes;\r
+ EFI_FVB_ATTRIBUTES_2 FvbAttributes;\r
\r
FvDevice = FV_DEVICE_FROM_THIS (This);\r
Fvb = FvDevice->Fvb;\r
Status = Fvb->GetAttributes (Fvb, &FvbAttributes);\r
\r
//\r
- // Mask out Fvb bits that are not defined in FV \r
+ // Mask out Fvb bits that are not defined in FV\r
//\r
FvbAttributes &= 0xfffff0ff;\r
- \r
- *Attributes = (EFI_FV_ATTRIBUTES)FvbAttributes; \r
- \r
+\r
+ *Attributes = (EFI_FV_ATTRIBUTES)FvbAttributes;\r
+\r
return Status;\r
}\r
\r
\r
+\r
+/**\r
+ Sets current attributes for volume\r
+\r
+ @param This Calling context\r
+ @param Attributes At input, contains attributes to be set. At output\r
+ contains new value of FV\r
+\r
+ @retval EFI_UNSUPPORTED Could not be set.\r
+\r
+**/\r
EFI_STATUS\r
EFIAPI\r
FvSetVolumeAttributes (\r
- IN EFI_FIRMWARE_VOLUME_PROTOCOL *This,\r
- IN OUT EFI_FV_ATTRIBUTES *Attributes\r
+ IN CONST EFI_FIRMWARE_VOLUME2_PROTOCOL *This,\r
+ IN OUT EFI_FV_ATTRIBUTES *Attributes\r
+ )\r
+{\r
+ return EFI_UNSUPPORTED;\r
+}\r
+\r
+\r
+/**\r
+ Return information of type InformationType for the requested firmware\r
+ volume.\r
+\r
+ @param This Pointer to EFI_FIRMWARE_VOLUME2_PROTOCOL.\r
+ @param InformationType InformationType for requested.\r
+ @param BufferSize On input, size of Buffer.On output, the amount of data\r
+ returned in Buffer.\r
+ @param Buffer A poniter to the data buffer to return.\r
+\r
+ @retval EFI_SUCCESS Successfully got volume Information.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+FvGetVolumeInfo (\r
+ IN CONST EFI_FIRMWARE_VOLUME2_PROTOCOL *This,\r
+ IN CONST EFI_GUID *InformationType,\r
+ IN OUT UINTN *BufferSize,\r
+ OUT VOID *Buffer\r
)\r
-/*++\r
+{\r
+ return EFI_UNSUPPORTED;\r
+}\r
+\r
\r
-Routine Description:\r
- Sets current attributes for volume\r
\r
-Arguments:\r
- This - Calling context\r
- Attributes - At input, contains attributes to be set. At output contains\r
- new value of FV\r
+/**\r
+ Set information of type InformationType for the requested firmware\r
+ volume.\r
\r
-Returns:\r
- EFI_UNSUPPORTED - Could not be set.\r
+ @param This Pointer to EFI_FIRMWARE_VOLUME2_PROTOCOL.\r
+ @param InformationType InformationType for requested.\r
+ @param BufferSize On input, size of Buffer.On output, the amount of data\r
+ returned in Buffer.\r
+ @param Buffer A poniter to the data buffer to return.\r
\r
---*/\r
+ @retval EFI_SUCCESS Successfully set volume Information.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+FvSetVolumeInfo (\r
+ IN CONST EFI_FIRMWARE_VOLUME2_PROTOCOL *This,\r
+ IN CONST EFI_GUID *InformationType,\r
+ IN UINTN BufferSize,\r
+ IN CONST VOID *Buffer\r
+ )\r
{\r
return EFI_UNSUPPORTED;\r
}\r
\r
+\r
+\r