]> git.proxmox.com Git - mirror_edk2.git/blame - FmpDevicePkg/Library/CapsuleUpdatePolicyLibNull/CapsuleUpdatePolicyLibNull.c
FmpDevicePkg: Fix code style issue
[mirror_edk2.git] / FmpDevicePkg / Library / CapsuleUpdatePolicyLibNull / CapsuleUpdatePolicyLibNull.c
CommitLineData
a6d73269 1/** @file\r
403d4bcd
KM
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#include <PiDxe.h>\r
29#include <Library/CapsuleUpdatePolicyLib.h>\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
44EFI_STATUS\r
45EFIAPI\r
46CheckSystemPower (\r
47 OUT BOOLEAN *Good\r
48 )\r
49{\r
50 *Good = TRUE;\r
51 return EFI_SUCCESS;\r
52}\r
53\r
54/**\r
55 Determines if the system thermal state supports a capsule update.\r
56\r
57 @param[out] Good Returns TRUE if system thermal state supports a capsule\r
58 update. Returns FALSE if system thermal state does not\r
59 support a capsule update. Return value is only valid if\r
60 return status is EFI_SUCCESS.\r
61\r
62 @retval EFI_SUCCESS Good parameter has been updated with result.\r
63 @retval EFI_INVALID_PARAMETER Good is NULL.\r
64 @retval EFI_DEVICE_ERROR System thermal state can not be determined.\r
65\r
66**/\r
67EFI_STATUS\r
68EFIAPI\r
69CheckSystemThermal (\r
a6d73269 70 OUT BOOLEAN *Good\r
403d4bcd
KM
71 )\r
72{\r
73 *Good = TRUE;\r
74 return EFI_SUCCESS;\r
75}\r
76\r
77/**\r
78 Determines if the system environment state supports a capsule update.\r
79\r
80 @param[out] Good Returns TRUE if system environment state supports a capsule\r
81 update. Returns FALSE if system environment state does not\r
82 support a capsule update. Return value is only valid if\r
83 return status is EFI_SUCCESS.\r
84\r
85 @retval EFI_SUCCESS Good parameter has been updated with result.\r
86 @retval EFI_INVALID_PARAMETER Good is NULL.\r
87 @retval EFI_DEVICE_ERROR System environment state can not be determined.\r
88\r
89**/\r
90EFI_STATUS\r
91EFIAPI\r
92CheckSystemEnvironment (\r
a6d73269 93 OUT BOOLEAN *Good\r
403d4bcd
KM
94 )\r
95{\r
96 *Good = TRUE;\r
97 return EFI_SUCCESS;\r
98}\r
99\r
100/**\r
101 Determines if the Lowest Supported Version checks should be performed. The\r
102 expected result from this function is TRUE. A platform can choose to return\r
103 FALSE (e.g. during manufacturing or servicing) to allow a capsule update to a\r
104 version below the current Lowest Supported Version.\r
105\r
106 @retval TRUE The lowest supported version check is required.\r
107 @retval FALSE Do not perform lowest support version check.\r
108\r
109**/\r
110BOOLEAN\r
111EFIAPI\r
112IsLowestSupportedVersionCheckRequired (\r
113 VOID\r
114 )\r
115{\r
116 return TRUE;\r
117}\r
118\r
119/**\r
120 Determines if the FMP device should be locked when the event specified by\r
121 PcdFmpDeviceLockEventGuid is signaled. The expected result from this function\r
122 is TRUE so the FMP device is always locked. A platform can choose to return\r
123 FALSE (e.g. during manufacturing) to allow FMP devices to remain unlocked.\r
124\r
125 @retval TRUE The FMP device lock action is required at lock event guid.\r
126 @retval FALSE Do not perform FMP device lock at lock event guid.\r
127\r
128**/\r
129BOOLEAN\r
130EFIAPI\r
131IsLockFmpDeviceAtLockEventGuidRequired (\r
132 VOID\r
133 )\r
134{\r
135 return TRUE;\r
136}\r