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