]> git.proxmox.com Git - mirror_edk2.git/blobdiff - SecurityPkg/Library/RpmcLibNull/RpmcLibNull.c
SecurityPkg: add null version of RpmcLib
[mirror_edk2.git] / SecurityPkg / Library / RpmcLibNull / RpmcLibNull.c
diff --git a/SecurityPkg/Library/RpmcLibNull/RpmcLibNull.c b/SecurityPkg/Library/RpmcLibNull/RpmcLibNull.c
new file mode 100644 (file)
index 0000000..e1dd09e
--- /dev/null
@@ -0,0 +1,47 @@
+/** @file\r
+  NULL RpmcLib instance for build purpose.\r
+\r
+Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>\r
+SPDX-License-Identifier: BSD-2-Clause-Patent\r
+\r
+**/\r
+\r
+#include <Library/DebugLib.h>\r
+#include <Library/RpmcLib.h>\r
+\r
+/**\r
+  Requests the monotonic counter from the designated RPMC counter.\r
+\r
+  @param[out]   CounterValue            A pointer to a buffer to store the RPMC value.\r
+\r
+  @retval       EFI_SUCCESS             The operation completed successfully.\r
+  @retval       EFI_DEVICE_ERROR        A device error occurred while attempting to update the counter.\r
+  @retval       EFI_UNSUPPORTED         The operation is un-supported.\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+RequestMonotonicCounter (\r
+  OUT UINT32  *CounterValue\r
+  )\r
+{\r
+  ASSERT (FALSE);\r
+  return EFI_UNSUPPORTED;\r
+}\r
+\r
+/**\r
+  Increments the monotonic counter in the SPI flash device by 1.\r
+\r
+  @retval       EFI_SUCCESS             The operation completed successfully.\r
+  @retval       EFI_DEVICE_ERROR        A device error occurred while attempting to update the counter.\r
+  @retval       EFI_UNSUPPORTED         The operation is un-supported.\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+IncrementMonotonicCounter (\r
+  VOID\r
+  )\r
+{\r
+  ASSERT (FALSE);\r
+  return EFI_UNSUPPORTED;\r
+}\r
+\r