summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Library/VarCheckUefiLib
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2019-01-16 22:22:20 +0100
committerArd Biesheuvel <ard.biesheuvel@linaro.org>2019-01-21 13:42:49 +0100
commit070c5a66cd858f949f8bd5dd3527bb39ebb0e146 (patch)
tree62370e0736237804bed4120b59ba72795c2bebff /MdeModulePkg/Library/VarCheckUefiLib
parentc5386c78984bb681184f3ea249abfc8ba5efc3b9 (diff)
downloadedk2-070c5a66cd858f949f8bd5dd3527bb39ebb0e146.tar.gz
edk2-070c5a66cd858f949f8bd5dd3527bb39ebb0e146.tar.bz2
edk2-070c5a66cd858f949f8bd5dd3527bb39ebb0e146.zip
MdeModulePkg/VarCheckUefiLib: permit use by MM_STANDALONE modules
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>
Diffstat (limited to 'MdeModulePkg/Library/VarCheckUefiLib')
-rw-r--r--MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf4
-rw-r--r--MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLibNullClass.c12
2 files changed, 7 insertions, 9 deletions
diff --git a/MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf b/MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf
index 128c44d695..8873fd51a0 100644
--- a/MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf
+++ b/MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf
@@ -19,9 +19,9 @@
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 80dc6341ad..94aac27785 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>
@@ -921,21 +923,17 @@ VariablePropertySetUefiDefined (
Constructor function of VarCheckUefiLib to set property and
register SetVariable check handler for UEFI defined variables.
- @param[in] ImageHandle The firmware allocated handle for the EFI image.
- @param[in] SystemTable A pointer to the EFI System Table.
-
@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;
}