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