public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "PierreGondois" <pierre.gondois@arm.com>
To: Leif Lindholm <quic_llindhol@quicinc.com>, devel@edk2.groups.io
Cc: Jiewen Yao <jiewen.yao@intel.com>,
	Ard Biesheuvel <ardb+tianocore@kernel.org>,
	Liming Gao <gaoliming@byosoft.com.cn>,
	Michael D Kinney <michael.d.kinney@intel.com>,
	Sami Mujawar <sami.mujawar@arm.com>,
	Zhiguang Liu <zhiguang.liu@intel.com>
Subject: Re: [edk2-devel] [RFC PATCH 1/1] ArmPkg,MdePkg: move ArmLib.h to MdePkg
Date: Mon, 12 Feb 2024 18:24:35 +0100	[thread overview]
Message-ID: <725dcaa0-8365-46d8-a6fe-f95b1d495518@arm.com> (raw)
In-Reply-To: <d1ab5235-1c6f-47b0-8b7c-a90318c5c3c8@quicinc.com>

Hello Leif,

On 2/9/24 16:29, Leif Lindholm wrote:
> Hi Pierre,
> 
> You appear to have stumbled onto one of those areas we haven't gotten
> around to cleaning up yet...
> 
> 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
> 
> If we moved these, I think we should also rename the latter two
> AArch32.h/AArch32Mmu.h.

Yes ok.

> 
>> also need to be moved to the MdePkg. Otherwise the MdePkg
>> would depend on the ArmPkg, cf. ArmLib.h:
>   >> #ifdef MDE_CPU_ARM
>>     #include <Chipset/ArmV7.h>
>> #elif defined (MDE_CPU_AARCH64)
>>     #include <Chipset/AArch64.h>
> 
> Sure.
> 
>> Depending on where these files are placed in the MdePkg, this
>> might imply some renaming to include them. Meaning that all
>>     #include <Chipset/AArch64.h>
>> might need to be renamed
>>     #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,
> 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/8801c75b4d77c2e6e06b3ddc8560e0db590f6342/CryptoPkg/CryptoPkg.dsc#L117

> 
>> 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
>>     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")
> 
> 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


-=-=-=-=-=-=-=-=-=-=-=-
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]
-=-=-=-=-=-=-=-=-=-=-=-



  reply	other threads:[~2024-02-12 17:24 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-21 16:42 [edk2-devel] [RFC PATCH 1/1] ArmPkg,MdePkg: move ArmLib.h to MdePkg Leif Lindholm
2023-12-21 11:13 ` PierreGondois
2024-02-09 13:25   ` PierreGondois
2024-02-09 15:05     ` Leif Lindholm
2024-02-09 15:29   ` Leif Lindholm
2024-02-12 17:24     ` PierreGondois [this message]
2024-02-12 17:37       ` Leif Lindholm
2024-02-13  9:33         ` Sami Mujawar
2024-03-01  1:00         ` Yao, Jiewen
2024-03-01 11:45           ` Leif Lindholm
2024-03-01 15:04             ` Yao, Jiewen
2024-03-11 17:02             ` PierreGondois

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=725dcaa0-8365-46d8-a6fe-f95b1d495518@arm.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox