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 85A8DD8083D for ; Fri, 15 Mar 2024 11:16:47 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=xT+u/b8/PwgUWVrMLDpG71PggvsN42ZFkOI8XaZQxC8=; 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=1710501406; v=1; b=Kzlr0R3fCoT3RZAe8hbRgK+k69s1gXFTeCi4OPvdmK7cRiTwcbsF4mzZHDTypnYBG5Z35VeZ HeYXHatBhOtkKZbortTP02LfarhYqORdFZf1rSSOZJSg7cWyBARCppb5aRL5BgLMCdkXZkPoN8n wCLBm38ha8LcEWCBQm0935+lrV7bqV/uzBgTym9NOEwg7Y7YhnC+py6TPRT8Af/RTUsesc3rxqL 6JKNJvhLrZ82wt5QSqKCRH2PWCfuBFAvS+oxMKtNA2mTc4azZaQbQRm5l6mhOLQdLRdIYusBxZp QzhAJmG7KCNYyzCr7nUsERfigfiVPD/dzEY+SWUdD2OSQ== X-Received: by 127.0.0.2 with SMTP id eNnzYY7687511xVTUXvdO8js; Fri, 15 Mar 2024 04:16:46 -0700 X-Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by mx.groups.io with SMTP id smtpd.web11.19406.1710501403342854231 for ; Fri, 15 Mar 2024 04:16:45 -0700 X-Received: from loongson.cn (unknown [10.40.24.149]) by gateway (Coremail) with SMTP id _____8AxeegLLPRlInEZAA--.41971S3; Fri, 15 Mar 2024 19:07:56 +0800 (CST) X-Received: from [10.40.24.149] (unknown [10.40.24.149]) by localhost.localdomain (Coremail) with SMTP id AQAAf8CxZMwJLPRlZN1aAA--.48407S3; Fri, 15 Mar 2024 19:07:53 +0800 (CST) Message-ID: <0032b197-8480-424d-8fdb-b38714ca9198@loongson.cn> Date: Fri, 15 Mar 2024 19:07:53 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [edk2-devel] [PATCH v1 18/26] OvmfPkg/LoongArchVirt: Add the early serial port output library To: devel@edk2.groups.io, kraxel@redhat.com Cc: Ard Biesheuvel , Jiewen Yao , Jordan Justen , Bibo Mao , Dongyan Qian , Xianglai Li References: <20240311093631.1251466-1-lichao@loongson.cn> <20240311093908.1254385-1-lichao@loongson.cn> <32d4cd2c-1d83-48f5-ba30-7eda6dbcbf44@loongson.cn> From: "Chao Li" In-Reply-To: X-CM-TRANSID: AQAAf8CxZMwJLPRlZN1aAA--.48407S3 X-CM-SenderInfo: xolfxt3r6o00pqjv00gofq/1tbiAQARCGX0BucC1wABs8 X-Coremail-Antispam: 1Uk129KBj93XoW7ZF1DAFW8Wry5Jw1UZFy8CrX_yoW8XFWfpr s8ZFyYqFn0y3WIy3ykt34jqa1S9wsakFW5Z34Ykw4vk3WxGFn3Kry7CrnxG34xC3Z0vF18 tF4Yva1UZF4DKacCm3ZEXasCq-sJn29KB7ZKAUJUUUU5529EdanIXcx71UUUUU7KY7ZEXa sCq-sGcSsGvfJ3UbIjqfuFe4nvWSU5nxnvy29KBjDU0xBIdaVrnRJUUUkEb4IE77IF4wAF F20E14v26r1j6r4UM7CY07I20VC2zVCF04k26cxKx2IYs7xG6rWj6s0DM7CIcVAFz4kK6r 106r15M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48ve4kI8wA2z4x0Y4vE2Ix0cI8IcVAF wI0_JFI_Gr1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI0_Jr0_Gr1l84ACjcxK6I8E87Iv67 AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVCY1x0267AKxVWxJr0_GcWle2I262IYc4CY6c8I j28IcVAaY2xG8wAqjxCEc2xF0cIa020Ex4CE44I27wAv7VC0I7IYx2IY67AKxVWUXVWUAw Av7VC2z280aVAFwI0_Gr0_Cr1lOx8S6xCaFVCjc4AY6r1j6r4UM4x0Y48IcVAKI48JMx8G jcxK6IxK0xIIj40E5I8CrwCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8Jw CFI7km07C267AKxVWUtVW8ZwC20s026c02F40E14v26r106r1rMI8I3I0E7480Y4vE14v2 6r106r1rMI8E67AF67kF1VAFwI0_Jw0_GFylIxkGc2Ij64vIr41lIxAIcVC0I7IYx2IY67 AKxVWUJVWUCwCI42IY6xIIjxv20xvEc7CjxVAFwI0_Jr0_Gr1lIxAIcVCF04k26cxKx2IY s7xG6r1j6r1xMIIF0xvEx4A2jsIE14v26r4j6F4UMIIF0xvEx4A2jsIEc7CjxVAFwI0_Gr 0_Gr1UYxBIdaVFxhVjvjDU0xZFpf9x07jbZ2-UUUUU= X-Gw-Check: 35eccaf8ce65f800 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: Fri, 15 Mar 2024 04:16:45 -0700 Reply-To: devel@edk2.groups.io,lichao@loongson.cn List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: OjJHFEdJGSi0RFepVLdSsU84x7686176AA= Content-Type: multipart/alternative; boundary="------------6bSLyN0bRvy91I0IRpckY0dt" X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=Kzlr0R3f; 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 --------------6bSLyN0bRvy91I0IRpckY0dt Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Hi Gerd, Thanks, Chao On 2024/3/15 18:34, Gerd Hoffmann wrote: > On Fri, Mar 15, 2024 at 06:19:12PM +0800, Chao Li wrote: >> Hi Gerd, >> >> >> Thanks, >> Chao >> On 2024/3/15 17:36, Gerd Hoffmann wrote: >>> On Mon, Mar 11, 2024 at 05:39:08PM +0800, Chao Li wrote: >>>> Add a early serial port output library into LoongArchVirt that named >>>> EarlyFdtSerialPortLib16550, this library is referenced from >>>> MdeModulePkg. >>> Why create your own copy? What are the differences to >>> MdeModulePkg/Library/BaseSerialPortLib16550? >> This library is used in the PEI stage, same as the Hook Library, LoongAr= ch >> QEMU is runs on flash in PEI stage, MdeModule version does not support t= o >> get the SerialRegisterBase via registers or HOB or FDT, > It uses PcdSerialRegisterBase. > > Having a quick look at the PCD code it looks like the PCD are stored in > in a HOB (gPcdDataBaseHobGuid), so setting dynamic PCDs should work even > when running directly from flash. I guess if the PCD type is FixedAtbuild, then it might not be in the=20 HOB, because the global symbols will be in the GOT table. And it really=20 doesn't work in the flash stage(I tried it before and I just tried it=20 again). > > 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 (#116812): https://edk2.groups.io/g/devel/message/116812 Mute This Topic: https://groups.io/mt/104859894/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- --------------6bSLyN0bRvy91I0IRpckY0dt Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

