From cf938ea1b9a6e1de69f906dddea5890d2dca1c54 Mon Sep 17 00:00:00 2001 From: Eric Dong Date: Fri, 15 Apr 2016 11:05:27 +0800 Subject: SecurityPkg TcgStorageOpalLib: Update ComId for Block SID command. The ComId for Block SID authentication command is 0x0005 according to "TCG Storage Feature Set: Block SID Authentication Specification Version 1.0.0". Update code to follow this spec requirement. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong Reviewed-by: Feng Tian (cherry picked from commit 81c1b6df92184f07446b6cf197b18c61ad8b73f0) --- MdePkg/Include/IndustryStandard/TcgStorageCore.h | 4 ++++ SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalCore.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/MdePkg/Include/IndustryStandard/TcgStorageCore.h b/MdePkg/Include/IndustryStandard/TcgStorageCore.h index 9549c00b33..74253f804d 100644 --- a/MdePkg/Include/IndustryStandard/TcgStorageCore.h +++ b/MdePkg/Include/IndustryStandard/TcgStorageCore.h @@ -261,6 +261,10 @@ ATA 8 Rev6a Table 68 7.57.6.2 #define TCG_RESERVED_COMID 0x0000 +// Defined in TCG Storage Feature Set:Block SID Authentication spec, +// ComId used for BlockSid command is hardcode 0x0005. +#define TCG_BLOCKSID_COMID 0x0005 + #pragma pack(1) typedef struct { UINT8 Reserved[6]; diff --git a/SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalCore.c b/SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalCore.c index 2db5ffeba9..f60a427012 100644 --- a/SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalCore.c +++ b/SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalCore.c @@ -258,7 +258,7 @@ OpalBlockSid( Session->Sscp, Session->MediaId, TCG_OPAL_SECURITY_PROTOCOL_2, - Session->OpalBaseComId, + TCG_BLOCKSID_COMID, // hardcode ComID 0x0005 1, Buffer, BUFFER_SIZE -- cgit v1.2.3