]>
Commit | Line | Data |
---|---|---|
1 | /** @file\r | |
2 | Provides platform policy services used during a capsule update.\r | |
3 | \r | |
4 | Copyright (c) 2016, Microsoft Corporation. All rights reserved.<BR>\r | |
5 | Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>\r | |
6 | \r | |
7 | Redistribution and use in source and binary forms, with or without\r | |
8 | modification, are permitted provided that the following conditions are met:\r | |
9 | 1. Redistributions of source code must retain the above copyright notice,\r | |
10 | this list of conditions and the following disclaimer.\r | |
11 | 2. Redistributions in binary form must reproduce the above copyright notice,\r | |
12 | this list of conditions and the following disclaimer in the documentation\r | |
13 | and/or other materials provided with the distribution.\r | |
14 | \r | |
15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND\r | |
16 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\r | |
17 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\r | |
18 | IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\r | |
19 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\r | |
20 | BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r | |
21 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r | |
22 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE\r | |
23 | OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF\r | |
24 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r | |
25 | \r | |
26 | **/\r | |
27 | \r | |
28 | #ifndef __CAPSULE_UPDATE_POLICY_LIB__\r | |
29 | #define __CAPSULE_UPDATE_POLICY_LIB__\r | |
30 | \r | |
31 | /**\r | |
32 | Determine if the system power state supports a capsule update.\r | |
33 | \r | |
34 | @param[out] Good Returns TRUE if system power state supports a capsule\r | |
35 | update. Returns FALSE if system power state does not\r | |
36 | support a capsule update. Return value is only valid if\r | |
37 | return status is EFI_SUCCESS.\r | |
38 | \r | |
39 | @retval EFI_SUCCESS Good parameter has been updated with result.\r | |
40 | @retval EFI_INVALID_PARAMETER Good is NULL.\r | |
41 | @retval EFI_DEVICE_ERROR System power state can not be determined.\r | |
42 | \r | |
43 | **/\r | |
44 | EFI_STATUS\r | |
45 | EFIAPI\r | |
46 | CheckSystemPower (\r | |
47 | OUT BOOLEAN *Good\r | |
48 | );\r | |
49 | \r | |
50 | /**\r | |
51 | Determines if the system thermal state supports a capsule update.\r | |
52 | \r | |
53 | @param[out] Good Returns TRUE if system thermal state supports a capsule\r | |
54 | update. Returns FALSE if system thermal state does not\r | |
55 | support a capsule update. Return value is only valid if\r | |
56 | return status is EFI_SUCCESS.\r | |
57 | \r | |
58 | @retval EFI_SUCCESS Good parameter has been updated with result.\r | |
59 | @retval EFI_INVALID_PARAMETER Good is NULL.\r | |
60 | @retval EFI_DEVICE_ERROR System thermal state can not be determined.\r | |
61 | \r | |
62 | **/\r | |
63 | EFI_STATUS\r | |
64 | EFIAPI\r | |
65 | CheckSystemThermal (\r | |
66 | OUT BOOLEAN *Good\r | |
67 | );\r | |
68 | \r | |
69 | /**\r | |
70 | Determines if the system environment state supports a capsule update.\r | |
71 | \r | |
72 | @param[out] Good Returns TRUE if system environment state supports a capsule\r | |
73 | update. Returns FALSE if system environment state does not\r | |
74 | support a capsule update. Return value is only valid if\r | |
75 | return status is EFI_SUCCESS.\r | |
76 | \r | |
77 | @retval EFI_SUCCESS Good parameter has been updated with result.\r | |
78 | @retval EFI_INVALID_PARAMETER Good is NULL.\r | |
79 | @retval EFI_DEVICE_ERROR System environment state can not be determined.\r | |
80 | \r | |
81 | **/\r | |
82 | EFI_STATUS\r | |
83 | EFIAPI\r | |
84 | CheckSystemEnvironment (\r | |
85 | OUT BOOLEAN *Good\r | |
86 | );\r | |
87 | \r | |
88 | /**\r | |
89 | Determines if the Lowest Supported Version checks should be performed. The\r | |
90 | expected result from this function is TRUE. A platform can choose to return\r | |
91 | FALSE (e.g. during manufacturing or servicing) to allow a capsule update to a\r | |
92 | version below the current Lowest Supported Version.\r | |
93 | \r | |
94 | @retval TRUE The lowest supported version check is required.\r | |
95 | @retval FALSE Do not perform lowest support version check.\r | |
96 | \r | |
97 | **/\r | |
98 | BOOLEAN\r | |
99 | EFIAPI\r | |
100 | IsLowestSupportedVersionCheckRequired (\r | |
101 | VOID\r | |
102 | );\r | |
103 | \r | |
104 | /**\r | |
105 | Determines if the FMP device should be locked when the event specified by\r | |
106 | PcdFmpDeviceLockEventGuid is signaled. The expected result from this function\r | |
107 | is TRUE so the FMP device is always locked. A platform can choose to return\r | |
108 | FALSE (e.g. during manufacturing) to allow FMP devices to remain unlocked.\r | |
109 | \r | |
110 | @retval TRUE The FMP device lock action is required at lock event guid.\r | |
111 | @retval FALSE Do not perform FMP device lock at lock event guid.\r | |
112 | \r | |
113 | **/\r | |
114 | BOOLEAN\r | |
115 | EFIAPI\r | |
116 | IsLockFmpDeviceAtLockEventGuidRequired (\r | |
117 | VOID\r | |
118 | );\r | |
119 | \r | |
120 | #endif\r |