X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=IntelFrameworkModulePkg%2FUniversal%2FVariablePei%2FVariable.h;h=31c855d27bc18b5fa656c4e95bc7997859390efc;hp=aeb49bca80f4f4c9729de4d3c54d07bff1cbee2c;hb=630b41877e9a1afe59d4f8a1c22bc691fe933ff8;hpb=9cad030bc14e706d8986ed33f0fa8b28f0828c48 diff --git a/IntelFrameworkModulePkg/Universal/VariablePei/Variable.h b/IntelFrameworkModulePkg/Universal/VariablePei/Variable.h index aeb49bca80..31c855d27b 100644 --- a/IntelFrameworkModulePkg/Universal/VariablePei/Variable.h +++ b/IntelFrameworkModulePkg/Universal/VariablePei/Variable.h @@ -1,4 +1,4 @@ -/*++ +/** @file Copyright (c) 2006 - 2007, Intel Corporation All rights reserved. This program and the accompanying materials @@ -9,15 +9,7 @@ http://opensource.org/licenses/bsd-license.php THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -Module Name: - - Variable.h - -Abstract: - - Tiano PEIM to provide the variable functionality - ---*/ +**/ #ifndef _PEI_VARIABLE_H #define _PEI_VARIABLE_H @@ -31,23 +23,7 @@ Abstract: #include #include #include -#include - -// -// Define GET_PAD_SIZE to optimize compiler -// -#if ((ALIGNMENT == 0) || (ALIGNMENT == 1)) -#define GET_PAD_SIZE(a) (0) -#else -#define GET_PAD_SIZE(a) (((~a) + 1) & (ALIGNMENT - 1)) -#endif - -#define HEADER_ALIGN(Header) (((UINTN) (Header) + HEADER_ALIGNMENT - 1) & (~(HEADER_ALIGNMENT - 1))) - -#define GET_VARIABLE_NAME_PTR(a) (CHAR16 *) ((UINTN) (a) + sizeof (VARIABLE_HEADER)) - -#define GET_VARIABLE_DATA_PTR(a) \ - (UINT8 *) ((UINTN) GET_VARIABLE_NAME_PTR (a) + NameSizeOfVariable(a) + GET_PAD_SIZE (NameSizeOfVariable(a) )) +#include typedef struct { VARIABLE_HEADER *CurrPtr; @@ -68,33 +44,9 @@ typedef struct { UINT16 Index[VARIABLE_INDEX_TABLE_VOLUME]; } VARIABLE_INDEX_TABLE; - // // Functions // -EFI_STATUS -EFIAPI -PeimInitializeVariableServices ( - IN EFI_FFS_FILE_HEADER *FfsHeader, - IN EFI_PEI_SERVICES **PeiServices - ) -/*++ - -Routine Description: - - TODO: Add function description - -Arguments: - - FfsHeader - TODO: add argument description - PeiServices - TODO: add argument description - -Returns: - - TODO: add return values - ---*/ -; EFI_STATUS EFIAPI @@ -105,28 +57,7 @@ PeiGetVariable ( OUT UINT32 *Attributes OPTIONAL, IN OUT UINTN *DataSize, OUT VOID *Data - ) -/*++ - -Routine Description: - - TODO: Add function description - -Arguments: - - PeiServices - TODO: add argument description - VariableName - TODO: add argument description - VendorGuid - TODO: add argument description - Attributes - TODO: add argument description - DataSize - TODO: add argument description - Data - TODO: add argument description - -Returns: - - TODO: add return values - ---*/ -; + ); EFI_STATUS EFIAPI @@ -137,37 +68,7 @@ PeiGetVariable2 ( OUT UINT32 *Attributes, IN OUT UINTN *DataSize, OUT VOID *Data - ) -/*++ - -Routine Description: - - Provide the read variable functionality of the variable services. - -Arguments: - - PeiServices - General purpose services available to every PEIM. - - VariableName - The variable name - - VendorGuid - The vendor's GUID - - Attributes - Pointer to the attribute - - DataSize - Size of data - - Data - Pointer to data - -Returns: - - EFI_SUCCESS - The interface could be successfully installed - - EFI_NOT_FOUND - The variable could not be discovered - - EFI_BUFFER_TOO_SMALL - The caller buffer is not large enough - ---*/ -; + ); EFI_STATUS EFIAPI @@ -176,34 +77,7 @@ PeiGetNextVariableName2 ( IN OUT UINTN *VariableNameSize, IN OUT CHAR16 *VariableName, IN OUT EFI_GUID *VariableGuid - ) -/*++ - -Routine Description: - - Provide the get next variable functionality of the variable services. - -Arguments: - - PeiServices - General purpose services available to every PEIM. - VariabvleNameSize - The variable name's size. - VariableName - A pointer to the variable's name. - VariableGuid - A pointer to the EFI_GUID structure. - - VariableNameSize - Size of the variable name - - VariableName - The variable name - - VendorGuid - The vendor's GUID - -Returns: - - EFI_SUCCESS - The interface could be successfully installed - - EFI_NOT_FOUND - The variable could not be discovered - ---*/ -; + ); EFI_STATUS EFIAPI @@ -212,26 +86,7 @@ PeiGetNextVariableName ( IN OUT UINTN *VariableNameSize, IN OUT CHAR16 *VariableName, IN OUT EFI_GUID *VendorGuid - ) -/*++ - -Routine Description: - - TODO: Add function description - -Arguments: - - PeiServices - TODO: add argument description - VariableNameSize - TODO: add argument description - VariableName - TODO: add argument description - VendorGuid - TODO: add argument description - -Returns: - - TODO: add return values - ---*/ -; + ); /** Get one variable by the index count.