public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [Patch 0/2] Fix 2 regression caused by enabling pyrite 2.0 feature changes.
@ 2018-05-14  7:35 Eric Dong
  2018-05-14  7:36 ` [Patch 1/2] SecurityPkg/TcgStorageOpalLib: Fix GCC build failure Eric Dong
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Eric Dong @ 2018-05-14  7:35 UTC (permalink / raw)
  To: edk2-devel

Fix GCC build failure and PSID revert no hint message issues caused 
by enabling pyrite 2.0 feature.

Eric Dong (2):
  SecurityPkg/TcgStorageOpalLib: Fix GCC build failure.
  SecurityPkg/OpalPassword: Fix PSID revert no hint message.

 .../Library/TcgStorageOpalLib/TcgStorageOpalCore.c |  4 ---
 .../TcgStorageOpalLib/TcgStorageOpalLibInternal.h  |  1 -
 SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c     | 29 +++++++++++++++-------
 3 files changed, 20 insertions(+), 14 deletions(-)

-- 
2.15.0.windows.1



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

* [Patch 1/2] SecurityPkg/TcgStorageOpalLib: Fix GCC build failure.
  2018-05-14  7:35 [Patch 0/2] Fix 2 regression caused by enabling pyrite 2.0 feature changes Eric Dong
@ 2018-05-14  7:36 ` Eric Dong
  2018-05-14  7:36 ` [Patch 2/2] SecurityPkg/OpalPassword: Fix PSID revert no hint message Eric Dong
  2018-05-14  8:25 ` [Patch 0/2] Fix 2 regression caused by enabling pyrite 2.0 feature changes Wu, Hao A
  2 siblings, 0 replies; 4+ messages in thread
From: Eric Dong @ 2018-05-14  7:36 UTC (permalink / raw)
  To: edk2-devel; +Cc: Hao Wu

Function definition different with function implementation
caused this build failure. Change code to make them
consistent to pass the build.

Done Unit Test:
1. Pass GCC build.

Cc: Hao Wu <hao.a.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Eric Dong <eric.dong@intel.com>
---
 SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalCore.c        | 4 ----
 SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalLibInternal.h | 1 -
 2 files changed, 5 deletions(-)

