American Megatrends, Inc.

NVRAM

Copyright

Release Notes

© American Megatrends, Inc.


Copyright

American Megatrends, Inc.
5555 Oakbrook Parkway
Suite 200
Norcross, GA 30093 (USA)

Copyright (c) 1999-2014 American Megatrends, Inc. All Rights Reserved.

This publication contains proprietary information, which is protected by copyright. No part of this publication may be reproduced, transcribed, stored in a retrieval system, translated into any language or computer language, or transmitted in any form whatsoever without the prior written consent of the publisher, American Megatrends, Inc.

American Megatrends, Inc. retains the right to update, change, modify this publication at any time, without notice.

For Additional Information

Call American Megatrends BIOS Sales Department at 1-800-828-9264 for additional information.

Limitations of Liability

In no event shall American Megatrends be held liable for any loss, expenses, or damages of any kind whatsoever, whether direct, indirect, incidental, or consequential, arising from the design or use of this product or the support materials provided with the product.

Limited Warranty

No warranties are made, either expressed or implied, with regard to the contents of this work, its merchantability, or fitness for a particular use. American Megatrends assumes no responsibility for errors and omissions or for the uses made of the material contained herein or reader decisions based on such use.

Trademark and Copyright Acknowledgments

All product names used in this publication are for identification purposes only and are trademarks of their respective Companies.


Release Notes - NDA Required

Component Information:
Component Title: NVRAM
Component Reference Name: NVRAM
Component Type: ModulePart
Release Date: 2014-06-11
Source Control Label: 4.6.5.5_NVRAM_02
Source Control Location: $/Alaska/SOURCE/Core/Modules/NVRAM

Dependencies
NONE.
Non-Compiled BIN and LIB File(s) within this Component:
N0NE
Component Description:

Non-volatile random-access memory (NVRAM) is random-access memory that retains its information when power is turned off (non-volatile).
In the content of this document NVRAM refers to the section of flash part, used for storing different variables which can be modified from boot to boot by a user (Setup data, for example), other firmware modules or OS.
Architecturally there are two main parts of Nvram code: Nvram and NvramSmi.

Nvram part has implementation of Nvram Variable services and all routines needed for its functioning (Store discovering, Garbage collection, etc.) Structurally Nvram divided into 2 parts
- NvramPei – PEIM with PeiReadOnlyVariable and PeiReadOnlyVariable2 PPIs available as soon as possible on PEI stage.
- NvramDxe – implements DXE and Runtime Variable services and all supporting infrastructure.

Filename | Description
NVRAM.cif | Cif file for Nvram module
NVRAM.chm | This chm file.
NVRAM.sdl | Sdl file with setings.
NVRAM.mak | NVRAM mak file with build rules and eLing generation.
NVRAM.h | Definitions, common for all Nvram module.
NVRAMRead.c | NVRAM data area access API common for all Nvram.
NVRAMPEI.c | File contains PEI specific Nvram code such as entry point of the Nvram PEIM and implementation of PEI ReadOnlyVariable.
NVRAMDXE.c | File contains DXE specific NvRam routines such as Entry point of the NvRam DXE driver and implementation of Runtime Variable services and all supporting infrastructure.
AMI Build Tools:
Tools Label: 4.5.5_TOOLS_41, Dated: 2013-04-21
Visual eBios: RSS.5.73.0244, Dated: 2013-03-19
Compiler Tool(s): WinDDK 7600.16385.1
New features added in this label:
  • None.
    • General Bug Fixes:
  • EIP173026. GetNextVariableName was in certain cases returning name and GUID of a boot time variable.
    Variable name and GUID of a boot time variable X were returned at runtime under the following conditions:
    - The variable X was present in the default var.store and not present in the main var.store
    - The variable immediately before variable X in the default var.store was present in the main var.store
    The default var.store is a var.store generated at build time that contains default values for all setup variables (variables associated with setup controls).
    The main var.store is the main NVRAM area. Variable is added into a main var.store when somebody calls SetVariable.
    • EIP addressed in this label:
  • EIP170545. Spelling errors corrected.
  • EIP159166. Set Auth Variable behaviour when AuthVariable_SUPPORT is not present in project made up to speck.
    • Files changed for EIP fixes:
  • NVRAMPEI.c: EIP170545
  • NVRAMDXE.c: EIP159166
  • NVRAMDXE.c, NVRAMRead.c: EIP173026
    • Known issues and limitations in this label:
  • None.
    • Remaining Issues:
  • None.
    • Unit Testing:
  • Variable services are tested through SCT.
    • Validation Testing:
  • NONE
    • Release History:
  • None. Initial Check in.

    • © American Megatrends Inc.


Function by File Name

AMIBIOS Function Reference

By File Name

The following is a list of the source files.
For a list in alphabetical order, see In Alphabetical Order.

  • NVRAM.h
  • NVRAM.mak
  • NVRAMDXE.c
  • NVRAMPEI.c
  • NVRAMRead.c
Built on 16:21:53 06/11/14


NVRAM.h

Description:
NVRAM Definitions


NVRAM.mak

Description:


NVRAMDXE.c

Description:

The following functions are used in the file: NVRAMDXE.c.

