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 DE193D8086D for ; Fri, 15 Mar 2024 09:49:52 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=84koqdQulNE0qePZ+sYl0Z6GNWrtOMzZLuOeMtYslWQ=; 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=1710496191; v=1; b=sVPTCJgcByquoz0Ej99xN9UrqocAS8sFu8ZTtq1zybeywID5JEWzL5zyX8ErFZ0eBFGkPefk 1O2hD6hyvouYLSRHjVG+zqQTBpWrGGqidaEZMc3b4EerZJPnJ5rysT3FmcVpPjwfACL/GF4vQTE TvXWAlKMZNO6vP80t/7orcs8EhTlWxLYhW6BYTdcA7QigkMMJyH0HlaakH1qgxx3USbY7rzfR9w VLjqDnJ6cAVyMZdSpZxZkiCnKKWNo5nCbujIVWMo5VQy8mw1unv1oTFqfRq4c9A39jbJtRmtsam c7XiS/sV/zUf1SrMBRJdxLJtIYBgMbWOURkv743kFU8HA== X-Received: by 127.0.0.2 with SMTP id ehdZYY7687511xkZ2XbizKxY; Fri, 15 Mar 2024 02:49:51 -0700 X-Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by mx.groups.io with SMTP id smtpd.web10.17795.1710496188290186126 for ; Fri, 15 Mar 2024 02:49:50 -0700 X-Received: from loongson.cn (unknown [10.40.24.149]) by gateway (Coremail) with SMTP id _____8Dx_7sWGfRlOWwZAA--.41937S3; Fri, 15 Mar 2024 17:47:03 +0800 (CST) X-Received: from [10.40.24.149] (unknown [10.40.24.149]) by localhost.localdomain (Coremail) with SMTP id AQAAf8AxX88TGfRlkNRaAA--.41378S3; Fri, 15 Mar 2024 17:46:59 +0800 (CST) Message-ID: <2c9c655d-6c17-4373-8dca-05196a86ca24@loongson.cn> Date: Fri, 15 Mar 2024 17:46:59 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [edk2-devel] [PATCH v1 17/26] OvmfPkg/LoongArchVirt: Add serial port hook library To: devel@edk2.groups.io, kraxel@redhat.com Cc: Ard Biesheuvel , Jiewen Yao , Jordan Justen , Bibo Mao , Dongyan Qian References: <20240311093631.1251466-1-lichao@loongson.cn> <20240311093902.1254321-1-lichao@loongson.cn> From: "Chao Li" In-Reply-To: X-CM-TRANSID: AQAAf8AxX88TGfRlkNRaAA--.41378S3 X-CM-SenderInfo: xolfxt3r6o00pqjv00gofq/1tbiAQARCGX0BucBaAANsM X-Coremail-Antispam: 1Uk129KBj9xXoWrKrW7CrW7KryDuFy5uw47Jrc_yoWDuwb_JF 15WryDXwn0qFsagw1qqrn8KrZ3Can7ZryYq34Igws7CrWS9Fs7XF45J34jgr1fJ343Ar1U G3y3KF1ayrnYqosvyTuYvTs0mTUanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUj1kv1TuYvT s0mT0YCTnIWjDUYxn0WfASr-VFAUDa7-sFnT9fnUUIcSsGvfJTRUUUb4AYFVCjjxCrM7AC 8VAFwI0_Jr0_Gr1l1xkIjI8I6I8E6xAIw20EY4v20xvaj40_Wr0E3s1l1IIY67AEw4v_Jr v_JF1l8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxSw2x7M28EF7xvwVC0I7IYx2IY67AK xVWUCVW8JwA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxVW8JVWxJwA2z4x0Y4vEx4A2jsIE14 v26r4UJVWxJr1l84ACjcxK6I8E87Iv6xkF7I0E14v26F4UJVW0owAS0I0E0xvYzxvE52x0 82IY62kv0487Mc804VCY07AIYIkI8VC2zVCFFI0UMcIj6xIIjxv20xvE14v26r106r15Mc Ij6I8E87Iv67AKxVW8JVWxJwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IY64vIr41l7480 Y4vEI4kI2Ix0rVAqx4xJMxAIw28IcxkI7VAKI48JMxC20s026xCaFVCjc4AY6r1j6r4UMx CIbckI1I0E14v26r1Y6r17MI8I3I0E5I8CrVAFwI0_JrI_JrWlx2IqxVCjr7xvwVAFwI0_ JrI_JrWlx4CE17CEb7AF67AKxVWUAVWUtwCIc40Y0x0EwIxGrwCI42IY6xIIjxv20xvE14 v26r1j6r1xMIIF0xvE2Ix0cI8IcVCY1x0267AKxVWUJVW8JwCI42IY6xAIw20EY4v20xva j40_Jr0_JF4lIxAIcVC2z280aVAFwI0_Gr0_Cr1lIxAIcVC2z280aVCY1x0267AKxVW8JV W8JrUvcSsGvfC2KfnxnUUI43ZEXa7IU8Urc3UUUUU== 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 02:49:50 -0700 Reply-To: devel@edk2.groups.io,lichao@loongson.cn List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: 3O84ol6sckndVSqn2oNlhpMmx7686176AA= Content-Type: multipart/alternative; boundary="------------3AJ1HZwOp3jyXKgbPzRHVTS2" X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=sVPTCJgc; 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 --------------3AJ1HZwOp3jyXKgbPzRHVTS2 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Hi Gerd, Thanks, Chao On 2024/3/15 17:33, Gerd Hoffmann wrote: > On Mon, Mar 11, 2024 at 05:39:02PM +0800, Chao Li wrote: >> Add a serial port hook library in LoongArchVirt named >> Fdt16550SerialProtHookLib, this library is referenced from ArmVirtPkg. >> >> LoongArch QEMU virtual machine uses register of LOONGARCH_CSR_KS1 to >> transfer serial port base addres from the PEI phase to the DXE phase. > Why use LOONGARCH_CSR_KS1? Can't you simply set PcdSerialRegisterBase? The LoongArch QEMU PEI stage runs on flash and does not allow set PCD=20 operations(memory have not enabled), so the address can only be=20 transferred through a SAVE register. > > 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 (#116796): https://edk2.groups.io/g/devel/message/116796 Mute This Topic: https://groups.io/mt/104859892/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- --------------3AJ1HZwOp3jyXKgbPzRHVTS2 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

Hi Gerd,


=
Thanks,
Chao
On 2024/3/15 17:33, Gerd Hoffmann wrote:
On Mon, Mar 11, 2024 at 05:39:=
02PM +0800, Chao Li wrote:
Add a serial port hook libra=
ry in LoongArchVirt named
Fdt16550SerialProtHookLib, this library is referenced from ArmVirtPkg.

LoongArch QEMU virtual machine uses register of LOONGARCH_CSR_KS1 to
transfer serial port base addres from the PEI phase to the DXE phase.
Why use LOONGARCH_CSR_KS1?  Can't you simply set PcdSerialRegisterBase?
    
The LoongArch QEMU PEI stage runs on flash and does not allow set PCD operations(memory have not enabled), so the address can only be transferred through a SAVE register.

take care,
  Gerd





_._,_._,_

Groups.io Links:

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

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

_._,_._,_
--------------3AJ1HZwOp3jyXKgbPzRHVTS2--