]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Core/Dxe/FwVol/FwVolAttrib.c
Add doxygen style comments for functions in DxeMain.
[mirror_edk2.git] / MdeModulePkg / Core / Dxe / FwVol / FwVolAttrib.c
CommitLineData
504214c4
LG
1/** @file \r
2\r
3 Implements get/set firmware volume attributes\r
28a00297 4\r
504214c4 5Copyright (c) 2006 - 2008, Intel Corporation \r
28a00297 6All rights reserved. This program and the accompanying materials \r
7are licensed and made available under the terms and conditions of the BSD License \r
8which accompanies this distribution. The full text of the license may be found at \r
9http://opensource.org/licenses/bsd-license.php \r
10 \r
11THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
12WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
13\r
504214c4 14**/\r
28a00297 15\r
16#include <DxeMain.h>\r
17\r
162ed594 18\r
19/**\r
20 Retrieves attributes, insures positive polarity of attribute bits, returns\r
21 resulting attributes in output parameter.\r
22\r
23 @param This Calling context \r
24 @param Attributes output buffer which contains attributes \r
25\r
26 @retval EFI_SUCCESS Successfully got volume attributes\r
27\r
28**/\r
28a00297 29EFI_STATUS\r
30EFIAPI\r
31FvGetVolumeAttributes (\r
0c2b5da8 32 IN CONST EFI_FIRMWARE_VOLUME2_PROTOCOL *This,\r
33 OUT EFI_FV_ATTRIBUTES *Attributes\r
28a00297 34 )\r
28a00297 35{\r
36 EFI_STATUS Status;\r
37 FV_DEVICE *FvDevice;\r
38 EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *Fvb;\r
39 EFI_FVB_ATTRIBUTES FvbAttributes;\r
40\r
41 FvDevice = FV_DEVICE_FROM_THIS (This);\r
42 Fvb = FvDevice->Fvb;\r
43\r
44 if (FvDevice->CachedFv == NULL) {\r
45 Status = FvCheck (FvDevice);\r
46 if (EFI_ERROR (Status)) {\r
47 return Status;\r
48 }\r
49 }\r
50\r
51 //\r
52 // First get the Firmware Volume Block Attributes\r
53 //\r
54 Status = Fvb->GetAttributes (Fvb, &FvbAttributes);\r
55\r
56 //\r
57 // Mask out Fvb bits that are not defined in FV \r
58 //\r
59 FvbAttributes &= 0xfffff0ff;\r
60 \r
61 *Attributes = (EFI_FV_ATTRIBUTES)FvbAttributes; \r
62 \r
63 return Status;\r
64}\r
65\r
66\r
162ed594 67\r
68/**\r
69 Sets current attributes for volume\r
70\r
71 @param This Calling context \r
72 @param Attributes At input, contains attributes to be set. At output \r
73 contains new value of FV \r
74\r
75 @retval EFI_UNSUPPORTED Could not be set.\r
76\r
77**/\r
28a00297 78EFI_STATUS\r
79EFIAPI\r
80FvSetVolumeAttributes (\r
0c2b5da8 81 IN CONST EFI_FIRMWARE_VOLUME2_PROTOCOL *This,\r
82 IN OUT EFI_FV_ATTRIBUTES *Attributes\r
28a00297 83 )\r
162ed594 84{\r
85 return EFI_UNSUPPORTED;\r
86}\r
28a00297 87\r
28a00297 88\r
162ed594 89/**\r
90 Return information of type InformationType for the requested firmware\r
91 volume.\r
28a00297 92\r
162ed594 93 @param This Pointer to EFI_FIRMWARE_VOLUME2_PROTOCOL. \r
94 @param InformationType InformationType for requested. \r
95 @param BufferSize On input, size of Buffer.On output, the amount of data \r
96 returned in Buffer. \r
97 @param Buffer A poniter to the data buffer to return. \r
28a00297 98\r
162ed594 99 @retval EFI_SUCCESS Successfully got volume Information.\r
28a00297 100\r
162ed594 101**/\r
0c2b5da8 102EFI_STATUS\r
103EFIAPI\r
104FvGetVolumeInfo (\r
105 IN CONST EFI_FIRMWARE_VOLUME2_PROTOCOL *This,\r
106 IN CONST EFI_GUID *InformationType,\r
107 IN OUT UINTN *BufferSize,\r
108 OUT VOID *Buffer\r
109 )\r
0c2b5da8 110{\r
111 return EFI_UNSUPPORTED;\r
112}\r
113\r
114\r
162ed594 115\r
116/**\r
117 Set information of type InformationType for the requested firmware\r
118 volume.\r
119\r
120 @param This Pointer to EFI_FIRMWARE_VOLUME2_PROTOCOL. \r
121 @param InformationType InformationType for requested. \r
122 @param BufferSize On input, size of Buffer.On output, the amount of data \r
123 returned in Buffer. \r
124 @param Buffer A poniter to the data buffer to return. \r
125\r
126 @retval EFI_SUCCESS Successfully set volume Information.\r
127\r
128**/\r
0c2b5da8 129EFI_STATUS\r
130EFIAPI\r
131FvSetVolumeInfo (\r
132 IN CONST EFI_FIRMWARE_VOLUME2_PROTOCOL *This,\r
133 IN CONST EFI_GUID *InformationType,\r
134 IN UINTN BufferSize,\r
135 IN CONST VOID *Buffer\r
136 )\r
0c2b5da8 137{\r
138 return EFI_UNSUPPORTED;\r
139}\r
140\r
141\r
162ed594 142\r