]> git.proxmox.com Git - mirror_edk2.git/blob - OvmfPkg/Library/PlatformSecureLib/PlatformSecureLib.c
956ff9e2c58b34cd1a17332638222e20ab9a77de
[mirror_edk2.git] / OvmfPkg / Library / PlatformSecureLib / PlatformSecureLib.c
1 /** @file
2 Provides a platform-specific method to enable Secure Boot Custom Mode setup.
3
4 Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
9
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
13 **/
14 #include <Library/PcdLib.h>
15
16 /**
17
18 This function detects whether a secure platform-specific method to clear PK(Platform Key)
19 is configured by platform owner. This method is provided for users force to clear PK
20 in case incorrect enrollment mis-haps.
21
22 UEFI231 spec chapter 27.5.2 stipulates: The platform key may also be cleared using
23 a secure platform-specific method. In this case, the global variable SetupMode
24 must also be updated to 1.
25
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.
28
29 @retval TRUE The Platform owner wants to force clear PK.
30 @retval FALSE The Platform owner doesn't want to force clear PK.
31
32 **/
33 BOOLEAN
34 EFIAPI
35 ForceClearPK (
36 VOID
37 )
38 {
39 return TRUE;
40 }
41
42 /**
43
44 This function detects whether current platform is operated by a physical present user.
45
46 @retval TRUE The Platform is operated by a physical present user.
47 @retval FALSE The Platform is NOT operated by a physical persent user.
48
49 **/
50 BOOLEAN
51 EFIAPI
52 UserPhysicalPresent (
53 VOID
54 )
55 {
56 return TRUE;
57 }