]> git.proxmox.com Git - mirror_edk2.git/blame - IntelFrameworkModulePkg/Universal/VariablePei/VariableWorker.c
Modify all file header to follow doxygen format
[mirror_edk2.git] / IntelFrameworkModulePkg / Universal / VariablePei / VariableWorker.c
CommitLineData
3dbba770 1/** @file\r
7ba905c9 2\r
3Copyright (c) 2007, Intel Corporation\r
4All rights reserved. This program and the accompanying materials\r
5are licensed and made available under the terms and conditions of the BSD License\r
6which accompanies this distribution. The full text of the license may be found at\r
7http://opensource.org/licenses/bsd-license.php\r
8\r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
11\r
12Module Name:\r
13\r
14 VariableWorker.c\r
15\r
16Abstract:\r
17\r
18 Framework PEIM to provide the Variable functionality\r
19\r
3dbba770 20**/\r
7ba905c9 21\r
22#include <Variable.h>\r
23\r
24/**\r
25 Get one variable by the index count.\r
26\r
27 @param IndexTable The pointer to variable index table.\r
28 @param Count The index count of variable in index table.\r
29\r
30 @return The pointer to variable header indexed by count.\r
31\r
32**/\r
33VARIABLE_HEADER *\r
34GetVariableByIndex (\r
35 IN VARIABLE_INDEX_TABLE *IndexTable,\r
36 IN UINT32 Count\r
37 )\r
38{\r
39 return (VARIABLE_HEADER *) (UINTN) (IndexTable->Index[Count] + ((UINTN) IndexTable->StartPtr & 0xFFFF0000));\r
40}\r
41\r
42/**\r
43 Record Variable in VariableIndex HOB.\r
44\r
45 Record Variable in VariableIndex HOB and update the length of variable index table.\r
46\r
47 @param IndexTable The pointer to variable index table.\r
48 @param Variable The pointer to the variable that will be recorded.\r
49\r
50 @retval VOID\r
51\r
52**/\r
53VOID\r
54VariableIndexTableUpdate (\r
55 IN OUT VARIABLE_INDEX_TABLE *IndexTable,\r
56 IN VARIABLE_HEADER *Variable\r
57 )\r
58{\r
59 IndexTable->Index[IndexTable->Length++] = (UINT16) (UINTN) Variable;\r
60\r
61 return;\r
62}\r
63\r