public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH V2 0/7] OpalPassword: New solution without SMM device code
@ 2018-03-07 13:19 Star Zeng
  2018-03-07 13:19 ` [PATCH V2 1/7] MdeModulePkg LockBoxLib: Support LOCK_BOX_ATTRIBUTE_RESTORE_IN_S3_ONLY Star Zeng
                   ` (6 more replies)
  0 siblings, 7 replies; 10+ messages in thread
From: Star Zeng @ 2018-03-07 13:19 UTC (permalink / raw)
  To: edk2-devel; +Cc: Star Zeng, Jiewen Yao, Eric Dong, Chao Zhang

The patch series is also at
https://github.com/lzeng14/edk2 OpalPasswordNewV2 branch.

After IOMMU is enabled in S3, original solution with SMM device
code (OpalPasswordSmm) to unlock OPAL device for S3 will not work
as the DMA operation will be aborted without granted DMA buffer.
Instead, this solution is to add OpalPasswordPei to eliminate
SMM device code, and OPAL setup UI produced by OpalPasswordDxe
will be updated to send requests (set password, update password,
and etc), and then the requests will be processed in next boot
before SmmReadyToLock, password and device info will be saved to
lock box used by OpalPasswordPei to unlock OPAL device for S3.

The old solution related codes are also removed.

V2: Thanks for Jiewen's great comments.
1. Still use suppressif for unavailabe requests, and use grayoutif
for conflict requests.
2. Zero DevInfo in BuildOpalDeviceInfoAta() and BuildOpalDeviceInfoNvme().
3. Zero Mask and Unicode in OpalDriverPopUpPsidInput() and
OpalDriverPopUpPasswordInput() even for NULL return path.
4. Do some HII related refinement.
5. Do more NULL pointer check.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Chao Zhang <chao.b.zhang@intel.com>

