diff mbox series

[edk2,3/4] MdeModulePkg/VarCheckLib: permit use by MM_STANDALONE modules

Message ID 20190116212221.7460-4-ard.biesheuvel@linaro.org
State Accepted
Commit 070c5a66cd858f949f8bd5dd3527bb39ebb0e146
Headers show
Series Various Packages: add MM_STANDALONE support | expand

Commit Message

Ard Biesheuvel Jan. 16, 2019, 9:22 p.m. UTC
Permit VarCheckLib and VarCheckUefiLib to be used by MM_STANDALONE
modules.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

---
 MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf        | 4 ++--
 MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLibNullClass.c | 9 +++++----
 2 files changed, 7 insertions(+), 6 deletions(-)

-- 
2.17.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Comments

Wang, Jian J Jan. 18, 2019, 7:06 a.m. UTC | #1
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>



> -----Original Message-----

> From: Ard Biesheuvel [mailto:ard.biesheuvel@linaro.org]

> Sent: Thursday, January 17, 2019 5:22 AM

> To: edk2-devel@lists.01.org

> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>; Kinney, Michael D

> <michael.d.kinney@intel.com>; Gao, Liming <liming.gao@intel.com>; Ye, Ting

> <ting.ye@intel.com>; Wei, Gang <gang.wei@intel.com>; Wang, Jian J

> <jian.j.wang@intel.com>; Zhang, Chao B <chao.b.zhang@intel.com>; Yao,

> Jiewen <jiewen.yao@intel.com>; Wu, Hao A <hao.a.wu@intel.com>; Zeng, Star

> <star.zeng@intel.com>; Achin Gupta <achin.gupta@arm.com>; Jagadeesh Ujja

> <jagadeesh.ujja@arm.com>

> Subject: [PATCH 3/4] MdeModulePkg/VarCheckLib: permit use by

> MM_STANDALONE modules

> 

> Permit VarCheckLib and VarCheckUefiLib to be used by MM_STANDALONE

> modules.

> 

> Contributed-under: TianoCore Contribution Agreement 1.1

> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

> ---

>  MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf        | 4 ++--

>  MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLibNullClass.c | 9

> +++++----

>  2 files changed, 7 insertions(+), 6 deletions(-)

> 

> diff --git a/MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf

> b/MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf

> index 128c44d695e1..8873fd51a02a 100644

> --- a/MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf

> +++ b/MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf

> @@ -19,9 +19,9 @@ [Defines]

>    BASE_NAME                      = VarCheckUefiLib

>    MODULE_UNI_FILE                = VarCheckUefiLib.uni

>    FILE_GUID                      = AC24A4C7-F845-4665-90E5-6431D6E28DC0

> -  MODULE_TYPE                    = DXE_RUNTIME_DRIVER

> +  MODULE_TYPE                    = BASE

>    VERSION_STRING                 = 1.0

> -  LIBRARY_CLASS                  = NULL|DXE_RUNTIME_DRIVER DXE_SMM_DRIVER

> +  LIBRARY_CLASS                  = NULL|DXE_RUNTIME_DRIVER DXE_SMM_DRIVER

> MM_STANDALONE

>    CONSTRUCTOR                    = VarCheckUefiLibNullClassConstructor

> 

>  #

> diff --git a/MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLibNullClass.c

> b/MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLibNullClass.c

> index 80dc6341adcf..5e419831e8cc 100644

> --- a/MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLibNullClass.c

> +++ b/MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLibNullClass.c

> @@ -12,6 +12,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY

> KIND, EITHER EXPRESS OR IMPLIED.

> 

>  **/

> 

> +#include <Uefi/UefiBaseType.h>

> +

>  #include <Library/VarCheckLib.h>

>  #include <Library/BaseLib.h>

>  #include <Library/BaseMemoryLib.h>

