From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web09.8492.1658500354976510612 for ; Fri, 22 Jul 2022 07:32:35 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: pierre.gondois@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 29BF91570; Fri, 22 Jul 2022 07:32:35 -0700 (PDT) Received: from pierre123.arm.com (pierre123.nice.arm.com [10.34.100.102]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 1A7E43F70D; Fri, 22 Jul 2022 07:32:32 -0700 (PDT) From: "PierreGondois" To: devel@edk2.groups.io Cc: Sami Mujawar , Leif Lindholm , Ard Biesheuvel , Rebecca Cran , Michael D Kinney , Liming Gao , Jiewen Yao , Jian J Wang , Pierre Gondois Subject: [PATCH v4 04/21] ArmPkg/ArmHvcNullLib: Add NULL instance of ArmHvcLib Date: Fri, 22 Jul 2022 16:31:36 +0200 Message-Id: <20220722143153.913585-5-Pierre.Gondois@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220722143153.913585-1-Pierre.Gondois@arm.com> References: <20220722143153.913585-1-Pierre.Gondois@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Pierre Gondois Add a Null instance of ArmHvcLib in case of library dependencies. Signed-off-by: Pierre Gondois --- 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 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 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/Librar= y/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.
+ + SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#include +#include + +/** + 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/Libr= ary/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.
+# +# SPDX-License-Identifier: BSD-2-Clause-Patent +## + +[Defines] + INF_VERSION =3D 0x00010005 + BASE_NAME =3D ArmHvcNullLib + FILE_GUID =3D 02076A46-D6DB-48DD-8E5F-153172DD73A= 1 + MODULE_TYPE =3D BASE + VERSION_STRING =3D 1.0 + LIBRARY_CLASS =3D ArmHvcLib + +[Sources] + ArmHvcNullLib.c + +[Packages] + ArmPkg/ArmPkg.dec + MdePkg/MdePkg.dec --=20 2.25.1