From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail04.groups.io (mail04.groups.io [45.79.224.9]) by spool.mail.gandi.net (Postfix) with ESMTPS id 6D8799416DD for ; Wed, 17 Apr 2024 10:01:54 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=FzLUyjTkVKqdvH13P01blFaw/erm0dE9HZ9lgfZA4LY=; 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:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type; s=20240206; t=1713348113; v=1; b=Zh4vkYQdwYbxXBOdHEICmdMmfNVg7iUxqmIzXPG2lGJa4zivees6bKVRPcH7ud1Ud0Vbubne nJeij9FMoDHapJ2R+QwIXMlWfIflYjpgmUifjFdOG7ZuVQmELSbROmoQmVfoBrmzlCO9/OPzkNL 5YEGxWpR0AwmBSt6qcbgRfRzzCXNTH19SwkHGT0sYYK4TeSpfQKWq/TNc5eOw+H+PjiiEx6U/Xz JYJ4dWIHiFXuCETNQgdoK2+xH9xjw6G/aGtXLn19h7ueDzsL9vZ5p9Lz5EFvlsjVCvfBDqeCWkI cQti830zbfKnWNE63hoIbudYQXE/K4MvTlioVCt/R19bg== X-Received: by 127.0.0.2 with SMTP id Sy71YY7687511x7vCqmuXPgh; Wed, 17 Apr 2024 03:01:53 -0700 X-Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by mx.groups.io with SMTP id smtpd.web11.9034.1713348111316344689 for ; Wed, 17 Apr 2024 03:01:52 -0700 X-Received: from loongson.cn (unknown [10.40.24.149]) by gateway (Coremail) with SMTP id _____8BxVfEHnh9mj7goAA--.27185S3; Wed, 17 Apr 2024 18:01:43 +0800 (CST) X-Received: from [10.40.24.149] (unknown [10.40.24.149]) by localhost.localdomain (Coremail) with SMTP id AQAAf8DxfRMFnh9mluV9AA--.10848S3; Wed, 17 Apr 2024 18:01:41 +0800 (CST) Message-ID: <1a4004f1-d66b-4f6c-99ac-1814d348b937@loongson.cn> Date: Wed, 17 Apr 2024 18:01:41 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [edk2-devel] [PATCH v1 0/4] Adjust the QemuFwCfgLibMmio and add PEI stage To: devel@edk2.groups.io, kraxel@redhat.com Cc: Ard Biesheuvel , Jiewen Yao , Leif Lindholm , Sami Mujawar , Sunil V L , Andrei Warkentin References: <20240417081256.3125187-1-lichao@loongson.cn> From: "Chao Li" In-Reply-To: X-CM-TRANSID: AQAAf8DxfRMFnh9mluV9AA--.10848S3 X-CM-SenderInfo: xolfxt3r6o00pqjv00gofq/1tbiAQAKCGYfiGsCVAABsO 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: Wed, 17 Apr 2024 03:01:52 -0700 Resent-From: lichao@loongson.cn Reply-To: devel@edk2.groups.io,lichao@loongson.cn List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: pRCeLW7Jb4QoyYzqg1Ux64zVx7686176AA= Content-Type: multipart/alternative; boundary="------------bi6md9i0yKpRCje6TYx0Y3U4" X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=Zh4vkYQd; dmarc=none; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.9 as permitted sender) smtp.mailfrom=bounce@groups.io --------------bi6md9i0yKpRCje6TYx0Y3U4 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Hi Gerd, Thanks, Chao On 2024/4/17 17:35, Gerd Hoffmann wrote: > On Wed, Apr 17, 2024 at 04:12:56PM +0800, Chao Li wrote: >> Patch1: Added three PCDs for QemuFwCfgLibMmio >> Patch2: Sparate QemuFwCfgLibMmio.c into two files and default as DXE >> stage library. >> Patch3: Added QemuFwCfgMmiLib PEI version >> Patch4: Rename QemuFwCfgLibMmio.inf to QemuFwCfgMmioDxeLib.inf and >> enable it in AARCH64 and RISCV64. > Ok, I see, you are using the PCDs because global variables don't work > in PEI. Yes. :) > > Alternative approach would be to create a HOB for that (see > EFI_HOB_PLATFORM_INFO used by X64). Not sure this is a good idea > though given that we have three different architectures using that code. > Ard, any advise? I think HOB might be heavy, and the dynamically PCD is also uses the=20 HOB, so this I think this way is more simpler. I'm also looking forward=20 Ard's suggestions. :) > >> OvmfPkg: Add three PCDs for QemuFwCfgLib >> OvmfPkg: Separate QemuFwCfgLibMmio.c into two files > This patch should be splitted into two, one doing the code split without > functional change, and one which switches from global variables to PCDs > (or HOB). OK, I will split it in V2. > > Otherwise this looks good to me (and I'd suggest to keep and merge this > as separate patch series). Sure! > > 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 (#117913): https://edk2.groups.io/g/devel/message/117913 Mute This Topic: https://groups.io/mt/105573103/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- --------------bi6md9i0yKpRCje6TYx0Y3U4 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

Hi Gerd,


=
Thanks,
Chao
On 2024/4/17 17:35, Gerd Hoffmann wrote:
On Wed, Apr 17, 2024 at 04:12:=
56PM +0800, Chao Li wrote:
Patch1: Added three PCDs for=
 QemuFwCfgLibMmio
Patch2: Sparate QemuFwCfgLibMmio.c into two files and default as DXE
stage library.
Patch3: Added QemuFwCfgMmiLib PEI version
Patch4: Rename QemuFwCfgLibMmio.inf to QemuFwCfgMmioDxeLib.inf and
enable it in AARCH64 and RISCV64.
Ok, I see, you are using the PCDs because global variables don't work
in PEI.
Yes. :)

Alternative approach would be to create a HOB for that (see
EFI_HOB_PLATFORM_INFO used by X64).  Not sure this is a good idea
though given that we have three different architectures using that code.
Ard, any advise?
I think HOB might be heavy, and the dynamically PCD is also uses the HOB, so this I think this way is more simpler. I'm also looking forward Ard's suggestions. :)

  OvmfPkg: Add three PCDs fo=
r QemuFwCfgLib
  OvmfPkg: Separate QemuFwCfgLibMmio.c into two files
This patch should be splitted into two, one doing the code split without
functional change, and one which switches from global variables to PCDs
(or HOB).
OK, I will split it in V2.

Otherwise this looks good to me (and I'd suggest to keep and merge this
as separate patch series).
Sure!

take care,
  Gerd





_._,_._,_

Groups.io Links:

=20 You receive all messages sent to this group. =20 =20

View/Reply Online (#117913) | =20 | Mute= This Topic | New Topic
Your Subscriptio= n | Contact Group Owner | Unsubscribe [rebecca@openfw.io]

_._,_._,_
--------------bi6md9i0yKpRCje6TYx0Y3U4--