Reviewed-by: Feng Tian
Thanks
Feng
-Original Message-
From: Dong, Eric
Sent: Thursday, April 7, 2016 1:59 PM
To: edk2-devel@lists.01.org
Cc: Tian, Feng
Subject: [Patch] SecurityPkg OpalPasswordDxe: Suppress option for special
device.
According to current Pyrite SSC Spec 1.00, there is no parameter for RevertSP
method. So suppress KeepUserData option for the Pyrite Ssc type device.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong
Cc: Feng Tian
---
SecurityPkg/Tcg/Opal/OpalPasswordDxe/OpalHii.c | 16 +++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/SecurityPkg/Tcg/Opal/OpalPasswordDxe/OpalHii.c
b/SecurityPkg/Tcg/Opal/OpalPasswordDxe/OpalHii.c
index eb7d59b..94dce6c 100644
--- a/SecurityPkg/Tcg/Opal/OpalPasswordDxe/OpalHii.c
+++ b/SecurityPkg/Tcg/Opal/OpalPasswordDxe/OpalHii.c
@@ -374,7 +374,13 @@ HiiSelectDiskAction (
case HII_KEY_ID_GOTO_REVERT:
gHiiConfiguration.AvailableFields |= HII_FIELD_PASSWORD;
- gHiiConfiguration.AvailableFields |= HII_FIELD_KEEP_USER_DATA;
+ if (OpalDisk->SupportedAttributes.PyriteSsc != 1) {
+//
+// According to current Pyrite SSC Spec 1.00, there is no parameter
for RevertSP method.
+// So issue RevertSP method without any parameter by suppress
KeepUserData option.
+//
+gHiiConfiguration.AvailableFields |= HII_FIELD_KEEP_USER_DATA;
+ }
if (AvailActions.RevertKeepDataForced) {
gHiiConfiguration.AvailableFields |= HII_FIELD_KEEP_USER_DATA_FORCED;
}
@@ -611,6 +617,14 @@ HiiPopulateDiskInfoForm(
// Default initialize keep user Data to be true
//
gHiiConfiguration.KeepUserData = 1;
+if (OpalDisk->SupportedAttributes.PyriteSsc == 1) {
+ //
+ // According to current Pyrite SSC Spec 1.00, there is no parameter
for RevertSP method.
+ // So issue RevertSP method without any parameter by set default
value to FALSE.
+ //
+ gHiiConfiguration.KeepUserData = 0;
+}
+
}
}
}
--
2.6.4.windows.1
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel