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.769.1664553960035993043 for ; Fri, 30 Sep 2022 09:06:00 -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 631DA24C0; Fri, 30 Sep 2022 09:06:06 -0700 (PDT) Received: from pierre123.nice.arm.com (pierre123.nice.arm.com [10.34.100.116]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 4D6543F792; Fri, 30 Sep 2022 09:05:58 -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 Subject: [PATCH v6 05/19] ArmPkg/ArmHvcLibNull: Add NULL instance of ArmHvcLib Date: Fri, 30 Sep 2022 18:05:18 +0200 Message-Id: <20220930160532.2921381-6-Pierre.Gondois@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220930160532.2921381-1-Pierre.Gondois@arm.com> References: <20220930160532.2921381-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/ArmHvcLibNull/ArmHvcLibNull.c | 29 +++++++++++++++++++ .../Library/ArmHvcLibNull/ArmHvcLibNull.inf | 22 ++++++++++++++ 3 files changed, 52 insertions(+) create mode 100644 ArmPkg/Library/ArmHvcLibNull/ArmHvcLibNull.c create mode 100644 ArmPkg/Library/ArmHvcLibNull/ArmHvcLibNull.inf diff --git a/ArmPkg/ArmPkg.dsc b/ArmPkg/ArmPkg.dsc index 13e20a258e9e..11b473974463 100644 --- a/ArmPkg/ArmPkg.dsc +++ b/ArmPkg/ArmPkg.dsc @@ -132,6 +132,7 @@ [Components.common] ArmPkg/Library/ArmGenericTimerVirtCounterLib/ArmGenericTimerVirtCounte= rLib.inf =20 ArmPkg/Library/ArmHvcLib/ArmHvcLib.inf + ArmPkg/Library/ArmHvcLibNull/ArmHvcLibNull.inf ArmPkg/Library/ArmMonitorLib/ArmMonitorLib.inf ArmPkg/Library/ArmSmcLib/ArmSmcLib.inf ArmPkg/Library/ArmSmcLibNull/ArmSmcLibNull.inf diff --git a/ArmPkg/Library/ArmHvcLibNull/ArmHvcLibNull.c b/ArmPkg/Librar= y/ArmHvcLibNull/ArmHvcLibNull.c new file mode 100644 index 000000000000..8edda01a7f0a --- /dev/null +++ b/ArmPkg/Library/ArmHvcLibNull/ArmHvcLibNull.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/ArmHvcLibNull/ArmHvcLibNull.inf b/ArmPkg/Libr= ary/ArmHvcLibNull/ArmHvcLibNull.inf new file mode 100644 index 000000000000..e390a5fbbe21 --- /dev/null +++ b/ArmPkg/Library/ArmHvcLibNull/ArmHvcLibNull.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 1.29 + BASE_NAME =3D ArmHvcLibNull + FILE_GUID =3D 02076A46-D6DB-48DD-8E5F-153172DD73A= 1 + MODULE_TYPE =3D BASE + VERSION_STRING =3D 1.0 + LIBRARY_CLASS =3D ArmHvcLib + +[Sources] + ArmHvcLibNull.c + +[Packages] + ArmPkg/ArmPkg.dec + MdePkg/MdePkg.dec --=20 2.25.1