]> git.proxmox.com Git - mirror_edk2.git/blame_incremental - IntelFrameworkPkg/Include/Ppi/ReadOnlyVariable.h
Update the copyright notice format
[mirror_edk2.git] / IntelFrameworkPkg / Include / Ppi / ReadOnlyVariable.h
... / ...
CommitLineData
1/** @file\r
2 This file declares the Read-only Variable Service PPI, which is required by the framework spec.\r
3\r
4 These services provide a lightweight, read-only variant of the full EFI variable services. The\r
5 reason that these services are read-only is to reduce the complexity of flash management. Also,\r
6 some implementation of the PEI may use the same physical flash part for variable and PEIM\r
7 storage. As such, a write command to certain technologies would alter the contents of the entire part,\r
8 making the PEIM execution in the original position not follow the required flow.\r
9\r
10Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
11This program and the accompanying materials are licensed and made available under \r
12the terms and conditions of the BSD License that accompanies this distribution. \r
13The full text of the license may be found at\r
14http://opensource.org/licenses/bsd-license.php. \r
15 \r
16THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
17WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
18\r
19 @par Revision Reference:\r
20 This PPI is defined in PEI CIS\r
21 Version 0.91.\r
22**/\r
23\r
24#ifndef __PEI_READ_ONLY_VARIABLE_PPI_H__\r
25#define __PEI_READ_ONLY_VARIABLE_PPI_H__\r
26\r
27#define EFI_PEI_READ_ONLY_VARIABLE_ACCESS_PPI_GUID \\r
28 { \\r
29 0x3cdc90c6, 0x13fb, 0x4a75, {0x9e, 0x79, 0x59, 0xe9, 0xdd, 0x78, 0xb9, 0xfa } \\r
30 }\r
31\r
32typedef struct _EFI_PEI_READ_ONLY_VARIABLE_PPI EFI_PEI_READ_ONLY_VARIABLE_PPI;\r
33\r
34///\r
35/// Variable attributes.\r
36///@{\r
37#define EFI_VARIABLE_NON_VOLATILE 0x00000001\r
38#define EFI_VARIABLE_BOOTSERVICE_ACCESS 0x00000002\r
39#define EFI_VARIABLE_RUNTIME_ACCESS 0x00000004\r
40///\r
41/// Inconsistent with specification here: \r
42/// In Framework Spec, PeiCis0.91, neither the macro or its value is defined.\r
43/// Keeping this inconsistancy for backward compatibility.\r
44/// \r
45#define EFI_VARIABLE_READ_ONLY 0x00000008\r
46///@}\r
47\r
48/**\r
49 Get Variable value by Name and GUID pair.\r
50\r
51 @param[in] PeiServices An indirect pointer to the PEI Services Table published \r
52 by the PEI Foundation.\r
53 @param[in] VariableName A NULL-terminated Unicode string that is the name of the vendor's variable.\r
54 @param[in] VendorGuid A unique identifier for the vendor.\r
55 @param[out] Attributes This OPTIONAL parameter may be either NULL or\r
56 a pointer to the location in which to return\r
57 the attributes bitmask for the variable.\r
58 @param[in,out] DataSize On input, the size in bytes of the return Data buffer.\r
59 On output, the size of data returned in Data.\r
60 @param[out] Data The buffer to return the contents of the variable.\r
61\r
62 @retval EFI_SUCCESS The function completed successfully.\r
63 @retval EFI_NOT_FOUND The variable was not found.\r
64 @retval EFI_BUFFER_TOO_SMALL The BufferSize is too small for the result.\r
65 @retval EFI_INVALID_PARAMETER One of the parameters has an invalid value.\r
66 @retval EFI_DEVICE_ERROR The variable could not be retrieved due to a hardware error.\r
67\r
68**/\r
69typedef\r
70EFI_STATUS\r
71(EFIAPI *EFI_PEI_GET_VARIABLE)(\r
72 IN EFI_PEI_SERVICES **PeiServices,\r
73 IN CHAR16 *VariableName,\r
74 IN EFI_GUID *VendorGuid,\r
75 OUT UINT32 *Attributes OPTIONAL,\r
76 IN OUT UINTN *DataSize,\r
77 OUT VOID *Data\r
78 );\r
79\r
80/**\r
81 This function can be called multiple times to retrieve the VariableName\r
82 and VendorGuid of all variables currently available in the system. On each call\r
83 to GetNextVariableName(), the previous results are passed into the interface,\r
84 and on output the interface returns the next variable name data. When the\r
85 entire variable list has been returned, the error EFI_NOT_FOUND is returned.\r
86\r
87 @param[in] PeiServices An indirect pointer to the PEI Services Table \r
88 published by the PEI Foundation.\r
89 @param[in] VariableNameSize The size of the VariableName buffer.\r
90 @param[in] VariableName On input, supplies the last VariableName that was\r
91 returned by GetNextVariableName(). On output, \r
92 returns the Null-terminated Unicode string of the \r
93 current variable.\r
94 @param[in] VendorGuid On input, supplies the last VendorGuid that was\r
95 returned by GetNextVariableName(). On output, \r
96 returns the VendorGuid of the current variable.\r
97\r
98 @retval EFI_SUCCESS The function completed successfully.\r
99 @retval EFI_NOT_FOUND The next variable was not found.\r
100 @retval EFI_BUFFER_TOO_SMALL The VariableNameSize is too small for the result.\r
101 @retval EFI_INVALID_PARAMETER One of the parameters has an invalid value.\r
102 @retval EFI_DEVICE_ERROR The variable name could not be retrieved due to \r
103 a hardware error.\r
104\r
105**/\r
106typedef\r
107EFI_STATUS\r
108(EFIAPI *EFI_PEI_GET_NEXT_VARIABLE_NAME)(\r
109 IN EFI_PEI_SERVICES **PeiServices,\r
110 IN OUT UINTN *VariableNameSize,\r
111 IN OUT CHAR16 *VariableName,\r
112 IN OUT EFI_GUID *VendorGuid\r
113 );\r
114\r
115///\r
116/// This PPI provides a lightweight, read-only variant of the full EFI\r
117/// variable services. \r
118///\r
119struct _EFI_PEI_READ_ONLY_VARIABLE_PPI {\r
120 ///\r
121 /// Inconsistent with specification here: \r
122 /// In Framework Spec, PeiCis0.91, the field is named as GetVariable and GetNextVariableName.\r
123 /// Keeping this inconsistancy for backward compatibility.\r
124 /// \r
125 EFI_PEI_GET_VARIABLE PeiGetVariable; ///< A service to ascertain a given variable name.\r
126 EFI_PEI_GET_NEXT_VARIABLE_NAME PeiGetNextVariableName; ///< A service to ascertain a variable based upon a given, known variable\r
127};\r
128\r
129extern EFI_GUID gEfiPeiReadOnlyVariablePpiGuid;\r
130\r
131#endif /* __PEI_READ_ONLY_VARIABLE_PPI_H__ */\r
132\r