]> git.proxmox.com Git - mirror_edk2.git/blob - FmpDevicePkg/Include/Library/CapsuleUpdatePolicyLib.h
FmpDevicePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / FmpDevicePkg / Include / Library / CapsuleUpdatePolicyLib.h
1 /** @file
2 Provides platform policy services used during a capsule update.
3
4 Copyright (c) 2016, Microsoft Corporation. All rights reserved.<BR>
5 Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
6
7 SPDX-License-Identifier: BSD-2-Clause-Patent
8
9 **/
10
11 #ifndef __CAPSULE_UPDATE_POLICY_LIB__
12 #define __CAPSULE_UPDATE_POLICY_LIB__
13
14 /**
15 Determine if the system power state supports a capsule update.
16
17 @param[out] Good Returns TRUE if system power state supports a capsule
18 update. Returns FALSE if system power state does not
19 support a capsule update. Return value is only valid if
20 return status is EFI_SUCCESS.
21
22 @retval EFI_SUCCESS Good parameter has been updated with result.
23 @retval EFI_INVALID_PARAMETER Good is NULL.
24 @retval EFI_DEVICE_ERROR System power state can not be determined.
25
26 **/
27 EFI_STATUS
28 EFIAPI
29 CheckSystemPower (
30 OUT BOOLEAN *Good
31 );
32
33 /**
34 Determines if the system thermal state supports a capsule update.
35
36 @param[out] Good Returns TRUE if system thermal state supports a capsule
37 update. Returns FALSE if system thermal state does not
38 support a capsule update. Return value is only valid if
39 return status is EFI_SUCCESS.
40
41 @retval EFI_SUCCESS Good parameter has been updated with result.
42 @retval EFI_INVALID_PARAMETER Good is NULL.
43 @retval EFI_DEVICE_ERROR System thermal state can not be determined.
44
45 **/
46 EFI_STATUS
47 EFIAPI
48 CheckSystemThermal (
49 OUT BOOLEAN *Good
50 );
51
52 /**
53 Determines if the system environment state supports a capsule update.
54
55 @param[out] Good Returns TRUE if system environment state supports a capsule
56 update. Returns FALSE if system environment state does not
57 support a capsule update. Return value is only valid if
58 return status is EFI_SUCCESS.
59
60 @retval EFI_SUCCESS Good parameter has been updated with result.
61 @retval EFI_INVALID_PARAMETER Good is NULL.
62 @retval EFI_DEVICE_ERROR System environment state can not be determined.
63
64 **/
65 EFI_STATUS
66 EFIAPI
67 CheckSystemEnvironment (
68 OUT BOOLEAN *Good
69 );
70
71 /**
72 Determines if the Lowest Supported Version checks should be performed. The
73 expected result from this function is TRUE. A platform can choose to return
74 FALSE (e.g. during manufacturing or servicing) to allow a capsule update to a
75 version below the current Lowest Supported Version.
76
77 @retval TRUE The lowest supported version check is required.
78 @retval FALSE Do not perform lowest support version check.
79
80 **/
81 BOOLEAN
82 EFIAPI
83 IsLowestSupportedVersionCheckRequired (
84 VOID
85 );
86
87 /**
88 Determines if the FMP device should be locked when the event specified by
89 PcdFmpDeviceLockEventGuid is signaled. The expected result from this function
90 is TRUE so the FMP device is always locked. A platform can choose to return
91 FALSE (e.g. during manufacturing) to allow FMP devices to remain unlocked.
92
93 @retval TRUE The FMP device lock action is required at lock event guid.
94 @retval FALSE Do not perform FMP device lock at lock event guid.
95
96 **/
97 BOOLEAN
98 EFIAPI
99 IsLockFmpDeviceAtLockEventGuidRequired (
100 VOID
101 );
102
103 #endif