Commit Graph

421 Commits

Author SHA1 Message Date
Zhang, Chao B 126f3b1de0 SecurityPkg: AuthVariableLib & SecureBootConfigDxe: Fix SecureBootEnable & PK inconsistency issue
Revert previous fix in AuthVariable driver init which breaks SecureBootEnable original behavior. Add more error handling logic in SecureBootConfigDxe to prevent wrong display info when SecureBootEnable & PK inconsistency happens.
Commit hash for the reverted patch in AuthVariable driver is
SHA-1: a6811666b0

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>
2016-04-19 11:05:09 +08:00
Liming Gao 7921de0951 SecurityPkg: Update protocol usage in module INF files.
Update TCG and Library module uses gEdkiiVariableLockProtocolGuid
as SOMETIMES_CONSUMES instead of CONSUMES to follow the code logic.

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>
2016-04-13 14:52:58 +08:00
Eric Dong 8207d79b30 SecurityPkg OpalPasswordDxe: Clean up debug message in OpalHii.c
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
2016-04-08 10:40:53 +08:00
Eric Dong 1e6844dbe4 SecurityPkg TcgStorageOpalLib: Fix wrong condition judgment.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
2016-04-08 10:40:38 +08:00
Eric Dong ea2a6eb786 SecurityPkg OpalPasswordDxe: Suppress option for special device.
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>
2016-04-08 10:40:37 +08:00
Eric Dong 89b553bbbf SecurityPkg OpalPasswordSupportLib: Add comments for the used protocol in 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>
2016-04-06 13:03:17 +08:00
Eric Dong cffc006c19 SecurityPkg OpalPasswordSupportLib: Remove the hard code debug build option.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
2016-04-06 13:03:16 +08:00
Eric Dong 56a44df26b SecurityPkg OpalPasswordSupportLib: Fixed gcc build failure.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
2016-04-06 13:03:16 +08:00
Eric Dong 59ed6433dd SecurityPkg TcgStorageOpalLib: Fixed gcc build failure.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
2016-04-06 13:03:15 +08:00
Eric Dong b4ddf0eb49 SecurityPkg OpalPasswordDxe: Check the pointer before use it.
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>
2016-04-06 13:03:15 +08:00
Eric Dong 3626c583e5 SecurityPkg TcgStorageOpalLib: Remove the hard code debug build option.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
2016-04-06 13:03:14 +08:00
Eric Dong 7fb312f257 SecurityPkg OpalPasswordDxe: Remove the hard code debug build option.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
2016-04-06 13:03:14 +08:00
Eric Dong 9348813c4b SecurityPkg OpalPasswordSmm: Remove the hard code build option.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
2016-04-06 13:03:13 +08:00
Zhang, Chao B 9381e149ad SecurityPkg: Tcg2Dxe: Fix undersized TempBuf
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>
2016-03-31 09:41:03 +08:00
Eric Dong d4de4f99da SecurityPkg: Enable Opal password solution build.
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>
2016-03-29 15:37:31 +08:00
Eric Dong cb274a2703 SecurityPkg: OpalPasswordSmm: Add Opal password Smm driver.
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>
2016-03-29 15:37:30 +08:00
Eric Dong a06875e1f0 SecurityPkg: OpalPasswordDxe: Add Opal password dxe driver.
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>
2016-03-29 15:37:30 +08:00
Eric Dong 1cf00fbdb3 SecurityPkg: OpalPasswordSupportLib: Add Opal password support library.
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>
2016-03-29 15:37:30 +08:00
Eric Dong 9dd05ddec3 SecurityPkg: TcgStorageOpalLib: Add TCG storage opal library.
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>
2016-03-29 15:37:30 +08:00
Eric Dong 085dcf01f7 SecurityPkg: TcgStorageCoreLib: Add TCG storage core library.
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>
2016-03-29 15:37:29 +08:00
Gary Lin d6224153d7 SecurityPkg/SecureBootConfigDxe: Remove type casting from the ChooseFile 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>
2016-03-24 09:26:49 +01:00
Gary Lin bac308be0c SecurityPkg/SecureBootConfigDxe: Declare EFIAPI for the ChooseFile handlers
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>
2016-03-24 09:26:46 +01:00
Jiewen Yao c31313da22 SecurityPkg: Clear LocalAuthSession content after use.
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>
2016-03-11 12:51:43 +08:00
Jiewen Yao 0e47ac1535 SecurityPkg: Add Tpm2 prefix to lib to avoid conflict.
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>
2016-03-11 12:51:32 +08:00
Jiewen Yao 6d7c4a25b7 SecurityPkg: Fix Tcg2 SubmitRequestToPreOSFunction() fail in second times.
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>
2016-03-11 12:51:19 +08:00
Zhang, Chao B abffadf0ec SecurityPkg: SecureBootConfigDxe: Update coding style
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>
2016-03-11 12:28:01 +08:00
Dandan Bi ed2992b3f7 SecurityPkg/SecureBootConfigDxe: Handle allocation failure gracefully
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>
2016-03-04 16:43:36 +08:00
Zhang, Chao B 447f73dbfe SecurityPkg: Tcg2Smm: Change TPM2.0 MMIO range attribute
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>
2016-02-29 09:37:13 +08:00
Dandan Bi 762d8ddb28 SecurityPkg: Use FileExplorerLib in SecureBootConfigDxe
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>
2016-02-26 16:52:51 +08:00
Dandan Bi 2a7ee1151e SecurityPkg: Add FileExplorerLib.inf to the dsc file
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>
2016-02-26 16:52:50 +08:00
Zhang, Chao B 1826b5e63d SecurityPkg: TcgConfigDxe: Move TPM state string update to CallBack function
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>
2016-02-22 14:19:04 +08:00
Chao Zhang 98c2d96105 SecurityPkg: AuthVariableLib: Add new cert database for volatile time based 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
2016-02-02 01:02:31 +00:00
Yao, Jiewen b1b1d64699 SecurityPkg: Correct data copy in Tpm2NvReadPublic.
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
2016-01-27 12:16:47 +00:00
Yao, Jiewen e4780913e5 SecurityPkg: Add TPM PTP detection in Tpm12SubmitCommand.
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
2016-01-27 12:15:59 +00:00
Chao Zhang e8cd9b8041 SecurityPkg: SecureBootConfigDxe: Fix potential NULL pointer dereference
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
2016-01-27 02:46:51 +00:00
Yao, Jiewen 518b6f6565 SecurityPkg: Add TPM PTP support in TCG2 Config.
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
2016-01-26 01:30:55 +00:00
Yao, Jiewen 8e997ab8d3 SecurityPkg: Add TPM PTP detection in TPM12 device lib.
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
2016-01-26 01:30:35 +00:00
Yao, Jiewen d967d6d96f SecurityPkg: Add TPM PTP support in TCG2 SMM.
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
2016-01-26 01:30:17 +00:00
Yao, Jiewen 79e748cf29 SecurityPkg: Add TPM PTP support in TPM2 device lib.
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
2016-01-26 01:29:38 +00:00
Yao, Jiewen 0179180d6d SecurityPkg: Update TCG PPI "1.3" for TCG2.
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
2016-01-22 06:30:08 +00:00
Michael Kinney 441a3678e1 SecurityPkg/TcgDxe: Use updated Tpm12CommandLib APIs
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
2016-01-21 19:30:21 +00:00
Michael Kinney 45500265b3 SecurityPkg/TcgPei: Use updated Tpm12CommandLib APIs
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
2016-01-21 19:30:14 +00:00
Michael Kinney 83b9662fb0 SecurityPkg/Tpm12CommandLib: Add TPM 1.2 commands used by TCG modules
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
2016-01-21 19:30:05 +00:00
Michael Kinney e7c83012fd SecurityPkg/Tpm12CommandLib.h: Add TPM 1.2 commands used by TCG modules
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
2016-01-21 19:29:56 +00:00
Michael Kinney 6d2eec0287 SecurityPkg/Tcg2Config: Remove use of IoLib
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
2016-01-21 19:29:50 +00:00
Michael Kinney cc71e26372 SecurityPkg/TrEEConfig: Remove use of IoLib
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
2016-01-21 19:29:43 +00:00
Michael Kinney c132457ea7 SecurityPkg/TcgConfigDxe: Replace TpmCommLib with Tpm12DeviceLib
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
2016-01-21 19:29:35 +00:00
Michael Kinney 7cb1b15bea SecurityPkg/TcgDxe: Replace TpmCommLib with Tpm12DeviceLib
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
2016-01-21 19:29:28 +00:00
Michael Kinney b558f8bceb SecurityPkg/TcgPei: Replace TpmCommLib with Tpm12DeviceLib
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
2016-01-21 19:29:19 +00:00
Yao, Jiewen c3bcc1083e SecurityPkg: Mark MorLock module deprecated.
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
2016-01-19 13:23:30 +00:00