diff options
Diffstat (limited to 'roms/edk2/OvmfPkg/Library/PlatformSecureLib')
-rw-r--r-- | roms/edk2/OvmfPkg/Library/PlatformSecureLib/PlatformSecureLib.c | 34 | ||||
-rw-r--r-- | roms/edk2/OvmfPkg/Library/PlatformSecureLib/PlatformSecureLib.inf | 28 |
2 files changed, 62 insertions, 0 deletions
diff --git a/roms/edk2/OvmfPkg/Library/PlatformSecureLib/PlatformSecureLib.c b/roms/edk2/OvmfPkg/Library/PlatformSecureLib/PlatformSecureLib.c new file mode 100644 index 000000000..734d30213 --- /dev/null +++ b/roms/edk2/OvmfPkg/Library/PlatformSecureLib/PlatformSecureLib.c @@ -0,0 +1,34 @@ +/** @file
+ Provides a platform-specific method to enable Secure Boot Custom Mode setup.
+
+ Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+#include <Library/PcdLib.h>
+
+/**
+
+ This function provides a platform-specific method to detect whether the platform
+ is operating by a physically present user.
+
+ Programmatic changing of platform security policy (such as disable Secure Boot,
+ or switch between Standard/Custom Secure Boot mode) MUST NOT be possible during
+ Boot Services or after exiting EFI Boot Services. Only a physically present user
+ is allowed to perform these operations.
+
+ NOTE THAT: This function cannot depend on any EFI Variable Service since they are
+ not available when this function is called in AuthenticateVariable driver.
+
+ @retval TRUE The platform is operated by a physically present user.
+ @retval FALSE The platform is NOT operated by a physically present user.
+
+**/
+BOOLEAN
+EFIAPI
+UserPhysicalPresent (
+ VOID
+ )
+{
+ return TRUE;
+}
diff --git a/roms/edk2/OvmfPkg/Library/PlatformSecureLib/PlatformSecureLib.inf b/roms/edk2/OvmfPkg/Library/PlatformSecureLib/PlatformSecureLib.inf new file mode 100644 index 000000000..db340f60b --- /dev/null +++ b/roms/edk2/OvmfPkg/Library/PlatformSecureLib/PlatformSecureLib.inf @@ -0,0 +1,28 @@ +## @file
+# Provides a platform-specific method to enable Secure Boot Custom Mode setup.
+#
+# Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>
+#
+# SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+##
+
+[Defines]
+ INF_VERSION = 0x00010005
+ BASE_NAME = PlatformSecureLib
+ FILE_GUID = 4204D78D-EDBF-4cee-BE80-3881457CF344
+ MODULE_TYPE = DXE_DRIVER
+ VERSION_STRING = 1.0
+ LIBRARY_CLASS = PlatformSecureLib|DXE_RUNTIME_DRIVER DXE_SMM_DRIVER DXE_DRIVER
+
+#
+# The following information is for reference only and not required by the build tools.
+#
+# VALID_ARCHITECTURES = IA32 X64 EBC
+#
+
+[Sources]
+ PlatformSecureLib.c
+
+[Packages]
+ MdePkg/MdePkg.dec
|