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 4CCC9AC17A9 for ; Mon, 12 Feb 2024 17:24:45 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=dz49YHR/diORgf0z43l/VHHb3mcS/Bcnjkl6Gn+hq4A=; 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=1707758683; v=1; b=PN+EnV1+H5HTDooNi3JZ/H6eAzWrhHyx5fAoz1ciifBtVLM7IZFjxXw3cxN+TwgZzUbk90B9 4jVIZ1VfZB4Q7wu+5RrIs19zAr0L3p0+Jz8oPt01rJRmXCOa6UEmXd4dwLpA6aLqBw7ufs6LJ4a yNdQJ+6nFOGkHGUBOLegqRkw= X-Received: by 127.0.0.2 with SMTP id FRyhYY7687511xrdAZ0p5T7y; Mon, 12 Feb 2024 09:24:43 -0800 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.12445.1707758681830428985 for ; Mon, 12 Feb 2024 09:24:42 -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 E214DDA7; Mon, 12 Feb 2024 09:25:21 -0800 (PST) X-Received: from [10.34.100.133] (e126645.nice.arm.com [10.34.100.133]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 8252C3F5A1; Mon, 12 Feb 2024 09:24:39 -0800 (PST) Message-ID: <725dcaa0-8365-46d8-a6fe-f95b1d495518@arm.com> Date: Mon, 12 Feb 2024 18:24:35 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [edk2-devel] [RFC PATCH 1/1] ArmPkg,MdePkg: move ArmLib.h to MdePkg 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> From: "PierreGondois" In-Reply-To: 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: FG3FxMbDjQrbHHqaAvex3AGex7686176AA= 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=PN+EnV1+; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=arm.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io Hello Leif, On 2/9/24 16:29, Leif Lindholm wrote: > Hi Pierre, >=20 > You appear to have stumbled onto one of those areas we haven't gotten > around to cleaning up yet... >=20 > On 2023-12-21 11: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 >=20 > If we moved these, I think we should also rename the latter two > AArch32.h/AArch32Mmu.h. Yes ok. >=20 >> 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 >=20 > Sure. >=20 >> 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. >=20 > An annoyance, but an improvement. >=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 > Can ArmLib be declared under a [LibraryClasses.AArch64, > LibraryClasses.ARM]? Have I forgotten something that we discussed back > in ... November? From [1], it seems the MdePkg/CryptoPkg should build without a dependency on the ArmPkg. This is currently not really the case. cf. [2]. However, having a ArmLibNull implementation in the MdePkg would allow to avoid going in this direction when providing libraries to CryptoPkg.dsc. (Just in case, I think this ArmLibNull is a minor point.) [1] https://edk2.groups.io/g/devel/message/111545 [2] https://github.com/tianocore/edk2/blob/8801c75b4d77c2e6e06b3ddc8560e0db= 590f6342/CryptoPkg/CryptoPkg.dsc#L117 >=20 >> 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 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") >=20 > I think you're right. > Well, ArmCortexA9.h is still *used*, but I can't imagine the Arm branch > of ArmVExpressLib has been build by anyone for some time. And surely the > inclusion of ArmVExpressLibSec in ArmVExpress-FVP-AArch64.dsc is > superfluous (such that that .inf can be deleted)? The file could just be moved in the Library. I assume you/Sami/Ard will know more on the usage of the library itself, Regards, Pierre -=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 (#115367): https://edk2.groups.io/g/devel/message/115367 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-