audk/SecurityPkg/Tcg
Hao Wu a3efbc29c4 SecurityPkg/OpalPassword: Remove HW init codes and consume SSC PPI
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1409

For the current implementation of OpalPassword drivers, it has a feature
to support devices being automatically unlocked in the S3 resume. For this
feature, two types of devices are supported:

* ATA hard disks working under AHCI mode
* NVM Express devices

The support of this feature requires the above 2 types of device to be
initialized at the PEI phase during S3 resume, which is done by the
co-work of the OpalPasswordDxe driver and the OpalPasswordPei driver.

More specifically, the OpalPasswordDxe will handle:

* Pre-allocate MMIO resource and save it in a driver internal LockBox for
  OpalPasswordPei to retrieve;
* Save the PCI configuration space of ATA controllers into boot script.

Meanwhile, the OpalPasswordPei will handle:

* Rely on the boot script for the PCI configuration space program of ATA
  controllers;
* Restore the driver internal LockBox to get the MMIO resource;
* Complete the PCI configuration space program for ATA and NVME
  controllers;
* Initialize ATA and NVME controllers and devices.

This commit will remove these hardware initialization related codes from
the OpalPassword drivers. The hardware initialization will be covered by
PEI storage device drivers (e.g. NvmExpressPei & AhciPei in the
MdeModulePkg).

After such codes removal, the OpalPasswordDxe will only handle:

* Construct/update the S3StorageDeviceInitList LockBox with the managing
  ATA and NVME devices.

And the OpalPasswordPei will only handle:

* Locate Storage Security Command PPI instances to perform the device
  automatic unlock during the S3 resume.

Cc: Chao Zhang <chao.b.zhang@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
2019-02-22 08:20:08 +08:00
..
MemoryOverwriteControl SecurityPkg: Remove dead code and inf redundant definitions. 2018-12-10 15:56:32 +08:00
MemoryOverwriteRequestControlLock SecurityPkg: Removing ipf which is no longer supported from edk2. 2018-06-29 16:19:48 +08:00
Opal/OpalPassword SecurityPkg/OpalPassword: Remove HW init codes and consume SSC PPI 2019-02-22 08:20:08 +08:00
PhysicalPresencePei SecurityPkg: Removing ipf which is no longer supported from edk2. 2018-06-29 16:19:48 +08:00
Tcg2Config SecurityPkg: Remove dead code and inf redundant definitions. 2018-12-10 15:56:32 +08:00
Tcg2Dxe SecurityPkg/Tcg: Fix typos in TcgDxe.c and Tcg2Dxe.c 2019-01-31 20:19:10 +08:00
Tcg2Pei SecurityPkg Tcg(2)Pei: Remove the using of PcdPeiCoreMaxFvSupported 2018-12-19 12:33:28 +08:00
Tcg2Smm SecurityPkg/TCG: Upgrade UEFI supporting TCG spec info 2019-01-28 22:47:41 +08:00
TcgConfigDxe SecurityPkg/TcgConfigDxe: Allow enabling TPM 1.2 device from disabled state. 2019-02-20 21:44:14 +08:00
TcgDxe SecurityPkg/Tcg: Fix typos in TcgDxe.c and Tcg2Dxe.c 2019-01-31 20:19:10 +08:00
TcgPei SecurityPkg Tcg(2)Pei: Remove the using of PcdPeiCoreMaxFvSupported 2018-12-19 12:33:28 +08:00
TcgSmm SecurityPkg/Tcg: Fix Warnings and Remarks reported by IASL 2019-01-03 23:05:41 +08:00