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 D7384740039 for ; Mon, 18 Mar 2024 15:28:45 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=84XoeW+FB0/GucSvKnByIA8sIbwUXB7U0OaZ47IKlHA=; c=relaxed/simple; d=groups.io; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: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:Content-Disposition:Content-Transfer-Encoding; s=20240206; t=1710775724; v=1; b=3BJAWFKvkXJ2LLAQMyswfpu7v6gpRJyf4BCCtChJTKG1F9yWjdZ4gRFtm6OtvrYCZyDaSR/i ZjrC8pqWYgsN3lIfirXU+LXafRJRsC7WcoiNbzql8J8dhnfEeNfCmgktN83ohDKH1e2dfF1Xvov sJgrrCez0tVhRgNbq2R0MxN4jxEGFC0+gl/pRCtNKeRS1HKsNW5dUepd7kh+tef+YqbQQ5oQeG7 pXWIZnr3sMDQgAkbHfUzd2dOUTJJIjXK4L3vQo3MGAmiSX16/ARpo7x5BgR8w6eW4cCpFdYQm1J zmeXhGQgFoHcqyogo7ZVyplbHEMU92GWE75NjPICDGl6w== X-Received: by 127.0.0.2 with SMTP id C2BhYY7687511xar8qqibkJZ; Mon, 18 Mar 2024 08:28:44 -0700 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.groups.io with SMTP id smtpd.web11.47577.1710775723764598824 for ; Mon, 18 Mar 2024 08:28:43 -0700 X-Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-644-yLx6_3J1N7GeKea-3p3IVw-1; Mon, 18 Mar 2024 11:28:39 -0400 X-MC-Unique: yLx6_3J1N7GeKea-3p3IVw-1 X-Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id CA223800266; Mon, 18 Mar 2024 15:28:38 +0000 (UTC) X-Received: from sirius.home.kraxel.org (unknown [10.39.192.254]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A338640C6CB4; Mon, 18 Mar 2024 15:28:38 +0000 (UTC) X-Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id A275C1800D54; Mon, 18 Mar 2024 16:28:17 +0100 (CET) Date: Mon, 18 Mar 2024 16:28:17 +0100 From: "Gerd Hoffmann" To: lixianglai Cc: devel@edk2.groups.io, lichao@loongson.cn, Ard Biesheuvel , Jiewen Yao , Jordan Justen , Bibo Mao , Dongyan Qian Subject: Re: [edk2-devel] [PATCH v1 21/26] OvmfPkg/LoongArchVirt: Add FdtQemuFwCfgLib Message-ID: <2teja7rxfli7fxvxlii54tbdaj2y6jz2qlvprf7pfpzzjyycrz@gp5axpziekwh> References: <20240311093631.1251466-1-lichao@loongson.cn> <20240311093924.1254576-1-lichao@loongson.cn> <01d94c67-de3d-7709-84d4-ec97dc7a01ec@loongson.cn> MIME-Version: 1.0 In-Reply-To: <01d94c67-de3d-7709-84d4-ec97dc7a01ec@loongson.cn> X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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: Mon, 18 Mar 2024 08:28:43 -0700 Reply-To: devel@edk2.groups.io,kraxel@redhat.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: KD0HxEdQ8RqUozFAbe8mfETHx7686176AA= Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=3BJAWFKv; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=redhat.com (policy=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 On Sat, Mar 16, 2024 at 10:17:00AM +0800, lixianglai wrote: > Hi Gerd: > > On Mon, Mar 11, 2024 at 02:39:31AM -0700, Chao Li wrote: > >> This library for PEI phase, and obtains the QemuFwCfg base address by > >> directly parsing the FDT, reads and writes the data in QemuFwCfg by > >> operating on the QemuFwCfg base address. > >> create mode 100644 OvmfPkg/LoongArchVirt/Library/FdtQemuFwCfgLib/FdtQemuFwCfgPeiLib.c > >> create mode 100644 OvmfPkg/LoongArchVirt/Library/FdtQemuFwCfgLib/FdtQemuFwCfgPeiLib.inf > >> create mode 100644 OvmfPkg/LoongArchVirt/Library/FdtQemuFwCfgLib/QemuFwCfgLibInternal.h > >> create mode 100644 OvmfPkg/LoongArchVirt/Library/FdtQemuFwCfgLib/QemuFwCfgPei.c > > Is there anything LoongArch-specific in there? > No,The main function of this lib library is to obtain the fwcfg base address by parsing fdt in the pei stage, >  and provide access to fwcfg through mmio mode, >  the difference between it and the existing library is that the fwcfg base address is not hard-coded in the compilation stage, >  and is accessed through mmio rather than io port. That would be the case for risc-v and aarch64 too, although I think they don't need fw_cfg right now (they get all info needed via fdt). I think we should add this as OvmfPkg/Library/FdtQemuFwCfgLib. > Another point that needs to be explained is that because loongarch virtual machine runs on flash in pei phase, > it cannot assign the pcd global variable, so we use Hob as the global variable to store the fwcfg base address. I think the dynamic PCD database is stored in a HOB and you should be able to set PCDs them even when running from (read-only) flash. take care, Gerd -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#116843): https://edk2.groups.io/g/devel/message/116843 Mute This Topic: https://groups.io/mt/104859897/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-