summaryrefslogtreecommitdiffstats
path: root/SecurityPkg
Commit message (Collapse)AuthorAgeFilesLines
* SecurityPkg OpalPasswordDxe: Clean up debug message in OpalHii.cEric Dong2016-04-081-13/+0
| | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
* SecurityPkg TcgStorageOpalLib: Fix wrong condition judgment.Eric Dong2016-04-081-1/+1
| | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
* SecurityPkg OpalPasswordDxe: Suppress option for special device.Eric Dong2016-04-081-1/+15
| | | | | | | | | | 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>
* SecurityPkg OpalPasswordSupportLib: Add comments for the used protocol in ↵Eric Dong2016-04-061-1/+1
| | | | | | | | inf file. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
* SecurityPkg OpalPasswordSupportLib: Remove the hard code debug build option.Eric Dong2016-04-061-3/+0
| | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
* SecurityPkg OpalPasswordSupportLib: Fixed gcc build failure.Eric Dong2016-04-061-0/+1
| | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
* SecurityPkg TcgStorageOpalLib: Fixed gcc build failure.Eric Dong2016-04-062-4/+5
| | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
* SecurityPkg OpalPasswordDxe: Check the pointer before use it.Eric Dong2016-04-061-10/+11
| | | | | | | | Check the pointer before use it to make the code more safely. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
* SecurityPkg TcgStorageOpalLib: Remove the hard code debug build option.Eric Dong2016-04-061-3/+0
| | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
* SecurityPkg OpalPasswordDxe: Remove the hard code debug build option.Eric Dong2016-04-061-3/+0
| | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
* SecurityPkg OpalPasswordSmm: Remove the hard code build option.Eric Dong2016-04-061-3/+0
| | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
* SecurityPkg: Tcg2Dxe: Fix undersized TempBufZhang, Chao B2016-03-311-1/+1
| | | | | | | | | | TempBuf in SetupEventLog needs to include sizeof(UINT32) to hold NumberOfAlgorithms. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Thomas Palmer <thomas.palmer@hpe.com> Reviewed-by: Yao Jiewen <jiewen.yao@intel.com> Reviewed-by: Chao Zhang <chao.b.zhang@intel.com> Reviewed-by: El-Haj-Mahmoud Samer <samer.el-haj-mahmoud@hpe.com>
* SecurityPkg: Enable Opal password solution build.Eric Dong2016-03-291-4/+25
| | | | | | | | | This patch used to enable opal password solution build in Security package level build. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
* SecurityPkg: OpalPasswordSmm: Add Opal password Smm driver.Eric Dong2016-03-2910-0/+7466
| | | | | | | | This driver used to unlock device in S3 resume phase. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
* SecurityPkg: OpalPasswordDxe: Add Opal password dxe driver.Eric Dong2016-03-2912-0/+4675
| | | | | | | | | This driver used to enables opal feature in bios. It adds setup menu and unlock device process in boot phase. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
* SecurityPkg: OpalPasswordSupportLib: Add Opal password support library.Eric Dong2016-03-296-0/+1196
| | | | | | | | APIs used to support opal password solution to trig opal command. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
* SecurityPkg: TcgStorageOpalLib: Add TCG storage opal library.Eric Dong2016-03-294-0/+3447
| | | | | | | | Library APIs used to create commands defined by TCG storage opal spec. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
* SecurityPkg: TcgStorageCoreLib: Add TCG storage core library.Eric Dong2016-03-294-0/+3905
| | | | | | | | APIs used to create commands defined by TCG storage core spec. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com>
* SecurityPkg/SecureBootConfigDxe: Remove type casting from the ChooseFile ↵Gary Lin2016-03-241-5/+5
| | | | | | | | | | | | handlers The type casting in the ChooseFile is not necessary and it actually hid the incompatible handlers from the compiler. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Gary Lin <glin@suse.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Dandan Bi <dandan.bi@intel.com>
* SecurityPkg/SecureBootConfigDxe: Declare EFIAPI for the ChooseFile handlersGary Lin2016-03-242-0/+10
| | | | | | | | | | | | | | | | | | | | | | | The SecureBootConfig now uses ChooseFile() from FileExplorerLib to select the certificates to be enrolled into PK, KEK, DB, DBX, or DBT, and the corresponding handlers to get the content of the file. Per the definition of CHOOSE_HANDLER, the handler must use EFIAPI as the calling convention. However, the calling convention was not specified the following handlers: UpdatePKFromFile(), UpdateKEKFromFile(), UpdateDBFromFile(), UpdateDBXFromFile(), and UpdateDBTFromFile(). When compiling the firmware with gcc, the default calling convention is not compatible with EFIAPI, so the handlers interpreted the argument the wrong way and passed the wrong device path to UpdatePage(), and the system crashed when the user tried to enroll a certificate into the key database. This commit specifies the calling convention for those functions so that gcc can generate the right code. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Gary Lin <glin@suse.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Dandan Bi <dandan.bi@intel.com>
* 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