The internal header file includes the common header files, defines\r
internal structure and functions used by Variable modules.\r
\r
-Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2009 - 2012, 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
#include <Protocol/FirmwareVolumeBlock.h>\r
#include <Protocol/Variable.h>\r
#include <Library/PcdLib.h>\r
+#include <Library/HobLib.h>\r
#include <Library/UefiDriverEntryPoint.h>\r
#include <Library/DxeServicesTableLib.h>\r
#include <Library/UefiRuntimeLib.h>\r
#include <Guid/EventGroup.h>\r
#include <Guid/AuthenticatedVariableFormat.h>\r
#include <Guid/ImageAuthentication.h>\r
+#include <Guid/SystemNvDataGuid.h>\r
\r
#define VARIABLE_RECLAIM_THRESHOLD (1024)\r
\r
///\r
#define ISO_639_2_ENTRY_SIZE 3\r
\r
+typedef enum {\r
+ VariableStoreTypeVolatile,\r
+ VariableStoreTypeHob,\r
+ VariableStoreTypeNv,\r
+ VariableStoreTypeMax\r
+} VARIABLE_STORE_TYPE;\r
+\r
typedef struct {\r
VARIABLE_HEADER *CurrPtr;\r
VARIABLE_HEADER *EndPtr;\r
} VARIABLE_POINTER_TRACK;\r
\r
typedef struct {\r
+ EFI_PHYSICAL_ADDRESS HobVariableBase;\r
EFI_PHYSICAL_ADDRESS VolatileVariableBase;\r
EFI_PHYSICAL_ADDRESS NonVolatileVariableBase;\r
EFI_LOCK VariableServicesLock;\r
This code finds variable in storage blocks of volatile and non-volatile storage areas.\r
If VariableName is an empty string, then we just return the first\r
qualified variable without comparing VariableName and VendorGuid.\r
- Otherwise, VariableName and VendorGuid are compared.\r
+ If IgnoreRtCheck is TRUE, then we ignore the EFI_VARIABLE_RUNTIME_ACCESS attribute check\r
+ at runtime when searching existing variable, only VariableName and VendorGuid are compared.\r
+ Otherwise, variables without EFI_VARIABLE_RUNTIME_ACCESS are not visible at runtime.\r
\r
- @param VariableName Name of the variable to be found.\r
- @param VendorGuid Vendor GUID to be found.\r
- @param PtrTrack VARIABLE_POINTER_TRACK structure for output,\r
+ @param[in] VariableName Name of the variable to be found.\r
+ @param[in] VendorGuid Vendor GUID to be found.\r
+ @param[out] PtrTrack VARIABLE_POINTER_TRACK structure for output,\r
including the range searched and the target position.\r
- @param Global Pointer to VARIABLE_GLOBAL structure, including\r
+ @param[in] Global Pointer to VARIABLE_GLOBAL structure, including\r
base of volatile variable storage area, base of\r
NV variable storage area, and a lock.\r
+ @param[in] IgnoreRtCheck Ignore EFI_VARIABLE_RUNTIME_ACCESS attribute\r
+ check at runtime when searching variable.\r
\r
@retval EFI_INVALID_PARAMETER If VariableName is not an empty string, while\r
VendorGuid is NULL.\r
@retval EFI_SUCCESS Variable successfully found.\r
- @retval EFI_INVALID_PARAMETER Variable not found.\r
+ @retval EFI_NOT_FOUND Variable not found\r
\r
**/\r
EFI_STATUS\r
IN CHAR16 *VariableName,\r
IN EFI_GUID *VendorGuid,\r
OUT VARIABLE_POINTER_TRACK *PtrTrack,\r
- IN VARIABLE_GLOBAL *Global\r
+ IN VARIABLE_GLOBAL *Global,\r
+ IN BOOLEAN IgnoreRtCheck\r
);\r
\r
/**\r