<MaxDatumSize>4</MaxDatumSize>\r
<Value>320</Value>\r
</PcdData>\r
- <PcdData ItemType="FEATURE_FLAG">\r
- <C_Name>PcdNtEmulatorEnable</C_Name>\r
- <Token>0x0001003e</Token>\r
- <TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>\r
- <DatumType>BOOLEAN</DatumType>\r
- <MaxDatumSize>1</MaxDatumSize>\r
- <Value>FALSE</Value>\r
- </PcdData>\r
</PcdBuildDefinition>\r
<ModuleSaBuildOptions>\r
<FvBinding>NULL</FvBinding>\r
<MaxDatumSize>4</MaxDatumSize>\r
<Value>320</Value>\r
</PcdData>\r
- <PcdData ItemType="FEATURE_FLAG">\r
- <C_Name>PcdNtEmulatorEnable</C_Name>\r
- <Token>0x0001003e</Token>\r
- <TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>\r
- <DatumType>BOOLEAN</DatumType>\r
- <MaxDatumSize>1</MaxDatumSize>\r
- <Value>FALSE</Value>\r
- </PcdData>\r
</PcdBuildDefinition>\r
<ModuleSaBuildOptions>\r
<FvBinding>NULL</FvBinding>\r
<MaxDatumSize>4</MaxDatumSize>\r
<Value>320</Value>\r
</PcdData>\r
- <PcdData ItemType="FEATURE_FLAG">\r
- <C_Name>PcdNtEmulatorEnable</C_Name>\r
- <Token>0x0001003e</Token>\r
- <TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>\r
- <DatumType>BOOLEAN</DatumType>\r
- <MaxDatumSize>1</MaxDatumSize>\r
- <Value>FALSE</Value>\r
- </PcdData>\r
</PcdBuildDefinition>\r
<ModuleSaBuildOptions>\r
<FvBinding>NULL</FvBinding>\r
<MaxDatumSize>4</MaxDatumSize>\r
<Value>320</Value>\r
</PcdData>\r
- <PcdData ItemType="FEATURE_FLAG">\r
- <C_Name>PcdNtEmulatorEnable</C_Name>\r
- <Token>0x0001003e</Token>\r
- <TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>\r
- <DatumType>BOOLEAN</DatumType>\r
- <MaxDatumSize>1</MaxDatumSize>\r
- <Value>FALSE</Value>\r
- </PcdData>\r
</PcdBuildDefinition>\r
<ModuleSaBuildOptions>\r
<FvBinding>NULL</FvBinding>\r
/*++\r
\r
-Copyright (c) 2006, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution. The full text of the license may be found at \r
-http://opensource.org/licenses/bsd-license.php \r
- \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
+Copyright (c) 2006, Intel Corporation\r
+All rights reserved. This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution. The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
Module Name:\r
pxe_bc_dhcp.c\r
- \r
+\r
Abstract:\r
DHCP and PXE discovery protocol implementations.\r
\r
\r
Arguments:\r
Smbios - Pointer to SMBIOS structure\r
- StringNumber - String number to return. 0 is used to skip all strings and \r
+ StringNumber - String number to return. 0 is used to skip all strings and\r
point to the next SMBIOS structure.\r
\r
Returns:\r
Private := Pointer to PxeBc interface\r
ExtraEdit := Pointer to extra option checking function\r
OpFlags := UdpRead() option flags\r
- ServerIpPtr := \r
- ServerPortPtr := \r
- ClientIpPtr := \r
- ClientPortPtr := \r
- DhcpRxBuf := \r
+ ServerIpPtr :=\r
+ ServerPortPtr :=\r
+ ClientIpPtr :=\r
+ ClientPortPtr :=\r
+ DhcpRxBuf :=\r
TimeoutEvent :=\r
\r
Returns:\r
\r
Parameters:\r
This := Pointer to PxeBc interface\r
- SortOffers := \r
+ SortOffers :=\r
\r
Returns:\r
--*/\r
PXE_SERVER_LISTS *ServerListPtr\r
)\r
/*++\r
-Routine description: \r
+Routine description:\r
This function tries to complete the PXE Bootserver and/or boot image\r
discovery sequence. When this command completes successfully, the\r
PXEdiscover and PXEreply fields in the BC instance data structure are\r
updated. If the Info pointer is set to NULL, the discovery information\r
- in the DHCPack and ProxyOffer packets must be valid and will be used. \r
+ in the DHCPack and ProxyOffer packets must be valid and will be used.\r
If Info is not set to NULL, the discovery methods in the Info field\r
must be set and will be used. When discovering any layer number other\r
than zero (the credential flag does not count), only unicast discovery\r
\r
Parameters:\r
Private := Pointer to PxeBc interface\r
- OpFlags := \r
- Type := \r
- LayerPtr := \r
- UseBis := \r
- DestPtr := \r
- ServerListPtr := \r
+ OpFlags :=\r
+ Type :=\r
+ LayerPtr :=\r
+ UseBis :=\r
+ DestPtr :=\r
+ ServerListPtr :=\r
\r
Returns:\r
--*/\r
\r
Parameters:\r
Private := Pointer to PxeBc interface\r
- Type := \r
- LayerPtr := \r
- UseBis := \r
- DiscoverInfoPtr := \r
- McastServerListPtr := \r
- ServerListPtr := \r
+ Type :=\r
+ LayerPtr :=\r
+ UseBis :=\r
+ DiscoverInfoPtr :=\r
+ McastServerListPtr :=\r
+ ServerListPtr :=\r
\r
Returns:\r
--*/\r
Routine description:\r
\r
Parameters:\r
- This := \r
- Type := \r
- LayerPtr := \r
- UseBis := \r
- DiscoverInfoPtr := \r
+ This :=\r
+ Type :=\r
+ LayerPtr :=\r
+ UseBis :=\r
+ DiscoverInfoPtr :=\r
\r
Returns:\r
--*/\r
\r
#include "PxeDhcp4.h"\r
\r
-#define DebugPrint(x)\r
-//\r
-// #define DebugPrint(x) Aprint x\r
-//\r
-/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */\r
STATIC\r
INTN\r
offer_verify (\r
Private->offer_list = NULL;\r
Private->callback = NULL;\r
\r
- DebugPrint (("%a:%d:%r\n", __FILE__, __LINE__, EfiStatus));\r
+ DEBUG ((EFI_D_ERROR, "%r\n", EfiStatus));\r
return EfiStatus;\r
}\r
\r
EfiStatus = add_opt (&request, srvid);\r
\r
if (EFI_ERROR (EfiStatus)) {\r
- DebugPrint (("%a:%d:%r\n", __FILE__, __LINE__, EfiStatus));\r
+ DEBUG ((EFI_D_ERROR, "%r\n", EfiStatus));\r
Private->callback = NULL;\r
return EfiStatus;\r
}\r
EfiStatus = add_opt (&request, op);\r
\r
if (EFI_ERROR (EfiStatus)) {\r
- DebugPrint (("%a:%d:%r\n", __FILE__, __LINE__, EfiStatus));\r
+ DEBUG ((EFI_D_ERROR, "%r\n", EfiStatus));\r
Private->callback = NULL;\r
return EfiStatus;\r
}\r
);\r
\r
if (EFI_ERROR (EfiStatus)) {\r
- DebugPrint (("%a:%d:%r\n", __FILE__, __LINE__, EfiStatus));\r
+ DEBUG ((EFI_D_ERROR, "%r\n", EfiStatus));\r
Private->callback = NULL;\r
return EfiStatus;\r
}\r
/*++\r
-Copyright (c) 2006, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution. The full text of the license may be found at \r
-http://opensource.org/licenses/bsd-license.php \r
- \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
+Copyright (c) 2006, Intel Corporation\r
+All rights reserved. This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution. The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
Module name:\r
snp.h\r
\r
#include "IndustryStandard/pci22.h"\r
\r
-#define SNP_DEBUG 0\r
#define FOUR_GIGABYTES (UINT64) 0x100000000ULL\r
\r
-#if SNP_DEBUG\r
-#undef D_NET\r
-#define D_NET D_WARN\r
-#define SNP_PRINT(DebugInfo) Print (DebugInfo)\r
-#else\r
-#define SNP_PRINT(DebugInfo)\r
-#endif\r
-\r
#define SNP_DRIVER_SIGNATURE EFI_SIGNATURE_32 ('s', 'n', 'd', 's')\r
#define MAX_MAP_LENGTH 100\r
\r
\r
#define SNP_MEM_PAGES(x) (((x) - 1) / 4096 + 1)\r
\r
-#if SNP_DEBUG\r
-extern\r
-VOID\r
-snp_wait_for_key (\r
- VOID\r
- )\r
-;\r
-#endif\r
-\r
#endif /* _SNP_H */\r
/*++\r
-Copyright (c) 2006, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution. The full text of the license may be found at \r
-http://opensource.org/licenses/bsd-license.php \r
- \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
+Copyright (c) 2006, Intel Corporation\r
+All rights reserved. This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution. The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
Module name:\r
callback.c\r
}\r
\r
if (Index >= MAX_MAP_LENGTH) {\r
- SNP_PRINT (L"SNP maplist is FULL\n");\r
+ DEBUG ((EFI_D_INFO, "SNP maplist is FULL\n"));\r
*DevAddrPtr = 0;\r
return ;\r
}\r
/*++\r
-Copyright (c) 2006, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution. The full text of the license may be found at \r
-http://opensource.org/licenses/bsd-license.php \r
- \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
+Copyright (c) 2006, Intel Corporation\r
+All rights reserved. This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution. The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
Module name:\r
snp.c\r
\r
--*/\r
{\r
-#if SNP_DEBUG\r
- Aprint ("\nissue_hwundi_command() - This should not be called!");\r
- snp_wait_for_key ();\r
-#endif\r
+ DEBUG ((EFI_D_ERROR, "\nissue_hwundi_command() - This should not be called!"));\r
+\r
if (cdb == 0) {\r
return EFI_INVALID_PARAMETER;\r
\r
\r
Routine Description:\r
Compute 8-bit checksum of a buffer.\r
- \r
+\r
Arguments:\r
ptr - Pointer to buffer.\r
len - Length of buffer in bytes.\r
);\r
if (Status == EFI_ALREADY_STARTED)\r
{\r
-#if SNP_DEBUG\r
- Aprint ("Support(): Already Started. on handle %x\n", Controller);\r
-#endif\r
+ DEBUG ((EFI_D_INFO, "Support(): Already Started. on handle %x\n", Controller));\r
return EFI_ALREADY_STARTED;\r
}\r
\r
if (!EFI_ERROR (Status))\r
{\r
-\r
-#if SNP_DEBUG\r
- Aprint ("Support(): UNDI3.1 found on handle %x\n", Controller);\r
- snp_wait_for_key ();\r
-#endif\r
+ DEBUG ((EFI_D_INFO, "Support(): UNDI3.1 found on handle %x\n", Controller));\r
IsUndi31 = TRUE;\r
} else {\r
//\r
return Status;\r
}\r
\r
-#if SNP_DEBUG\r
- Aprint ("Support(): UNDI3.0 found on handle %x\n", Controller);\r
- snp_wait_for_key ();\r
-#endif\r
+ DEBUG ((EFI_D_INFO, "Support(): UNDI3.0 found on handle %x\n", Controller));\r
}\r
//\r
// check the version, we don't want to connect to the undi16\r
}\r
\r
Status = EFI_SUCCESS;\r
-#if SNP_DEBUG\r
- Aprint ("Support(): supported on %x\n", Controller);\r
- snp_wait_for_key ();\r
-#endif\r
+ DEBUG ((EFI_D_INFO, "Support(): supported on %x\n", Controller));\r
\r
Done:\r
if (IsUndi31) {\r
// probably not a 3.1 UNDI\r
//\r
UndiNew = TRUE;\r
-#if SNP_DEBUG\r
- Aprint ("Start(): UNDI3.1 found\n");\r
- snp_wait_for_key ();\r
-#endif\r
+ DEBUG ((EFI_D_INFO, "Start(): UNDI3.1 found\n"));\r
+\r
} else {\r
UndiNew = FALSE;\r
Status = gBS->OpenProtocol (\r
return Status;\r
}\r
\r
-#if SNP_DEBUG\r
- Aprint ("Start(): UNDI3.0 found\n");\r
- snp_wait_for_key ();\r
-#endif\r
+ DEBUG ((EFI_D_INFO, "Start(): UNDI3.0 found\n"));\r
}\r
\r
pxe = (PXE_UNDI *) (UINTN) (Nii->ID);\r
Controller\r
);\r
}\r
- \r
+\r
Status = gBS->CloseProtocol (\r
Controller,\r
&gEfiDevicePathProtocolGuid,\r
\r
Routine Description:\r
This routine maps the given CPU address to a Device address. It creates a\r
- an entry in the map list with the virtual and physical addresses and the \r
+ an entry in the map list with the virtual and physical addresses and the\r
un map cookie.\r
\r
Arguments:\r
/*++\r
\r
Routine Description:\r
- This routine searches the linked list of mapped address nodes (for undi3.0 \r
+ This routine searches the linked list of mapped address nodes (for undi3.0\r
interface) to find the node that corresponds to the given virtual address and\r
returns a pointer to that node.\r
\r
/*++\r
\r
Routine Description:\r
- This routine unmaps the given virtual address and frees the memory allocated \r
+ This routine unmaps the given virtual address and frees the memory allocated\r
for the map list node corresponding to that address.\r
- \r
+\r
Arguments:\r
vaddr - virtual address (or CPU address) to be unmapped\r
\r
\r
gBS->FreePool (v);\r
\r
-#if SNP_DEBUG\r
if (Status) {\r
- Print (L"Unmap failed with status = %x\n", Status);\r
+ DEBUG ((EFI_D_ERROR, "Unmap failed with status = %x\n", Status));\r
}\r
-#endif\r
return Status;\r
}\r
\r
v->next = t->next;\r
Status = mPciIoFncs->Unmap (mPciIoFncs, t->unmap);\r
gBS->FreePool (t);\r
-#if SNP_DEBUG\r
+\r
if (Status) {\r
- Print (L"Unmap failed with status = %x\n", Status);\r
+ DEBUG ((EFI_D_ERROR, "Unmap failed with status = %x\n", Status));\r
}\r
-#endif\r
return Status;\r
}\r
}\r
\r
return EFI_NOT_FOUND;\r
}\r
-\r
-#if SNP_DEBUG\r
-VOID\r
-snp_wait_for_key (\r
- VOID\r
- )\r
-/*++\r
-\r
-Routine Description:\r
- Wait for a key stroke, used for debugging purposes\r
-\r
-Arguments:\r
- none\r
-\r
-Returns:\r
- none\r
-\r
---*/\r
-{\r
- EFI_INPUT_KEY key;\r
-\r
- Aprint ("\nPress any key to continue\n");\r
-\r
- while (gST->ConIn->ReadKeyStroke (gST->ConIn, &key) == EFI_NOT_READY) {\r
- ;\r
- }\r
-}\r
-#endif\r
--- /dev/null
+/*++\r
+\r
+Copyright (c) 2007, Intel Corporation\r
+All rights reserved. This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution. The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+Module Name:\r
+\r
+ VariableWorker.c\r
+\r
+Abstract:\r
+\r
+ Framework PEIM to provide the Variable functionality\r
+\r
+--*/\r
+\r
+#include <Variable.h>\r
+\r
+\r
+VARIABLE_HEADER *\r
+GetVariableByIndex (\r
+ IN VARIABLE_INDEX_TABLE *IndexTable,\r
+ IN UINT32 Count\r
+ )\r
+{\r
+ return (VARIABLE_HEADER *) (UINTN) ((((UINT32)IndexTable->Index[Count]) << 2) + ((UINT32)(UINTN)IndexTable->StartPtr & 0xFFFC0000) );\r
+}\r
+\r
+VOID\r
+VariableIndexTableUpdate (\r
+ IN OUT VARIABLE_INDEX_TABLE *IndexTable,\r
+ IN VARIABLE_HEADER *Variable\r
+ )\r
+{\r
+ IndexTable->Index[IndexTable->Length++] = (UINT16) (((UINT32)(UINTN) Variable) >> 2);\r
+\r
+ return;\r
+}\r
+\r
\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
-\r
Module Name:\r
\r
Variable.c\r
Provide the functionality of the variable services.\r
\r
Arguments:\r
- \r
+\r
FfsHeadher - The FFS file header\r
PeiServices - General purpose services available to every PEIM.\r
\r
\r
EFI_SUCCESS - Found match variable\r
EFI_NOT_FOUND - Variable not found\r
- \r
+\r
--*/\r
{\r
if (VariableName[0] == 0) {\r
// No Variable Address equals zero, so 0 as initial value is safe.\r
//\r
MaxIndex = 0;\r
- \r
+\r
GuidHob = GetFirstGuidHob (&gEfiVariableIndexTableGuid);\r
if (GuidHob == NULL) {\r
IndexTable = BuildGuidHob (&gEfiVariableIndexTableGuid, sizeof (VARIABLE_INDEX_TABLE));\r
IndexTable = GET_GUID_HOB_DATA (GuidHob);\r
for (Count = 0; Count < IndexTable->Length; Count++)\r
{\r
-#if ALIGNMENT <= 1\r
- MaxIndex = (VARIABLE_HEADER *) (UINTN) (IndexTable->Index[Count] + ((UINTN) IndexTable->StartPtr & 0xFFFF0000));\r
-#else\r
-#if ALIGNMENT >= 4\r
- MaxIndex = (VARIABLE_HEADER *) (UINTN) ((((UINT32)IndexTable->Index[Count]) << 2) + ((UINT32)(UINTN)IndexTable->StartPtr & 0xFFFC0000) ); \r
-#endif\r
-#endif\r
+ MaxIndex = GetVariableByIndex (IndexTable, Count);\r
+\r
if (CompareWithValidVariable (MaxIndex, VariableName, VendorGuid, PtrTrack) == EFI_SUCCESS) {\r
PtrTrack->StartPtr = IndexTable->StartPtr;\r
PtrTrack->EndPtr = IndexTable->EndPtr;\r
VariableBase = (UINT8 *) (UINTN) PcdGet32 (PcdFlashNvStorageVariableBase);\r
VariableStoreHeader = (VARIABLE_STORE_HEADER *) (VariableBase + \\r
((EFI_FIRMWARE_VOLUME_HEADER *) (VariableBase)) -> HeaderLength);\r
- \r
+\r
if (GetVariableStoreStatus (VariableStoreHeader) != EfiValid) {\r
return EFI_UNSUPPORTED;\r
}\r
//\r
if (IndexTable->Length < VARIABLE_INDEX_TABLE_VOLUME)\r
{\r
-#if ALIGNMENT <= 1\r
- IndexTable->Index[IndexTable->Length++] = (UINT16) (UINTN) Variable;\r
-#else\r
-#if ALIGNMENT >= 4\r
- IndexTable->Index[IndexTable->Length++] = (UINT16) (((UINT32)(UINTN) Variable) >> 2);\r
-#endif\r
-#endif\r
+ VariableIndexTableUpdate (IndexTable, Variable);\r
}\r
\r
if (CompareWithValidVariable (Variable, VariableName, VendorGuid, PtrTrack) == EFI_SUCCESS) {\r
/*++\r
\r
-Copyright (c) 2006, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution. The full text of the license may be found at \r
-http://opensource.org/licenses/bsd-license.php \r
- \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
+Copyright (c) 2006, Intel Corporation\r
+All rights reserved. This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution. The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
Module Name:\r
\r
Variable.h\r
- \r
+\r
Abstract:\r
\r
Tiano PEIM to provide the variable functionality\r
\r
//\r
// BugBug: We need relcate the head file.\r
-// \r
+//\r
#include <Common/Variable.h>\r
#include <VarMachine.h>\r
\r
--*/\r
;\r
\r
+VARIABLE_HEADER *\r
+GetVariableByIndex (\r
+ IN VARIABLE_INDEX_TABLE *IndexTable,\r
+ IN UINT32 Count\r
+ );\r
+\r
+VOID\r
+VariableIndexTableUpdate (\r
+ IN OUT VARIABLE_INDEX_TABLE *IndexTable,\r
+ IN VARIABLE_HEADER *Variable\r
+ );\r
+\r
#endif // _PEI_VARIABLE_H\r
-<?xml version="1.0" encoding="UTF-8"?>\r
+<?xml version="1.0" encoding="UTF-8"?>\r
<ModuleSurfaceArea xmlns="http://www.TianoCore.org/2006/Edk2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">\r
<MsaHeader>\r
<ModuleName>PeiVariable</ModuleName>\r
<Filename>Variable.h</Filename>\r
<Filename>Variable.c</Filename>\r
<Filename>Variable.dxs</Filename>\r
+ <Filename SupArchList="IA32 X64 EBC">VariableWorker.c</Filename>\r
+ <Filename SupArchList="IPF">Ipf/VariableWorker.c</Filename>\r
<Filename SupArchList="IA32">Ia32/VarMachine.h</Filename>\r
<Filename SupArchList="EBC">Ebc/VarMachine.h</Filename>\r
<Filename SupArchList="X64">x64/VarMachine.h</Filename>\r
--- /dev/null
+/*++\r
+\r
+Copyright (c) 2007, Intel Corporation\r
+All rights reserved. This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution. The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+Module Name:\r
+\r
+ VariableWorker.c\r
+\r
+Abstract:\r
+\r
+ Framework PEIM to provide the Variable functionality\r
+\r
+--*/\r
+\r
+#include <Variable.h>\r
+\r
+\r
+VARIABLE_HEADER *\r
+GetVariableByIndex (\r
+ IN VARIABLE_INDEX_TABLE *IndexTable,\r
+ IN UINT32 Count\r
+ )\r
+{\r
+ return (VARIABLE_HEADER *) (UINTN) (IndexTable->Index[Count] + ((UINTN) IndexTable->StartPtr & 0xFFFF0000));\r
+}\r
+\r
+VOID\r
+VariableIndexTableUpdate (\r
+ IN OUT VARIABLE_INDEX_TABLE *IndexTable,\r
+ IN VARIABLE_HEADER *Variable\r
+ )\r
+{\r
+ IndexTable->Index[IndexTable->Length++] = (UINT16) (UINTN) Variable;\r
+\r
+ return;\r
+}\r
+\r
<MaxDatumSize>4</MaxDatumSize>\r
<Value>320</Value>\r
</PcdData>\r
- <PcdData ItemType="FEATURE_FLAG">\r
- <C_Name>PcdNtEmulatorEnable</C_Name>\r
- <Token>0x0001003e</Token>\r
- <TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>\r
- <DatumType>BOOLEAN</DatumType>\r
- <MaxDatumSize>1</MaxDatumSize>\r
- <Value>FALSE</Value>\r
- </PcdData>\r
</PcdBuildDefinition>\r
<ModuleSaBuildOptions>\r
<FvBinding>NULL</FvBinding>\r
<MaxDatumSize>4</MaxDatumSize>\r
<Value>320</Value>\r
</PcdData>\r
- <PcdData ItemType="FEATURE_FLAG">\r
- <C_Name>PcdNtEmulatorEnable</C_Name>\r
- <Token>0x0001003e</Token>\r
- <TokenSpaceGuidCName>gEfiEdkModulePkgTokenSpaceGuid</TokenSpaceGuidCName>\r
- <DatumType>BOOLEAN</DatumType>\r
- <MaxDatumSize>1</MaxDatumSize>\r
- <Value>FALSE</Value>\r
- </PcdData>\r
</PcdBuildDefinition>\r
<ModuleSaBuildOptions>\r
<FvBinding>NULL</FvBinding>\r