summaryrefslogtreecommitdiff
path: root/MdeModulePkg
diff options
context:
space:
mode:
authorerictian <erictian@6f19259b-4bc3-4df7-8a09-765794883524>2010-03-18 08:58:48 +0000
committererictian <erictian@6f19259b-4bc3-4df7-8a09-765794883524>2010-03-18 08:58:48 +0000
commit8e38f18ef7fea7a584b578b127680736427a23bf (patch)
treee7f12b90e5c14aa7cc1af306439aa7c197048d15 /MdeModulePkg
parentff19726366cd5d5d922c7b1d304327e1600d04c5 (diff)
downloadedk2-platforms-8e38f18ef7fea7a584b578b127680736427a23bf.tar.xz
variable driver doesn't support EFI_AUTHENTICATED_WRITE_ACCESS. we use:
1. EFI_INVALID_PARAMETER as a return value of SetVariable() to indicate it does not support this feature. 2. EFI_NOT_FOUND will be a return value of QueryVariableInfo() to indicate it does not support this feature. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10281 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg')
-rw-r--r--MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c12
-rw-r--r--MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c12
2 files changed, 24 insertions, 0 deletions
diff --git a/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c b/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c
index bc3458c429..6fcefa35c6 100644
--- a/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c
+++ b/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c
@@ -1159,6 +1159,13 @@ EmuSetVariable (
}
//
+ // Not support authenticated variable write yet.
+ //
+ if ((Attributes & EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS) != 0) {
+ return EFI_INVALID_PARAMETER;
+ }
+
+ //
// Make sure if runtime bit is set, boot service bit is set also
//
if ((Attributes & (EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_BOOTSERVICE_ACCESS)) == EFI_VARIABLE_RUNTIME_ACCESS) {
@@ -1275,6 +1282,11 @@ EmuQueryVariableInfo (
// Make sure Hw Attribute is set with NV.
//
return EFI_INVALID_PARAMETER;
+ } else if ((Attributes & EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS) != 0) {
+ //
+ // Not support authentiated variable write yet.
+ //
+ return EFI_UNSUPPORTED;
}
AcquireLockOnlyAtBootTime(&Global->VariableServicesLock);
diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
index c71c8d541d..7edb2e5daa 100644
--- a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
+++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
@@ -1935,6 +1935,13 @@ RuntimeServiceSetVariable (
}
//
+ // Not support authenticated variable write yet.
+ //
+ if ((Attributes & EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS) != 0) {
+ return EFI_INVALID_PARAMETER;
+ }
+
+ //
// Make sure if runtime bit is set, boot service bit is set also
//
if ((Attributes & (EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_BOOTSERVICE_ACCESS)) == EFI_VARIABLE_RUNTIME_ACCESS) {
@@ -2065,6 +2072,11 @@ RuntimeServiceQueryVariableInfo (
// Make sure Hw Attribute is set with NV.
//
return EFI_INVALID_PARAMETER;
+ } else if ((Attributes & EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS) != 0) {
+ //
+ // Not support authentiated variable write yet.
+ //
+ return EFI_UNSUPPORTED;
}
AcquireLockOnlyAtBootTime(&mVariableModuleGlobal->VariableGlobal.VariableServicesLock);