summaryrefslogtreecommitdiff
path: root/SecurityPkg/Library
diff options
context:
space:
mode:
authorEric Dong <eric.dong@intel.com>2016-04-22 10:54:05 +0800
committerLiming Gao <liming.gao@intel.com>2016-05-05 12:52:46 +0800
commitb20e0d29fa99d7e6126930e133afada55ad1bc66 (patch)
treeaf98e5ee34294a9ce7f7f0c2a13e66f021806887 /SecurityPkg/Library
parent19d539af756429815310ebaffb443409e94da809 (diff)
downloadedk2-platforms-b20e0d29fa99d7e6126930e133afada55ad1bc66.tar.xz
SecurityPkg TcgStorageOpalLib: Check BlockSid capability.
Check the BlockSid feature capability through check BlockSid header in the DiscoveryHeader. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
Diffstat (limited to 'SecurityPkg/Library')
-rw-r--r--SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalCore.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalCore.c b/SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalCore.c
index f60a427012..7674ee5716 100644
--- a/SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalCore.c
+++ b/SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalCore.c
@@ -1515,6 +1515,12 @@ OpalGetSupportedAttributesInfo(
SupportedAttributes->MediaEncryption = Feat->Locking.MediaEncryption;
}
+ Size = 0;
+ Feat = (OPAL_LEVEL0_FEATURE_DESCRIPTOR*) TcgGetFeature (DiscoveryHeader, TCG_FEATURE_BLOCK_SID, &Size);
+ if (Feat != NULL && Size >= sizeof (TCG_BLOCK_SID_FEATURE_DESCRIPTOR)) {
+ SupportedAttributes->BlockSid = TRUE;
+ }
+
DEBUG ((DEBUG_INFO, "Base COMID 0x%04X \n", *OpalBaseComId));