]> git.proxmox.com Git - mirror_edk2.git/blame - EdkModulePkg/Universal/Variable/Pei/Ipf/VariableWorker.c
1. Removed #ifdef SNP_DEBUG and used debug lib to output information
[mirror_edk2.git] / EdkModulePkg / Universal / Variable / Pei / Ipf / VariableWorker.c
CommitLineData
3aaddf92 1/*++\r
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
20--*/\r
21\r
22#include <Variable.h>\r
23\r
24\r
25VARIABLE_HEADER *\r
26GetVariableByIndex (\r
27 IN VARIABLE_INDEX_TABLE *IndexTable,\r
28 IN UINT32 Count\r
29 )\r
30{\r
31 return (VARIABLE_HEADER *) (UINTN) ((((UINT32)IndexTable->Index[Count]) << 2) + ((UINT32)(UINTN)IndexTable->StartPtr & 0xFFFC0000) );\r
32}\r
33\r
34VOID\r
35VariableIndexTableUpdate (\r
36 IN OUT VARIABLE_INDEX_TABLE *IndexTable,\r
37 IN VARIABLE_HEADER *Variable\r
38 )\r
39{\r
40 IndexTable->Index[IndexTable->Length++] = (UINT16) (((UINT32)(UINTN) Variable) >> 2);\r
41\r
42 return;\r
43}\r
44\r