]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Variable/Pei/Variable.h
Patch from open source community for CryptoPkg to allow it to build for ARM using...
[mirror_edk2.git] / MdeModulePkg / Universal / Variable / Pei / Variable.h
index fe32c113dd11fc3c094f13e604396eecc8290567..430a3544dcd89e77e477588c9bd17571720e6c56 100644 (file)
@@ -3,8 +3,8 @@
   The internal header file includes the common header files, defines\r
   internal structure and functions used by PeiVariable module.\r
 \r
-Copyright (c) 2006 - 2008, Intel Corporation\r
-All rights reserved. This program and the accompanying materials\r
+Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
+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
@@ -28,18 +28,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Library/PeiServicesTablePointerLib.h>\r
 #include <Library/PeiServicesLib.h>\r
 \r
-#include <VariableFormat.h>\r
-\r
-//\r
-// Define GET_PAD_SIZE to optimize compiler\r
-//\r
-#if ((ALIGNMENT == 0) || (ALIGNMENT == 1))\r
-#define GET_PAD_SIZE(a) (0)\r
-#else\r
-#define GET_PAD_SIZE(a) (((~a) + 1) & (ALIGNMENT - 1))\r
-#endif\r
-\r
-#define HEADER_ALIGN(Header)  (((UINTN) (Header) + HEADER_ALIGNMENT - 1) & (~(HEADER_ALIGNMENT - 1)))\r
+#include <Guid/VariableFormat.h>\r
 \r
 typedef struct {\r
   VARIABLE_HEADER *CurrPtr;\r
@@ -52,11 +41,18 @@ typedef struct {
 #define EFI_VARIABLE_INDEX_TABLE_GUID \\r
   { 0x8cfdb8c8, 0xd6b2, 0x40f3, { 0x8e, 0x97, 0x02, 0x30, 0x7c, 0xc9, 0x8b, 0x7c } }\r
 \r
+///\r
+/// Use this data structure to store variable-related info, which can decrease\r
+/// the cost of access to NV.\r
+///\r
 typedef struct {\r
   UINT16          Length;\r
   UINT16          GoneThrough;\r
   VARIABLE_HEADER *EndPtr;\r
   VARIABLE_HEADER *StartPtr;\r
+  ///\r
+  /// This field is used to store the distance of two neighbouring VAR_ADDED type variables.\r
+  /// The meaning of the field is implement-dependent.\r
   UINT16          Index[VARIABLE_INDEX_TABLE_VOLUME];\r
 } VARIABLE_INDEX_TABLE;\r
 \r
@@ -157,34 +153,4 @@ PeiGetNextVariableName (
   IN OUT EFI_GUID                           *VariableGuid\r
   );\r
 \r
-/**\r
-  Get one variable by the index count.\r
-\r
-  @param  IndexTable  The pointer to variable index table.\r
-  @param  Count       The index count of variable in index table.\r
-\r
-  @return The pointer to variable header indexed by count.\r
-\r
-**/\r
-VARIABLE_HEADER *\r
-GetVariableByIndex (\r
-  IN VARIABLE_INDEX_TABLE        *IndexTable,\r
-  IN UINT32                      Count\r
-  );\r
-\r
-/**\r
-  Record Variable in VariableIndex HOB.\r
-\r
-  Record Variable in VariableIndex HOB and update the length of variable index table.\r
-\r
-  @param  IndexTable  The pointer to variable index table.\r
-  @param  Variable    The pointer to the variable that will be recorded.\r
-\r
-**/\r
-VOID\r
-VariableIndexTableUpdate (\r
-  IN OUT  VARIABLE_INDEX_TABLE   *IndexTable,\r
-  IN      VARIABLE_HEADER        *Variable\r
-  );\r
-\r
 #endif\r