Hi Gerd,


=
Thanks,
Chao
On 2024/3/15 18:34, Gerd Hoffmann wrote:
On Fri, Mar 15, 2024 at 06:19:=
12PM +0800, Chao Li wrote:
Hi Gerd,


Thanks,
Chao
On 2024/3/15 17:36, Gerd Hoffmann wrote:
On Mon, Mar 11, 2024 at 05=
:39:08PM +0800, Chao Li wrote:
Add a early serial port =
output library into LoongArchVirt that named
EarlyFdtSerialPortLib16550, this library is referenced from
MdeModulePkg.
Why create your own copy? =
 What are the differences to
MdeModulePkg/Library/BaseSerialPortLib16550?
This library is used in the =
PEI stage, same as the Hook Library, LoongArch
QEMU is runs on flash in PEI stage, MdeModule version does not support to
get the SerialRegisterBase via registers or HOB or FDT,
It uses PcdSerialRegisterBase.

Having a quick look at the PCD code it looks like the PCD are stored in
in a HOB (gPcdDataBaseHobGuid), so setting dynamic PCDs should work even
when running directly from flash.
I guess if the PCD type is FixedAtbuild, then it might not be in the HOB, because the global symbols will be in the GOT table. And it really doesn't work in the flash stage(I tried it before and I just tried it again).

take care,
  Gerd





_._,_._,_

Groups.io Links:

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

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

_._,_._,_
--------------6bSLyN0bRvy91I0IRpckY0dt--