3 Variable worker functions specific for IA32, X64 and EBC.
5 Copyright (c) 2007 - 2008, Intel Corporation
6 All rights reserved. This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
19 Get one variable by the index count.
21 @param IndexTable The pointer to variable index table.
22 @param Count The index count of variable in index table.
24 @return The pointer to variable header indexed by count.
29 IN VARIABLE_INDEX_TABLE
*IndexTable
,
33 return (VARIABLE_HEADER
*) (UINTN
) (IndexTable
->Index
[Count
] + ((UINTN
) IndexTable
->StartPtr
& 0xFFFF0000));
37 Record Variable in VariableIndex HOB.
39 Record Variable in VariableIndex HOB and update the length of variable index table.
41 @param IndexTable The pointer to variable index table.
42 @param Variable The pointer to the variable that will be recorded.
46 VariableIndexTableUpdate (
47 IN OUT VARIABLE_INDEX_TABLE
*IndexTable
,
48 IN VARIABLE_HEADER
*Variable
51 if (IndexTable
->Length
< VARIABLE_INDEX_TABLE_VOLUME
) {
52 IndexTable
->Index
[IndexTable
->Length
++] = (UINT16
) (UINTN
) Variable
;