VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Include/Ppi/ReadOnlyVariable2.h@ 58466

Last change on this file since 58466 was 58466, checked in by vboxsync, 9 years ago

EFI/Firmware: Merged in the svn:eol-style, svn:mime-type and trailing whitespace cleanup that was done after the initial UDK2014.SP1 import: svn merge /vendor/edk2/UDK2014.SP1 /vendor/edk2/current .

  • Property svn:eol-style set to native
File size: 5.1 KB
Line 
1/** @file
2 This file declares Read-only Variable Service2 PPI.
3 This ppi permits read-only access to the UEFI variable store during the PEI phase.
4
5Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
6This program and the accompanying materials are licensed and made available under
7the terms and conditions of the BSD License that accompanies this distribution.
8The full text of the license may be found at
9http://opensource.org/licenses/bsd-license.php.
10
11THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13
14 @par Revision Reference:
15 This PPI is introduced in PI Version 1.0.
16
17**/
18
19#ifndef __PEI_READ_ONLY_VARIABLE2_PPI_H__
20#define __PEI_READ_ONLY_VARIABLE2_PPI_H__
21
22#define EFI_PEI_READ_ONLY_VARIABLE2_PPI_GUID \
23 { 0x2ab86ef5, 0xecb5, 0x4134, { 0xb5, 0x56, 0x38, 0x54, 0xca, 0x1f, 0xe1, 0xb4 } }
24
25
26typedef struct _EFI_PEI_READ_ONLY_VARIABLE2_PPI EFI_PEI_READ_ONLY_VARIABLE2_PPI;
27
28/**
29 This service retrieves a variable's value using its name and GUID.
30
31 Read the specified variable from the UEFI variable store. If the Data
32 buffer is too small to hold the contents of the variable,
33 the error EFI_BUFFER_TOO_SMALL is returned and DataSize is set to the
34 required buffer size to obtain the data.
35
36 @param This A pointer to this instance of the EFI_PEI_READ_ONLY_VARIABLE2_PPI.
37 @param VariableName A pointer to a null-terminated string that is the variable's name.
38 @param VariableGuid A pointer to an EFI_GUID that is the variable's GUID. The combination of
39 VariableGuid and VariableName must be unique.
40 @param Attributes If non-NULL, on return, points to the variable's attributes.
41 @param DataSize On entry, points to the size in bytes of the Data buffer.
42 On return, points to the size of the data returned in Data.
43 @param Data Points to the buffer which will hold the returned variable value.
44
45 @retval EFI_SUCCESS The variable was read successfully.
46 @retval EFI_NOT_FOUND The variable could not be found.
47 @retval EFI_BUFFER_TOO_SMALL The DataSize is too small for the resulting data.
48 DataSize is updated with the size required for
49 the specified variable.
50 @retval EFI_INVALID_PARAMETER VariableName, VariableGuid, DataSize or Data is NULL.
51 @retval EFI_DEVICE_ERROR The variable could not be retrieved because of a device error.
52
53**/
54typedef
55EFI_STATUS
56(EFIAPI *EFI_PEI_GET_VARIABLE2)(
57 IN CONST EFI_PEI_READ_ONLY_VARIABLE2_PPI *This,
58 IN CONST CHAR16 *VariableName,
59 IN CONST EFI_GUID *VariableGuid,
60 OUT UINT32 *Attributes,
61 IN OUT UINTN *DataSize,
62 OUT VOID *Data
63 );
64
65
66/**
67 Return the next variable name and GUID.
68
69 This function is called multiple times to retrieve the VariableName
70 and VariableGuid of all variables currently available in the system.
71 On each call, the previous results are passed into the interface,
72 and, on return, the interface returns the data for the next
73 interface. When the entire variable list has been returned,
74 EFI_NOT_FOUND is returned.
75
76 @param This A pointer to this instance of the EFI_PEI_READ_ONLY_VARIABLE2_PPI.
77
78 @param VariableNameSize On entry, points to the size of the buffer pointed to by VariableName.
79 On return, the size of the variable name buffer.
80 @param VariableName On entry, a pointer to a null-terminated string that is the variable's name.
81 On return, points to the next variable's null-terminated name string.
82
83 @param VariableGuid On entry, a pointer to an EFI_GUID that is the variable's GUID.
84 On return, a pointer to the next variable's GUID.
85
86 @retval EFI_SUCCESS The variable was read successfully.
87 @retval EFI_NOT_FOUND The variable could not be found.
88 @retval EFI_BUFFER_TOO_SMALL The VariableNameSize is too small for the resulting
89 data. VariableNameSize is updated with the size
90 required for the specified variable.
91 @retval EFI_INVALID_PARAMETER VariableName, VariableGuid or
92 VariableNameSize is NULL.
93 @retval EFI_DEVICE_ERROR The variable could not be retrieved because of a device error.
94
95**/
96typedef
97EFI_STATUS
98(EFIAPI *EFI_PEI_GET_NEXT_VARIABLE_NAME2)(
99 IN CONST EFI_PEI_READ_ONLY_VARIABLE2_PPI *This,
100 IN OUT UINTN *VariableNameSize,
101 IN OUT CHAR16 *VariableName,
102 IN OUT EFI_GUID *VariableGuid
103 );
104
105///
106/// This PPI provides a lightweight, read-only variant of the full EFI
107/// variable services.
108///
109struct _EFI_PEI_READ_ONLY_VARIABLE2_PPI {
110 EFI_PEI_GET_VARIABLE2 GetVariable;
111 EFI_PEI_GET_NEXT_VARIABLE_NAME2 NextVariableName;
112};
113
114extern EFI_GUID gEfiPeiReadOnlyVariable2PpiGuid;
115
116#endif
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette