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