Star Zeng (7):
  MdeModulePkg LockBoxLib: Support LOCK_BOX_ATTRIBUTE_RESTORE_IN_S3_ONLY
  SecurityPkg TcgStorageOpalLib: Make it be base type really
  SecurityPkg TcgStorageCoreLib: Make it be base type really
  SecurityPkg OpalPassword: Add solution without SMM device code
  SecurityPkg OpalPassword: Remove old solution
  SecurityPkg OpalPasswordSupportLib: Remove it
  SecurityPkg OpalPasswordExtraInfoVariable.h: Remove it

 MdeModulePkg/Include/Library/LockBoxLib.h          |   14 +-
 .../Library/SmmLockBoxLib/SmmLockBoxDxeLib.c       |    4 +-
 .../Library/SmmLockBoxLib/SmmLockBoxSmmLib.c       |  227 +-
 .../Library/SmmLockBoxLib/SmmLockBoxSmmLib.inf     |   10 +-
 .../Include/Guid/OpalPasswordExtraInfoVariable.h   |   27 -
 .../Include/Library/OpalPasswordSupportLib.h       |  289 --
 .../OpalPasswordSupportLib.c                       |  781 -----
 .../OpalPasswordSupportLib.inf                     |   55 -
 .../OpalPasswordSupportNotify.h                    |   55 -
 .../TcgStorageCoreLib/TcgStorageCoreLib.inf        |    4 +-
 .../TcgStorageOpalLib/TcgStorageOpalLib.inf        |    8 +-
 SecurityPkg/SecurityPkg.dec                        |    4 -
 SecurityPkg/SecurityPkg.dsc                        |    6 +-
 .../ComponentName.c                                |    0
 .../OpalAhciMode.c                                 |  492 ++--
 .../OpalAhciMode.h                                 |   93 +-
 SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c     | 3003 ++++++++++++++++++++
 .../{OpalPasswordDxe => OpalPassword}/OpalDriver.h |  215 +-
 .../{OpalPasswordDxe => OpalPassword}/OpalHii.c    |  895 ++----
 .../OpalHiiPrivate.h => OpalPassword/OpalHii.h}    |  150 +-
 .../OpalHiiCallbacks.c                             |    6 +-
 .../OpalHiiFormStrings.uni                         |   49 +-
 .../OpalHiiFormValues.h                            |   97 +-
 .../OpalNvmeMode.c                                 |   95 +-
 .../OpalNvmeMode.h                                 |   19 +-
 .../OpalNvmeReg.h                                  |    5 +-
 .../Tcg/Opal/OpalPassword/OpalPasswordCommon.h     |   65 +
 .../OpalPasswordDxe.inf                            |   25 +-
 .../OpalPasswordForm.vfr                           |  279 +-
 .../Tcg/Opal/OpalPassword/OpalPasswordPei.c        |  940 ++++++
 .../Tcg/Opal/OpalPassword/OpalPasswordPei.h        |  133 +
 .../Tcg/Opal/OpalPassword/OpalPasswordPei.inf      |   63 +
 SecurityPkg/Tcg/Opal/OpalPasswordDxe/OpalDriver.c  | 1091 -------
 .../Tcg/Opal/OpalPasswordDxe/OpalDriverPrivate.h   |  102 -
 SecurityPkg/Tcg/Opal/OpalPasswordDxe/OpalHii.h     |  146 -
 SecurityPkg/Tcg/Opal/OpalPasswordSmm/OpalIdeMode.c |  767 -----
 SecurityPkg/Tcg/Opal/OpalPasswordSmm/OpalIdeMode.h |  173 --
 .../Tcg/Opal/OpalPasswordSmm/OpalPasswordSmm.c     | 1088 -------
 .../Tcg/Opal/OpalPasswordSmm/OpalPasswordSmm.h     |  299 --
 .../Tcg/Opal/OpalPasswordSmm/OpalPasswordSmm.inf   |   77 -
 40 files changed, 5656 insertions(+), 6195 deletions(-)
 delete mode 100644 SecurityPkg/Include/Guid/OpalPasswordExtraInfoVariable.h
 delete mode 100644 SecurityPkg/Include/Library/OpalPasswordSupportLib.h
 delete mode 100644 SecurityPkg/Library/OpalPasswordSupportLib/OpalPasswordSupportLib.c
 delete mode 100644 SecurityPkg/Library/OpalPasswordSupportLib/OpalPasswordSupportLib.inf
 delete mode 100644 SecurityPkg/Library/OpalPasswordSupportLib/OpalPasswordSupportNotify.h
 rename SecurityPkg/Tcg/Opal/{OpalPasswordDxe => OpalPassword}/ComponentName.c (100%)
 rename SecurityPkg/Tcg/Opal/{OpalPasswordSmm => OpalPassword}/OpalAhciMode.c (68%)
 rename SecurityPkg/Tcg/Opal/{OpalPasswordSmm => OpalPassword}/OpalAhciMode.h (85%)
 create mode 100644 SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c
 rename SecurityPkg/Tcg/Opal/{OpalPasswordDxe => OpalPassword}/OpalDriver.h (71%)
 rename SecurityPkg/Tcg/Opal/{OpalPasswordDxe => OpalPassword}/OpalHii.c (56%)
 rename SecurityPkg/Tcg/Opal/{OpalPasswordDxe/OpalHiiPrivate.h => OpalPassword/OpalHii.h} (72%)
 rename SecurityPkg/Tcg/Opal/{OpalPasswordDxe => OpalPassword}/OpalHiiCallbacks.c (91%)
 rename SecurityPkg/Tcg/Opal/{OpalPasswordDxe => OpalPassword}/OpalHiiFormStrings.uni (66%)
 rename SecurityPkg/Tcg/Opal/{OpalPasswordDxe => OpalPassword}/OpalHiiFormValues.h (56%)
 rename SecurityPkg/Tcg/Opal/{OpalPasswordSmm => OpalPassword}/OpalNvmeMode.c (93%)
 rename SecurityPkg/Tcg/Opal/{OpalPasswordSmm => OpalPassword}/OpalNvmeMode.h (93%)
 rename SecurityPkg/Tcg/Opal/{OpalPasswordSmm => OpalPassword}/OpalNvmeReg.h (96%)
 create mode 100644 SecurityPkg/Tcg/Opal/OpalPassword/OpalPasswordCommon.h
 rename SecurityPkg/Tcg/Opal/{OpalPasswordDxe => OpalPassword}/OpalPasswordDxe.inf (80%)
 rename SecurityPkg/Tcg/Opal/{OpalPasswordDxe => OpalPassword}/OpalPasswordForm.vfr (55%)
 create mode 100644 SecurityPkg/Tcg/Opal/OpalPassword/OpalPasswordPei.c
 create mode 100644 SecurityPkg/Tcg/Opal/OpalPassword/OpalPasswordPei.h
 create mode 100644 SecurityPkg/Tcg/Opal/OpalPassword/OpalPasswordPei.inf
 delete mode 100644 SecurityPkg/Tcg/Opal/OpalPasswordDxe/OpalDriver.c
 delete mode 100644 SecurityPkg/Tcg/Opal/OpalPasswordDxe/OpalDriverPrivate.h
 delete mode 100644 SecurityPkg/Tcg/Opal/OpalPasswordDxe/OpalHii.h
 delete mode 100644 SecurityPkg/Tcg/Opal/OpalPasswordSmm/OpalIdeMode.c
 delete mode 100644 SecurityPkg/Tcg/Opal/OpalPasswordSmm/OpalIdeMode.h
 delete mode 100644 SecurityPkg/Tcg/Opal/OpalPasswordSmm/OpalPasswordSmm.c
 delete mode 100644 SecurityPkg/Tcg/Opal/OpalPasswordSmm/OpalPasswordSmm.h
 delete mode 100644 SecurityPkg/Tcg/Opal/OpalPasswordSmm/OpalPasswordSmm.inf

-- 
2.7.0.windows.1



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2018-03-08 11:42 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-07 13:19 [PATCH V2 0/7] OpalPassword: New solution without SMM device code Star Zeng
2018-03-07 13:19 ` [PATCH V2 1/7] MdeModulePkg LockBoxLib: Support LOCK_BOX_ATTRIBUTE_RESTORE_IN_S3_ONLY Star Zeng
2018-03-07 13:19 ` [PATCH V2 2/7] SecurityPkg TcgStorageOpalLib: Make it be base type really Star Zeng
2018-03-07 13:19 ` [PATCH V2 3/7] SecurityPkg TcgStorageCoreLib: " Star Zeng
2018-03-07 13:19 ` [PATCH V2 4/7] SecurityPkg OpalPassword: Add solution without SMM device code Star Zeng
2018-03-08 11:44   ` Yao, Jiewen
2018-03-08 11:48     ` Zeng, Star
2018-03-07 13:19 ` [PATCH V2 5/7] SecurityPkg OpalPassword: Remove old solution Star Zeng
2018-03-07 13:19 ` [PATCH V2 6/7] SecurityPkg OpalPasswordSupportLib: Remove it Star Zeng
2018-03-07 13:19 ` [PATCH V2 7/7] SecurityPkg OpalPasswordExtraInfoVariable.h: " Star Zeng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox