summaryrefslogtreecommitdiffstats
path: root/SecurityPkg
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2019-01-16 22:22:19 +0100
committerArd Biesheuvel <ard.biesheuvel@linaro.org>2019-01-21 13:42:49 +0100
commitc5386c78984bb681184f3ea249abfc8ba5efc3b9 (patch)
tree1f385dcc1cf29c8ec2a3536a4b93e430f46345cf /SecurityPkg
parent2c010aba2252183a410a5087d949e9b4e1724796 (diff)
downloadedk2-c5386c78984bb681184f3ea249abfc8ba5efc3b9.tar.gz
edk2-c5386c78984bb681184f3ea249abfc8ba5efc3b9.tar.bz2
edk2-c5386c78984bb681184f3ea249abfc8ba5efc3b9.zip
SecurityPkg/PlatformSecureLibNull: permit use by MM_STANDALONE modules
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>
Diffstat (limited to 'SecurityPkg')
-rw-r--r--SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.c12
-rw-r--r--SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.inf4
2 files changed, 7 insertions, 9 deletions
diff --git a/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.c b/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.c
index 0c6ded22f3..b2be45be7f 100644
--- a/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.c
+++ b/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.c
@@ -15,6 +15,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
+#include <Uefi/UefiBaseType.h>
+
BOOLEAN mUserPhysicalPresence = FALSE;
/**
@@ -47,21 +49,17 @@ UserPhysicalPresent (
/**
Save user physical presence state from a PCD to mUserPhysicalPresence.
- @param ImageHandle ImageHandle of the loaded driver.
- @param SystemTable Pointer to the EFI System Table.
-
@retval EFI_SUCCESS PcdUserPhysicalPresence is got successfully.
**/
-EFI_STATUS
+RETURN_STATUS
EFIAPI
PlatformSecureLibNullConstructor (
- IN EFI_HANDLE ImageHandle,
- IN EFI_SYSTEM_TABLE *SystemTable
+ VOID
)
{
mUserPhysicalPresence = PcdGetBool(PcdUserPhysicalPresence);
- return EFI_SUCCESS;
+ return RETURN_SUCCESS;
}
diff --git a/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.inf b/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.inf
index 979a33705d..70051a27a0 100644
--- a/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.inf
+++ b/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.inf
@@ -21,9 +21,9 @@
BASE_NAME = PlatformSecureLibNull
MODULE_UNI_FILE = PlatformSecureLibNull.uni
FILE_GUID = 7FA68D82-10A4-4e71-9524-D3D9500D3CDF
- MODULE_TYPE = DXE_DRIVER
+ MODULE_TYPE = BASE
VERSION_STRING = 1.0
- LIBRARY_CLASS = PlatformSecureLib|DXE_RUNTIME_DRIVER DXE_SMM_DRIVER DXE_DRIVER
+ LIBRARY_CLASS = PlatformSecureLib|DXE_RUNTIME_DRIVER DXE_SMM_DRIVER DXE_DRIVER MM_STANDALONE
CONSTRUCTOR = PlatformSecureLibNullConstructor
#