diff options
author | Eric Dong <eric.dong@intel.com> | 2016-04-07 13:56:44 +0800 |
---|---|---|
committer | Hao Wu <hao.a.wu@intel.com> | 2016-07-06 11:11:28 +0800 |
commit | bee07bd99a733442444f19faaff684dd8d759e23 (patch) | |
tree | 6939d8c923401314beec957d26123df84c956495 /SecurityPkg/Tcg | |
parent | f8f855f627856ac0c33402f51b44701241071e0c (diff) | |
download | edk2-platforms-bee07bd99a733442444f19faaff684dd8d759e23.tar.xz |
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 <eric.dong@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
(cherry picked from commit ea2a6eb786c3fa881fdd5146de00c6a48273b4c1)
Diffstat (limited to 'SecurityPkg/Tcg')
-rw-r--r-- | SecurityPkg/Tcg/Opal/OpalPasswordDxe/OpalHii.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/SecurityPkg/Tcg/Opal/OpalPasswordDxe/OpalHii.c b/SecurityPkg/Tcg/Opal/OpalPasswordDxe/OpalHii.c index 370b8462a6..75ff9fcfff 100644 --- a/SecurityPkg/Tcg/Opal/OpalPasswordDxe/OpalHii.c +++ b/SecurityPkg/Tcg/Opal/OpalPasswordDxe/OpalHii.c @@ -373,7 +373,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;
}
@@ -610,6 +616,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;
+ }
+
}
}
}
|