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 46E58D811C5 for ; Tue, 19 Mar 2024 09:10:49 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=/FRazbiW9X7Aki8pbYrx3ADKghYN1DzyjitC3fJRJbU=; 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:Resent-Date:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type; s=20240206; t=1710839447; v=1; b=pJ8dra+1NDcjAunJSSpmCVtPAI5M03WUkpRdcmM9vDrYOeUgtqe40fKTS3L7GHEyVu3gjlBH SV1Hel9rmmejwd0VYhi3eUPBHbPU/oq3vwZF9K1GOFllr9Ljo329KnsLxnWmASfcsJWXw8HU6rT lRZ+SdiRs/ws2UjnSmKdHSDHJBdwCzof8wqvQTryqiQ1tEbPuudGPKEV3ZJy/M7FVZNHhF+caML krfTZJQ4LxCq/CHQI2Sx2eHnpJXF7WAB7TvC9euxPplWA3G5xG35nCqIcC9lYiagFEJgW2vHewu PawxJ3CFCw5RDN0QTvxMiFtF2G2+kLTOOpceZic0g/MMA== X-Received: by 127.0.0.2 with SMTP id JBMGYY7687511xSo02Tz8Ff1; Tue, 19 Mar 2024 02:10:47 -0700 X-Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by mx.groups.io with SMTP id smtpd.web10.10591.1710839445915344712 for ; Tue, 19 Mar 2024 02:10:46 -0700 X-Received: from loongson.cn (unknown [10.40.24.149]) by gateway (Coremail) with SMTP id _____8BxVfGTVvllBLMaAA--.64449S3; Tue, 19 Mar 2024 17:10:43 +0800 (CST) X-Received: from [10.40.24.149] (unknown [10.40.24.149]) by localhost.localdomain (Coremail) with SMTP id AQAAf8BxnhOPVvllBkldAA--.59585S3; Tue, 19 Mar 2024 17:10:39 +0800 (CST) Message-ID: Date: Tue, 19 Mar 2024 17:10:39 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [edk2-devel] [PATCH v1 20/26] OvmfPkg/LoongArchVirt: Add NorFlashQemuLib To: devel@edk2.groups.io, kraxel@redhat.com Cc: lixianglai , Ard Biesheuvel , Jiewen Yao , Jordan Justen , Bibo Mao , Dongyan Qian References: <20240311093631.1251466-1-lichao@loongson.cn> <20240311093919.1254515-1-lichao@loongson.cn> <7nqe7k3oi3cph7mhqc4t5ea7qair3u2i7dy6oli6wurovyaoqa@apkw6d7gneam> <51c896fa-60bb-127f-c346-dc69179d288f@loongson.cn> From: "Chao Li" In-Reply-To: X-CM-TRANSID: AQAAf8BxnhOPVvllBkldAA--.59585S3 X-CM-SenderInfo: xolfxt3r6o00pqjv00gofq/1tbiAQABCGX5TOgAeQABsI X-Coremail-Antispam: 1Uk129KBjDUn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7KY7 ZEXasCq-sGcSsGvfJ3UbIjqfuFe4nvWSU5nxnvy29KBjDU0xBIdaVrnUUvcSsGvfC2Kfnx nUUI43ZEXa7xR_UUUUUUUUU== 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 Resent-Date: Tue, 19 Mar 2024 02:10:46 -0700 Reply-To: devel@edk2.groups.io,lichao@loongson.cn List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: CYU8HmIq9UXkBzBrBfdHF8kNx7686176AA= Content-Type: multipart/alternative; boundary="------------snPUv85LqpmNpHbHsT0TJ9pt" X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=pJ8dra+1; 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=none --------------snPUv85LqpmNpHbHsT0TJ9pt Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable He Gerd, Thanks, Chao On 2024/3/19 16:03, Gerd Hoffmann wrote: > Hi, > >>>> I can't tell the implementation scheme of the current lib and existing >>>> lib implementation scheme which one is better, Could you give we some >>>> advice? >>> I'd suggest to merge your code as OvmfPkg/Library/FdtNorFlashQemuLib as >>> it is not really loongarch-specific. >>> >>> If you want try switch aarch64 to use the same code that'll be great, >>> but sorting that out later is also fine with me. >> If you think this design is looks better, then I'm prepare to commit thi= s >> change under the OvmfPkg/Library as a public library. And I will enable = it >> in aarch64 after merging this change, because I think it may be tweaked = and >> validated in aarch64 for many platforms. Do you think that is good? > The VirtNorFlashDxe is optimized for qemu-emulated pflash. It tries to > avoid switching between read and write mode much, because that operation > has a significant overhead in virtualization. So it's really only used > by ArmVirtPkg and not lots of other arm platforms. > > Doing it separate from this patch series makes sense nevertheless. > > Speaking of this series: maybe split it into two? The first part > of this series with the Mde*Pkg + UefiPkg changes looks almost ready > to merge to me, so maybe we can get that in while still sorting out > the remaining issues in the OvmfPkg patches ... This series does not include changes to Mde*Pkg , so if the patches are=20 separated, I think it might be two series, one is the UefiCpuPkg series,=20 and other is OvmfPkg. Just like you saied, if this series is split into=20 two, and the series 1 finds some bugs when we sorting out the OvmfPkg,=20 then we have to submit other pathes to fix them. So what do you think? I think each plan has it's own benefits. I tend to=20 split patches into two series. > > take care, > Gerd > > > >=20 > -=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 (#116882): https://edk2.groups.io/g/devel/message/116882 Mute This Topic: https://groups.io/mt/104859896/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- --------------snPUv85LqpmNpHbHsT0TJ9pt Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit

He Gerd,


Thanks,
Chao
On 2024/3/19 16:03, Gerd Hoffmann wrote:
  Hi,

I can't tell the implementation scheme of the current lib and existing
lib implementation scheme which one is better, Could you give we some
advice?
I'd suggest to merge your code as OvmfPkg/Library/FdtNorFlashQemuLib as
it is not really loongarch-specific.

If you want try switch aarch64 to use the same code that'll be great,
but sorting that out later is also fine with me.
If you think this design is looks better, then I'm prepare to commit this
change under the OvmfPkg/Library as a public library. And I will enable it
in aarch64 after merging this change, because I think it may be tweaked and
validated in aarch64 for many platforms. Do you think that is good?
The VirtNorFlashDxe is optimized for qemu-emulated pflash.  It tries to
avoid switching between read and write mode much, because that operation
has a significant overhead in virtualization.  So it's really only used
by ArmVirtPkg and not lots of other arm platforms.

Doing it separate from this patch series makes sense nevertheless.

Speaking of this series: maybe split it into two?  The first part
of this series with the Mde*Pkg + UefiPkg changes looks almost ready
to merge to me, so maybe we can get that in while still sorting out
the remaining issues in the OvmfPkg patches ...

This series does not include changes to Mde*Pkg , so if the patches are separated, I think it might be two series, one is the UefiCpuPkg series, and other is OvmfPkg. Just like you saied, if this series is split into two, and the series 1 finds some bugs when we sorting out the OvmfPkg, then we have to submit other pathes to fix them. 

So what do you think? I think each plan has it's own benefits. I tend to split patches into two series.


take care,
  Gerd





_._,_._,_

Groups.io Links:

You receive all messages sent to this group.

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

_._,_._,_
--------------snPUv85LqpmNpHbHsT0TJ9pt--