3 Copyright (c) 2006, 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.
18 Tiano PEIM to provide the variable functionality
22 #ifndef _PEI_VARIABLE_H
23 #define _PEI_VARIABLE_H
26 // BugBug: We need relcate the head file.
28 #include <Common/Variable.h>
33 // Define GET_PAD_SIZE to optimize compiler
35 #if ((ALIGNMENT == 0) || (ALIGNMENT == 1))
36 #define GET_PAD_SIZE(a) (0)
38 #define GET_PAD_SIZE(a) (((~a) + 1) & (ALIGNMENT - 1))
41 #define GET_VARIABLE_NAME_PTR(a) (CHAR16 *) ((UINTN) (a) + sizeof (VARIABLE_HEADER))
43 #define GET_VARIABLE_DATA_PTR(a) \
44 (UINT8 *) ((UINTN) GET_VARIABLE_NAME_PTR (a) + (a)->NameSize + GET_PAD_SIZE ((a)->NameSize))
47 VARIABLE_HEADER
*CurrPtr
;
48 VARIABLE_HEADER
*EndPtr
;
49 VARIABLE_HEADER
*StartPtr
;
50 } VARIABLE_POINTER_TRACK
;
52 #define VARIABLE_INDEX_TABLE_VOLUME 122
54 #define EFI_VARIABLE_INDEX_TABLE_GUID \
55 { 0x8cfdb8c8, 0xd6b2, 0x40f3, { 0x8e, 0x97, 0x02, 0x30, 0x7c, 0xc9, 0x8b, 0x7c } }
60 VARIABLE_HEADER
*EndPtr
;
61 VARIABLE_HEADER
*StartPtr
;
62 UINT16 Index
[VARIABLE_INDEX_TABLE_VOLUME
];
63 } VARIABLE_INDEX_TABLE
;
65 extern EFI_GUID gEfiVariableIndexTableGuid
;
72 PeimInitializeVariableServices (
73 IN EFI_FFS_FILE_HEADER
*FfsHeader
,
74 IN EFI_PEI_SERVICES
**PeiServices
80 TODO: Add function description
84 FfsHeader - TODO: add argument description
85 PeiServices - TODO: add argument description
89 TODO: add return values
97 IN EFI_PEI_SERVICES
**PeiServices
,
98 IN CHAR16
*VariableName
,
99 IN EFI_GUID
* VendorGuid
,
100 OUT UINT32
*Attributes OPTIONAL
,
101 IN OUT UINTN
*DataSize
,
108 TODO: Add function description
112 PeiServices - TODO: add argument description
113 VariableName - TODO: add argument description
114 VendorGuid - TODO: add argument description
115 Attributes - TODO: add argument description
116 DataSize - TODO: add argument description
117 Data - TODO: add argument description
121 TODO: add return values
128 PeiGetNextVariableName (
129 IN EFI_PEI_SERVICES
**PeiServices
,
130 IN OUT UINTN
*VariableNameSize
,
131 IN OUT CHAR16
*VariableName
,
132 IN OUT EFI_GUID
*VendorGuid
138 TODO: Add function description
142 PeiServices - TODO: add argument description
143 VariableNameSize - TODO: add argument description
144 VariableName - TODO: add argument description
145 VendorGuid - TODO: add argument description
149 TODO: add return values
154 #endif // _PEI_VARIABLE_H