On 2022-09-19 12:21, pierre.gond...@arm.com wrote:
From: Pierre Gondois <pierre.gond...@arm.com>
Add a Null instance of ArmHvcLib in case of library dependencies.
Signed-off-by: Pierre Gondois <pierre.gond...@arm.com>
---
ArmPkg/ArmPkg.dsc | 1 +
ArmPkg/Library/ArmHvcNullLib/ArmHvcNullLib.c | 29 +++++++++++++++++++
.../Library/ArmHvcNullLib/ArmHvcNullLib.inf | 22 ++++++++++++++
3 files changed, 52 insertions(+)
create mode 100644 ArmPkg/Library/ArmHvcNullLib/ArmHvcNullLib.c
create mode 100644 ArmPkg/Library/ArmHvcNullLib/ArmHvcNullLib.inf
I think the name of the library, source files and library class should
be ArmHvcLibNull rather than ArmHvcNullLib - to match existing code.
diff --git a/ArmPkg/ArmPkg.dsc b/ArmPkg/ArmPkg.dsc
index 3afd212f472b..e33b40f2c215 100644
--- a/ArmPkg/ArmPkg.dsc
+++ b/ArmPkg/ArmPkg.dsc
@@ -134,6 +134,7 @@ [Components.common]
ArmPkg/Library/ArmSmcLib/ArmSmcLib.inf
ArmPkg/Library/ArmSmcLibNull/ArmSmcLibNull.inf
ArmPkg/Library/ArmHvcLib/ArmHvcLib.inf
+ ArmPkg/Library/ArmHvcNullLib/ArmHvcNullLib.inf
Please sort alphabetically.
ArmPkg/Library/ArmSvcLib/ArmSvcLib.inf
ArmPkg/Library/ArmMonitorLib/ArmMonitorLib.inf
ArmPkg/Library/OpteeLib/OpteeLib.inf
diff --git a/ArmPkg/Library/ArmHvcNullLib/ArmHvcNullLib.c
b/ArmPkg/Library/ArmHvcNullLib/ArmHvcNullLib.c
new file mode 100644
index 000000000000..6905631ccb6c
--- /dev/null
+++ b/ArmPkg/Library/ArmHvcNullLib/ArmHvcNullLib.c
@@ -0,0 +1,29 @@
+/** @file
+ Arm HyperVisor Call (HVC) Null Library.
+
+ Copyright (c) 2022, Arm Limited. All rights reserved.<BR>
+
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#include <Library/DebugLib.h>
+#include <Library/ArmHvcLib.h>
Please sort alphabetically.
/
Leif
+
+/**
+ Trigger an HVC call
+
+ HVC calls can take up to 8 arguments and return up to 4 return values.
+ Therefore, the 4 first fields in the ARM_HVC_ARGS structure are used
+ for both input and output values.
+
+ @param [in, out] Args Arguments for the HVC call.
+**/
+VOID
+ArmCallHvc (
+ IN OUT ARM_HVC_ARGS *Args
+ )
+{
+ ASSERT (FALSE);
+ return;
+}
diff --git a/ArmPkg/Library/ArmHvcNullLib/ArmHvcNullLib.inf
b/ArmPkg/Library/ArmHvcNullLib/ArmHvcNullLib.inf
new file mode 100644
index 000000000000..c4665d34018b
--- /dev/null
+++ b/ArmPkg/Library/ArmHvcNullLib/ArmHvcNullLib.inf
@@ -0,0 +1,22 @@
+## @file
+# Arm Hvc Null Library
+#
+# Copyright (c) 2022, Arm Limited. All rights reserved.<BR>
+#
+# SPDX-License-Identifier: BSD-2-Clause-Patent
+##
+
+[Defines]
+ INF_VERSION = 0x00010005
+ BASE_NAME = ArmHvcNullLib
+ FILE_GUID = 02076A46-D6DB-48DD-8E5F-153172DD73A1
+ MODULE_TYPE = BASE
+ VERSION_STRING = 1.0
+ LIBRARY_CLASS = ArmHvcLib
+
+[Sources]
+ ArmHvcNullLib.c
+
+[Packages]
+ ArmPkg/ArmPkg.dec
+ MdePkg/MdePkg.dec
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#94435): https://edk2.groups.io/g/devel/message/94435
Mute This Topic: https://groups.io/mt/93788867/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-