3 Copyright (c) 2006 - 2007, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
14 #ifndef _PEI_VARIABLE_H
15 #define _PEI_VARIABLE_H
18 #include <Ppi/ReadOnlyVariable.h>
19 #include <Ppi/ReadOnlyVariable2.h>
20 #include <Library/DebugLib.h>
21 #include <Library/PeimEntryPoint.h>
22 #include <Library/HobLib.h>
23 #include <Library/PcdLib.h>
24 #include <Library/BaseMemoryLib.h>
25 #include <Library/PeiServicesTablePointerLib.h>
26 #include <Guid/VariableFormat.h>
29 VARIABLE_HEADER
*CurrPtr
;
30 VARIABLE_HEADER
*EndPtr
;
31 VARIABLE_HEADER
*StartPtr
;
32 } VARIABLE_POINTER_TRACK
;
34 #define VARIABLE_INDEX_TABLE_VOLUME 122
36 #define EFI_VARIABLE_INDEX_TABLE_GUID \
37 { 0x8cfdb8c8, 0xd6b2, 0x40f3, { 0x8e, 0x97, 0x02, 0x30, 0x7c, 0xc9, 0x8b, 0x7c } }
42 VARIABLE_HEADER
*EndPtr
;
43 VARIABLE_HEADER
*StartPtr
;
44 UINT16 Index
[VARIABLE_INDEX_TABLE_VOLUME
];
45 } VARIABLE_INDEX_TABLE
;
54 IN EFI_PEI_SERVICES
**PeiServices
,
55 IN CHAR16
*VariableName
,
56 IN EFI_GUID
* VendorGuid
,
57 OUT UINT32
*Attributes OPTIONAL
,
58 IN OUT UINTN
*DataSize
,
65 IN CONST EFI_PEI_READ_ONLY_VARIABLE2_PPI
*This
,
66 IN CONST CHAR16
*VariableName
,
67 IN CONST EFI_GUID
*VariableGuid
,
68 OUT UINT32
*Attributes
,
69 IN OUT UINTN
*DataSize
,
75 PeiGetNextVariableName2 (
76 IN CONST EFI_PEI_READ_ONLY_VARIABLE2_PPI
*This
,
77 IN OUT UINTN
*VariableNameSize
,
78 IN OUT CHAR16
*VariableName
,
79 IN OUT EFI_GUID
*VariableGuid
84 PeiGetNextVariableName (
85 IN EFI_PEI_SERVICES
**PeiServices
,
86 IN OUT UINTN
*VariableNameSize
,
87 IN OUT CHAR16
*VariableName
,
88 IN OUT EFI_GUID
*VendorGuid
92 Get one variable by the index count.
94 @param IndexTable The pointer to variable index table.
95 @param Count The index count of variable in index table.
97 @return The pointer to variable header indexed by count.
102 IN VARIABLE_INDEX_TABLE
*IndexTable
,
107 Record Variable in VariableIndex HOB.
109 Record Variable in VariableIndex HOB and update the length of variable index table.
111 @param IndexTable The pointer to variable index table.
112 @param Variable The pointer to the variable that will be recorded.
118 VariableIndexTableUpdate (
119 IN OUT VARIABLE_INDEX_TABLE
*IndexTable
,
120 IN VARIABLE_HEADER
*Variable
123 #endif // _PEI_VARIABLE_H