diff options
author | Zhang, Chao B <chao.b.zhang@intel.com> | 2017-01-10 14:53:08 +0800 |
---|---|---|
committer | Zhang, Chao B <chao.b.zhang@intel.com> | 2017-03-06 13:13:06 +0800 |
commit | 0f39cdb7da21f2de1e97a97dc264ef6c944f16c2 (patch) | |
tree | 74a5e76e46e29011130748cbdcf296c4c5dbc3e9 | |
parent | 7579c9a5a4a42cd3c8355ce40fb9b6299a13d691 (diff) | |
download | edk2-0f39cdb7da21f2de1e97a97dc264ef6c944f16c2.zip edk2-0f39cdb7da21f2de1e97a97dc264ef6c944f16c2.tar.gz edk2-0f39cdb7da21f2de1e97a97dc264ef6c944f16c2.tar.bz2 |
SecurityPkg: Tcg2ConfigDxe/Tcg2Smm: Fix TPM2 HID issue
Fix wrong TPM2 HID generation logic.
Cc: Star Zeng <star.zeng@intel.com>
Cc: Yao Jiewen <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chao Zhang <chao.b.zhang@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Yao Jiewen <jiewen.yao@intel.com>
-rw-r--r-- | SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c | 4 | ||||
-rw-r--r-- | SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c index 2181da2..e28d6c2 100644 --- a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c +++ b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigImpl.c @@ -441,9 +441,9 @@ GetTpm2HID( // #### is Firmware Version 1
//
if (PnpHID) {
- AsciiSPrint(Hid + 3, TPM_HID_PNP_SIZE - 3, "%02d%02d", ((FirmwareVersion1 & 0xFFFF0000) >> 16), (FirmwareVersion1 && 0x0000FFFF));
+ AsciiSPrint(Hid + 3, TPM_HID_PNP_SIZE - 3, "%02d%02d", ((FirmwareVersion1 & 0xFFFF0000) >> 16), (FirmwareVersion1 & 0x0000FFFF));
} else {
- AsciiSPrint(Hid + 4, TPM_HID_ACPI_SIZE - 4, "%02d%02d", ((FirmwareVersion1 & 0xFFFF0000) >> 16), (FirmwareVersion1 && 0x0000FFFF));
+ AsciiSPrint(Hid + 4, TPM_HID_ACPI_SIZE - 4, "%02d%02d", ((FirmwareVersion1 & 0xFFFF0000) >> 16), (FirmwareVersion1 & 0x0000FFFF));
}
} else {
diff --git a/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c b/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c index bd4414f..95ce1a3 100644 --- a/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c +++ b/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c @@ -360,9 +360,9 @@ UpdateHID ( // #### is Firmware Version 1
//
if (PnpHID) {
- AsciiSPrint(Hid + 3, TPM_HID_PNP_SIZE - 3, "%02d%02d", ((FirmwareVersion1 & 0xFFFF0000) >> 16), (FirmwareVersion1 && 0x0000FFFF));
+ AsciiSPrint(Hid + 3, TPM_HID_PNP_SIZE - 3, "%02d%02d", ((FirmwareVersion1 & 0xFFFF0000) >> 16), (FirmwareVersion1 & 0x0000FFFF));
} else {
- AsciiSPrint(Hid + 4, TPM_HID_ACPI_SIZE - 4, "%02d%02d", ((FirmwareVersion1 & 0xFFFF0000) >> 16), (FirmwareVersion1 && 0x0000FFFF));
+ AsciiSPrint(Hid + 4, TPM_HID_ACPI_SIZE - 4, "%02d%02d", ((FirmwareVersion1 & 0xFFFF0000) >> 16), (FirmwareVersion1 & 0x0000FFFF));
}
} else {
|