summaryrefslogtreecommitdiffstats
path: root/SecurityPkg
Commit message (Collapse)AuthorAgeFilesLines
* SecurityPkg: Clear LocalAuthSession content after use.Jiewen Yao2016-03-111-2/+6
| | | | | | | | | | | | Some commands in DxeTcg2PhysicalPresenceLib accept AuthSession as input parameter and copy to local command buffer. After use, this AuthSession content should be zeroed, because there might be some secrete there. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: "Yao, Jiewen" <jiewen.yao@intel.com> Reviewed-by: "Zhang, Chao B" <chao.b.zhang@intel.com>
* SecurityPkg: Add Tpm2 prefix to lib to avoid conflict.Jiewen Yao2016-03-111-9/+9
| | | | | | | | | | | | Tpm2Ptp.c is library, but it miss Tpm2 prefix for IsPtpPresence() and GetPtpInterface(). There might be risk as name symbol conflict. This patch adds Tpm2 prefix for them. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: "Yao, Jiewen" <Jiewen.Yao@intel.com> Reviewed-by: "Zhang, Chao B" <chao.b.zhang@intel.com> Tested-by: "Wu, Hao A" <hao.a.wu@intel.com>
* SecurityPkg: Fix Tcg2 SubmitRequestToPreOSFunction() fail in second times.Jiewen Yao2016-03-112-4/+6
| | | | | | | | | | | | Tcg2PhysicalPresenceLibSubmitRequestToPreOSFunction() has check if current request is same as previous. But it forget check RequestParameter, which causes second request fail to process, if RequestParameter is different. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: "Yao, Jiewen" <Jiewen.Yao@intel.com> Reviewed-by: "Zhang, Chao B" <chao.b.zhang@intel.com>
* SecurityPkg: SecureBootConfigDxe: Update coding styleZhang, Chao B2016-03-111-1/+2
| | | | | | | | Update code to follow EDK2 coding style. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chao Zhang<chao.b.zhang@intel.com> Reviewed-by: Qiu Shumin <shumin.qiu@intel.com>
* SecurityPkg/SecureBootConfigDxe: Handle allocation failure gracefullyDandan Bi2016-03-041-9/+21
| | | | | | | | | | | | | The function AllocateCopyPool may return NULL, so need to do check after calling it. This patch is to enhance the related logic. Cc: Chao Zhang <chao.b.zhang@intel.com> Cc: Qiu Shumin <shumin.qiu@intel.com> Cc: Eric Dong <eric.dong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Chao Zhang <chao.b.zhang@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com>
* SecurityPkg: Tcg2Smm: Change TPM2.0 MMIO range attributeZhang, Chao B2016-02-291-1/+2
| | | | | | | | Change TPM2.0 MMIO resource attribute to ReadWrite according to TCG PC Client Platform Firmware Profile Spec. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Anbazhagan Baraneedharan <anbazhagan@hp.com> Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>
* SecurityPkg: Use FileExplorerLib in SecureBootConfigDxeDandan Bi2016-02-266-1225/+333
| | | | | | | | | | | | | | | | | | | | Using existing library FileExplorerLib to replace the same logic in SecureBootConfigDxe to make the code clear. After using FileExplorerLib, the UI behavior for enroll PK will change, previously when select one PK file, commit/discard changes will return to Device Manager,press ESC will return to FileExplorer. Now using FileExplorerLib the behavior will keep same with enroll KEK/DB/..., commit/discard changes will return to Custom Secure Boot Options form and ESC will return to PK options form. Cc: Chao Zhang <chao.b.zhang@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Acked-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>
* SecurityPkg: Add FileExplorerLib.inf to the dsc fileDandan Bi2016-02-261-0/+1
| | | | | | | | | | | | Add FileExplorerLib to SecurePkg DSC to pass build, as SecureBootConfigDxe requires this library now. Cc: Chao Zhang <chao.b.zhang@intel.com> Cc: Eric Dong <eric.dong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>
* SecurityPkg: TcgConfigDxe: Move TPM state string update to CallBack functionZhang, Chao B2016-02-223-26/+40
| | | | | | | | | TPM state string update requires HiiHandle which may not be initialized when calling ExtractConfig. Move this logic to CallBack function. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chao Zhang <chao.b.zhang@intel.com> Reviewed-by: Dandan Bi <dandan.bi@intel.com>
* SecurityPkg: AuthVariableLib: Add new cert database for volatile time based ↵Chao Zhang2016-02-025-58/+146
| | | | | | | | | | | | | | Auth variable Add a new cert data base "certdbv" to store signer certs for volatile time based Auth variable. 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: Fu Siyuan <siyuan.fu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19786 6f19259b-4bc3-4df7-8a09-765794883524
* SecurityPkg: Correct data copy in Tpm2NvReadPublic.Yao, Jiewen2016-01-271-2/+2
| | | | | | | | | | | | | | | | | 1) NvPublic.dataSize data should be got from original receive buffer, instead of returned NvPublic. 2) NvNameSize means the size of NvName without size field. The original code treats it to be size of NvName with size field, so the last 2 bytes are missing. This patch fixed problem. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: "Yao, Jiewen" <jiewen.yao@intel.com> Reviewed-by: "Zhang, Chao B" <chao.b.zhang@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19756 6f19259b-4bc3-4df7-8a09-765794883524
* SecurityPkg: Add TPM PTP detection in Tpm12SubmitCommand.Yao, Jiewen2016-01-271-41/+58
| | | | | | | | | | | | | | Previously, we only add PTP detection in Tpm12RequestUseTpm, because RequestUseTpm does not check TPM command. This patch also adds similar check in Tpm12SubmitCommand. PTP device does not accept TPM12 command, so that it can return error on PTP device, instead of wait till timeout. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: "Yao, Jiewen" <jiewen.yao@intel.com> Reviewed-by: "Zhang, Chao B" <chao.b.zhang@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19755 6f19259b-4bc3-4df7-8a09-765794883524
* SecurityPkg: SecureBootConfigDxe: Fix potential NULL pointer dereferenceChao Zhang2016-01-271-4/+5
| | | | | | | | | | Fix SecureBoot potential NULL pointer dereference. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chao Zhang <chao.b.zhang@intel.com> Reviewed-by: Qiu Shumin <shumin.qiu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19751 6f19259b-4bc3-4df7-8a09-765794883524
* SecurityPkg: Add TPM PTP support in TCG2 Config.Yao, Jiewen2016-01-266-27/+299
| | | | | | | | | | | | | | This patch add PTP CRB support in BIOS Setup. It can: 1) Display the PTP capability (TIS/FIFO/CRB) 2) Display the PTP current interface (TIS/FIFO/CRB) 3) Let user select CRB/FIFO, if supported. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: "Yao, Jiewen" <jiewen.yao@intel.com> Reviewed-by: "Zhang, Chao B" <chao.b.zhang@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19743 6f19259b-4bc3-4df7-8a09-765794883524
* SecurityPkg: Add TPM PTP detection in TPM12 device lib.Yao, Jiewen2016-01-261-159/+122
| | | | | | | | | | | | | | | | | | | | | The TPM RequestUseTpm API can only set register to use the hardware, but it can not be used to distinguish TPM12 or TPM2 device. TPM PTP defines same address with TIS, so we need detect the TPM device is PTP or TIS in RequestUseTpm. Also, Tcg2Config driver call RequestUseTpm to detect TPM hardware device. So we have to add check here. There is no need to support PTP CRB style SubmitCommand(), because TPM2 device can not accept TPM12 style command. This patch also uses TpmTis.h instead of duplicate definition. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: "Yao, Jiewen" <jiewen.yao@intel.com> Reviewed-by: "Zhang, Chao B" <chao.b.zhang@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19742 6f19259b-4bc3-4df7-8a09-765794883524
* SecurityPkg: Add TPM PTP support in TCG2 SMM.Yao, Jiewen2016-01-264-4/+71
| | | | | | | | | | | | | | | | | | | TPM2 hardware may support PTP FIFO/TIS interface or PTP CRB interface. The original ACPI table only handles PTP FIFO/TIS interface. This patch adds PTP CRB interface support. The current logic is that SMM driver will runtime detect TPM device interface (CRB or FIFO/TIS) and publish TPM2 table based on result. It is compatible for old TPM2 FIFO/TIS device and new TPM2 CRB device. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: "Yao, Jiewen" <jiewen.yao@intel.com> Reviewed-by: "Zhang, Chao B" <chao.b.zhang@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19741 6f19259b-4bc3-4df7-8a09-765794883524
* SecurityPkg: Add TPM PTP support in TPM2 device lib.Yao, Jiewen2016-01-267-184/+579
| | | | | | | | | | | | | | | | | | | TPM2 hardware may support PTP FIFO/TIS interface or PTP CRB interface. The original lib only handles PTP FIFO/TIS interface. This patch adds PTP CRB interface support. The current logic is that lib will runtime detect TPM device interface (CRB or FIFO/TIS) and call proper function to access hardware. It is compatible for old TPM2 FIFO/TIS device and new TPM2 CRB device. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: "Yao, Jiewen" <jiewen.yao@intel.com> Reviewed-by: "Zhang, Chao B" <chao.b.zhang@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19740 6f19259b-4bc3-4df7-8a09-765794883524
* SecurityPkg: Update TCG PPI "1.3" for TCG2.Yao, Jiewen2016-01-221-2/+2
| | | | | | | | | | | The Tcg2Smm follows TCG PPI 1.3 specification. This patch updates the ASL code string to 1.3. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: "Yao, Jiewen" <jiewen.yao@intel.com> Reviewed-by: "Zhang, Chao B" <chao.b.zhang@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19733 6f19259b-4bc3-4df7-8a09-765794883524
* SecurityPkg/TcgDxe: Use updated Tpm12CommandLib APIsMichael Kinney2016-01-215-634/+94
| | | | | | | | | | | | | | | | | | | Use the following new APIs in Tpm12CommandLib and remove duplicate code from TcgPei and TcgDxe: Tpm12Extend() Tpm12PhysicalPresence() Tpm12ContinueSelfTest() Tpm12GetCapabilityFlagPermanent() Tpm12GetCapabilityFlagVolatile() Cc: Chao Zhang <chao.b.zhang@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney <michael.d.kinney@intel.com> Reviewed-by: Chao Zhang <chao.b.zhang@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19729 6f19259b-4bc3-4df7-8a09-765794883524
* SecurityPkg/TcgPei: Use updated Tpm12CommandLib APIsMichael Kinney2016-01-214-477/+61
| | | | | | | | | | | | | | | | | | | Use the following new APIs in Tpm12CommandLib and remove duplicate code from TcgPei and TcgDxe: Tpm12Extend() Tpm12PhysicalPresence() Tpm12ContinueSelfTest() Tpm12GetCapabilityFlagPermanent() Tpm12GetCapabilityFlagVolatile() Cc: Chao Zhang <chao.b.zhang@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney <michael.d.kinney@intel.com> Reviewed-by: Chao Zhang <chao.b.zhang@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19728 6f19259b-4bc3-4df7-8a09-765794883524
* SecurityPkg/Tpm12CommandLib: Add TPM 1.2 commands used by TCG modulesMichael Kinney2016-01-218-188/+442
| | | | | | | | | | | | | | | | | | | Add the following APIs that are required by TcgPei and/or TcgDxe to the Tpm12CommandLib instance: Tpm12Extend() Tpm12PhysicalPresence() Tpm12ContinueSelfTest() Tpm12GetCapabilityFlagPermanent() Tpm12GetCapabilityFlagVolatile() Cc: Chao Zhang <chao.b.zhang@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney <michael.d.kinney@intel.com> Reviewed-by: Chao Zhang <chao.b.zhang@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19727 6f19259b-4bc3-4df7-8a09-765794883524
* SecurityPkg/Tpm12CommandLib.h: Add TPM 1.2 commands used by TCG modulesMichael Kinney2016-01-211-1/+85
| | | | | | | | | | | | | | | | | | Add the following APIs that are required by TcgPei and/or TcgDxe: Tpm12Extend() Tpm12PhysicalPresence() Tpm12ContinueSelfTest() Tpm12GetCapabilityFlagPermanent() Tpm12GetCapabilityFlagVolatile() Cc: Chao Zhang <chao.b.zhang@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney <michael.d.kinney@intel.com> Reviewed-by: Chao Zhang <chao.b.zhang@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19726 6f19259b-4bc3-4df7-8a09-765794883524
* SecurityPkg/Tcg2Config: Remove use of IoLibMichael Kinney2016-01-212-32/+6
| | | | | | | | | | | | | | | | | | Remove the use of the IoLib and Mmioxx() calls to detect dTPM. This module calls the Tpm12DeviceLib to detect a TPM and the implementation of the Tpm12DeviceLib for dTPM performs the same Mmioxx() calls to detect a dTPM. This change makes this module more generic and portable by maximizing the use of the Tpm12DeviceLib abstraction for TPM detection. Cc: Chao Zhang <chao.b.zhang@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney <michael.d.kinney@intel.com> Reviewed-by: Chao Zhang <chao.b.zhang@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19725 6f19259b-4bc3-4df7-8a09-765794883524
* SecurityPkg/TrEEConfig: Remove use of IoLibMichael Kinney2016-01-212-32/+6
| | | | | | | | | | | | | | | | | | Remove the use of the IoLib and Mmioxx() calls to detect dTPM. This module calls the Tpm12DeviceLib to detect a TPM and the implementation of the Tpm12DeviceLib for dTPM performs the same Mmioxx() calls to detect a dTPM. This change makes this module more generic and portable by maximizing the use of the Tpm12DeviceLib abstraction for TPM detection. Cc: Chao Zhang <chao.b.zhang@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney <michael.d.kinney@intel.com> Reviewed-by: Chao Zhang <chao.b.zhang@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19724 6f19259b-4bc3-4df7-8a09-765794883524
* SecurityPkg/TcgConfigDxe: Replace TpmCommLib with Tpm12DeviceLibMichael Kinney2016-01-213-6/+6
| | | | | | | | | | | | | | | Update TCG drivers for TPM 1.2 devices to use Tpm12DeviceLib instead of TpmCommLib. This is required to support TPM 1.2 hardware devices that are not on LPC bus. Cc: Chao Zhang <chao.b.zhang@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney <michael.d.kinney@intel.com> Reviewed-by: Chao Zhang <chao.b.zhang@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19723 6f19259b-4bc3-4df7-8a09-765794883524
* SecurityPkg/TcgDxe: Replace TpmCommLib with Tpm12DeviceLibMichael Kinney2016-01-215-191/+82
| | | | | | | | | | | | | | | | | | | | | Update TCG drivers for TPM 1.2 devices to use Tpm12DeviceLib instead of TpmCommLib. This is required to support TPM 1.2 hardware devices that are not on LPC bus. The current versions of the TCG PEIM and DXE driver contain MMIO reads/writes to a TPM attached to an LPC bus. In order to support TPMs that are connected to other bus types, the TGC PEIM and DXE drivers must be updated to not perform any direct register accesses to any TPMs. Cc: Chao Zhang <chao.b.zhang@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney <michael.d.kinney@intel.com> Reviewed-by: Chao Zhang <chao.b.zhang@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19722 6f19259b-4bc3-4df7-8a09-765794883524
* SecurityPkg/TcgPei: Replace TpmCommLib with Tpm12DeviceLibMichael Kinney2016-01-215-262/+88
| | | | | | | | | | | | | | | | | | | | | Update TCG drivers for TPM 1.2 devices to use Tpm12DeviceLib instead of TpmCommLib. This is required to support TPM 1.2 hardware devices that are not on LPC bus. The current versions of the TCG PEIM and DXE driver contain MMIO reads/writes to a TPM attached to an LPC bus. In order to support TPMs that are connected to other bus types, the TGC PEIM and DXE drivers must be updated to not perform any direct register accesses to any TPMs. Cc: Chao Zhang <chao.b.zhang@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney <michael.d.kinney@intel.com> Reviewed-by: Chao Zhang <chao.b.zhang@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19721 6f19259b-4bc3-4df7-8a09-765794883524
* SecurityPkg: Mark MorLock module deprecated.Yao, Jiewen2016-01-191-1/+4
| | | | | | | | | | | | | This module only handles MOR lock v1. Now MOR lock V2 solution is published and added in variable driver. So this module can be deprecated. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: "Yao, Jiewen" <jiewen.yao@intel.com> Reviewed-by: "Zhang, Chao B" <chao.b.zhang@intel.com> Reviewed-by: "Zeng, Star" <star.zeng@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19691 6f19259b-4bc3-4df7-8a09-765794883524
* SecurityPkg: Add NOOPT target in SecurityPkg.dscHao Wu2016-01-191-2/+2
| | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19678 6f19259b-4bc3-4df7-8a09-765794883524
* SecurityPkg: Update final event log calculation.Yao, Jiewen2016-01-181-38/+84
| | | | | | | | | | | | | | | | | | This patch updated final event log calculation based on TCG EFI PROTOCOL rev9, 7.1.2 "All options implementation". The previous logic is to save event to final event log once GetEventLog() is called. 7.1.1 shows that we should save event log to both normal even log area and final event log area after GetEventLog() is called. And there is no need to record TCG12 format log to final event log area, and normal event log area can be BootServices memory because OS will not access it directly. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: "Yao, Jiewen" <jiewen.yao@intel.com> Reviewed-by: "Zhang, Chao B" <chao.b.zhang@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19661 6f19259b-4bc3-4df7-8a09-765794883524
* SecurityPkg: Correct NumberOfPCRBanks calculation.Yao, Jiewen2016-01-181-7/+10
| | | | | | | | | | | | | | | | Previously, NumberOfPCRBanks is calculated based on TPM capability. However, there might be a case that TPM hardware support 1 algorithm, but BIOS does not support and BIOS mask it via PCD. This causes the conflict between HashAlgorithmBitmap and NumberOfPCRBanks. So we move the NumberOfPCRBanks calculation based on HashAlgorithmBitmap to make sure the data is consistent. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: "Yao, Jiewen" <jiewen.yao@intel.com> Reviewed-by: "Zhang, Chao B" <chao.b.zhang@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19660 6f19259b-4bc3-4df7-8a09-765794883524
* SecurityPkg: Replace TREE macro with TCG2.Yao, Jiewen2016-01-181-2/+2
| | | | | | | | | | | Since Tcg2Dxe driver follows TCG spec, we should use TCG2 MACRO, instead of TREE macro. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: "Yao, Jiewen" <jiewen.yao@intel.com> Reviewed-by: "Zhang, Chao B" <chao.b.zhang@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19659 6f19259b-4bc3-4df7-8a09-765794883524
* SecurityPkg: SecureBootConfigDxe: Fix string typoChao Zhang2016-01-152-5/+5
| | | | | | | | | | | Fix secure boot mode transition string typo. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chao Zhang <chao.b.zhang@intel.com> Reviewed-by: Qin Long <qin.long@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19646 6f19259b-4bc3-4df7-8a09-765794883524
* SecurityPkg: SecureBootConfigDxe: Enhance secure boot string update logicChao Zhang2016-01-151-42/+57
| | | | | | | | | | | | ExtractConfig is called many times, so it's not efficient to update Secure Boot STR_SECURE_BOOT_STATE_CONTENT, STR_CUR_SECURE_BOOT_MODE_CONTENT string in ExtractConfig. As these 2 strings are displayed on one form, always update them when opening the form. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chao Zhang <chao.b.zhang@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19645 6f19259b-4bc3-4df7-8a09-765794883524
* SecurityPkg: SecureBootConfigDxe: Change KEY_TRANS_SECURE_BOOT_MODE valueChao Zhang2016-01-151-2/+2
| | | | | | | | | | | Change KEY_TRANS_SECURE_BOOT_MODE value, as it conflicts with OPTION_DEL_KEK_QUESTION_ID. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chao Zhang <chao.b.zhang@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Qin Long <qin.long@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19644 6f19259b-4bc3-4df7-8a09-765794883524
* SecurityPkg: TcgDxe,Tcg2Dxe,TrEEDxe: New PCD for TCG event log and TCG2 ↵Chao Zhang2016-01-128-29/+44
| | | | | | | | | | | | | | | | final event log area TCG event log and TCG2 final event log area length can be configurable to meet platform event log requirement. PcdTcgLogAreaMinLen : 0x10000 based on minimum requirement in TCG ACPI Spec 00.37 PcdTcg2FinalLogAreaLen : 0x8000 based on experience value Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chao Zhang <chao.b.zhang@intel.com> Reviewed-by: Yao Jiewen <jiewen.yao@intel.com> Reviewed-by: Qin Long <qin.long@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19639 6f19259b-4bc3-4df7-8a09-765794883524
* SecurityPkg: Clear AuthSession content after use.Yao, Jiewen2016-01-116-122/+333
| | | | | | | | | | | | | Some commands in Tpm2CommandLib accept AuthSession as input parameter and copy to local command buffer. After use, this AuthSession content should be zeroed, because there might be some secrete there. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: "Yao, Jiewen" <jiewen.yao@intel.com> Reviewed-by: "Zhang, Chao B" <chao.b.zhang@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19635 6f19259b-4bc3-4df7-8a09-765794883524
* SecurityPkg: Add Tpm2Startup return code check.Yao, Jiewen2016-01-111-4/+25
| | | | | | | | | | | | Tpm2Startup does not check TPM device return code. It might cause problem, that error is not detected in Tcg2Peim, for example, S3 resume case. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: "Yao, Jiewen" <jiewen.yao@intel.com> Reviewed-by: "Zhang, Chao B" <chao.b.zhang@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19634 6f19259b-4bc3-4df7-8a09-765794883524
* SecurityPkg: MOR drivers use Tcg2Protocol instead of TrEE.Yao, Jiewen2016-01-112-2/+2
| | | | | | | | | | | | The official TCG standard uses Tcg2Protocol, instead of TrEE. We should update TCG driver to use Tcg2Protocol, too. TrEE should be used only for old TrEE implementation. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: "Yao, Jiewen" <jiewen.yao@intel.com> Reviewed-by: "Zhang, Chao B" <chao.b.zhang@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19633 6f19259b-4bc3-4df7-8a09-765794883524
* SecurityPkg : Tpm2DeviceLibDTpm : Rename TisTpmCommand to avoid name collisionSamer El-Haj-Mahmoud2016-01-081-3/+3
| | | | | | | | | | Change TisTpmCommand to Tpm2TisTpmCommand. Makes function name more clear. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <samer.el-haj-mahmoud@hpe.com> Reviewed-by: Chao Zhang <chao.b.zhang@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19622 6f19259b-4bc3-4df7-8a09-765794883524
* SecurityPkg/Tcg: Fix debug messagesMichael Kinney2016-01-073-18/+18
| | | | | | | | | | | | | | | | | Debug messages are using a format strings with %s for a Unicode string, but the strings being printed are ASCII strings and this results in corrupted debug messages. Change the the format string to use %a instead of %s. Cc: Chao Zhang <chao.b.zhang@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Kinney <michael.d.kinney@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Reviewed-by: Chao Zhang <chao.b.zhang@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19617 6f19259b-4bc3-4df7-8a09-765794883524
* SecurityPkg Tcg2Pei: Fix a typo in function descriptionHao Wu2016-01-061-1/+1
| | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19602 6f19259b-4bc3-4df7-8a09-765794883524
* SecurityPkg AuthVariableLib: Correct comment/error log about CleanCertsFromDbStar Zeng2015-12-292-10/+8
| | | | | | | | | Cc: Chao Zhang <chao.b.zhang@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Chao Zhang <chao.b.zhang@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19574 6f19259b-4bc3-4df7-8a09-765794883524
* SecurityPkg: SecureBootConfigDxe: Remove useless code in VFRChao Zhang2015-12-221-61/+11
| | | | | | | | | | | Remove suppressif TRUE, disableif TRUE code in VFR. They are useless. 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: Tapan Shah <tapandshah@hpe.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19429 6f19259b-4bc3-4df7-8a09-765794883524
* DxeTpmMeasureBootLib: Change global variable name to avoid name conflict.Eric Dong2015-12-181-5/+5
| | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19334 6f19259b-4bc3-4df7-8a09-765794883524
* SecurityPkg: Correct Pcd Usage PcdTpm2HashMask in Tcg2PeiLiming Gao2015-12-171-1/+3
| | | | | | | | | | | Tcg2Pei sets PcdTpm2HashMask. Its usage should be both SOMETIMES_CONSUMES and SOMETIMES_PRODUCES. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Chao Zhang <chao.b.zhang@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19314 6f19259b-4bc3-4df7-8a09-765794883524
* SecurityPkg: Correct Pcd Usage PcdTcg2HashAlgorithmBitmapLiming Gao2015-12-172-2/+6
| | | | | | | | | | | HashLibBaseCryptoRouter sets PcdTcg2HashAlgorithmBitmap. Its usage should be both SOMETIMES_CONSUMES and SOMETIMES_PRODUCES. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Chao Zhang <chao.b.zhang@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19313 6f19259b-4bc3-4df7-8a09-765794883524
* SecurityPkg: Convert all .uni files to utf-8Jordan Justen2015-12-15101-0/+0
| | | | | | | | | | | | | To convert these files I ran: $ python3 BaseTools/Scripts/ConvertUni.py SecurityPkg Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com> Reviewed-by: Chao Zhang <chao.b.zhang@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19262 6f19259b-4bc3-4df7-8a09-765794883524
* SecurityPkg: AuthVariableLib: Fix GCC compile errorArd Biesheuvel2015-12-071-17/+17
| | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Chao Zhang <chao.b.zhang@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19140 6f19259b-4bc3-4df7-8a09-765794883524
* SecurityPkg: SecureBootConfigDxe: SecureBoot UI for Customized SecureBoot ModeChao Zhang2015-12-074-56/+464
| | | | | | | | | | | | Add SecureBoot UI support for Customized SecureBoot Mode transition according to Mantis 1263. User can do secure boot mode transition through UI. https://mantis.uefi.org/mantis/view.php?id=1263 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chao Zhang <chao.b.zhang@intel.com> Reviewed-by: Zeng Star <star.zeng@intel.com> Reviewed-by: Long Qin <qin.long@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19134 6f19259b-4bc3-4df7-8a09-765794883524