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 B4BD6D811A7 for ; Fri, 9 Feb 2024 15:29:52 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=hLkg5yE6EBFowceRynaGWlQhK+dkUMQbr+r/J+efuwI=; c=relaxed/simple; d=groups.io; h=Message-ID:Date:MIME-Version:User-Agent:Subject:To:CC:References:From: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=1707492591; v=1; b=vRTuKPOrzc4TXHgrgdzAlCqfw1ua6wXIceoCJbbAsef3ds7K1yPJTxF2D2VPL0od377SvENU KK87LXG54AsUxLTN9h/Ej5UzyL6xHX33o/N8hElDJV7W8DsHc65QWpWHu4UQZYVfrmYe3KpjaLG t7W9dpKxfBHjtBzYZrUlGthw= X-Received: by 127.0.0.2 with SMTP id Z0xbYY7687511xUvEC9LTniZ; Fri, 09 Feb 2024 07:29:51 -0800 X-Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by mx.groups.io with SMTP id smtpd.web11.14580.1707492590498211425 for ; Fri, 09 Feb 2024 07:29:50 -0800 X-Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 419ExaE8028747; Fri, 9 Feb 2024 15:29:39 GMT X-Received: from nasanppmta04.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3w5pa102ap-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 09 Feb 2024 15:29:39 +0000 (GMT) X-Received: from nasanex01c.na.qualcomm.com (nasanex01c.na.qualcomm.com [10.45.79.139]) by NASANPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 419FTciG015325 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 9 Feb 2024 15:29:38 GMT X-Received: from [10.111.139.3] (10.80.80.8) by nasanex01c.na.qualcomm.com (10.45.79.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Fri, 9 Feb 2024 07:29:36 -0800 Message-ID: Date: Fri, 9 Feb 2024 15:29:34 +0000 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [edk2-devel] [RFC PATCH 1/1] ArmPkg,MdePkg: move ArmLib.h to MdePkg To: Pierre Gondois , 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> From: "Leif Lindholm" In-Reply-To: <4951c86b-ecd8-4253-95e7-ceb00b8192b9@arm.com> X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nasanex01c.na.qualcomm.com (10.45.79.139) X-QCInternal: smtphost X-Proofpoint-GUID: 0dCQQ82sR1NP1QiH52nfmo0w1HGOx-LQ X-Proofpoint-ORIG-GUID: 0dCQQ82sR1NP1QiH52nfmo0w1HGOx-LQ X-MIME-Autoconverted: from 8bit to quoted-printable by mx0a-0031df01.pphosted.com id 419ExaE8028747 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,quic_llindhol@quicinc.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: kjqmg5HQkzUB4KxsJ2SIOR6dx7686176AA= Content-Language: en-GB 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=vRTuKPOr; 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=quicinc.com (policy=none) Hi Pierre, You appear to have stumbled onto one of those areas we haven't gotten=20 around to cleaning up yet... On 2023-12-21 11: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 If we moved these, I think we should also rename the latter two=20 AArch32.h/AArch32Mmu.h. > also need to be moved to the MdePkg. Otherwise the MdePkg > would depend on the ArmPkg, cf. ArmLib.h: >> #ifdef MDE_CPU_ARM > =C2=A0 #include > #elif defined (MDE_CPU_AARCH64) > =C2=A0 #include Sure. > Depending on where these files are placed in the MdePkg, this > might imply some renaming to include them. Meaning that all > =C2=A0 #include > might need to be renamed > =C2=A0 #include <[New path]/AArch64.h> > but it should be ok. An annoyance, but an improvement. > 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. Can ArmLib be declared under a [LibraryClasses.AArch64,=20 LibraryClasses.ARM]? Have I forgotten something that we discussed back=20 in ... November? > 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 > =C2=A0 isn't used anymore in edk2/edk2-platorms > - ArmPkg/Include/Chipset/ArmCortexA9.h > =C2=A0 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") I think you're right. Well, ArmCortexA9.h is still *used*, but I can't imagine the Arm branch=20 of ArmVExpressLib has been build by anyone for some time. And surely the=20 inclusion of ArmVExpressLibSec in ArmVExpress-FVP-AArch64.dsc is=20 superfluous (such that that .inf can be deleted)? Regards, Leif > 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. >> >> =C2=A0 ArmPkg/ArmPkg.dec=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 | 4 ---- >> =C2=A0 MdePkg/MdePkg.dec=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 | 5 +++++ >> =C2=A0 {ArmPkg =3D> MdePkg}/Include/Library/ArmLib.h | 0 >> =C2=A0 Maintainers.txt=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 | 6 ++++++ >> =C2=A0 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] >> =C2=A0=C2=A0=C2=A0 # >> =C2=A0=C2=A0=C2=A0 ArmHvcLib|Include/Library/ArmHvcLib.h >> -=C2=A0 ##=C2=A0 @libraryclass=C2=A0 Provides an interface to Arm regist= ers. >> -=C2=A0 # >> -=C2=A0 ArmLib|Include/Library/ArmLib.h >> - >> =C2=A0=C2=A0=C2=A0 ##=C2=A0 @libraryclass=C2=A0 Provides a Mmu interface= . >> =C2=A0=C2=A0=C2=A0 # >> =C2=A0=C2=A0=C2=A0 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] >> =C2=A0=C2=A0=C2=A0 ##=C2=A0 @libraryclass=C2=A0 Provides function to mak= e ecalls to SBI >> =C2=A0=C2=A0=C2=A0 BaseRiscVSbiLib|Include/Library/BaseRiscVSbiLib.h >> +[LibraryClasses.ARM, LibraryClasses.AARCH64] >> +=C2=A0 ##=C2=A0 @libraryclass=C2=A0 Provides an interface to Arm regist= ers. >> +=C2=A0 # >> +=C2=A0 ArmLib|Include/Library/ArmLib.h >> + >> =C2=A0 [Guids] >> =C2=A0=C2=A0=C2=A0 # >> =C2=A0=C2=A0=C2=A0 # GUID defined in UEFI2.1/UEFI2.0/EFI1.1 >> diff --git a/ArmPkg/Include/Library/ArmLib.h=20 >> b/MdePkg/Include/Library/ArmLib.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] >> =C2=A0 R: Abdul Lateef Attar [abdattar] >> =C2=A0 R: Nickle Wang [nicklela] >> +MdePkg: ARM/AARCH64 standard interfaces >> +F: MdePkg/Include/Library/ArmLib.h >> +M: Leif Lindholm [leiflindholm] >> +M: Ard Biesheuvel [ardbiesheuvel] >> +R: Sami Mujawar [samimujawar] >> + >> =C2=A0 NetworkPkg >> =C2=A0 F: NetworkPkg/ >> =C2=A0 W: https://github.com/tianocore/tianocore.github.io/wiki/NetworkP= kg -=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 (#115307): https://edk2.groups.io/g/devel/message/115307 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-