]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg/VarCheckUefiLib: permit use by MM_STANDALONE modules
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Wed, 16 Jan 2019 21:22:20 +0000 (22:22 +0100)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Mon, 21 Jan 2019 12:42:49 +0000 (13:42 +0100)
Permit CheckUefiLib to be used by MM_STANDALONE modules. Since this
library has a constructor, change the library's module type into
BASE so its constructor prototype is compatible with MM_STANDALONE
as well.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf
MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLibNullClass.c

index 128c44d695e15b2541e893b834537636cedafddc..8873fd51a02a91e6b325098c6ee2deffcbbf8fa8 100644 (file)
@@ -19,9 +19,9 @@
   BASE_NAME                      = VarCheckUefiLib\r
   MODULE_UNI_FILE                = VarCheckUefiLib.uni\r
   FILE_GUID                      = AC24A4C7-F845-4665-90E5-6431D6E28DC0\r
   BASE_NAME                      = VarCheckUefiLib\r
   MODULE_UNI_FILE                = VarCheckUefiLib.uni\r
   FILE_GUID                      = AC24A4C7-F845-4665-90E5-6431D6E28DC0\r
-  MODULE_TYPE                    = DXE_RUNTIME_DRIVER\r
+  MODULE_TYPE                    = BASE\r
   VERSION_STRING                 = 1.0\r
   VERSION_STRING                 = 1.0\r
-  LIBRARY_CLASS                  = NULL|DXE_RUNTIME_DRIVER DXE_SMM_DRIVER\r
+  LIBRARY_CLASS                  = NULL|DXE_RUNTIME_DRIVER DXE_SMM_DRIVER MM_STANDALONE\r
   CONSTRUCTOR                    = VarCheckUefiLibNullClassConstructor\r
 \r
 #\r
   CONSTRUCTOR                    = VarCheckUefiLibNullClassConstructor\r
 \r
 #\r
index 80dc6341adcf192d15546e99dd2c4107a730416c..94aac2778591ee755032ffca2489aa713a12376e 100644 (file)
@@ -12,6 +12,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 **/\r
 \r
 \r
 **/\r
 \r
+#include <Uefi/UefiBaseType.h>\r
+\r
 #include <Library/VarCheckLib.h>\r
 #include <Library/BaseLib.h>\r
 #include <Library/BaseMemoryLib.h>\r
 #include <Library/VarCheckLib.h>\r
 #include <Library/BaseLib.h>\r
 #include <Library/BaseMemoryLib.h>\r
@@ -921,21 +923,17 @@ VariablePropertySetUefiDefined (
   Constructor function of VarCheckUefiLib to set property and\r
   register SetVariable check handler for UEFI defined variables.\r
 \r
   Constructor function of VarCheckUefiLib to set property and\r
   register SetVariable check handler for UEFI defined variables.\r
 \r
-  @param[in] ImageHandle    The firmware allocated handle for the EFI image.\r
-  @param[in] SystemTable    A pointer to the EFI System Table.\r
-\r
   @retval EFI_SUCCESS       The constructor executed correctly.\r
 \r
 **/\r
   @retval EFI_SUCCESS       The constructor executed correctly.\r
 \r
 **/\r
-EFI_STATUS\r
+RETURN_STATUS\r
 EFIAPI\r
 VarCheckUefiLibNullClassConstructor (\r
 EFIAPI\r
 VarCheckUefiLibNullClassConstructor (\r
-  IN EFI_HANDLE             ImageHandle,\r
-  IN EFI_SYSTEM_TABLE       *SystemTable\r
+  VOID\r
   )\r
 {\r
   VariablePropertySetUefiDefined ();\r
   VarCheckLibRegisterSetVariableCheckHandler (SetVariableCheckHandlerUefiDefined);\r
 \r
   )\r
 {\r
   VariablePropertySetUefiDefined ();\r
   VarCheckLibRegisterSetVariableCheckHandler (SetVariableCheckHandlerUefiDefined);\r
 \r
-  return EFI_SUCCESS;\r
+  return RETURN_SUCCESS;\r
 }\r
 }\r