RpmcLib.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /** @file
  2. Public definitions for the Replay Protected Monotonic Counter (RPMC) Library.
  3. Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>
  4. SPDX-License-Identifier: BSD-2-Clause-Patent
  5. **/
  6. #ifndef _RPMC_LIB_H_
  7. #define _RPMC_LIB_H_
  8. #include <Uefi/UefiBaseType.h>
  9. /**
  10. Requests the monotonic counter from the designated RPMC counter.
  11. @param[out] CounterValue A pointer to a buffer to store the RPMC value.
  12. @retval EFI_SUCCESS The operation completed successfully.
  13. @retval EFI_DEVICE_ERROR A device error occurred while attempting to update the counter.
  14. @retval EFI_UNSUPPORTED The operation is un-supported.
  15. **/
  16. EFI_STATUS
  17. EFIAPI
  18. RequestMonotonicCounter (
  19. OUT UINT32 *CounterValue
  20. );
  21. /**
  22. Increments the monotonic counter in the SPI flash device by 1.
  23. @retval EFI_SUCCESS The operation completed successfully.
  24. @retval EFI_DEVICE_ERROR A device error occurred while attempting to update the counter.
  25. @retval EFI_UNSUPPORTED The operation is un-supported.
  26. **/
  27. EFI_STATUS
  28. EFIAPI
  29. IncrementMonotonicCounter (
  30. VOID
  31. );
  32. #endif