summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c16
-rw-r--r--MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.h20
2 files changed, 11 insertions, 25 deletions
diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
index 2d6d428..f09ed23 100644
--- a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
+++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
@@ -36,8 +36,14 @@ VARIABLE_CACHE_ENTRY mVariableCache[] = {
}
};
-GLOBAL_REMOVE_IF_UNREFERENCED VARIABLE_INFO_ENTRY *gVariableInfo = NULL;
+VARIABLE_INFO_ENTRY *gVariableInfo = NULL;
+EFI_STATUS
+FtwVariableSpace (
+ IN EFI_PHYSICAL_ADDRESS VariableBaseAddress,
+ IN UINT8 *Buffer,
+ IN UINTN BufferSize
+ );
/**
@@ -747,7 +753,7 @@ Reclaim (
@param[in] VariableName Name of variable
@param[in] VendorGuid Guid of variable
- @param[in] Attribute Attribue of the variable
+ @param[in] Attributes Attribues of the variable
@param[in] DataSize Size of data. 0 means delete
@param[in] Data Variable data
@@ -1364,7 +1370,7 @@ RuntimeServiceSetVariable (
// Only variable have NV|RT attribute can be created in Runtime
//
if (EfiAtRuntime () &&
- (!(Attributes & EFI_VARIABLE_RUNTIME_ACCESS) || !(Attributes & EFI_VARIABLE_NON_VOLATILE))) {
+ (((Attributes & EFI_VARIABLE_RUNTIME_ACCESS) == 0) || ((Attributes & EFI_VARIABLE_NON_VOLATILE) == 0))) {
Status = EFI_INVALID_PARAMETER;
goto Done;
}
@@ -1420,7 +1426,7 @@ RuntimeServiceSetVariable (
// include pad size.
//
VarSize = VarDataOffset + DataSize + GET_PAD_SIZE (DataSize);
- if (Attributes & EFI_VARIABLE_NON_VOLATILE) {
+ if ((Attributes & EFI_VARIABLE_NON_VOLATILE) != 0) {
//
// Create a nonvolatile variable
//
@@ -1655,7 +1661,7 @@ RuntimeServiceQueryVariableInfo (
// Make sure if runtime bit is set, boot service bit is set also.
//
return EFI_INVALID_PARAMETER;
- } else if (EfiAtRuntime () && !(Attributes & EFI_VARIABLE_RUNTIME_ACCESS)) {
+ } else if (EfiAtRuntime () && ((Attributes & EFI_VARIABLE_RUNTIME_ACCESS) == 0)) {
//
// Make sure RT Attribute is set if we are in Runtime phase.
//
diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.h b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.h
index c03dece..320d1ec 100644
--- a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.h
+++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.h
@@ -85,24 +85,4 @@ typedef struct {
VOID *Data;
} VARIABLE_CACHE_ENTRY;
-
-//
-// Functions
-//
-
-EFI_STATUS
-EFIAPI
-VariableServiceInitialize (
- IN EFI_HANDLE ImageHandle,
- IN EFI_SYSTEM_TABLE *SystemTable
- );
-
-
-EFI_STATUS
-FtwVariableSpace (
- IN EFI_PHYSICAL_ADDRESS VariableBaseAddress,
- IN UINT8 *Buffer,
- IN UINTN BufferSize
- );
-
#endif