aboutsummaryrefslogtreecommitdiffstats
path: root/roms/edk2/SecurityPkg/Library/RpmcLibNull
diff options
context:
space:
mode:
Diffstat (limited to 'roms/edk2/SecurityPkg/Library/RpmcLibNull')
-rw-r--r--roms/edk2/SecurityPkg/Library/RpmcLibNull/RpmcLibNull.c47
-rw-r--r--roms/edk2/SecurityPkg/Library/RpmcLibNull/RpmcLibNull.inf33
2 files changed, 80 insertions, 0 deletions
diff --git a/roms/edk2/SecurityPkg/Library/RpmcLibNull/RpmcLibNull.c b/roms/edk2/SecurityPkg/Library/RpmcLibNull/RpmcLibNull.c
new file mode 100644
index 000000000..e1dd09eb1
--- /dev/null
+++ b/roms/edk2/SecurityPkg/Library/RpmcLibNull/RpmcLibNull.c
@@ -0,0 +1,47 @@
+/** @file
+ NULL RpmcLib instance for build purpose.
+
+Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>
+SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#include <Library/DebugLib.h>
+#include <Library/RpmcLib.h>
+
+/**
+ Requests the monotonic counter from the designated RPMC counter.
+
+ @param[out] CounterValue A pointer to a buffer to store the RPMC value.
+
+ @retval EFI_SUCCESS The operation completed successfully.
+ @retval EFI_DEVICE_ERROR A device error occurred while attempting to update the counter.
+ @retval EFI_UNSUPPORTED The operation is un-supported.
+**/
+EFI_STATUS
+EFIAPI
+RequestMonotonicCounter (
+ OUT UINT32 *CounterValue
+ )
+{
+ ASSERT (FALSE);
+ return EFI_UNSUPPORTED;
+}
+
+/**
+ Increments the monotonic counter in the SPI flash device by 1.
+
+ @retval EFI_SUCCESS The operation completed successfully.
+ @retval EFI_DEVICE_ERROR A device error occurred while attempting to update the counter.
+ @retval EFI_UNSUPPORTED The operation is un-supported.
+**/
+EFI_STATUS
+EFIAPI
+IncrementMonotonicCounter (
+ VOID
+ )
+{
+ ASSERT (FALSE);
+ return EFI_UNSUPPORTED;
+}
+
diff --git a/roms/edk2/SecurityPkg/Library/RpmcLibNull/RpmcLibNull.inf b/roms/edk2/SecurityPkg/Library/RpmcLibNull/RpmcLibNull.inf
new file mode 100644
index 000000000..500edfa87
--- /dev/null
+++ b/roms/edk2/SecurityPkg/Library/RpmcLibNull/RpmcLibNull.inf
@@ -0,0 +1,33 @@
+## @file
+# Provides Null version of RpmcLib for build purpose.
+#
+# Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>
+# SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+##
+
+[Defines]
+ INF_VERSION = 0x00010029
+ BASE_NAME = RpmcLibNull
+ FILE_GUID = FAE0BA22-92E2-4334-8F0F-96AFF9BAE360
+ MODULE_TYPE = BASE
+ VERSION_STRING = 1.0
+ LIBRARY_CLASS = RpmcLib
+
+#
+# The following information is for reference only and not required by the build tools.
+#
+# VALID_ARCHITECTURES = IA32 X64 Arm AArch64
+#
+
+[Sources]
+ RpmcLibNull.c
+
+[Packages]
+ MdePkg/MdePkg.dec
+ SecurityPkg/SecurityPkg.dec
+
+[LibraryClasses]
+ BaseLib
+ DebugLib
+