Function | Description
BeginCriticalSection | This function calls when critical section begins. It disables interupts, and Smi and fills CRITICAL_SECTION structure fields
CheckStore | This function checks if Varstore is correct and otherwise tries to Reinitialize NvRam, copy Varstore to memory and prints messages based on situation.
CheckTheHeader | This function validates correctness of the header fields used by the driver and fixes them if Update parameter is TRUE
CopyVariable | This function copyes variable from one Nvram store to another
CopyVariables | This function copies variables from one varstore to another
CopyVarStore | This function copyes varstore to a new location
CopyVarStoreToMemStore | This function allocates memory copyes varstore to a new location
CreateVariableEx | This function adds new variable to Varstore
DeleteVariable | This function delets variable
DummyUpdateRoutine | This function is dummy function doing nothing and always returning TRUE
DxeGetNextVariableName | This function searches for next Var after Var with specific name and GUID and returns it's Name.
DxeGetNextVariableNameSafe | This function searches for Var folowing after Var with specific name and GUID and returns it's Name, beginning and ending critical section .
DxeGetVariable | This function searches for Var with specific GUID and Name
DxeGetVariableSafe | This function searches for Var with specific GUID and Name beginning and ending critical section
DxeSetVariable | This function sets Var with specific GUID, Name and attributes
DxeSetVariableSafe | This function sets Var with specific GUID, Name and attributes beginning and ending critical section.
EndCriticalSection | This function calls when critical section ends. It enable interupts, and Smi and fills CRITICAL_SECTION structure fields
EnumerateStore | This function searches for last Ver and fills the NVRAM_STORE_INFO structure.
FindVariable | This function searches for Var with specific GUID and Name
FlashMemFlashWrite | This function used to copy some information from one part of flash to another, when flash is not memory mapped. It uses temporary buffer one or more times.
GetNextHighMonotonicCount | This function gets Next High Monotonic Count
GetNextMonotonicCount | This function gets Next low and high Monotonic Count
GetVarAuthExtFlags | This function returns Security fields Mc and KeyHash form existing Var in Var store It is called called every time variable with one of UEFI23_1_AUTHENTICATED_VARIABLE_ATTRIBUTES is being verified.
IndexAddVariable | This function adds new Var
IndexDeleteVariable | This function deletes Var and adds it's entry in VarIndexPtr to blanks
IndexDeleteVariableEntry | This function deletes Var and adds it's entry in VarIndexPtr to blanks
IndexExitBs | This function resets VarIndexPtr to NULL on Exit BS
IndexFindVariable | This function searches for Var with specific GUID
IndexFindVariableEntry | This function searches for Var with specific GUID
IndexGetBlankEntry | This function searches for the blank entry in VarIndexPtr structure
IndexGetList | This function gets list of variables starting with FirstLetter
IndexGetListNvar | This function gets list of variables starting with First Letter of Nvar
IndexInit | This function allocates memory for Var Index Buffer and fils pointer to it in VarIndexPtr stucture
IndexReset | This function resets the VarIndexPtr and updates VarStoreInfo structures
IndexUpdateVariable | This function searces for Var and if it is found updates it, or add new var otherwise
InitVolatileStore | This function allocates memory and inits NVRAM_STORE_INFO structure.
IsClean | This function checks if defined memory chunk is clean
IsEnoughSpace | This function checks is there is Size space avaiable in NVRAM_STORE_INFO
IsNvramRuntime | This function returns the value of Runtime local variable
IsProgrammableOrEqual | This function checks if defined memory chunks are the same and if destenation is programmable
IsStoreOk | This function checks is Varstore is correct
LegacyToEfiFn |
MemErase | This function sets Size amount memory starting from Address to FLASH_EMPTY_BYTE
MemProgram | This function writs Data to memory starting from Address
MonotonicCounterInit | This function initialize pBS MonotonicCount servicies and installs corresponding protocols
NvDisableWrites | This function disables writes to flash starting from Address
NvEnableWrites | This function enables writes to flash starting from Address
NvErase | This function erases Size amount of flash starting with Address
NvProgram | This function programms Size amount of flash starting with Address
NvRamInit | This function initialize pRS Var servicies and MonotonicCount servicies (if MONOTONIC_COUNT_IN_NVRAM token is set) installs corresponding protocols
NvramInitialize | This function initializes Varstore
NvramNotInSmmExitBs | This function signals that exit BS event was taken place and switches SwitchToRuntime field in NvRamMailbox
NvramNotInSmmInit | This function initialize pRS Var, MonotonicCount servicies (if MONOTONIC_COUNT_IN_NVRAM token is set) and installs corresponding protocols and sets NvRamMailbox Var not in SMM
NvRamSmmEntry | This function is the entry point for this DXE. This function installs NvRam services in and outside SMM.
NvramSmmInit | This function gets NvRamMailbox and initialize pRS Var servicies and corresponding structures
NvResetConfiguration | This function resets NvRam configuration
QueryVariableInfo | This function returns parameters of VarStore with passed attributes
RecoverFromFlashUpdateFailure | This function checks is there was a flash update failure and signal about it to CheckStore
ResetFfsFileStateInMemory | This function sets State of Ffs file to new value described by NewState
SelectiveAllocate | This function returns pointer to allocated memory to use as temp buffer for any occasions. If NvramDriverBuffer is not 0 - memory allocated previously will be used. If not - function will allocate memory with the Size - and return pointer to it.
SelectiveFree | This function free memory allocated for temp buffer for any occasions. If address passed to this function fits (NvramDriverBuffer + it's size) range memory allocated in NvramDriverBuffer will be released. If not - function will call FreePool routine.
SetNvramFfsFileState | This function updates State of Ffs file with new bits described by NewState
SkipSpecificNvar | Helper varstore filtering function. Skips the variable that corresponds to the passed in NVAR.
SkipVarsWithDefaults | Helper varstore filtering function. Skips the variables that have defaults.
SmmGetNextVariableName | This function searches for next Var after Var with specific name and GUID and returns it's Name in SMM synchronizing Varstors before and after operation.
SmmGetVariable | This function searches for Var with specific GUID and Name in SMM synchronizing Varstors before and after operation
SmmQueryVariableInfo | This function returns parameters of VarStore with passed attributes in SMM synchronizing Varstors before operation.
SmmSetVariable | This function sets Var with specific GUID, Name and attributes in SMM synchronizing Varstors before and after operation
SynchronizeAfterOperation | This function synchronizes Runtime and non Runtime Var Structures after enterin SMM after each operation with Variables
SynchronizeBeforeOperation | This function synchronizes Runtime and non Runtime Var Structures after enterin SMM before each operation with Variables
SynchronizeVarStore | This function synchronizes NVRAM_STORE_INFO structure after enterin SMM
SynchronizeVarStoreInfo | This function synchronizes all NVRAM_STORE_INFO structures in VARSTORE_INFO after enterin SMM
UpdateFtVarstore | This function copyes Varstore to a new location and makes this copy main Varstore
UpdateVariable | This function updates variable
UpdateVarstore | This function copyes Varstore to a new location and makes this copy main Varstore if old varstore flag has NVRAM_STORE_FLAG_NON_VALATILE and Backupadress is valid, else it just copy Varstor to new location
VarExitBS | This function will be called when Exit BS will signaled will update data to work in RunTime.
VarInterfaceVirtualFixup | This function will be invoked to convert runtime pointers to virtual address
VarNotInEfiGlobalVarList | Searches for the passed variable in the EFI Global Var lists and if found, makes sure, that it has the same attributes.
VarNotInPreserveList | Looks for the provided variable in the preserved list.
VarStoreDiscovery | This function searches for nested Verstores and adds them to the NVRAM_STORE_INFO structure.
VarStoreVirtualFixup | This function will be invoked to convert runtime pointers to virtual address
VarVirtAddressChange | This function will be invoked to convert whole Var infrustructure and pRS runtime pointers to virtual address


BeginCriticalSection in the NVRAMDXE.c

Function : BeginCriticalSection

File: NVRAMDXE.c
Description:
This function calls when critical section begins. It disables interupts,
and Smi and fills CRITICAL_SECTION structure fields
Input:
CRITICAL_SECTION *Cs - pointer to CRITICAL_SECTION structure
Output:
VOID


CheckStore in the NVRAMDXE.c

Function : CheckStore

File: NVRAMDXE.c
Description:
This function checks if Varstore is correct and otherwise tries to
Reinitialize NvRam, copy Varstore to memory and prints messages
based on situation.
Input:
OUT NVRAM_STORE_INFO *Info -  pointer to NVRAM_STORE_INFO structure
Output:
BOOLEAN - based on result


CheckTheHeader in the NVRAMDXE.c

Function : CheckTheHeader

File: NVRAMDXE.c
Description:
This function validates correctness of the header fields used by the driver
and fixes them if Update parameter is TRUE
Input:
IN NVRAM_STORE_INFO *Info -  pointer to NVRAM_STORE_INFO structure to check
IN UINT32 HeaderLength - length of the NVRAM header
IN BOOLEAN Update -  If TRUE, invalid header will be updated to fix the problem
Output:
BOOLEAN
 TRUE - No problems detected
 FALSE - Problem(s) detected


CopyVariable in the NVRAMDXE.c

Function : CopyVariable

File: NVRAMDXE.c
Description:
This function copyes variable from one Nvram store to another
Input:
IN CHAR16 *VariableName - pointer to Var Name in Unicode
IN EFI_GUID *VendorGuid - pointer to Var GUID
IN UINTN DataSize - size of Var data
IN VOID *Data - pointer to the Var data temprary storadge
OUT NVRAM_STORE_INFO *FromInfo -  pointer to NVRAM_STORE_INFO structure to copy from
OUT NVRAM_STORE_INFO *ToInfo -  pointer to NVRAM_STORE_INFO structure to copy to
VARIABLE_INTERFACE *ToInterface - pointer to the interface with the Variable routins
Output:
EFI_STATUS


CopyVariables in the NVRAMDXE.c

Function : CopyVariables

File: NVRAMDXE.c
Description:
This function copies variables from one varstore to another
Input:
OUT NVRAM_STORE_INFO *Info -  pointer to NVRAM_STORE_INFO structure to copy from
OUT NVRAM_STORE_INFO *NewInfo -  pointer to NVRAM_STORE_INFO structure to copy to
VARIABLE_INTERFACE *NewInterface - pointer to the interface with the update routins
COPY_VAR_STORE_FILTER FilterFunction - filtering function
VOID *FilterContext - filtering function context
Output:
EFI_STATUS


CopyVarStore in the NVRAMDXE.c

Function : CopyVarStore

File: NVRAMDXE.c
Description:
This function copyes varstore to a new location
Input:
OUT NVRAM_STORE_INFO *Info -  pointer to NVRAM_STORE_INFO structure to copy from
OUT NVRAM_STORE_INFO *NewInfo -  pointer to NVRAM_STORE_INFO structure to copy to
VARIABLE_INTERFACE *NewInterface - pointer to the interface with the update routins
COPY_VAR_STORE_FILTER FilterFunction - filtering function
VOID *FilterContext - filtering function context
Output:
EFI_STATUS


CopyVarStoreToMemStore in the NVRAMDXE.c

Function : CopyVarStoreToMemStore

File: NVRAMDXE.c
Description:
This function allocates memory copyes varstore to a new location
Input:
OUT NVRAM_STORE_INFO *Info -  pointer to NVRAM_STORE_INFO structure to copy from
IN NVAR* SkipVar - pointer to var to be skiped
OUT NVRAM_STORE_INFO *NewInfo -  pointer to NVRAM_STORE_INFO structure which was created
Output:
EFI_STATUS


CreateVariableEx in the NVRAMDXE.c

Function : CreateVariableEx

File: NVRAMDXE.c
Description:
This function adds new variable to Varstore
Input:
IN CHAR16 *VariableName - pointer to Var Name in Unicode
IN EFI_GUID *VendorGuid - pointer to Var GUID
IN UINT32 Attributes - attributes of Variable
IN UINTN DataSize - size of Var data
IN VOID *Data - pointer to the Var data
OUT NVRAM_STORE_INFO *Info -  pointer to NVRAM_STORE_INFO structure
VARIABLE_INTERFACE *Interface - pointer to the interface with the Variable routins
(OPTIONAL) NVAR* OldVar - in case of garbage collection pointer to the first i
nstance of variable to get Monotonic Counter and Flags from
(OPTIONAL) NVRAM_STORE_INFO *FromInfo - in case of garbage collection pointer to the
store info strucrure - to get Public Key from
Output:
EFI_STATUS


DeleteVariable in the NVRAMDXE.c

Function : DeleteVariable

File: NVRAMDXE.c
Description:
This function delets variable
Input:
IN NVAR *Var - pointer to the Var to be deleted
OUT NVRAM_STORE_INFO *Info -  pointer to NVRAM_STORE_INFO structure
VARIABLE_INTERFACE *Interface - pointer to the interface with the Variable routins
Output:
EFI_STATUS


DummyUpdateRoutine in the NVRAMDXE.c

Function : DummyUpdateRoutine

File: NVRAMDXE.c
Description:
This function is dummy function doing nothing and always returning TRUE
Input:
IN VOID *Address - Memory address
UINTN Size - Size
Output:
TRUE always


DxeGetNextVariableName in the NVRAMDXE.c

Function : DxeGetNextVariableName

File: NVRAMDXE.c
Description:
This function searches for next Var after Var with specific name and GUID and returns it's Name.
Input:
IN OUT UINTN *VariableNameSize - size of Varname - if smaller than actual EFI_BUFFER_TOO_SMALL
will be returned and DataSize will be set to actual size needed
IN OUT CHAR16 *VariableName - pointer where Var Name in Unicode will be stored
IN OUT EFI_GUID *VendorGuid - pointer to menory where Var GUID is stored
Output:
EFI_STATUS - based on result


DxeGetNextVariableNameSafe in the NVRAMDXE.c

Function : DxeGetNextVariableNameSafe

File: NVRAMDXE.c
Description:
This function searches for Var folowing after Var with specific name and GUID
and returns it's Name, beginning and ending critical section .
Input:
IN OUT UINTN *VariableNameSize - size of Varname - if smaller than actual EFI_BUFFER_TOO_SMALL
will be returned and DataSize will be set to actual size needed
IN OUT CHAR16 *VariableName - pointer where Var Name in Unicode will be stored
IN OUT EFI_GUID *VendorGuid - pointer to menory where Var GUID is stored
Output:
EFI_STATUS - based on result


DxeGetVariable in the NVRAMDXE.c

Function : DxeGetVariable

File: NVRAMDXE.c
Description:
This function searches for Var with specific GUID and Name
Input:
IN CHAR16 *VariableName - pointer to Var Name in Unicode
IN EFI_GUID *VendorGuid - pointer to Var GUID
OPTIONAL OUT UINT32* Attributes - Pointer to memory where Attributes will be returned
IN OUT UINTN *DataSize - size of Var - if smaller than actual EFI_BUFFER_TOO_SMALL
will be returned and DataSize will be set to actual size needed
OUT VOID *Data - Pointer to memory where Var will be returned
Output:
EFI_STATUS - based on result


DxeGetVariableSafe in the NVRAMDXE.c

Function : DxeGetVariableSafe

File: NVRAMDXE.c
Description:
This function searches for Var with specific GUID and Name
beginning and ending critical section
Input:
IN CHAR16 *VariableName - pointer to Var Name in Unicode
IN EFI_GUID *VendorGuid - pointer to Var GUID
OPTIONAL OUT UINT32* Attributes - Pointer to memory where Attributes will be returned
IN OUT UINTN *DataSize - size of Var - if smaller than actual EFI_BUFFER_TOO_SMALL
will be returned and DataSize will be set to actual size needed
OUT VOID *Data - Pointer to memory where Var will be returned
Output:
EFI_STATUS - based on result


DxeSetVariable in the NVRAMDXE.c

Function : DxeSetVariable

File: NVRAMDXE.c
Description:
This function sets Var with specific GUID, Name and attributes
Input:
IN CHAR16 *VariableName - pointer to Var Name in Unicode
IN EFI_GUID *VendorGuid - pointer to Var GUID
IN UINT32 Attributes - Attributes of the Var
IN UINTN DataSize - size of Var
IN VOID *Data - Pointer to memory where Var data is stored
Output:
EFI_STATUS - based on result


DxeSetVariableSafe in the NVRAMDXE.c

Function : DxeSetVariableSafe

File: NVRAMDXE.c
Description:
This function sets Var with specific GUID, Name and attributes
beginning and ending critical section.
Input:
IN CHAR16 *VariableName - pointer to Var Name in Unicode
IN EFI_GUID *VendorGuid - pointer to Var GUID
IN UINT32 Attributes - Attributes of the Var
IN UINTN DataSize - size of Var
IN VOID *Data - Pointer to memory where Var data is stored
Output:
EFI_STATUS - based on result


EndCriticalSection in the NVRAMDXE.c

Function : EndCriticalSection

File: NVRAMDXE.c
Description:
This function calls when critical section ends. It enable interupts,
and Smi and fills CRITICAL_SECTION structure fields
Input:
CRITICAL_SECTION *Cs - pointer to CRITICAL_SECTION structure
Output:
VOID


EnumerateStore in the NVRAMDXE.c

Function : EnumerateStore

File: NVRAMDXE.c
Description:
This function searches for last Ver and fills the NVRAM_STORE_INFO structure.
Input:
NVRAM_STORE_INFO *pInfo - pointer to NVRAM store structure
Output:
VOID


FindVariable in the NVRAMDXE.c

Function : FindVariable

File: NVRAMDXE.c
Description:
This function searches for Var with specific GUID and Name
Input:
IN CHAR16 *VariableName - pointer to Var Name in Unicode
IN EFI_GUID *VendorGuid - pointer to Var GUID
OUT UINT32* Attributes - Pointer to memory where Attributes will be returned
IN OUT UINTN *DataSize - size of Var - if smaller than actual EFI_BUFFER_TOO_SMALL
will be returned and DataSize will be set to actual size needed
OUT VOID *Data - Pointer to memory where Var is loacted
Output:
EFI_STATUS - based on result


FlashMemFlashWrite in the NVRAMDXE.c

Function : FlashMemFlashWrite

File: NVRAMDXE.c
Description:
This function used to copy some information from one part of
flash to another, when flash is not memory mapped. It uses temporary
buffer one or more times.
Input:
IN VARIABLE_INTERFACE *Interface - pointer to Variable interface
IN OUT UINT8 **PointerTo - Destination
IN VOID *From - Source
IN UINTN SizeToWrite - in bytes.
IN NVRAM_STORE_INFO *Info - pointer to NVRAM_STORE_INFO stucture
Output:
*EXT_SEC_FLAGS


GetNextHighMonotonicCount in the NVRAMDXE.c

Function : GetNextHighMonotonicCount

File: NVRAMDXE.c
Description:
This function gets Next High Monotonic Count
Input:
OUT UINT32 *HighCount - pointer to where result will be stored
Output:
EFI_STATUS based on result


GetNextMonotonicCount in the NVRAMDXE.c

Function : GetNextMonotonicCount

File: NVRAMDXE.c
Description:
This function gets Next low and high Monotonic Count
Input:
OUT UINT64 *Count - pointer to where result will be stored
Output:
EFI_STATUS based on result


GetVarAuthExtFlags in the NVRAMDXE.c

Function : GetVarAuthExtFlags

File: NVRAMDXE.c
Description:
This function returns Security fields Mc and KeyHash form existing
Var in Var store
It is called called every time variable with one of
UEFI23_1_AUTHENTICATED_VARIABLE_ATTRIBUTES is being verified.
Input:
NVAR *Var pointer to the 1st instance of Var
NVRAM_STORE_INFO *pInfo - pointer to NVRAM store structure
OUT EXT_SEC_FLAGS->MonotonicCount - value of MC or TIME stamp
OUT EXT_SEC_FLAGS->KeyHash - pointer to memory, allocated by caller,
where Hash of PublicKeyDigest will be returned.
Output:
*EXT_SEC_FLAGS


IndexAddVariable in the NVRAMDXE.c

Function : IndexAddVariable

File: NVRAMDXE.c
Description:
This function adds new Var
Input:
NVAR *Nvar - pointer to Var
IN NVRAM_STORE_INFO *Info - pointer to NVRAM_STORE_INFO structure
Output:
VOID


IndexDeleteVariable in the NVRAMDXE.c

Function : IndexDeleteVariable

File: NVRAMDXE.c
Description:
This function deletes Var and adds it's entry in VarIndexPtr to blanks
Input:
NVAR *Nvar - pointer to Var to delete
Output:
VOID


IndexDeleteVariableEntry in the NVRAMDXE.c

Function : IndexDeleteVariableEntry

File: NVRAMDXE.c
Description:
This function deletes Var and adds it's entry in VarIndexPtr to blanks
Input:
VAR_INDEX_ENTRY *Entry - pointer to Entry to delete
Output:
VOID


IndexExitBs in the NVRAMDXE.c

Function : IndexExitBs

File: NVRAMDXE.c
Description:
This function resets VarIndexPtr to NULL on Exit BS
Input:
NONE
Output:
VOID


IndexFindVariable in the NVRAMDXE.c

Function : IndexFindVariable

File: NVRAMDXE.c
Description:
This function searches for Var with specific GUID
Input:
IN CHAR16 *VariableName - pointer to Var Name in Unicode
IN EFI_GUID *VendorGuid - pointer to Var GUID
OUT UINTN *VariableNameSize - size of Var name
OUT NVRAM_STORE_INFO **Info - double pointer to NVRAM_STORE_INFO structure
OUT BOOLEAN *UnindexedExists - indicator, that there is unindexed variables
Output:
NVAR* - pointer to Var found; NULL if not found


IndexFindVariableEntry in the NVRAMDXE.c

Function : IndexFindVariableEntry

File: NVRAMDXE.c
Description:
This function searches for Var with specific GUID
Input:
IN CHAR16 *VariableName - pointer to Var Name in Unicode
IN EFI_GUID *VendorGuid - pointer to Var GUID
OUT UINTN *VariableNameSize - size of Var name
OUT NVRAM_STORE_INFO **Info - double pointer to NVRAM_STORE_INFO structure
OUT BOOLEAN *UnindexedExists - indicator, that there is unindexed variables
Output:
VAR_INDEX_ENTRY* - pointer to Var's Index entry found; NULL if not found


IndexGetBlankEntry in the NVRAMDXE.c

Function : IndexGetBlankEntry

File: NVRAMDXE.c
Description:
This function searches for the blank entry in VarIndexPtr structure
Input:
NONE
Output:
VAR_INDEX_ENTRY* - pointer to the blank entry, NUUL if no space


IndexGetList in the NVRAMDXE.c

Function : IndexGetList

File: NVRAMDXE.c
Description:
This function gets list of variables starting with FirstLetter
Input:
CHAR16 FirstLetter - letter to search
Output:
DLIST* - pointer to list of Var starting with FirstLetter


IndexGetListNvar in the NVRAMDXE.c

Function : IndexGetListNvar

File: NVRAMDXE.c
Description:
This function gets list of variables starting with First Letter of Nvar
Input:
NVAR *Nvar - pointer to Var
Output:
DLIST* - pointer to list of Var


IndexInit in the NVRAMDXE.c

Function : IndexInit

File: NVRAMDXE.c
Description:
This function allocates memory for Var Index Buffer and fils pointer to it in
VarIndexPtr stucture
Input:
NONE
Output:
VOID


IndexReset in the NVRAMDXE.c

Function : IndexReset

File: NVRAMDXE.c
Description:
This function resets the VarIndexPtr and updates VarStoreInfo structures
Input:
NONE
Output:
VOID


IndexUpdateVariable in the NVRAMDXE.c

Function : IndexUpdateVariable

File: NVRAMDXE.c
Description:
This function searces for Var and if it is found updates it, or add new var otherwise
Input:
NVAR *Nvar - pointer to Var
IN NVRAM_STORE_INFO *Info - pointer to NVRAM_STORE_INFO structure
Output:
VOID


InitVolatileStore in the NVRAMDXE.c

Function : InitVolatileStore

File: NVRAMDXE.c
Description:
This function allocates memory and inits NVRAM_STORE_INFO structure.
Input:
NVRAM_STORE_INFO *pInfo - pointer to NVRAM store structure
UINTN HeaderSize - Size of the header
UINT8 Flags - default Flags
Output:
EFI_STATUS


IsClean in the NVRAMDXE.c

Function : IsClean

File: NVRAMDXE.c
Description:
This function checks if defined memory chunk is clean
Input:
IN  UINT8 *pDest - pointer to memory to check
IN  UINTN Size - size of the chunk
Output:
BOOLEAN - TRUE if pDest is clean, otherwice FALSE


IsEnoughSpace in the NVRAMDXE.c

Function : IsEnoughSpace

File: NVRAMDXE.c
Description:
This function checks is there is Size space avaiable in NVRAM_STORE_INFO
Input:
NVRAM_STORE_INFO* Info - pointer to NVRAM_STORE_INFO stucture
UINTN Size - Size to check for
Output:
BOOLEAN - TRUE if space avaiable, FALSE otherwise


IsNvramRuntime in the NVRAMDXE.c

Function : IsNvramRuntime

File: NVRAMDXE.c
Description:
This function returns the value of Runtime local variable
Input:
None
Output:
BOOLEAN - current value of Runtime local variable


IsProgrammableOrEqual in the NVRAMDXE.c

Function : IsProgrammableOrEqual

File: NVRAMDXE.c
Description:
This function checks if defined memory chunks are the same and if destenation is programmable
Input:
IN  UINT8 *pDest - pointer to memory to check
IN  UINT8 *pSource - pointer to the source to compare with
IN  UINTN Size - size of the chunk
OUT BOOLEAN *pIsProgrammable - Will be set to TRUE if pDest is programable
OUT BOOLEAN *pIsEqual - Will be set to TRUE if pDest and pSource has the same content
Output:
VOID


IsStoreOk in the NVRAMDXE.c

Function : IsStoreOk

File: NVRAMDXE.c
Description:
This function checks is Varstore is correct
Input:
OUT NVRAM_STORE_INFO *Info -  pointer to NVRAM_STORE_INFO structure
Output:
BOOLEAN - based on result


LegacyToEfiFn in the NVRAMDXE.c

Function : LegacyToEfiFn

File: NVRAMDXE.c
Description:
Input:
Output:
Notes:


MemErase in the NVRAMDXE.c

Function : MemErase

File: NVRAMDXE.c
Description:
This function sets Size amount memory starting from Address to FLASH_EMPTY_BYTE
Input:
IN VOID *Address - Memory address
UINTN Size - Size
Output:
TRUE always


MemProgram in the NVRAMDXE.c

Function : MemProgram

File: NVRAMDXE.c
Description:
This function writs Data to memory starting from Address
Input:
IN VOID *Address - Memory address
UINTN Size - Size of data to write
VOID *Data - pointer to data to write
Output:
TRUE always


MonotonicCounterInit in the NVRAMDXE.c

Function : MonotonicCounterInit

File: NVRAMDXE.c
Description:
This function initialize pBS MonotonicCount servicies and installs
corresponding protocols
Input:
IN EFI_HANDLE ImageHandle - Image handle
IN EFI_SYSTEM_TABLE *SystemTable - pointer to System Table
Output:
VOID


NvDisableWrites in the NVRAMDXE.c

Function : NvDisableWrites

File: NVRAMDXE.c
Description:
This function disables writes to flash starting from Address
Input:
IN VOID *Address - Start address
UINTN Size - Size of flash to be write disable
Output:
TRUE always


NvEnableWrites in the NVRAMDXE.c

Function : NvEnableWrites

File: NVRAMDXE.c
Description:
This function enables writes to flash starting from Address
Input:
IN VOID *Address - Start address
UINTN Size - Size of flash to be write enabled
Output:
TRUE always


NvErase in the NVRAMDXE.c

Function : NvErase

File: NVRAMDXE.c
Description:
This function erases Size amount of flash starting with Address
Input:
IN VOID *Address - pointer to flash to erase
IN  UINTN Size - size of the flash to erase
Output:
BOOLEAN - TRUE or FALSE based on result


NvProgram in the NVRAMDXE.c

Function : NvProgram

File: NVRAMDXE.c
Description:
This function programms Size amount of flash starting with Address
Input:
IN VOID *Address - pointer to flash to programm
IN  UINTN Size - size of the data to programm
VOID *Data - pointer to the data to be programed
Output:
BOOLEAN - TRUE if pDest is clean, otherwice FALSE


NvRamInit in the NVRAMDXE.c

Function : NvRamInit

File: NVRAMDXE.c
Description:
This function initialize pRS Var servicies and MonotonicCount servicies
(if MONOTONIC_COUNT_IN_NVRAM token is set) installs
corresponding protocols
Input:
IN EFI_HANDLE ImageHandle - Image handle
IN EFI_SYSTEM_TABLE *SystemTable - pointer to System Table
Output:
VOID


NvramInitialize in the NVRAMDXE.c

Function : NvramInitialize

File: NVRAMDXE.c
Description:
This function initializes Varstore
Input:
NONE
Output:
EFI_STATUS based on result


NvramNotInSmmExitBs in the NVRAMDXE.c

Function : NvramNotInSmmExitBs

File: NVRAMDXE.c
Description:
This function signals that exit BS event was taken place and switches
SwitchToRuntime field in NvRamMailbox
Input:
NONE
Output:
VOID


NvramNotInSmmInit in the NVRAMDXE.c

Function : NvramNotInSmmInit

File: NVRAMDXE.c
Description:
This function initialize pRS Var, MonotonicCount servicies
(if MONOTONIC_COUNT_IN_NVRAM token is set) and installs
corresponding protocols and sets NvRamMailbox Var not in SMM
Input:
IN EFI_HANDLE ImageHandle - Image handle
IN EFI_SYSTEM_TABLE *SystemTable - pointer to System Table
Output:
EFI_STATUS


NvRamSmmEntry in the NVRAMDXE.c

Function : NvRamSmmEntry

File: NVRAMDXE.c
Description:
This function is the entry point for this DXE. This function
        installs NvRam services in and outside SMM.
Input:
IN EFI_HANDLE ImageHandle -	Image handle
        IN EFI_SYSTEM_TABLE *SystemTable -	Pointer to the system table
Output:
EFI_STATUS - Status based on errors that occurred while waiting for
        time to expire.


NvramSmmInit in the NVRAMDXE.c

Function : NvramSmmInit

File: NVRAMDXE.c
Description:
This function gets NvRamMailbox and initialize pRS Var servicies and
corresponding structures
Input:
IN EFI_HANDLE ImageHandle - Image handle
IN EFI_SYSTEM_TABLE *SystemTable - pointer to System Table
Output:
EFI_STATUS based on result


NvResetConfiguration in the NVRAMDXE.c

Function : NvResetConfiguration

File: NVRAMDXE.c
Description:
This function resets NvRam configuration
Input:
OUT NVRAM_STORE_INFO *Info -  pointer to NVRAM_STORE_INFO structure
VARIABLE_INTERFACE *Interface - pointer to the interface with the Variable routins
BOOLEAN ExternalDefaults - if TRUE - use external defaults
Output:
EFI_STATUS


QueryVariableInfo in the NVRAMDXE.c

Function : QueryVariableInfo

File: NVRAMDXE.c
Description:
This function returns parameters of VarStore with passed attributes
Input:
IN UINT32 Attributes - Atributes to search for
OUT UINT64 *MaximumVariableStorageSize - Maximum Variable Storage Size
OUT UINT64 *RemainingVariableStorageSize - Remaining Variable Storage Size
OUT UINT64 *MaximumVariableSize - Maximum Variable Size
Output:
EFI_STATUS based on result


RecoverFromFlashUpdateFailure in the NVRAMDXE.c

Function : RecoverFromFlashUpdateFailure

File: NVRAMDXE.c
Description:
This function checks is there was a flash update failure and signal about it
to CheckStore
Input:
NVRAM_STORE_INFO* Info - pointer to NVRAM_STORE_INFO stucture
VOID *EndOfVars - End of Vars pointer
UINTN DataSize - Size of data, that was programed
NVAR *PrevVar - pointer to previous instance of Var
Output:
VOID


ResetFfsFileStateInMemory in the NVRAMDXE.c

Function : ResetFfsFileStateInMemory

File: NVRAMDXE.c
Description:
This function sets State of Ffs file to new value described by NewState
Input:
OUT NVRAM_STORE_INFO *Info -  pointer to NVRAM_STORE_INFO structure
EFI_FFS_FILE_STATE NewState - New state to set
Output:
EFI_STATUS


SelectiveAllocate in the NVRAMDXE.c

Function : SelectiveAllocate

File: NVRAMDXE.c
Description:
This function returns pointer to allocated memory to use as
temp buffer for any occasions. If NvramDriverBuffer is not 0 -
memory allocated previously will be used. If not - function will
allocate memory with the Size - and return pointer to it.
Input:
IN BOOLEAN  FirstPart - if TRUE - first part of NvramDriverBuffer
                       will be used.
IN  UINTN Size - size of memory to allocate.
Output:
UINT8* - pointer to allocated memory.


SelectiveFree in the NVRAMDXE.c

Function : SelectiveFree

File: NVRAMDXE.c
Description:
This function free memory allocated for temp buffer
for any occasions. If address passed to this function fits
(NvramDriverBuffer +  it's size) range memory allocated in
NvramDriverBuffer will be released. If not - function will
call FreePool routine.
Input:
UINT8* Target - pointer to the begining of memory to free
Output:
VOID


SetNvramFfsFileState in the NVRAMDXE.c

Function : SetNvramFfsFileState

File: NVRAMDXE.c
Description:
This function updates State of Ffs file with new bits described by NewState
Input:
OUT NVRAM_STORE_INFO *Info -  pointer to NVRAM_STORE_INFO structure
VARIABLE_INTERFACE *Interface - pointer to the interface with the Variable routins
EFI_FFS_FILE_STATE NewState - New state to update to
Output:
EFI_STATUS


SkipSpecificNvar in the NVRAMDXE.c

Function : SkipSpecificNvar

File: NVRAMDXE.c
Description:
Helper varstore filtering function.
Skips the variable that corresponds to the passed in NVAR.
Output:
BOOLEAN
   TRUE - skip the variable
   FALSE - do not skip the variable


SkipVarsWithDefaults in the NVRAMDXE.c

Function : SkipVarsWithDefaults

File: NVRAMDXE.c
Description:
Helper varstore filtering function.
Skips the variables that have defaults.
Output:
BOOLEAN
   TRUE - skip the variable
   FALSE - do not skip the variable


SmmGetNextVariableName in the NVRAMDXE.c

Function : SmmGetNextVariableName

File: NVRAMDXE.c
Description:
This function searches for next Var after Var with specific name and GUID and returns it's Name
in SMM synchronizing Varstors before and after operation.
Input:
IN OUT UINTN *VariableNameSize - size of Varname - if smaller than actual EFI_BUFFER_TOO_SMALL
will be returned and DataSize will be set to actual size needed
IN OUT CHAR16 *VariableName - pointer where Var Name in Unicode will be stored
IN OUT EFI_GUID *VendorGuid - pointer to menory where Var GUID is stored
Output:
EFI_STATUS - based on result


SmmGetVariable in the NVRAMDXE.c

Function : SmmGetVariable

File: NVRAMDXE.c
Description:
This function searches for Var with specific GUID and Name in SMM
synchronizing Varstors before and after operation
Input:
IN CHAR16 *VariableName - pointer to Var Name in Unicode
IN EFI_GUID *VendorGuid - pointer to Var GUID
OPTIONAL OUT UINT32* Attributes - Pointer to memory where Attributes will be returned
IN OUT UINTN *DataSize - size of Var - if smaller than actual EFI_BUFFER_TOO_SMALL
will be returned and DataSize will be set to actual size needed
OUT VOID *Data - Pointer to memory where Var will be returned
Output:
EFI_STATUS - based on result


SmmQueryVariableInfo in the NVRAMDXE.c

Function : SmmQueryVariableInfo

File: NVRAMDXE.c
Description:
This function returns parameters of VarStore with passed attributes in SMM
synchronizing Varstors before operation.
Input:
IN UINT32 Attributes - Atributes to search for
OUT UINT64 *MaximumVariableStorageSize - Maximum Variable Storage Size
OUT UINT64 *RemainingVariableStorageSize - Remaining Variable Storage Size
OUT UINT64 *MaximumVariableSize - Maximum Variable Size
Output:
EFI_STATUS based on result


SmmSetVariable in the NVRAMDXE.c

Function : SmmSetVariable

File: NVRAMDXE.c
Description:
This function sets Var with specific GUID, Name and attributes in SMM
synchronizing Varstors before and after operation
Input:
IN CHAR16 *VariableName - pointer to Var Name in Unicode
IN EFI_GUID *VendorGuid - pointer to Var GUID
IN UINT32 Attributes - Attributes of the Var
IN UINTN DataSize - size of Var
IN VOID *Data - Pointer to memory where Var data is stored
Output:
EFI_STATUS - based on result


SynchronizeAfterOperation in the NVRAMDXE.c

Function : SynchronizeAfterOperation

File: NVRAMDXE.c
Description:
This function synchronizes Runtime and non Runtime Var Structures after enterin SMM
after each operation with Variables
Input:
NONE
Output:
VOID


SynchronizeBeforeOperation in the NVRAMDXE.c

Function : SynchronizeBeforeOperation

File: NVRAMDXE.c
Description:
This function synchronizes Runtime and non Runtime Var Structures after enterin SMM
before each operation with Variables
Input:
NONE
Output:
VOID


SynchronizeVarStore in the NVRAMDXE.c

Function : SynchronizeVarStore

File: NVRAMDXE.c
Description:
This function synchronizes NVRAM_STORE_INFO structure after enterin SMM
Input:
NVRAM_STORE_INFO *Source - source NVRAM_STORE_INFO structure
NVRAM_STORE_INFO *Target - synchronized NVRAM_STORE_INFO structure
Output:
VOID


SynchronizeVarStoreInfo in the NVRAMDXE.c

Function : SynchronizeVarStoreInfo

File: NVRAMDXE.c
Description:
This function synchronizes all NVRAM_STORE_INFO structures in VARSTORE_INFO after enterin SMM
Input:
VARSTORE_INFO *From - source VARSTORE_INFO structure
VARSTORE_INFO *To - synchronized VARSTORE_INFO structure
Output:
VOID


UpdateFtVarstore in the NVRAMDXE.c

Function : UpdateFtVarstore

File: NVRAMDXE.c
Description:
This function copyes Varstore to a new location and makes this copy main Varstore
Input:
OUT NVRAM_STORE_INFO *Info -  pointer to NVRAM_STORE_INFO structure
VARIABLE_INTERFACE *Interface - pointer to the interface with the Variable routins
NVRAM_STORE_INFO* NewInfo - pointer to the new NVRAM_STORE_INFO Varstore
Output:
EFI_STATUS


UpdateVariable in the NVRAMDXE.c

Function : UpdateVariable

File: NVRAMDXE.c
Description:
This function updates variable
Input:
IN NVAR *OldVar - pointer to the old Var
IN CHAR16 *VariableName - pointer to Var Name in Unicode
IN UINTN NameSize - size of the Var mane
IN EFI_GUID *VendorGuid - pointer to Var GUID
IN UINT32 Attributes - attributes of Variable
IN UINTN DataSize - size of Var data
IN VOID *Data - pointer to the Var data
OUT NVRAM_STORE_INFO *Info -  pointer to NVRAM_STORE_INFO structure
VARIABLE_INTERFACE *Interface - pointer to the interface with the Variable routins
Output:
EFI_STATUS


UpdateVarstore in the NVRAMDXE.c

Function : UpdateVarstore

File: NVRAMDXE.c
Description:
This function copyes Varstore to a new location and makes this copy main Varstore
if old varstore flag has NVRAM_STORE_FLAG_NON_VALATILE and Backupadress is valid, else it
just copy Varstor to new location
Input:
OUT NVRAM_STORE_INFO *Info -  pointer to NVRAM_STORE_INFO structure
VARIABLE_INTERFACE *Interface - pointer to the interface with the Variable routins
NVRAM_STORE_INFO* NewInfo - pointer to the new NVRAM_STORE_INFO Varstore
Output:
EFI_STATUS


VarExitBS in the NVRAMDXE.c

Function : VarExitBS

File: NVRAMDXE.c
Description:
This function will be called when Exit BS will signaled
will update data to work in RunTime.
Input:
IN EFI_EVENT Event - signalled event
IN VOID *Context - calling context
Output:
VOID


VarInterfaceVirtualFixup in the NVRAMDXE.c

Function : VarInterfaceVirtualFixup

File: NVRAMDXE.c
Description:
This function will be invoked to convert
runtime pointers to virtual address
Input:
VARIABLE_INTERFACE *Interface - pointer to VARIABLE_INTERFACE structure to fixup
Output:
VOID


VarNotInEfiGlobalVarList in the NVRAMDXE.c

Function : VarNotInEfiGlobalVarList

File: NVRAMDXE.c
Description:
Searches for the passed variable in the EFI Global Var lists and
        if found, makes sure, that it has the same attributes.
Input:
IN CHAR16 *VarName - Variable name to be found.
IN UINT32 Attributes  - Variable attributes.
Output:
BOOLEAN - Depending on result.
TRUE - if not in list, FALSE - if in list.


VarNotInPreserveList in the NVRAMDXE.c

Function : VarNotInPreserveList

File: NVRAMDXE.c
Description:
Looks for the provided variable in the preserved list.
Input:
IN CHAR16 *VarName - Variable name to be found.
IN EFI_GUID *Guid  - Variable GUID to be found.
Output:
BOOLEAN - Depending on result.
TRUE - if not in list, FALSE - if in list.


VarStoreDiscovery in the NVRAMDXE.c

Function : VarStoreDiscovery

File: NVRAMDXE.c
Description:
This function searches for nested Verstores and adds them to the NVRAM_STORE_INFO structure.
Input:
NVRAM_STORE_INFO *pInfo - pointer to NVRAM store structure
NVRAM_STORE_INFO *MemInfo - pointer to NVRAM store structure in memory
Output:
VOID


VarStoreVirtualFixup in the NVRAMDXE.c

Function : VarStoreVirtualFixup

File: NVRAMDXE.c
Description:
This function will be invoked to convert
runtime pointers to virtual address
Input:
NVRAM_STORE_INFO *Info - pointer to NVRAM_STORE_INFO structure to fixup
Output:
VOID


VarVirtAddressChange in the NVRAMDXE.c

Function : VarVirtAddressChange

File: NVRAMDXE.c
Description:
This function will be invoked to convert whole Var infrustructure
and pRS runtime pointers to virtual address
Input:
IN EFI_EVENT Event - signalled event
IN VOID *Context - calling context
Output:
VOID


NVRAMPEI.c

Description:

The following functions are used in the file: NVRAMPEI.c.

Function | Description
NvGetNextVariableName2 | This function searches for Var with specific GUID and Enty number not betwin LastInfoIndex - InfoCount parameter and returns it's Name.
PeiInitNV | This function inits NVRAM
VarPpi2GetVariable | This function searches for Var with specific GUID
VarPpiGetNextVariableName | This function searches for Var folowed by the Var with specific name (optional) and GUID and returns it's Name.
VarPpiGetVariable | This function searches for a Variable with specific GUID and Name


NvGetNextVariableName2 in the NVRAMPEI.c

Function : NvGetNextVariableName2

File: NVRAMPEI.c
Description:
This function searches for Var with specific GUID and Enty number
not betwin LastInfoIndex - InfoCount parameter and returns it's Name.
Input:
IN CONST EFI_PEI_READ_ONLY_VARIABLE2_PPI *This - pointer to FI_PEI_READ_ONLY_VARIABLE2_PPI
IN OUT UINTN *VariableNameSize - size of Varname - if smaller than actual EFI_BUFFER_TOO_SMALL
will be returned and DataSize will be set to actual size needed
IN OUT CHAR16 *VariableName - pointer where Var Name in Unicode will be stored
IN OUT EFI_GUID *VendorGuid - pointer to menory where Var GUID will be stored
Output:
EFI_STATUS - based on result


PeiInitNV in the NVRAMPEI.c

Function : PeiInitNV

File: NVRAMPEI.c
Description:
This function inits NVRAM
Input:
IN EFI_FFS_FILE_HEADER *FfsHeader - pointer to FfsHeader
IN EFI_PEI_SERVICES **PeiServices - double pointer to the Pei Sevices structure
Output:
EFI_STATUS - based on result


VarPpi2GetVariable in the NVRAMPEI.c

Function : VarPpi2GetVariable

File: NVRAMPEI.c
Description:
This function searches for Var with specific GUID
Input:
IN CONST EFI_PEI_READ_ONLY_VARIABLE2_PPI *This - pointer to FI_PEI_READ_ONLY_VARIABLE2_PPI
IN CHAR16 *VariableName - pointer to Var Name in Unicode
IN EFI_GUID *VendorGuid - pointer to Var GUID
OPTIONAL OUT UINT32* Attributes - Pointer to memory where Attributes will be returned
IN OUT UINTN *DataSize - size of Var - if smaller than actual EFI_BUFFER_TOO_SMALL
will be returned and DataSize will be set to actual size needed
OUT VOID *Data - Pointer to memory where Var will be returned
Output:
EFI_STATUS - based on result


VarPpiGetNextVariableName in the NVRAMPEI.c

Function : VarPpiGetNextVariableName

File: NVRAMPEI.c
Description:
This function searches for Var folowed by the Var with specific name (optional)
and GUID and returns it's Name.
Input:
IN EFI_PEI_SERVICES **PeiServices - Double pointer to Pei Services instance
IN OUT UINTN *VariableNameSize - size of Varname - if smaller than actual EFI_BUFFER_TOO_SMALL
will be returned and DataSize will be set to actual size needed
IN OUT CHAR16 *VariableName - pointer where Var Name in Unicode will be stored
IN OUT EFI_GUID *VendorGuid - pointer to menory where Var GUID is stored
Output:
EFI_STATUS - based on result


VarPpiGetVariable in the NVRAMPEI.c

Function : VarPpiGetVariable

File: NVRAMPEI.c
Description:
This function searches for a Variable with specific GUID and Name
Input:
IN EFI_PEI_SERVICES **PeiServices - Double pointer to Pei Services instance
IN CHAR16 *VariableName - pointer to Var Name in Unicode
IN EFI_GUID *VendorGuid - pointer to Var GUID
OPTIONAL OUT UINT32* Attributes - Pointer to memory where Attributes will be returned
IN OUT UINTN *DataSize - size of Var - if smaller than actual EFI_BUFFER_TOO_SMALL
will be returned and DataSize will be set to actual size needed
OUT VOID *Data - Pointer to memory where Var will be returned
Output:
EFI_STATUS - based on result


NVRAMRead.c

Description:
NVRAM data area access API

The following functions are used in the file: NVRAMRead.c.

Function | Description
GetNvramFfsFileState | This function searches for the header of the NVRAM image FFS file and returns the value of its State field
GetNvramFfsFileStatePtr | This function searches for firmvare vol header and returns pointer to its State field
IsMainNvramStoreValid | This function verifies if main NVRAM storage is valid
NvarEqNvar | This function verifies if two Var are the same
NvAttribEq | This function checks if pNvar attributes ara same with Attributes passed.
NvCalculateNvarChecksum | This function calculates and Checks the checksum of the Var
NvFindVariable | This function searches for Var with specific GUID and Name.
NvFindVariableByNvar | This function searches for Var equal to one passed.
NvGetAttributesFromNvar | This function returns the attributes from a given Nvar
NvGetData | This function returns last variable in NVRAM storage.
NvGetDataNvar | This function returns last variable in NVRAM storage.
NvGetDefaultsInfo | This function returns Default Variables info.
NvGetExtFlags | This function returs pointer to Ext Flags feild in Var
NvGetExtSize | This function returs pointer to Ext Size feild in Var
NvGetFirstValid | This function returns the first valid Var in NVRAM.
NvGetGuid | This function returns GUID of specified variable.
NvGetName | This function returns pointer to the Var name.
NvGetNameFromNvar | This function searches for a Var after Var with specific GUID and returns it's Name.
NvGetNextNvar | This function returns the next valid Var after pVar.
NvGetNextVariableName | This function searches for a Var after Var with specific GUID and returns it's Name.
NvGetNextVariableName2 | This function searches for Var with specific GUID and Enty number not betwin LastInfoIndex - InfoCount parameter and returns it's Name.
NvGetNextVariableNvar | This function searches for a Var after Var with specific GUID and returns pointer to is using NextNvar parameter
NvGetVariable | This function searches for a Var after Var with specific GUID and Name.
NvGetVariable2 | This function searches for Var with specific GUID, Name and Enty number not bigger than InfoCount parameter.
NvGetVariableFromNvar | This function searches for Var with specific GUID and Name.
NvInitInfoBuffer | This function inits NVRAM_STORE_INFO structure.
NvIsValid | This function checks if passed Var is valid.
NvIsVariable | This function checks if pVar reccord is correct.
NvVarEq | This function checks if pNvar GUID and Name ara same with passed one.


GetNvramFfsFileState in the NVRAMRead.c

Function : GetNvramFfsFileState

File: NVRAMRead.c
Description:
This function searches for the header of the NVRAM image FFS file and returns the value of its State field
Input:
NVRAM_STORE_INFO *Info - pointer to NVRAM store structure
Output:
EFI_FFS_FILE_STATE -  Ffs header State


GetNvramFfsFileStatePtr in the NVRAMRead.c

Function : GetNvramFfsFileStatePtr

File: NVRAMRead.c
Description:
This function searches for firmvare vol header and returns pointer to its State field
Input:
NVRAM_STORE_INFO *Info - pointer to NVRAM store structure
Output:
EFI_FFS_FILE_STATE* - pointer to Ffs header State field


IsMainNvramStoreValid in the NVRAMRead.c

Function : IsMainNvramStoreValid

File: NVRAMRead.c
Description:
This function verifies if main NVRAM storage is valid
Input:
NVRAM_STORE_INFO *MainInfo - pointer to Main NVRAM storage descriptor
VOID *BackUpAddress - address of the back up storage
Output:
BOOLEAN
 TRUE - the main NVRAM storage is valid
 FALSE - the main NVRAM storage is invalid. Back up srorage should be used.


NvarEqNvar in the NVRAMRead.c

Function : NvarEqNvar

File: NVRAMRead.c
Description:
This function verifies if two Var are the same
Input:
NVAR *Nvar1 - pointer to the first Var
IN NVRAM_STORE_INFO *Info1 - pointer to the first NVRAM_STORE_INFO structure
NVAR *Nvar2 - pointer to the second Var
IN NVRAM_STORE_INFO *Info2 - pointer to the second NVRAM_STORE_INFO structure
Output:
VOID


NvAttribEq in the NVRAMRead.c

Function : NvAttribEq

File: NVRAMRead.c
Description:
This function checks if pNvar attributes ara same with Attributes passed.
Input:
NVAR* pNVar - pointer to Var
UINT32 Attributes - Attributes of Var
NVRAM_STORE_INFO *pInfo - pointer to NVRAM store structure
Output:
NVAR* - pointer to next valid Var after pVar, NULL - if none


NvCalculateNvarChecksum in the NVRAMRead.c

Function : NvCalculateNvarChecksum

File: NVRAMRead.c
Description:
This function calculates and Checks the checksum of the Var
Input:
NVAR* NvStart - pointer to the Var to checksumm
BOOLEAN Calculate - if TRUE - skeep checksumm feild in Var
Output:
    UINT8 		Checksum value


NvFindVariable in the NVRAMRead.c

Function : NvFindVariable

File: NVRAMRead.c
Description:
This function searches for Var with specific GUID and Name.
Input:
CHAR16* sName - Name of the Var to search
EFI_GUID* pGuid - pointer to GUID to search
UINTN* pNameSize - Pointer to memory where Nane size will be returned
NVRAM_STORE_INFO *pInfo - pointer to NVRAM store structure
Output:
VOID* - Pointer to found Var, NULL - if not found


NvFindVariableByNvar in the NVRAMRead.c

Function : NvFindVariableByNvar

File: NVRAMRead.c
Description:
This function searches for Var equal to one passed.
Input:
NVAR* SourceNvar - pointer to Var, which need to be found
NVRAM_STORE_INFO* SourceInfo - pointer to source NVRAM store structure
NVRAM_STORE_INFO* DestInfo - pointer to NVRAM store structure where to search
Output:
VOID* - Pointer to found Var, NULL - if not found


NvGetAttributesFromNvar in the NVRAMRead.c

Function : NvGetAttributesFromNvar

File: NVRAMRead.c
Description:
This function returns the attributes from a given Nvar
Input:
NVAR* pNVar - pointer to Var
OPTIONAL OUT UINT32* Attributes - Pointer to memory where Attributes will be returned
NVRAM_STORE_INFO *pInfo - pointer to NVRAM store structure
Output:
EFI_STATUS - based on result


NvGetData in the NVRAMRead.c

Function : NvGetData

File: NVRAMRead.c
Description:
This function returns last variable in NVRAM storage.
Input:
NVAR* pVar - pointer to Var
UINTN NameLength - Length of the Var name
UINTN* pDataSize - pointer to where the site of data returned will be store
NVRAM_STORE_INFO *pInfo - pointer to NVRAM store structure
Output:
VOID* - pointer to the Data


NvGetDataNvar in the NVRAMRead.c

Function : NvGetDataNvar

File: NVRAMRead.c
Description:
This function returns last variable in NVRAM storage.
Input:
NVAR* pVar - pointer to Var
NVRAM_STORE_INFO *pInfo - pointer to NVRAM store structure
Output:
NVAR* - pointer to the last Var


NvGetDefaultsInfo in the NVRAMRead.c

Function : NvGetDefaultsInfo

File: NVRAMRead.c
Description:
This function returns Default Variables info.
Input:
IN const CHAR16* DefaultsVar - name of the defaults Vars
NVRAM_STORE_INFO *pInfo - pointer to NVRAM store structure
OUT NVRAM_STORE_INFO *pOutInfo - pointer to memory where defaults vill be stored
NULL - if not found
Output:
NVRAM_STORE_INFO*


NvGetExtFlags in the NVRAMRead.c

Function : NvGetExtFlags

File: NVRAMRead.c
Description:
This function returs pointer to Ext Flags feild in Var
Input:
NVAR* NvStart - pointer to the Var to checksumm
Output:
    UINT8* 		Pointer to Ext Flags feild in Var


NvGetExtSize in the NVRAMRead.c

Function : NvGetExtSize

File: NVRAMRead.c
Description:
This function returs pointer to Ext Size feild in Var
Input:
NVAR* NvStart - pointer to the Var to checksumm
Output:
    UINT16* 		Pointer to Ext Size feild in Var


NvGetFirstValid in the NVRAMRead.c

Function : NvGetFirstValid

File: NVRAMRead.c
Description:
This function returns the first valid Var in NVRAM.
Input:
NVRAM_STORE_INFO *pInfo - pointer to NVRAM store structure
Output:
NVAR* - pointer to first valid Var in NVRAM, NULL - if none


NvGetGuid in the NVRAMRead.c

Function : NvGetGuid

File: NVRAMRead.c
Description:
This function returns GUID of specified variable.
Input:
NVAR* pVar - pointer to Var
NVRAM_STORE_INFO *pInfo - pointer to NVRAM store structure
Output:
EFI_GUID* - pionter to the Var GUID


NvGetName in the NVRAMRead.c

Function : NvGetName

File: NVRAMRead.c
Description:
This function returns pointer to the Var name.
Input:
NVAR* pVar - pointer to the Var
Output:
VOID* - pionter to the Var name


NvGetNameFromNvar in the NVRAMRead.c

Function : NvGetNameFromNvar

File: NVRAMRead.c
Description:
This function searches for a Var after Var with specific GUID and returns it's Name.
Input:
IN OUT UINTN *VariableNameSize - size of Varname - if smaller than actual EFI_BUFFER_TOO_SMALL
will be returned and DataSize will be set to actual size needed
IN OUT CHAR16 *VariableName - pointer where Var Name in Unicode will be stored
IN OUT EFI_GUID *VendorGuid - pointer to menory where Var GUID will be stored
NVRAM_STORE_INFO *pInfo - pointer to NVRAM store structure
BOOLEAN Runtime - search for Var with NVRAM_FLAG_RUNTIME set
Output:
EFI_STATUS - based on result


NvGetNextNvar in the NVRAMRead.c

Function : NvGetNextNvar

File: NVRAMRead.c
Description:
This function returns the next valid Var after pVar.
Input:
NVAR* pVar - pointer to Var
NVRAM_STORE_INFO *pInfo - pointer to NVRAM store structure
Output:
NVAR* - pointer to next valid Var after pVar, NULL - if none


NvGetNextVariableName in the NVRAMRead.c

Function : NvGetNextVariableName

File: NVRAMRead.c
Description:
This function searches for a Var after Var with specific GUID and returns it's Name.
Input:
IN OUT UINTN *VariableNameSize - size of Varname - if smaller than actual EFI_BUFFER_TOO_SMALL
will be returned and DataSize will be set to actual size needed
IN OUT CHAR16 *VariableName - pointer where Var Name in Unicode will be stored
IN OUT EFI_GUID *VendorGuid - pointer to menory where Var GUID will be stored
NVRAM_STORE_INFO *pInfo - pointer to NVRAM store structure
BOOLEAN Runtime - search for Var with NVRAM_FLAG_RUNTIME set
Output:
EFI_STATUS - based on result


NvGetNextVariableName2 in the NVRAMRead.c

Function : NvGetNextVariableName2

File: NVRAMRead.c
Description:
This function searches for Var with specific GUID and Enty number
not betwin LastInfoIndex - InfoCount parameter and returns it's Name.
Input:
IN OUT UINTN *VariableNameSize - size of Varname - if smaller than actual EFI_BUFFER_TOO_SMALL
will be returned and DataSize will be set to actual size needed
IN OUT CHAR16 *VariableName - pointer where Var Name in Unicode will be stored
IN OUT EFI_GUID *VendorGuid - pointer to menory where Var GUID will be stored
UINT32 InfoCount - Max NVRAM entry number
NVRAM_STORE_INFO *pInfo - pointer to NVRAM store structure
UINT32 *LastInfoIndex - NVRAM entry number to starf from
BOOLEAN Runtime - search for Var with NVRAM_FLAG_RUNTIME set
Output:
EFI_STATUS - based on result


NvGetNextVariableNvar in the NVRAMRead.c

Function : NvGetNextVariableNvar

File: NVRAMRead.c
Description:
This function searches for a Var after Var with specific GUID and returns
pointer to is using NextNvar parameter
Input:
IN CHAR16 *VariableName - pointer to a Var Name in Unicode
IN OUT EFI_GUID *VendorGuid - pointer to Var GUID
NVRAM_STORE_INFO *pInfo - pointer to NVRAM store structure
BOOLEAN Runtime - search for Var with NVRAM_FLAG_RUNTIME set
NVAR **NextNvar - pointer to the next varaible's NVAR
Output:
EFI_STATUS - based on result


NvGetVariable in the NVRAMRead.c

Function : NvGetVariable

File: NVRAMRead.c
Description:
This function searches for a Var after Var  with specific GUID and Name.
Input:
IN CHAR16 *VariableName - pointer to Var Name in Unicode
IN EFI_GUID *VendorGuid - pointer to Var GUID
OPTIONAL OUT UINT32* Attributes - Pointer to memory where Attributes will be returned
IN OUT UINTN *DataSize - size of Var - if smaller than actual EFI_BUFFER_TOO_SMALL
will be returned and DataSize will be set to actual size needed
OUT VOID *Data - Pointer to memory where Var will be returned
NVRAM_STORE_INFO *pInfo - pointer to NVRAM store structure
OUT NVAR **Var - pointer to found Var variable
Output:
EFI_STATUS - based on result


NvGetVariable2 in the NVRAMRead.c

Function : NvGetVariable2

File: NVRAMRead.c
Description:
This function searches for Var with specific GUID, Name and Enty number
not bigger than InfoCount parameter.
Input:
IN CHAR16 *VariableName - pointer to Var Name in Unicode
IN EFI_GUID *VendorGuid - pointer to Var GUID
OPTIONAL OUT UINT32* Attributes - Pointer to memory where Attributes will be returned
IN OUT UINTN *DataSize - size of Var - if smaller than actual EFI_BUFFER_TOO_SMALL
will be returned and DataSize will be set to actual size needed
OUT VOID *Data - Pointer to memory where Var will be returned
UINT32 InfoCount - Max NVRAM entry number
NVRAM_STORE_INFO *pInfo - pointer to NVRAM store structure
Output:
EFI_STATUS - based on result


NvGetVariableFromNvar in the NVRAMRead.c

Function : NvGetVariableFromNvar

File: NVRAMRead.c
Description:
This function searches for Var with specific GUID and Name.
Input:
NVAR* pNVar - pointer to Var
UINTN NameSize - size of the Var name
OPTIONAL OUT UINT32* Attributes - Pointer to memory where Attributes will be returned
IN OUT UINTN *DataSize - size of Var - if smaller than actual EFI_BUFFER_TOO_SMALL
will be returned and DataSize will be set to actual size needed
OUT VOID *Data - Pointer to memory where Var will be returned
NVRAM_STORE_INFO *pInfo - pointer to NVRAM store structure
OUT UINT8 *Flags - Pointer to memory where Var Flags will be returned
Output:
EFI_STATUS - based on result


NvInitInfoBuffer in the NVRAMRead.c

Function : NvInitInfoBuffer

File: NVRAMRead.c
Description:
This function inits NVRAM_STORE_INFO structure.
Input:
NVRAM_STORE_INFO *pInfo - pointer to NVRAM store structure
UINTN HeaderSize - Size of the header
UINT8 Flags - default Flags
Output:
VOID


NvIsValid in the NVRAMRead.c

Function : NvIsValid

File: NVRAMRead.c
Description:
This function checks if passed Var is valid.
Input:
NVAR* pVar - pointer to the Var
Output:
BOOLEAN - TRUE of FALSE based on result


NvIsVariable in the NVRAMRead.c

Function : NvIsVariable

File: NVRAMRead.c
Description:
This function checks if pVar reccord is correct.
Input:
NVAR* pVar - pointer to Var
NVRAM_STORE_INFO *pInfo - pointer to NVRAM store structure
Output:
BOOLEAN - TRUE of FALSE based on result


NvVarEq in the NVRAMRead.c

Function : NvVarEq

File: NVRAMRead.c
Description:
This function checks if pNvar GUID and Name ara same with passed one.
Input:
NVAR* pNVar - pointer to Var
CHAR16* sName - Name of the Var to compare
EFI_GUID* pGuid - pointer to GUID to compare with
UINTN* pNameSize - Pointer to memory where Nane size will be returned
NVRAM_STORE_INFO *pInfo - pointer to NVRAM store structure
Output:
BOOLEAN - TRUE of FALSE based on result


Functions in Alphabetical Order

In Alphabetical Order

The following topics provide a list in alphabetical order.
For a list by file name, see By File Name.

  • B
  • C
  • D
  • E
  • F
  • G
  • I
  • L
  • M
  • N
  • P
  • Q
  • R
  • S
  • U
  • V


Functions in Alphabetical Order

B

Function | Description
BeginCriticalSection | This function calls when critical section begins. It disables interupts, and Smi and fills CRITICAL_SECTION structure fields

Built on 16:21:52 06/11/14


Functions in Alphabetical Order

C

Function | Description
CheckStore | This function checks if Varstore is correct and otherwise tries to Reinitialize NvRam, copy Varstore to memory and prints messages based on situation.
CheckTheHeader | This function validates correctness of the header fields used by the driver and fixes them if Update parameter is TRUE
CopyVariable | This function copyes variable from one Nvram store to another
CopyVariables | This function copies variables from one varstore to another
CopyVarStore | This function copyes varstore to a new location
CopyVarStoreToMemStore | This function allocates memory copyes varstore to a new location
CreateVariableEx | This function adds new variable to Varstore

Built on 16:21:52 06/11/14


Functions in Alphabetical Order

D

Function | Description
DeleteVariable | This function delets variable
DummyUpdateRoutine | This function is dummy function doing nothing and always returning TRUE
DxeGetNextVariableName | This function searches for next Var after Var with specific name and GUID and returns it's Name.
DxeGetNextVariableNameSafe | This function searches for Var folowing after Var with specific name and GUID and returns it's Name, beginning and ending critical section .
DxeGetVariable | This function searches for Var with specific GUID and Name
DxeGetVariableSafe | This function searches for Var with specific GUID and Name beginning and ending critical section
DxeSetVariable | This function sets Var with specific GUID, Name and attributes
DxeSetVariableSafe | This function sets Var with specific GUID, Name and attributes beginning and ending critical section.

Built on 16:21:52 06/11/14


Functions in Alphabetical Order

E

Function | Description
EndCriticalSection | This function calls when critical section ends. It enable interupts, and Smi and fills CRITICAL_SECTION structure fields
EnumerateStore | This function searches for last Ver and fills the NVRAM_STORE_INFO structure.

Built on 16:21:52 06/11/14


Functions in Alphabetical Order

F

Function | Description
FindVariable | This function searches for Var with specific GUID and Name
FlashMemFlashWrite | This function used to copy some information from one part of flash to another, when flash is not memory mapped. It uses temporary buffer one or more times.

Built on 16:21:52 06/11/14


Functions in Alphabetical Order

G

Function | Description
GetNextHighMonotonicCount | This function gets Next High Monotonic Count
GetNextMonotonicCount | This function gets Next low and high Monotonic Count
GetNvramFfsFileState | This function searches for the header of the NVRAM image FFS file and returns the value of its State field
GetNvramFfsFileStatePtr | This function searches for firmvare vol header and returns pointer to its State field
GetVarAuthExtFlags | This function returns Security fields Mc and KeyHash form existing Var in Var store It is called called every time variable with one of UEFI23_1_AUTHENTICATED_VARIABLE_ATTRIBUTES is being verified.

Built on 16:21:52 06/11/14


Functions in Alphabetical Order

I

Function | Description
IndexAddVariable | This function adds new Var
IndexDeleteVariable | This function deletes Var and adds it's entry in VarIndexPtr to blanks
IndexDeleteVariableEntry | This function deletes Var and adds it's entry in VarIndexPtr to blanks
IndexExitBs | This function resets VarIndexPtr to NULL on Exit BS
IndexFindVariable | This function searches for Var with specific GUID
IndexFindVariableEntry | This function searches for Var with specific GUID
IndexGetBlankEntry | This function searches for the blank entry in VarIndexPtr structure
IndexGetList | This function gets list of variables starting with FirstLetter
IndexGetListNvar | This function gets list of variables starting with First Letter of Nvar
IndexInit | This function allocates memory for Var Index Buffer and fils pointer to it in VarIndexPtr stucture
IndexReset | This function resets the VarIndexPtr and updates VarStoreInfo structures
IndexUpdateVariable | This function searces for Var and if it is found updates it, or add new var otherwise
InitVolatileStore | This function allocates memory and inits NVRAM_STORE_INFO structure.
IsClean | This function checks if defined memory chunk is clean
IsEnoughSpace | This function checks is there is Size space avaiable in NVRAM_STORE_INFO
IsMainNvramStoreValid | This function verifies if main NVRAM storage is valid
IsNvramRuntime | This function returns the value of Runtime local variable
IsProgrammableOrEqual | This function checks if defined memory chunks are the same and if destenation is programmable
IsStoreOk | This function checks is Varstore is correct


Functions in Alphabetical Order

L

Function | Description
LegacyToEfiFn |


Functions in Alphabetical Order

M

Function | Description
MemErase | This function sets Size amount memory starting from Address to FLASH_EMPTY_BYTE
MemProgram | This function writs Data to memory starting from Address
MonotonicCounterInit | This function initialize pBS MonotonicCount servicies and installs corresponding protocols


Functions in Alphabetical Order

N

Function | Description
NvarEqNvar | This function verifies if two Var are the same
NvAttribEq | This function checks if pNvar attributes ara same with Attributes passed.
NvCalculateNvarChecksum | This function calculates and Checks the checksum of the Var
NvDisableWrites | This function disables writes to flash starting from Address
NvEnableWrites | This function enables writes to flash starting from Address
NvErase | This function erases Size amount of flash starting with Address
NvFindVariable | This function searches for Var with specific GUID and Name.
NvFindVariableByNvar | This function searches for Var equal to one passed.
NvGetAttributesFromNvar | This function returns the attributes from a given Nvar
NvGetData | This function returns last variable in NVRAM storage.
NvGetDataNvar | This function returns last variable in NVRAM storage.
NvGetDefaultsInfo | This function returns Default Variables info.
NvGetExtFlags | This function returs pointer to Ext Flags feild in Var
NvGetExtSize | This function returs pointer to Ext Size feild in Var
NvGetFirstValid | This function returns the first valid Var in NVRAM.
NvGetGuid | This function returns GUID of specified variable.
NvGetName | This function returns pointer to the Var name.
NvGetNameFromNvar | This function searches for a Var after Var with specific GUID and returns it's Name.
NvGetNextNvar | This function returns the next valid Var after pVar.
NvGetNextVariableName | This function searches for a Var after Var with specific GUID and returns it's Name.
NvGetNextVariableName2 | This function searches for Var with specific GUID and Enty number not betwin LastInfoIndex - InfoCount parameter and returns it's Name.
NvGetNextVariableName2 | This function searches for Var with specific GUID and Enty number not betwin LastInfoIndex - InfoCount parameter and returns it's Name.
NvGetNextVariableNvar | This function searches for a Var after Var with specific GUID and returns pointer to is using NextNvar parameter
NvGetVariable | This function searches for a Var after Var with specific GUID and Name.
NvGetVariable2 | This function searches for Var with specific GUID, Name and Enty number not bigger than InfoCount parameter.
NvGetVariableFromNvar | This function searches for Var with specific GUID and Name.
NvInitInfoBuffer | This function inits NVRAM_STORE_INFO structure.
NvIsValid | This function checks if passed Var is valid.
NvIsVariable | This function checks if pVar reccord is correct.
NvProgram | This function programms Size amount of flash starting with Address
NvRamInit | This function initialize pRS Var servicies and MonotonicCount servicies (if MONOTONIC_COUNT_IN_NVRAM token is set) installs corresponding protocols
NvramInitialize | This function initializes Varstore
NvramNotInSmmExitBs | This function signals that exit BS event was taken place and switches SwitchToRuntime field in NvRamMailbox
NvramNotInSmmInit | This function initialize pRS Var, MonotonicCount servicies (if MONOTONIC_COUNT_IN_NVRAM token is set) and installs corresponding protocols and sets NvRamMailbox Var not in SMM
NvRamSmmEntry | This function is the entry point for this DXE. This function installs NvRam services in and outside SMM.
NvramSmmInit | This function gets NvRamMailbox and initialize pRS Var servicies and corresponding structures
NvResetConfiguration | This function resets NvRam configuration
NvVarEq | This function checks if pNvar GUID and Name ara same with passed one.


Functions in Alphabetical Order

P

Function | Description
PeiInitNV | This function inits NVRAM


Functions in Alphabetical Order

Q

Function | Description
QueryVariableInfo | This function returns parameters of VarStore with passed attributes


Functions in Alphabetical Order

R

Function | Description
RecoverFromFlashUpdateFailure | This function checks is there was a flash update failure and signal about it to CheckStore
ResetFfsFileStateInMemory | This function sets State of Ffs file to new value described by NewState


Functions in Alphabetical Order

S

Function | Description
SelectiveAllocate | This function returns pointer to allocated memory to use as temp buffer for any occasions. If NvramDriverBuffer is not 0 - memory allocated previously will be used. If not - function will allocate memory with the Size - and return pointer to it.
SelectiveFree | This function free memory allocated for temp buffer for any occasions. If address passed to this function fits (NvramDriverBuffer + it's size) range memory allocated in NvramDriverBuffer will be released. If not - function will call FreePool routine.
SetNvramFfsFileState | This function updates State of Ffs file with new bits described by NewState
SkipSpecificNvar | Helper varstore filtering function. Skips the variable that corresponds to the passed in NVAR.
SkipVarsWithDefaults | Helper varstore filtering function. Skips the variables that have defaults.
SmmGetNextVariableName | This function searches for next Var after Var with specific name and GUID and returns it's Name in SMM synchronizing Varstors before and after operation.
SmmGetVariable | This function searches for Var with specific GUID and Name in SMM synchronizing Varstors before and after operation
SmmQueryVariableInfo | This function returns parameters of VarStore with passed attributes in SMM synchronizing Varstors before operation.
SmmSetVariable | This function sets Var with specific GUID, Name and attributes in SMM synchronizing Varstors before and after operation
SynchronizeAfterOperation | This function synchronizes Runtime and non Runtime Var Structures after enterin SMM after each operation with Variables
SynchronizeBeforeOperation | This function synchronizes Runtime and non Runtime Var Structures after enterin SMM before each operation with Variables
SynchronizeVarStore | This function synchronizes NVRAM_STORE_INFO structure after enterin SMM
SynchronizeVarStoreInfo | This function synchronizes all NVRAM_STORE_INFO structures in VARSTORE_INFO after enterin SMM


Functions in Alphabetical Order

U

Function | Description
UpdateFtVarstore | This function copyes Varstore to a new location and makes this copy main Varstore
UpdateVariable | This function updates variable
UpdateVarstore | This function copyes Varstore to a new location and makes this copy main Varstore if old varstore flag has NVRAM_STORE_FLAG_NON_VALATILE and Backupadress is valid, else it just copy Varstor to new location


Functions in Alphabetical Order

V

Function | Description
VarExitBS | This function will be called when Exit BS will signaled will update data to work in RunTime.
VarInterfaceVirtualFixup | This function will be invoked to convert runtime pointers to virtual address
VarNotInEfiGlobalVarList | Searches for the passed variable in the EFI Global Var lists and if found, makes sure, that it has the same attributes.
VarNotInPreserveList | Looks for the provided variable in the preserved list.
VarPpi2GetVariable | This function searches for Var with specific GUID
VarPpiGetNextVariableName | This function searches for Var folowed by the Var with specific name (optional) and GUID and returns it's Name.
VarPpiGetVariable | This function searches for a Variable with specific GUID and Name
VarStoreDiscovery | This function searches for nested Verstores and adds them to the NVRAM_STORE_INFO structure.
VarStoreVirtualFixup | This function will be invoked to convert runtime pointers to virtual address
VarVirtAddressChange | This function will be invoked to convert whole Var infrustructure and pRS runtime pointers to virtual address


General Information