summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorerictian <erictian@6f19259b-4bc3-4df7-8a09-765794883524>2010-03-18 08:57:05 +0000
committererictian <erictian@6f19259b-4bc3-4df7-8a09-765794883524>2010-03-18 08:57:05 +0000
commite0c91cad86429cf731b632aacefa74baf5f72178 (patch)
tree524d41a665ed9e03283f6033cb80cc4084b9d25b
parentffd69cd6bf4c02efa7a6d0babab239a7b53229c1 (diff)
downloadedk2-e0c91cad86429cf731b632aacefa74baf5f72178.zip
edk2-e0c91cad86429cf731b632aacefa74baf5f72178.tar.gz
edk2-e0c91cad86429cf731b632aacefa74baf5f72178.tar.bz2
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@10280 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--edk2/DuetPkg/FSVariable/FSVariable.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/edk2/DuetPkg/FSVariable/FSVariable.c b/edk2/DuetPkg/FSVariable/FSVariable.c
index 2298e4e..dab8c89 100644
--- a/edk2/DuetPkg/FSVariable/FSVariable.c
+++ b/edk2/DuetPkg/FSVariable/FSVariable.c
@@ -1293,6 +1293,13 @@ Returns:
}
//
+ // 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) {
@@ -1390,8 +1397,7 @@ Returns:
// Make sure the Attributes combination is supported by the platform.
//
return EFI_UNSUPPORTED;
- }
- else if ((Attributes & (EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_BOOTSERVICE_ACCESS)) == EFI_VARIABLE_RUNTIME_ACCESS) {
+ } else if ((Attributes & (EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_BOOTSERVICE_ACCESS)) == EFI_VARIABLE_RUNTIME_ACCESS) {
//
// Make sure if runtime bit is set, boot service bit is set also.
//
@@ -1406,6 +1412,11 @@ Returns:
// 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;
}
VariableStoreHeader = (VARIABLE_STORE_HEADER *) mGlobal->VariableBase[