diff --git a/SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalCore.c b/SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalCore.c
index d794a91aad..cf37cad004 100644
--- a/SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalCore.c
+++ b/SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalCore.c
@@ -334,7 +334,6 @@ OpalPsidRevert(
 
 **/
 TCG_RESULT
-EFIAPI
 OpalPyrite2PsidRevert(
   OPAL_SESSION              *AdminSpSession,
   UINT32                    EstimateTimeCost
@@ -667,7 +666,6 @@ OpalGetMsid(
 
 **/
 TCG_RESULT
-EFIAPI
 OpalPyrite2GetActiveDataRemovalMechanism (
   IN  OPAL_SESSION    *AdminSpSession,
   OUT UINT8           *ActiveDataRemovalMechanism
@@ -845,7 +843,6 @@ OpalAdminRevert(
 
 **/
 TCG_RESULT
-EFIAPI
 OpalPyrite2AdminRevert(
   OPAL_SESSION    *LockingSpSession,
   BOOLEAN         KeepUserData,
@@ -1866,7 +1863,6 @@ OpalGetLockingInfo(
 
 **/
 TCG_RESULT
-EFIAPI
 OpalGetFeatureDescriptor (
   IN     OPAL_SESSION              *Session,
   IN     UINT16                    FeatureCode,
diff --git a/SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalLibInternal.h b/SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalLibInternal.h
index cd16c51c3b..9a2f60454f 100644
--- a/SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalLibInternal.h
+++ b/SecurityPkg/Library/TcgStorageOpalLib/TcgStorageOpalLibInternal.h
@@ -27,7 +27,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 
 **/
 TCG_RESULT
-EFIAPI
 OpalPyrite2GetActiveDataRemovalMechanism (
   OPAL_SESSION    *AdminSpSession,
   UINT8           *ActiveDataRemovalMechanism
-- 
2.15.0.windows.1



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

* [Patch 2/2] SecurityPkg/OpalPassword: Fix PSID revert no hint message.
  2018-05-14  7:35 [Patch 0/2] Fix 2 regression caused by enabling pyrite 2.0 feature changes Eric Dong
  2018-05-14  7:36 ` [Patch 1/2] SecurityPkg/TcgStorageOpalLib: Fix GCC build failure Eric Dong
@ 2018-05-14  7:36 ` Eric Dong
  2018-05-14  8:25 ` [Patch 0/2] Fix 2 regression caused by enabling pyrite 2.0 feature changes Wu, Hao A
  2 siblings, 0 replies; 4+ messages in thread
From: Eric Dong @ 2018-05-14  7:36 UTC (permalink / raw)
  To: edk2-devel; +Cc: Hao Wu

For no warning message when do the PSID revert action, the
message in the popup dialog is not enough. The error use
of NULL for CreatePopUp function caused this regression.
This change fixed it.

Passed Unit Test:
1. Check PSID revert with/without warning message cases.

Cc: Hao Wu <hao.a.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Eric Dong <eric.dong@intel.com>
---
 SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c | 29 ++++++++++++++++++--------
 1 file changed, 20 insertions(+), 9 deletions(-)

diff --git a/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c b/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c
index 8733564f00..5d1638d5cf 100644
--- a/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c
+++ b/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c
@@ -687,15 +687,26 @@ OpalDriverPopUpPsidInput (
   InputLength = 0;
   while (TRUE) {
     Mask[InputLength] = L'_';
-    CreatePopUp (
-      EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE,
-      &InputKey,
-      PopUpString,
-      PopUpString2,
-      L"---------------------",
-      Mask,
-      NULL
-    );
+    if (PopUpString2 == NULL) {
+      CreatePopUp (
+        EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE,
+        &InputKey,
+        PopUpString,
+        L"---------------------",
+        Mask,
+        NULL
+      );
+    } else {
+      CreatePopUp (
+        EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE,
+        &InputKey,
+        PopUpString,
+        PopUpString2,
+        L"---------------------",
+        Mask,
+        NULL
+      );
+    }
 
     //
     // Check key.
-- 
2.15.0.windows.1



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

* Re: [Patch 0/2] Fix 2 regression caused by enabling pyrite 2.0 feature changes.
  2018-05-14  7:35 [Patch 0/2] Fix 2 regression caused by enabling pyrite 2.0 feature changes Eric Dong
  2018-05-14  7:36 ` [Patch 1/2] SecurityPkg/TcgStorageOpalLib: Fix GCC build failure Eric Dong
  2018-05-14  7:36 ` [Patch 2/2] SecurityPkg/OpalPassword: Fix PSID revert no hint message Eric Dong
@ 2018-05-14  8:25 ` Wu, Hao A
  2 siblings, 0 replies; 4+ messages in thread
From: Wu, Hao A @ 2018-05-14  8:25 UTC (permalink / raw)
  To: Dong, Eric, edk2-devel@lists.01.org

Reviewed-by: Hao Wu <hao.a.wu@intel.com>

Best Regards,
Hao Wu


> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Eric
> Dong
> Sent: Monday, May 14, 2018 3:36 PM
> To: edk2-devel@lists.01.org
> Subject: [edk2] [Patch 0/2] Fix 2 regression caused by enabling pyrite 2.0
> feature changes.
> 
> Fix GCC build failure and PSID revert no hint message issues caused
> by enabling pyrite 2.0 feature.
> 
> Eric Dong (2):
>   SecurityPkg/TcgStorageOpalLib: Fix GCC build failure.
>   SecurityPkg/OpalPassword: Fix PSID revert no hint message.
> 
>  .../Library/TcgStorageOpalLib/TcgStorageOpalCore.c |  4 ---
>  .../TcgStorageOpalLib/TcgStorageOpalLibInternal.h  |  1 -
>  SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c     | 29 +++++++++++++++---
> ----
>  3 files changed, 20 insertions(+), 14 deletions(-)
> 
> --
> 2.15.0.windows.1
> 
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel


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

end of thread, other threads:[~2018-05-14  8:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-14  7:35 [Patch 0/2] Fix 2 regression caused by enabling pyrite 2.0 feature changes Eric Dong
2018-05-14  7:36 ` [Patch 1/2] SecurityPkg/TcgStorageOpalLib: Fix GCC build failure Eric Dong
2018-05-14  7:36 ` [Patch 2/2] SecurityPkg/OpalPassword: Fix PSID revert no hint message Eric Dong
2018-05-14  8:25 ` [Patch 0/2] Fix 2 regression caused by enabling pyrite 2.0 feature changes Wu, Hao A

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