From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id E313ED811BC for ; Fri, 9 Feb 2024 13:26:00 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=UELAD4aK6Uugbr+X77puY1nmZrrlb1pbK0fk9RvuPYg=; c=relaxed/simple; d=groups.io; h=Message-ID:Date:MIME-Version:User-Agent:Subject:From:To:Cc:References:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1707485159; v=1; b=MX+ck0PKi6zR36gwbU6sgMgPvX8loeaFbsc8EuQoYziVmigojpcKz0xupSJvVb1SGabcp3LM TPzlWPQ30k0ETXOPj9mLyUZQ91SVbYJBWj2Mt18A6Q5zyBAL6jDY+ojInBacmSUEDoEnbg/NZFo xrcri3Y3xXt9Cas6NcBhhGvY= X-Received: by 127.0.0.2 with SMTP id O4SQYY7687511xSXQxXzljqt; Fri, 09 Feb 2024 05:25:59 -0800 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.11175.1707485158525321905 for ; Fri, 09 Feb 2024 05:25:58 -0800 X-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 397ADDA7; Fri, 9 Feb 2024 05:26:40 -0800 (PST) X-Received: from [10.57.47.170] (unknown [10.57.47.170]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D04D53F762; Fri, 9 Feb 2024 05:25:56 -0800 (PST) Message-ID: <14f3a4de-dd3c-4abf-b3db-d46b365ed093@arm.com> Date: Fri, 9 Feb 2024 14:25:54 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [edk2-devel] [RFC PATCH 1/1] ArmPkg,MdePkg: move ArmLib.h to MdePkg From: "PierreGondois" To: Leif Lindholm , devel@edk2.groups.io Cc: Jiewen Yao , Ard Biesheuvel , Liming Gao , Michael D Kinney , Sami Mujawar , Zhiguang Liu References: <20231121164228.766299-1-quic_llindhol@quicinc.com> <4951c86b-ecd8-4253-95e7-ceb00b8192b9@arm.com> In-Reply-To: <4951c86b-ecd8-4253-95e7-ceb00b8192b9@arm.com> Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,pierre.gondois@arm.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: MRbP4OfY2fFPSpgXWP7KfDHEx7686176AA= Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=MX+ck0PK; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=arm.com (policy=none) Hello, I was wondering if moving ArmLib.h to the MdePkg was still considered ? Regards, Pierre On 12/21/23 12:13, Pierre Gondois wrote: > Hello Leif, >=20 > I think the following files: > - ArmPkg/Include/Chipset/AArch64.h > - ArmPkg/Include/Chipset/AArch64Mmu.h > - ArmPkg/Include/Chipset/ArmV7.h > - ArmPkg/Include/Chipset/ArmV7Mmu.h > also need to be moved to the MdePkg. Otherwise the MdePkg > would depend on the ArmPkg, cf. ArmLib.h: >=20 > #ifdef MDE_CPU_ARM > #include > #elif defined (MDE_CPU_AARCH64) > #include >=20 > Depending on where these files are placed in the MdePkg, this > might imply some renaming to include them. Meaning that all > #include > might need to be renamed > #include <[New path]/AArch64.h> > but it should be ok. >=20 > A ArmLibNull.inf library might also need to be created. If the > OpensslLibFullAccel.inf module will depend on the ArmLib library, > a Null implementation will be necessary for non-Arm architectures. >=20 > Otherwise I could apply and run the CryptoPkg/Arm native instructions > patchset on top of this patch. >=20 > --- >=20 > As a side note, it also seems that: > - ArmPkg/Include/Chipset/ArmCortexA5x.h > isn't used anymore in edk2/edk2-platorms > - ArmPkg/Include/Chipset/ArmCortexA9.h > is barely used in edk2-platforms. > Maybe the files should have been removed/simplified as part of > - cffa7925a293 ("ArmPkg: remove ArmCpuLib header and implementations") > - a913ad02479d ("ArmPlatformPkg: remove ArmVExpressPkg") >=20 > Regards, > Pierre >=20 > On 11/21/23 17:42, Leif Lindholm wrote: >> Related to https://bugzilla.tianocore.org/show_bug.cgi?id=3D4121, but no= t >> resolving it. (Nearly?) all of ArmPkg describes industry standard >> behaviour, and hence according to general rules, ought to live in MdePkg= . >> >> Addressing this will however be a substantial task. >> Take a first step by moving the ArmLib interface definition to MdePkg, >> as discussed in >> https://edk2.groups.io/g/devel/topic/patch_v5_2_6/102725178 >> >> Cc: Pierre Gondois >> Cc: Jiewen Yao >> Cc: Ard Biesheuvel >> Cc: Liming Gao >> Cc: Michael D Kinney >> Cc: Sami Mujawar >> Cc: Zhiguang Liu >> Signed-off-by: Leif Lindholm >> --- >> >> This should have no functional differences (and the set of >> platforms I have test built didn't find any problems). >> This may result in some modules depending on ArmPkg only >> for ArmLib now being able to drop ArmPkg dependency. >> >> ArmPkg/ArmPkg.dec | 4 ---- >> MdePkg/MdePkg.dec | 5 +++++ >> {ArmPkg =3D> MdePkg}/Include/Library/ArmLib.h | 0 >> Maintainers.txt | 6 ++++++ >> 4 files changed, 11 insertions(+), 4 deletions(-) >> >> diff --git a/ArmPkg/ArmPkg.dec b/ArmPkg/ArmPkg.dec >> index 7fe2b9bca43b..4ce59f3e1fbd 100644 >> --- a/ArmPkg/ArmPkg.dec >> +++ b/ArmPkg/ArmPkg.dec >> @@ -50,10 +50,6 @@ [LibraryClasses.common] >> # >> ArmHvcLib|Include/Library/ArmHvcLib.h >> =20 >> - ## @libraryclass Provides an interface to Arm registers. >> - # >> - ArmLib|Include/Library/ArmLib.h >> - >> ## @libraryclass Provides a Mmu interface. >> # >> ArmMmuLib|Include/Library/ArmMmuLib.h >> diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec >> index ac54338089e8..78e18ee444cd 100644 >> --- a/MdePkg/MdePkg.dec >> +++ b/MdePkg/MdePkg.dec >> @@ -339,6 +339,11 @@ [LibraryClasses.RISCV64] >> ## @libraryclass Provides function to make ecalls to SBI >> BaseRiscVSbiLib|Include/Library/BaseRiscVSbiLib.h >> =20 >> +[LibraryClasses.ARM, LibraryClasses.AARCH64] >> + ## @libraryclass Provides an interface to Arm registers. >> + # >> + ArmLib|Include/Library/ArmLib.h >> + >> [Guids] >> # >> # GUID defined in UEFI2.1/UEFI2.0/EFI1.1 >> diff --git a/ArmPkg/Include/Library/ArmLib.h b/MdePkg/Include/Library/Ar= mLib.h >> similarity index 100% >> rename from ArmPkg/Include/Library/ArmLib.h >> rename to MdePkg/Include/Library/ArmLib.h >> diff --git a/Maintainers.txt b/Maintainers.txt >> index 7c0b4cb58cfd..0315fa23dfce 100644 >> --- a/Maintainers.txt >> +++ b/Maintainers.txt >> @@ -450,6 +450,12 @@ M: Abner Chang [changab] >> R: Abdul Lateef Attar [abdattar] >> R: Nickle Wang [nicklela] >> =20 >> +MdePkg: ARM/AARCH64 standard interfaces >> +F: MdePkg/Include/Library/ArmLib.h >> +M: Leif Lindholm [leiflindholm] >> +M: Ard Biesheuvel [ardbiesheuvel] >> +R: Sami Mujawar [samimujawar] >> + >> NetworkPkg >> F: NetworkPkg/ >> W: https://github.com/tianocore/tianocore.github.io/wiki/NetworkPkg -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#115303): https://edk2.groups.io/g/devel/message/115303 Mute This Topic: https://groups.io/mt/102731845/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-