-/*++\r
+/** @file\r
\r
Copyright (c) 2006 - 2007, Intel Corporation\r
All rights reserved. This program and the accompanying materials\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
-Abstract:\r
-\r
- Tiano PEIM to provide the variable functionality\r
-\r
---*/\r
+**/\r
\r
#ifndef _PEI_VARIABLE_H\r
#define _PEI_VARIABLE_H\r
#include <Library/PeiServicesTablePointerLib.h>\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
-\r
typedef struct {\r
VARIABLE_HEADER *CurrPtr;\r
VARIABLE_HEADER *EndPtr;\r
UINT16 Index[VARIABLE_INDEX_TABLE_VOLUME];\r
} VARIABLE_INDEX_TABLE;\r
\r
-\r
//\r
// Functions\r
//\r
-EFI_STATUS\r
-EFIAPI\r
-PeimInitializeVariableServices (\r
- IN EFI_FFS_FILE_HEADER *FfsHeader,\r
- IN EFI_PEI_SERVICES **PeiServices\r
- )\r
-/*++\r
-\r
-Routine Description:\r
-\r
- TODO: Add function description\r
-\r
-Arguments:\r
-\r
- FfsHeader - TODO: add argument description\r
- PeiServices - TODO: add argument description\r
-\r
-Returns:\r
-\r
- TODO: add return values\r
-\r
---*/\r
-;\r
\r
EFI_STATUS\r
EFIAPI\r
OUT UINT32 *Attributes OPTIONAL,\r
IN OUT UINTN *DataSize,\r
OUT VOID *Data\r
- )\r
-/*++\r
-\r
-Routine Description:\r
-\r
- TODO: Add function description\r
-\r
-Arguments:\r
-\r
- PeiServices - TODO: add argument description\r
- VariableName - TODO: add argument description\r
- VendorGuid - TODO: add argument description\r
- Attributes - TODO: add argument description\r
- DataSize - TODO: add argument description\r
- Data - TODO: add argument description\r
-\r
-Returns:\r
-\r
- TODO: add return values\r
-\r
---*/\r
-;\r
+ );\r
\r
EFI_STATUS\r
EFIAPI\r
OUT UINT32 *Attributes,\r
IN OUT UINTN *DataSize,\r
OUT VOID *Data\r
- )\r
-/*++\r
-\r
-Routine Description:\r
-\r
- Provide the read variable functionality of the variable services.\r
-\r
-Arguments:\r
-\r
- PeiServices - General purpose services available to every PEIM.\r
-\r
- VariableName - The variable name\r
-\r
- VendorGuid - The vendor's GUID\r
-\r
- Attributes - Pointer to the attribute\r
-\r
- DataSize - Size of data\r
-\r
- Data - Pointer to data\r
-\r
-Returns:\r
-\r
- EFI_SUCCESS - The interface could be successfully installed\r
-\r
- EFI_NOT_FOUND - The variable could not be discovered\r
-\r
- EFI_BUFFER_TOO_SMALL - The caller buffer is not large enough\r
-\r
---*/\r
-; \r
+ ); \r
\r
EFI_STATUS\r
EFIAPI\r
IN OUT UINTN *VariableNameSize,\r
IN OUT CHAR16 *VariableName,\r
IN OUT EFI_GUID *VariableGuid\r
- )\r
-/*++\r
-\r
-Routine Description:\r
-\r
- Provide the get next variable functionality of the variable services.\r
-\r
-Arguments:\r
-\r
- PeiServices - General purpose services available to every PEIM.\r
- VariabvleNameSize - The variable name's size.\r
- VariableName - A pointer to the variable's name.\r
- VariableGuid - A pointer to the EFI_GUID structure.\r
-\r
- VariableNameSize - Size of the variable name\r
-\r
- VariableName - The variable name\r
-\r
- VendorGuid - The vendor's GUID\r
-\r
-Returns:\r
-\r
- EFI_SUCCESS - The interface could be successfully installed\r
-\r
- EFI_NOT_FOUND - The variable could not be discovered\r
-\r
---*/\r
-;\r
+ );\r
\r
EFI_STATUS\r
EFIAPI\r
IN OUT UINTN *VariableNameSize,\r
IN OUT CHAR16 *VariableName,\r
IN OUT EFI_GUID *VendorGuid\r
- )\r
-/*++\r
-\r
-Routine Description:\r
-\r
- TODO: Add function description\r
-\r
-Arguments:\r
-\r
- PeiServices - TODO: add argument description\r
- VariableNameSize - TODO: add argument description\r
- VariableName - TODO: add argument description\r
- VendorGuid - TODO: add argument description\r
-\r
-Returns:\r
-\r
- TODO: add return values\r
-\r
---*/\r
-;\r
+ );\r
\r
/**\r
Get one variable by the index count.\r