> @@ -927,15 +929,14 @@ VariablePropertySetUefiDefined (

>    @retval EFI_SUCCESS       The constructor executed correctly.

> 

>  **/

> -EFI_STATUS

> +RETURN_STATUS

>  EFIAPI

>  VarCheckUefiLibNullClassConstructor (

> -  IN EFI_HANDLE             ImageHandle,

> -  IN EFI_SYSTEM_TABLE       *SystemTable

> +  VOID

>    )

>  {

>    VariablePropertySetUefiDefined ();

>    VarCheckLibRegisterSetVariableCheckHandler

> (SetVariableCheckHandlerUefiDefined);

> 

> -  return EFI_SUCCESS;

> +  return RETURN_SUCCESS;

>  }

> --

> 2.17.1


_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Zeng, Star Jan. 18, 2019, 8:15 a.m. UTC | #2
This patch does not touch VarCheckLib at all, but only touch VarCheckUefiLib, so the title and commit message need be updated.
With them updated correctly, Reviewed-by: Star Zeng <star.zeng@intel.com>.


Thanks,
Star
-----Original Message-----
From: Ard Biesheuvel [mailto:ard.biesheuvel@linaro.org] 

Sent: Thursday, January 17, 2019 5:22 AM
To: edk2-devel@lists.01.org
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>; Kinney, Michael D <michael.d.kinney@intel.com>; Gao, Liming <liming.gao@intel.com>; Ye, Ting <ting.ye@intel.com>; Wei, Gang <gang.wei@intel.com>; Wang, Jian J <jian.j.wang@intel.com>; Zhang, Chao B <chao.b.zhang@intel.com>; Yao, Jiewen <jiewen.yao@intel.com>; Wu, Hao A <hao.a.wu@intel.com>; Zeng, Star <star.zeng@intel.com>; Achin Gupta <achin.gupta@arm.com>; Jagadeesh Ujja <jagadeesh.ujja@arm.com>
Subject: [PATCH 3/4] MdeModulePkg/VarCheckLib: permit use by MM_STANDALONE modules

Permit VarCheckLib and VarCheckUefiLib to be used by MM_STANDALONE modules.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

---
 MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf        | 4 ++--
 MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLibNullClass.c | 9 +++++----
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf b/MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf
index 128c44d695e1..8873fd51a02a 100644
--- a/MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf
+++ b/MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf
@@ -19,9 +19,9 @@ [Defines]
   BASE_NAME                      = VarCheckUefiLib
   MODULE_UNI_FILE                = VarCheckUefiLib.uni
   FILE_GUID                      = AC24A4C7-F845-4665-90E5-6431D6E28DC0
-  MODULE_TYPE                    = DXE_RUNTIME_DRIVER
+  MODULE_TYPE                    = BASE
   VERSION_STRING                 = 1.0
-  LIBRARY_CLASS                  = NULL|DXE_RUNTIME_DRIVER DXE_SMM_DRIVER
+  LIBRARY_CLASS                  = NULL|DXE_RUNTIME_DRIVER DXE_SMM_DRIVER MM_STANDALONE
   CONSTRUCTOR                    = VarCheckUefiLibNullClassConstructor
 
 #
diff --git a/MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLibNullClass.c b/MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLibNullClass.c
index 80dc6341adcf..5e419831e8cc 100644
--- a/MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLibNullClass.c
+++ b/MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLibNullClass.c
@@ -12,6 +12,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 
 **/
 
+#include <Uefi/UefiBaseType.h>
+
 #include <Library/VarCheckLib.h>
 #include <Library/BaseLib.h>
 #include <Library/BaseMemoryLib.h>
@@ -927,15 +929,14 @@ VariablePropertySetUefiDefined (
   @retval EFI_SUCCESS       The constructor executed correctly.
 
 **/
-EFI_STATUS
+RETURN_STATUS
 EFIAPI
 VarCheckUefiLibNullClassConstructor (
-  IN EFI_HANDLE             ImageHandle,
-  IN EFI_SYSTEM_TABLE       *SystemTable
+  VOID
   )
 {
   VariablePropertySetUefiDefined ();
   VarCheckLibRegisterSetVariableCheckHandler (SetVariableCheckHandlerUefiDefined);
 
-  return EFI_SUCCESS;
+  return RETURN_SUCCESS;
 }
--
2.17.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Zeng, Star Jan. 18, 2019, 10:45 a.m. UTC | #3
Anther, the parameters of constructor are removed, so their descriptions in function header also need to be cleaned up. Same comment to patch 2. With them fixed, Reviewed-by: Star Zeng <star.zeng@intel.com> to the series.

Thanks,
Star
-----Original Message-----
From: Zeng, Star 

Sent: Friday, January 18, 2019 4:15 PM
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>; edk2-devel@lists.01.org
Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Gao, Liming <liming.gao@intel.com>; Ye, Ting <ting.ye@intel.com>; Wei, Gang <gang.wei@intel.com>; Wang, Jian J <jian.j.wang@intel.com>; Zhang, Chao B <chao.b.zhang@intel.com>; Yao, Jiewen <jiewen.yao@intel.com>; Wu, Hao A <hao.a.wu@intel.com>; Achin Gupta <achin.gupta@arm.com>; Jagadeesh Ujja <jagadeesh.ujja@arm.com>; Zeng, Star <star.zeng@intel.com>
Subject: RE: [PATCH 3/4] MdeModulePkg/VarCheckLib: permit use by MM_STANDALONE modules

This patch does not touch VarCheckLib at all, but only touch VarCheckUefiLib, so the title and commit message need be updated.
With them updated correctly, Reviewed-by: Star Zeng <star.zeng@intel.com>.


Thanks,
Star
-----Original Message-----
From: Ard Biesheuvel [mailto:ard.biesheuvel@linaro.org] 

Sent: Thursday, January 17, 2019 5:22 AM
To: edk2-devel@lists.01.org
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>; Kinney, Michael D <michael.d.kinney@intel.com>; Gao, Liming <liming.gao@intel.com>; Ye, Ting <ting.ye@intel.com>; Wei, Gang <gang.wei@intel.com>; Wang, Jian J <jian.j.wang@intel.com>; Zhang, Chao B <chao.b.zhang@intel.com>; Yao, Jiewen <jiewen.yao@intel.com>; Wu, Hao A <hao.a.wu@intel.com>; Zeng, Star <star.zeng@intel.com>; Achin Gupta <achin.gupta@arm.com>; Jagadeesh Ujja <jagadeesh.ujja@arm.com>
Subject: [PATCH 3/4] MdeModulePkg/VarCheckLib: permit use by MM_STANDALONE modules

Permit VarCheckLib and VarCheckUefiLib to be used by MM_STANDALONE modules.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

---
 MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf        | 4 ++--
 MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLibNullClass.c | 9 +++++----
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf b/MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf
index 128c44d695e1..8873fd51a02a 100644
--- a/MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf
+++ b/MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf
@@ -19,9 +19,9 @@ [Defines]
   BASE_NAME                      = VarCheckUefiLib
   MODULE_UNI_FILE                = VarCheckUefiLib.uni
   FILE_GUID                      = AC24A4C7-F845-4665-90E5-6431D6E28DC0
-  MODULE_TYPE                    = DXE_RUNTIME_DRIVER
+  MODULE_TYPE                    = BASE
   VERSION_STRING                 = 1.0
-  LIBRARY_CLASS                  = NULL|DXE_RUNTIME_DRIVER DXE_SMM_DRIVER
+  LIBRARY_CLASS                  = NULL|DXE_RUNTIME_DRIVER DXE_SMM_DRIVER MM_STANDALONE
   CONSTRUCTOR                    = VarCheckUefiLibNullClassConstructor
 
 #
diff --git a/MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLibNullClass.c b/MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLibNullClass.c
index 80dc6341adcf..5e419831e8cc 100644
--- a/MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLibNullClass.c
+++ b/MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLibNullClass.c
@@ -12,6 +12,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 
 **/
 
+#include <Uefi/UefiBaseType.h>
+
 #include <Library/VarCheckLib.h>
 #include <Library/BaseLib.h>
 #include <Library/BaseMemoryLib.h>
@@ -927,15 +929,14 @@ VariablePropertySetUefiDefined (
   @retval EFI_SUCCESS       The constructor executed correctly.
 
 **/
-EFI_STATUS
+RETURN_STATUS
 EFIAPI
 VarCheckUefiLibNullClassConstructor (
-  IN EFI_HANDLE             ImageHandle,
-  IN EFI_SYSTEM_TABLE       *SystemTable
+  VOID
   )
 {
   VariablePropertySetUefiDefined ();
   VarCheckLibRegisterSetVariableCheckHandler (SetVariableCheckHandlerUefiDefined);
 
-  return EFI_SUCCESS;
+  return RETURN_SUCCESS;
 }
--
2.17.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
diff mbox series

Patch

diff --git a/MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf b/MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf
index 128c44d695e1..8873fd51a02a 100644
--- a/MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf
+++ b/MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf
@@ -19,9 +19,9 @@  [Defines]
   BASE_NAME                      = VarCheckUefiLib
   MODULE_UNI_FILE                = VarCheckUefiLib.uni
   FILE_GUID                      = AC24A4C7-F845-4665-90E5-6431D6E28DC0
-  MODULE_TYPE                    = DXE_RUNTIME_DRIVER
+  MODULE_TYPE                    = BASE
   VERSION_STRING                 = 1.0
-  LIBRARY_CLASS                  = NULL|DXE_RUNTIME_DRIVER DXE_SMM_DRIVER
+  LIBRARY_CLASS                  = NULL|DXE_RUNTIME_DRIVER DXE_SMM_DRIVER MM_STANDALONE
   CONSTRUCTOR                    = VarCheckUefiLibNullClassConstructor
 
 #
diff --git a/MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLibNullClass.c b/MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLibNullClass.c
index 80dc6341adcf..5e419831e8cc 100644
--- a/MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLibNullClass.c
+++ b/MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLibNullClass.c
@@ -12,6 +12,8 @@  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 
 **/
 
+#include <Uefi/UefiBaseType.h>
+
 #include <Library/VarCheckLib.h>
 #include <Library/BaseLib.h>
 #include <Library/BaseMemoryLib.h>
@@ -927,15 +929,14 @@  VariablePropertySetUefiDefined (
   @retval EFI_SUCCESS       The constructor executed correctly.
 
 **/
-EFI_STATUS
+RETURN_STATUS
 EFIAPI
 VarCheckUefiLibNullClassConstructor (
-  IN EFI_HANDLE             ImageHandle,
-  IN EFI_SYSTEM_TABLE       *SystemTable
+  VOID
   )
 {
   VariablePropertySetUefiDefined ();
   VarCheckLibRegisterSetVariableCheckHandler (SetVariableCheckHandlerUefiDefined);
 
-  return EFI_SUCCESS;
+  return RETURN_SUCCESS;
 }