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 9A02E740032 for ; Fri, 10 Nov 2023 03:32:11 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=nfclCmlysx3m2z3zbusZ1jHHf8o0snTzonqwTeAzcgQ=; 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-Type; s=20140610; t=1699587130; v=1; b=aXlUvvMfNFhY0iBAc+h2Og8aKY2eaO+11FPIXjayzxYVYuGRF2SBOBnaRkU/tfNEdjrm5DEJ TsHgqORy2VrhuKD+20I/PNNJ9asHdVfp0R6buXiG0bJ+WJHgFQ5t9sIx/9c2WiV+1psFji4WpkR CDbQ/zDEiP5FxDTdt/gxHi0Q= X-Received: by 127.0.0.2 with SMTP id IGaaYY7687511xDM7zcIUi9d; Thu, 09 Nov 2023 19:32:10 -0800 X-Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by mx.groups.io with SMTP id smtpd.web11.20833.1699587127634304410 for ; Thu, 09 Nov 2023 19:32:08 -0800 X-Received: from loongson.cn (unknown [10.40.24.149]) by gateway (Coremail) with SMTP id _____8BxpPAypE1lbZ44AA--.46010S3; Fri, 10 Nov 2023 11:32:02 +0800 (CST) X-Received: from [10.40.24.149] (unknown [10.40.24.149]) by localhost.localdomain (Coremail) with SMTP id AQAAf8DxiuQupE1l8bE9AA--.5270S3; Fri, 10 Nov 2023 11:31:59 +0800 (CST) Message-ID: <48e4de78-5baa-4a4a-9979-65a37199c0d2@loongson.cn> Date: Fri, 10 Nov 2023 11:31:58 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [edk2-devel] [PATCH v2 17/30] OvmfPkg/LoongArchVirt: Add PciCpuIo2Dxe module To: Sunil V L , devel@edk2.groups.io Cc: kraxel@redhat.com, Ard Biesheuvel , Jiewen Yao , Jordan Justen , Xianglai Li , Bibo Mao , Gerd Hoffmann References: <20231106032521.2251143-1-lichao@loongson.cn> <20231106032920.2285574-1-lichao@loongson.cn> From: "Chao Li" In-Reply-To: X-CM-TRANSID: AQAAf8DxiuQupE1l8bE9AA--.5270S3 X-CM-SenderInfo: xolfxt3r6o00pqjv00gofq/1tbiAQALCGVNkykBJgABs2 X-Coremail-Antispam: 1Uk129KBj93XoW7Ww4DGF1DKF1xKw13Jw17twc_yoW8Zr1kpF sYqF98Cr1jqF42vFy0yw15ZFySgrsavF95tr90kr40qF9rJF93K34fGrn8A3yUWr1Ykw4j qr15Gw15XFy5WagCm3ZEXasCq-sJn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7KY7ZEXa sCq-sGcSsGvfJ3UbIjqfuFe4nvWSU5nxnvy29KBjDU0xBIdaVrnRJUUUyCb4IE77IF4wAF F20E14v26r1j6r4UM7CY07I20VC2zVCF04k26cxKx2IYs7xG6rWj6s0DM7CIcVAFz4kK6r 106r15M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48ve4kI8wA2z4x0Y4vE2Ix0cI8IcVAF wI0_JFI_Gr1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI0_Jr0_Gr1l84ACjcxK6I8E87Iv67 AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVCY1x0267AKxVW8Jr0_Cr1UM2AIxVAIcxkEcVAq 07x20xvEncxIr21l57IF6xkI12xvs2x26I8E6xACxx1lYx0E2Ix0cI8IcVAFwI0_Jr0_Jr 4lYx0Ex4A2jsIE14v26r1j6r4UMcvjeVCFs4IE7xkEbVWUJVW8JwACjcxG0xvEwIxGrwCj r7xvwVCIw2I0I7xG6c02F41l42xK82IYc2Ij64vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr 1lx2IqxVAqx4xG67AKxVWUGVWUWwC20s026x8GjcxK67AKxVWUGVWUWwC2zVAF1VAY17CE 14v26r1q6r43MIIYrxkI7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI0_Jr0_JF4lIxAIcVC0I7 IYx2IY6xkF7I0E14v26r1j6r4UMIIF0xvE42xK8VAvwI8IcIk0rVWUJVWUCwCI42IY6I8E 87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF7I0E14v26r1j6r4UYxBIdaVFxhVjvjDU0x ZFpf9x07UEFAJUUUUU= 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,lichao@loongson.cn List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: Jfn9NnjJBr8R3LUOPnAH0rj7x7686176AA= Content-Type: multipart/alternative; boundary="------------RGswoExOtbORilSJnMXTU4sP" X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=aXlUvvMf; dmarc=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 --------------RGswoExOtbORilSJnMXTU4sP Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Hi Sunil, Ok, I will give it try, I'm leaning towards moving this driver to UefiCpuPkg and merging it with CpuIo2Dxe with two "inf" files which will be named CpuIo2Dxe.inf and MmioCpu2Dxe.inf, do you think this way is better? Thanks, Chao 在 2023/11/9 07:11, Sunil V L 写道: > On Tue, Nov 07, 2023 at 06:03:43PM +0800, Chao Li wrote: >> Hi Gerd, >> >> Yes, you are right, this driver could probably be located somewhere else >> where other ARCH can easily use it, but I can not find the right place, >> maybe MdeModulePkg or MdePkg? I also feel that something is not quite right >> about these two places... >> > Hi Chao, > > It was in my TODO list and somehow never got time, is to migrate some of > these drivers and libraries to common place and use them instead of > copy. > > For ex: Move ArmPciCpuIo2Dxe to UefiCpuPkg/CpuIo2Dxe. Either merge with > CpuIo2Dxe or add something like MmioCpuIo2Dxe. I think you can take this > approach. > > The recommendation I got from Mike earlier was: > MdePkg for libraries, UefiCpuPkg for drivers and OvmfPkg for purely > Qemu specific. Adding new things in MdeModulePkg was not recommended. > > Thanks, > Sunil > >> Thanks, >> Chao >> 在 2023/11/7 17:42, Gerd Hoffmann 写道: >>> On Mon, Nov 06, 2023 at 11:29:20AM +0800, Chao Li wrote: >>>> Add PciCpuIo2Dxe for LoongArch, this module is similar to >>>> ArmPciCpuIo2Dxe drvier. >>> What are the differences to ArmPciCpuIo2Dxe? >>> On a quick glance I can't see anything arch-specific here. >>> >>> Maybe we should find a better place for ArmPciCpuIo2Dxe so loongarch >>> can use it without copying the code? >>> >>> take care, >>> Gerd >>> >>> >>> >>> >>> >> >> >> >> -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#111008): https://edk2.groups.io/g/devel/message/111008 Mute This Topic: https://groups.io/mt/102413880/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=- --------------RGswoExOtbORilSJnMXTU4sP Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit

