]> git.proxmox.com Git - mirror_edk2.git/commitdiff
SecurityPkg/PlatformSecureLibNull: permit use by MM_STANDALONE modules
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Wed, 16 Jan 2019 21:22:19 +0000 (22:22 +0100)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Mon, 21 Jan 2019 12:42:49 +0000 (13:42 +0100)
Add MM_STANDALONE to the list of module types that are permitted to
link to this library. Also, since the constructor prototype is
different between MM_STANDALONE and DXE_DRIVER type libraries,
convert the library into BASE type.

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: Jiewen Yao <jiewen.yao@intel.com>
SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.c
SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.inf

index 0c6ded22f3e6d330889a5eb7000756de6bab28ea..b2be45be7fb6ace7b9e7ccbe05954a1722841349 100644 (file)
@@ -15,6 +15,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 **/\r
 \r
+#include <Uefi/UefiBaseType.h>\r
+\r
 BOOLEAN       mUserPhysicalPresence      = FALSE;\r
 \r
 /**\r
@@ -47,21 +49,17 @@ UserPhysicalPresent (
 /**\r
   Save user physical presence state from a PCD to mUserPhysicalPresence.\r
 \r
-  @param  ImageHandle   ImageHandle of the loaded driver.\r
-  @param  SystemTable   Pointer to the EFI System Table.\r
-\r
   @retval  EFI_SUCCESS          PcdUserPhysicalPresence is got successfully.\r
 \r
 **/\r
-EFI_STATUS\r
+RETURN_STATUS\r
 EFIAPI\r
 PlatformSecureLibNullConstructor (\r
-  IN EFI_HANDLE        ImageHandle,\r
-  IN EFI_SYSTEM_TABLE  *SystemTable\r
+  VOID\r
   )\r
 {\r
 \r
   mUserPhysicalPresence = PcdGetBool(PcdUserPhysicalPresence);\r
 \r
-  return EFI_SUCCESS;\r
+  return RETURN_SUCCESS;\r
 }\r
index 979a33705de08d5d0620a5acb775ccc39cc8f8c9..70051a27a0a921d94b753fc0e0a686f874c7c360 100644 (file)
@@ -21,9 +21,9 @@
   BASE_NAME                      = PlatformSecureLibNull\r
   MODULE_UNI_FILE                = PlatformSecureLibNull.uni\r
   FILE_GUID                      = 7FA68D82-10A4-4e71-9524-D3D9500D3CDF\r
-  MODULE_TYPE                    = DXE_DRIVER\r
+  MODULE_TYPE                    = BASE\r
   VERSION_STRING                 = 1.0\r
-  LIBRARY_CLASS                  = PlatformSecureLib|DXE_RUNTIME_DRIVER DXE_SMM_DRIVER DXE_DRIVER\r
+  LIBRARY_CLASS                  = PlatformSecureLib|DXE_RUNTIME_DRIVER DXE_SMM_DRIVER DXE_DRIVER MM_STANDALONE\r
   CONSTRUCTOR                    = PlatformSecureLibNullConstructor\r
 \r
 #\r