2 Provides platform policy services used during a capsule update that uses the
3 services of the EDKII_CAPSULE_UPDATE_POLICY_PROTOCOL.
5 Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
7 SPDX-License-Identifier: BSD-2-Clause-Patent
11 #ifndef __CAPSULE_UPDATE_POLICY_DXE_H__
12 #define __CAPSULE_UPDATE_POLICY_DXE_H__
16 #include <Protocol/CapsuleUpdatePolicy.h>
18 #include <Library/BaseLib.h>
19 #include <Library/DebugLib.h>
20 #include <Library/UefiBootServicesTableLib.h>
21 #include <Library/CapsuleUpdatePolicyLib.h>
24 Determine if the system power state supports a capsule update.
26 @param[in] This A pointer to the EDKII_CAPSULE_UPDATE_POLICY_PROTOCOL instance.
27 @param[out] Good Returns TRUE if system power state supports a capsule
28 update. Returns FALSE if system power state does not
29 support a capsule update. Return value is only valid if
30 return status is EFI_SUCCESS.
32 @retval EFI_SUCCESS Good parameter has been updated with result.
33 @retval EFI_INVALID_PARAMETER Good is NULL.
34 @retval EFI_DEVICE_ERROR System power state can not be determined.
39 CapsuleUpdatePolicyCheckSystemPower (
40 IN EDKII_CAPSULE_UPDATE_POLICY_PROTOCOL
*This
,
45 Determines if the system thermal state supports a capsule update.
47 @param[in] This A pointer to the EDKII_CAPSULE_UPDATE_POLICY_PROTOCOL instance.
48 @param[out] Good Returns TRUE if system thermal state supports a capsule
49 update. Returns FALSE if system thermal state does not
50 support a capsule update. Return value is only valid if
51 return status is EFI_SUCCESS.
53 @retval EFI_SUCCESS Good parameter has been updated with result.
54 @retval EFI_INVALID_PARAMETER Good is NULL.
55 @retval EFI_DEVICE_ERROR System thermal state can not be determined.
60 CapsuleUpdatePolicyCheckSystemThermal (
61 IN EDKII_CAPSULE_UPDATE_POLICY_PROTOCOL
*This
,
66 Determines if the system environment state supports a capsule update.
68 @param[in] This A pointer to the EDKII_CAPSULE_UPDATE_POLICY_PROTOCOL instance.
69 @param[out] Good Returns TRUE if system environment state supports a capsule
70 update. Returns FALSE if system environment state does not
71 support a capsule update. Return value is only valid if
72 return status is EFI_SUCCESS.
74 @retval EFI_SUCCESS Good parameter has been updated with result.
75 @retval EFI_INVALID_PARAMETER Good is NULL.
76 @retval EFI_DEVICE_ERROR System environment state can not be determined.
81 CapsuleUpdatePolicyCheckSystemEnvironment (
82 IN EDKII_CAPSULE_UPDATE_POLICY_PROTOCOL
*This
,
87 Determines if the Lowest Supported Version checks should be performed. The
88 expected result from this function is TRUE. A platform can choose to return
89 FALSE (e.g. during manufacturing or servicing) to allow a capsule update to a
90 version below the current Lowest Supported Version.
92 @param[in] This A pointer to the EDKII_CAPSULE_UPDATE_POLICY_PROTOCOL instance.
94 @retval TRUE The lowest supported version check is required.
95 @retval FALSE Do not perform lowest support version check.
100 CapsuleUpdatePolicyIsLowestSupportedVersionCheckRequired (
101 IN EDKII_CAPSULE_UPDATE_POLICY_PROTOCOL
*This
105 Determines if the FMP device should be locked when the event specified by
106 PcdFmpDeviceLockEventGuid is signaled. The expected result from this function
107 is TRUE so the FMP device is always locked. A platform can choose to return
108 FALSE (e.g. during manufacturing) to allow FMP devices to remain unlocked.
110 @param[in] This A pointer to the EDKII_CAPSULE_UPDATE_POLICY_PROTOCOL instance.
112 @retval TRUE The FMP device lock action is required at lock event guid.
113 @retval FALSE Do not perform FMP device lock at lock event guid.
118 CapsuleUpdatePolicyIsLockFmpDeviceAtLockEventGuidRequired (
119 IN EDKII_CAPSULE_UPDATE_POLICY_PROTOCOL
*This
123 The user Entry Point for module CapsuleUpdatePolicyDxe. The user code starts
126 @param[in] ImageHandle The firmware allocated handle for the EFI image.
127 @param[in] SystemTable A pointer to the EFI System Table.
129 @retval EFI_SUCCESS The entry point is executed successfully.
130 @retval other Some error occurs when executing this entry point.
135 CapsuleUpdatePolicyInitialize (
136 IN EFI_HANDLE ImageHandle
,
137 IN EFI_SYSTEM_TABLE
*SystemTable