2 NULL PlatformSecureLib instance does NOT really detect whether a physical present
3 user exists but return TRUE directly. This instance can be used to verify security
4 related features during platform enabling and development. It should be replaced
5 by a platform-specific method(e.g. Button pressed) in a real platform for product.
7 Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
8 SPDX-License-Identifier: BSD-2-Clause-Patent
12 #include <Uefi/UefiBaseType.h>
14 BOOLEAN mUserPhysicalPresence
= FALSE
;
18 This function provides a platform-specific method to detect whether the platform
19 is operating by a physically present user.
21 Programmatic changing of platform security policy (such as disable Secure Boot,
22 or switch between Standard/Custom Secure Boot mode) MUST NOT be possible during
23 Boot Services or after exiting EFI Boot Services. Only a physically present user
24 is allowed to perform these operations.
26 NOTE THAT: This function cannot depend on any EFI Variable Service since they are
27 not available when this function is called in AuthenticateVariable driver.
29 @retval TRUE The platform is operated by a physically present user.
30 @retval FALSE The platform is NOT operated by a physically present user.
39 return mUserPhysicalPresence
;
44 Save user physical presence state from a PCD to mUserPhysicalPresence.
46 @retval EFI_SUCCESS PcdUserPhysicalPresence is got successfully.
51 PlatformSecureLibNullConstructor (
56 mUserPhysicalPresence
= PcdGetBool(PcdUserPhysicalPresence
);
58 return RETURN_SUCCESS
;