Hi Sunil,

Ok, I will give it try, I'm leaning towards moving this driver to UefiCpuPkg and merging it with CpuIo2Dxe with two "inf" files which will be named CpuIo2Dxe.inf and MmioCpu2Dxe.inf, do you think this way is better?


Thanks,
Chao
在 2023/11/9 07:11, Sunil V L 写道:
On Tue, Nov 07, 2023 at 06:03:43PM +0800, Chao Li wrote:
Hi Gerd,

Yes, you are right, this driver could probably be located somewhere else
where other ARCH can easily use it, but I can not find the right place,
maybe MdeModulePkg or MdePkg? I also feel that something is not quite right
about these two places...

Hi Chao,

It was in my TODO list and somehow never got time, is to migrate some of
these drivers and libraries to common place and use them instead of
copy.

For ex: Move ArmPciCpuIo2Dxe to UefiCpuPkg/CpuIo2Dxe. Either merge with
CpuIo2Dxe or add something like MmioCpuIo2Dxe. I think you can take this
approach.

The recommendation I got from Mike earlier was:
MdePkg for libraries, UefiCpuPkg for drivers and OvmfPkg for purely
Qemu specific. Adding new things in MdeModulePkg was not recommended.

Thanks,
Sunil

Thanks,
Chao
在 2023/11/7 17:42, Gerd Hoffmann 写道:
On Mon, Nov 06, 2023 at 11:29:20AM +0800, Chao Li wrote:
Add PciCpuIo2Dxe for LoongArch, this module is similar to
ArmPciCpuIo2Dxe drvier.
What are the differences to ArmPciCpuIo2Dxe?
On a quick glance I can't see anything arch-specific here.

Maybe we should find a better place for ArmPciCpuIo2Dxe so loongarch
can use it without copying the code?

take care,
   Gerd









_._,_._,_

Groups.io Links:

You receive all messages sent to this group.

View/Reply Online (#111008) | | Mute This Topic | New Topic
Your Subscription | Contact Group Owner | Unsubscribe [rebecca@openfw.io]

_._,_._,_
--------------RGswoExOtbORilSJnMXTU4sP--