]> git.proxmox.com Git - mirror_edk2.git/commit - SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c
SecurityPkg/OpalPassword: Remove HW init codes and consume SSC PPI
authorHao Wu <hao.a.wu@intel.com>
Mon, 27 Aug 2018 08:52:13 +0000 (16:52 +0800)
committerHao Wu <hao.a.wu@intel.com>
Fri, 22 Feb 2019 00:20:08 +0000 (08:20 +0800)
commita3efbc29c45183fe69bcb311c2d974ddc4e7c00a
treeea31458a38b6bc7e202f8c70a1fd35044932339c
parentb6de92f74eca0f36461a5b96117b1428772e2278
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>
12 files changed:
SecurityPkg/Tcg/Opal/OpalPassword/OpalAhciMode.c [deleted file]
SecurityPkg/Tcg/Opal/OpalPassword/OpalAhciMode.h [deleted file]
SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c
SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.h
SecurityPkg/Tcg/Opal/OpalPassword/OpalNvmeMode.c [deleted file]
SecurityPkg/Tcg/Opal/OpalPassword/OpalNvmeMode.h [deleted file]
SecurityPkg/Tcg/Opal/OpalPassword/OpalNvmeReg.h [deleted file]
SecurityPkg/Tcg/Opal/OpalPassword/OpalPasswordCommon.h
SecurityPkg/Tcg/Opal/OpalPassword/OpalPasswordDxe.inf
SecurityPkg/Tcg/Opal/OpalPassword/OpalPasswordPei.c
SecurityPkg/Tcg/Opal/OpalPassword/OpalPasswordPei.h
SecurityPkg/Tcg/Opal/OpalPassword/OpalPasswordPei.inf