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 019FDD811CC for ; Fri, 9 Feb 2024 15:06:09 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=fuyXv7RfIMWa+nr/XmwI07MCQYg/KqjFX7RBOJEdJrM=; 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=1707491168; v=1; b=L7SxqgWL7IbT0R4p3ZVwGYnOIFskgXM5eK/kLv1PBxQ3jfNv0SsMrXWq49O2Y8DZ93NnPydV oI3ZVAy4LcTWduW10riKNW33e2bJQnuHumaI9136OgA5nfhzfPAqjSZxIrrkpLMk/qrcJfcJW70 JDA5ceoZDbwSTyyn7eEIji1Q= X-Received: by 127.0.0.2 with SMTP id uA2FYY7687511xvkoWRjiEm7; Fri, 09 Feb 2024 07:06:08 -0800 X-Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by mx.groups.io with SMTP id smtpd.web11.14033.1707491167817404399 for ; Fri, 09 Feb 2024 07:06:07 -0800 X-Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 419De7M8023695; Fri, 9 Feb 2024 15:06:02 GMT X-Received: from nasanppmta02.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3w4wbvkcep-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 09 Feb 2024 15:06:01 +0000 (GMT) X-Received: from nasanex01c.na.qualcomm.com (nasanex01c.na.qualcomm.com [10.45.79.139]) by NASANPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 419F61Yb024076 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 9 Feb 2024 15:06:01 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:05:56 -0800 Message-ID: Date: Fri, 9 Feb 2024 15:05:54 +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> <14f3a4de-dd3c-4abf-b3db-d46b365ed093@arm.com> From: "Leif Lindholm" In-Reply-To: <14f3a4de-dd3c-4abf-b3db-d46b365ed093@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: j0rLX7e-aFoElxvR2u3A7Z6I5r2j993U X-Proofpoint-ORIG-GUID: j0rLX7e-aFoElxvR2u3A7Z6I5r2j993U X-MIME-Autoconverted: from 8bit to quoted-printable by mx0a-0031df01.pphosted.com id 419De7M8023695 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: uoOBPZdGOE3Vox7S2VHX3RoCx7686176AA= 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=L7SxqgWL; 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) Apologies, I think your original email got lost in my "just after going=20 on christmas holidays dead zone" which I managed to mess up my read=20 staus on... Let me dig up that one and respond there. / Leif On 2024-02-09 13:25, Pierre Gondois wrote: > Hello, > I was wondering if moving ArmLib.h to the MdePkg was still considered ? >=20 > Regards, > Pierre >=20 > On 12/21/23 12:13, Pierre Gondois wrote: >> Hello Leif, >> >> 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: >> >> #ifdef MDE_CPU_ARM >> =C2=A0=C2=A0=C2=A0 #include >> #elif defined (MDE_CPU_AARCH64) >> =C2=A0=C2=A0=C2=A0 #include >> >> Depending on where these files are placed in the MdePkg, this >> might imply some renaming to include them. Meaning that all >> =C2=A0=C2=A0=C2=A0 #include >> might need to be renamed >> =C2=A0=C2=A0=C2=A0 #include <[New path]/AArch64.h> >> but it should be ok. >> >> 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. >> >> Otherwise I could apply and run the CryptoPkg/Arm native instructions >> patchset on top of this patch. >> >> --- >> >> As a side note, it also seems that: >> - ArmPkg/Include/Chipset/ArmCortexA5x.h >> =C2=A0=C2=A0=C2=A0 isn't used anymore in edk2/edk2-platorms >> - ArmPkg/Include/Chipset/ArmCortexA9.h >> =C2=A0=C2=A0=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") >> >> Regards, >> Pierre >> >> On 11/21/23 17:42, Leif Lindholm wrote: >>> Related to https://bugzilla.tianocore.org/show_bug.cgi?id=3D4121, but n= ot >>> resolving it. (Nearly?) all of ArmPkg describes industry standard >>> behaviour, and hence according to general rules, ought to live in=20 >>> 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=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=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=C2=A0 {ArmPkg =3D> MdePkg}/Include/Library/ArmLib.h | 0 >>> =C2=A0=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=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=C2=A0=C2=A0 ArmHvcLib|Include/Library/ArmHvcLib.h >>> -=C2=A0 ##=C2=A0 @libraryclass=C2=A0 Provides an interface to Arm regis= ters. >>> -=C2=A0 # >>> -=C2=A0 ArmLib|Include/Library/ArmLib.h >>> - >>> =C2=A0=C2=A0=C2=A0=C2=A0 ##=C2=A0 @libraryclass=C2=A0 Provides a Mmu in= terface. >>> =C2=A0=C2=A0=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 ##=C2=A0 @libraryclass=C2=A0 Provides function= to make ecalls to SBI >>> =C2=A0=C2=A0=C2=A0=C2=A0 BaseRiscVSbiLib|Include/Library/BaseRiscVSbiLi= b.h >>> +[LibraryClasses.ARM, LibraryClasses.AARCH64] >>> +=C2=A0 ##=C2=A0 @libraryclass=C2=A0 Provides an interface to Arm regis= ters. >>> +=C2=A0 # >>> +=C2=A0 ArmLib|Include/Library/ArmLib.h >>> + >>> =C2=A0=C2=A0 [Guids] >>> =C2=A0=C2=A0=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=C2=A0 R: Abdul Lateef Attar [abdatta= r] >>> =C2=A0=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=C2=A0 NetworkPkg >>> =C2=A0=C2=A0 F: NetworkPkg/ >>> =C2=A0=C2=A0 W: https://github.com/tianocore/tianocore.github.io/wiki/N= etworkPkg -=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 (#115306): https://edk2.groups.io/g/devel/message/115306 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-