CapsuleUpdatePolicyLib.h 3.3 KB

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