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 33092780091 for ; Sat, 16 Mar 2024 10:19:16 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=STqSOn8/fS4xIC2g1JBzFv6ff706VPx5Sy0Cs93qP20=; c=relaxed/simple; d=groups.io; h=Subject:To:Cc:References:From:Message-ID:Date:User-Agent: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-Transfer-Encoding:Content-Language; s=20240206; t=1710584354; v=1; b=xL6aC2dzHyURKcLgu4bBqTt3rkBgXb0fambk7DMX82hI8Xtn6VrObXClq7QQX4D+0AbSLo0n nlDHgelZ4TtXTh0mTLP4+e06nTGSUc+mmoLqOge9LX5twsDbCZHQcRFzEfgjH+r6AYndeCkecWK A2YBfM0LD9KVjH5DMeBC5qc3BBKK4+bMZPYYYQnj2W9YDmfx+KqmPe4ZUsnClczsLb4wh2dfpSK hIoEJWTy+7VHkerNG7fhT/SHzg2Qlp+fhvb3kwU8idlnepAQVxQ1d26WhSbl6AidA7c8oPuUJCT PhgmhkvVCGfdwtKvR4+O6hBySGeR/d71eJQny6FAZPGig== X-Received: by 127.0.0.2 with SMTP id RiqDYY7687511xAbeSuqYldb; Sat, 16 Mar 2024 03:19:14 -0700 X-Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by mx.groups.io with SMTP id smtpd.web11.3980.1710584351819981558 for ; Sat, 16 Mar 2024 03:19:13 -0700 X-Received: from loongson.cn (unknown [10.20.42.32]) by gateway (Coremail) with SMTP id _____8DxbOkZcvVlLNoZAA--.51980S3; Sat, 16 Mar 2024 18:19:06 +0800 (CST) X-Received: from [10.20.42.32] (unknown [10.20.42.32]) by localhost.localdomain (Coremail) with SMTP id AQAAf8Axj80UcvVlhJNbAA--.12874S2; Sat, 16 Mar 2024 18:19:02 +0800 (CST) Subject: Re: [edk2-devel] [PATCH v1 20/26] OvmfPkg/LoongArchVirt: Add NorFlashQemuLib To: devel@edk2.groups.io, kraxel@redhat.com, lichao@loongson.cn Cc: 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> From: "xianglai" Message-ID: <51c896fa-60bb-127f-c346-dc69179d288f@loongson.cn> Date: Sat, 16 Mar 2024 18:19:00 +0800 User-Agent: Mozilla/5.0 (X11; Linux loongarch64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <7nqe7k3oi3cph7mhqc4t5ea7qair3u2i7dy6oli6wurovyaoqa@apkw6d7gneam> X-CM-TRANSID: AQAAf8Axj80UcvVlhJNbAA--.12874S2 X-CM-SenderInfo: 5ol0xt5qjotxo6or00hjvr0hdfq/ X-Coremail-Antispam: 1Uk129KBj93XoWxAr1UKFyrtw47tFy3ZFWrZwc_yoW5Jw4Dpr W5Xa95tw1vqa4FkrZF9w17ZF1IvayxKFZxG3WkZ340gan8WFn7KrWFyw1rtFWxJrn5ZFya qw4jv3WDWF4DWwcCm3ZEXasCq-sJn29KB7ZKAUJUUUU5529EdanIXcx71UUUUU7KY7ZEXa sCq-sGcSsGvfJ3Ic02F40EFcxC0VAKzVAqx4xG6I80ebIjqfuFe4nvWSU5nxnvy29KBjDU 0xBIdaVrnRJUUUvYb4IE77IF4wAFF20E14v26r1j6r4UM7CY07I20VC2zVCF04k26cxKx2 IYs7xG6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48v e4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_Jr0_JF4l84ACjcxK6xIIjxv20xvEc7CjxVAFwI 0_Jr0_Gr1l84ACjcxK6I8E87Iv67AKxVW8JVWxJwA2z4x0Y4vEx4A2jsIEc7CjxVAFwI0_ Gr0_Gr1UM2AIxVAIcxkEcVAq07x20xvEncxIr21l57IF6xkI12xvs2x26I8E6xACxx1l5I 8CrVACY4xI64kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r1Y6r17McIj6I8E87Iv67AK xVWUJVW8JwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IY64vIr41lc7I2V7IY0VAS07AlzV AYIcxG8wCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwC20s026c02F40E 14v26r1j6r18MI8I3I0E7480Y4vE14v26r106r1rMI8E67AF67kF1VAFwI0_Jw0_GFylIx kGc2Ij64vIr41lIxAIcVC0I7IYx2IY67AKxVWUJVWUCwCI42IY6xIIjxv20xvEc7CjxVAF wI0_Jr0_Gr1lIxAIcVCF04k26cxKx2IYs7xG6r1j6r1xMIIF0xvEx4A2jsIE14v26r1j6r 4UMIIF0xvEx4A2jsIEc7CjxVAFwI0_Gr0_Gr1UYxBIdaVFxhVjvjDU0xZFpf9x07UNvtZU UUUU= 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: Sat, 16 Mar 2024 03:19:13 -0700 Reply-To: devel@edk2.groups.io,lixianglai@loongson.cn List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: EO0mYmjnfQtfKZw7PKh5mnnOx7686176AA= Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Language: en-US X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=xL6aC2dz; dmarc=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 Hi Gerd: > On Mon, Mar 11, 2024 at 02:39:24AM -0700, Chao Li wrote: >> Add NorFlashQemuLib for LoongArch, it is referenced from ArmVirtPkg. > What are the differences to the ArmVirtPkg version? In this lib we have assigned the following three pcd variables: PcdFlashNvStorageVariableBase PcdFlashNvStorageFtwWorkingBase PcdFlashNvStorageFtwSpareBase Instead of hardcoding these three variables in the VarStore.fdf.inc file as= arm does, the benefit is that when the flash base address changes in the qemu impleme= ntation, there is no need to re-adapt and compile UEFI. Other small differences are in the BIOS base address using different PCD va= riables, and this library only parse a flash rather than more pieces which handles a= rm Libs better. It is necessary to point out that the original NV variable address space is= specified by the bios, and then look for flash in the NV variable address space, while the current lib implementation is given the flash base address as the= NV variable address space The former implementation should theoretically be able to map multiple piec= es of flash into the NV variable address space, but we currently only add a piece of flash as an NV variable storage space = when using it. When I tried to implement the current patch scheme on aarch64, I found that the FaultTolerantWriteDxe driver loaded earlier than VirtNorFl= ashDxe. And It requires the PcdFlashNvStorageFtwWorkingSize and PcdFlashNvStorageFt= wSpareSize variables for initialization, However the initialization of these two variables is completed in VirtNorFl= ashDxe, The fdf file specifies that VirtNorFlashDxe is loaded first and then FaultT= olerantWriteDxe is loaded in loongarch64. So this is going to be a problem if we want to apply the current solution t= o aarch64 or risc-v. 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? Thanks, Xianglai. > Is it possible to have a FdtNorFlashQemuLib which is shared > between arm and loongarch? And maybe risc-v too? > > 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 (#116821): https://edk2.groups.io/g/devel/message/116821 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-