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 6C575740063 for ; Mon, 20 Nov 2023 03:04:13 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=mBBex92jCzcc1FxFkXOlDtPN5AgLkQWbFx1Rfeqw4xM=; 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:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type; s=20140610; t=1700449452; v=1; b=M0AgUNDhoHOqBcckP+MA013wN1ylQYDbIUJXNU0G0k2Zr1Qk/JPDGMTf7pj+F3wq9Gjm6eg3 3IQjZGGYjwcHbRPzzedVLgBAaLeKGX9HWS7OZA9F/80mx0G+W/9jo97r9StwLWUjzBgvVRKzhtN 8IGUPT8BbDHuqxOyOpmJ3L2A= X-Received: by 127.0.0.2 with SMTP id 7FbFYY7687511xIe3kookL7V; Sun, 19 Nov 2023 19:04:12 -0800 X-Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by mx.groups.io with SMTP id smtpd.web11.42932.1700449450595817153 for ; Sun, 19 Nov 2023 19:04:11 -0800 X-Received: from loongson.cn (unknown [10.40.24.149]) by gateway (Coremail) with SMTP id _____8AxqOiozFpl9SA7AA--.15129S3; Mon, 20 Nov 2023 11:04:08 +0800 (CST) X-Received: from [10.40.24.149] (unknown [10.40.24.149]) by localhost.localdomain (Coremail) with SMTP id AQAAf8BxK9ylzFpl2TRHAA--.24899S3; Mon, 20 Nov 2023 11:04:05 +0800 (CST) Message-ID: <431444f9-d0b3-40fd-afe2-d7fe608131d5@loongson.cn> Date: Mon, 20 Nov 2023 11:04:05 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [edk2-devel] [PATCH v3 23/39] OvmfPkg/RiscVVirt: Enable UefiCpuPkg version CpuIo2Dxe To: devel@edk2.groups.io, andrei.warkentin@intel.com Cc: Sunil V L References: <20231117095742.3605778-1-lichao@loongs> <20231117100147.3609997-1-lichao@loongson.cn> From: "Chao Li" In-Reply-To: X-CM-TRANSID: AQAAf8BxK9ylzFpl2TRHAA--.24899S3 X-CM-SenderInfo: xolfxt3r6o00pqjv00gofq/1tbiAQABCGVawioAkwACsO X-Coremail-Antispam: 1Uk129KBj93XoWxZFWfuF4DKr1rAr4kWr48GrX_yoW5CrWkpw 1jy398CFyft34qyayrA345X3WFvrZYyr18ArW5C3Wj9r1fJan3ua47Gw1rt3y2grsxZa18 Zr4jyF98Way7AabCm3ZEXasCq-sJn29KB7ZKAUJUUUU8529EdanIXcx71UUUUU7KY7ZEXa sCq-sGcSsGvfJ3UbIjqfuFe4nvWSU5nxnvy29KBjDU0xBIdaVrnRJUUUyGb4IE77IF4wAF F20E14v26r1j6r4UM7CY07I20VC2zVCF04k26cxKx2IYs7xG6rWj6s0DM7CIcVAFz4kK6r 1Y6r17M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48ve4kI8wA2z4x0Y4vE2Ix0cI8IcVAF wI0_Gr0_Xr1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI0_Gr0_Cr1l84ACjcxK6I8E87Iv67 AKxVWxJVW8Jr1l84ACjcxK6I8E87Iv6xkF7I0E14v26r4UJVWxJr1le2I262IYc4CY6c8I j28IcVAaY2xG8wAqjxCEc2xF0cIa020Ex4CE44I27wAv7VC0I7IYx2IY67AKxVWUGVWUXw Av7VC2z280aVAFwI0_Jr0_Gr1lOx8S6xCaFVCjc4AY6r1j6r4UM4x0Y48IcVAKI48JMx8G jcxK6IxK0xIIj40E5I8CrwCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8Jw C20s026c02F40E14v26r106r1rMI8I3I0E7480Y4vE14v26r106r1rMI8E67AF67kF1VAF wI0_Jrv_JF1lIxkGc2Ij64vIr41lIxAIcVC0I7IYx2IY67AKxVWUJVWUCwCI42IY6xIIjx v20xvEc7CjxVAFwI0_Jr0_Gr1lIxAIcVCF04k26cxKx2IYs7xG6r1j6r1xMIIF0xvEx4A2 jsIE14v26r1j6r4UMIIF0xvEx4A2jsIEc7CjxVAFwI0_Jr0_GrUvcSsGvfC2KfnxnUUI43 ZEXa7IU14rW5UUUUU== 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 Reply-To: devel@edk2.groups.io,lichao@loongson.cn List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: OKlcqANuuwmZLoBN3lpZPpDwx7686176AA= Content-Type: multipart/alternative; boundary="------------8SyfPanQKV67B5sz3Twy80Kk" X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=M0AgUNDh; 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 --------------8SyfPanQKV67B5sz3Twy80Kk Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Hi Andrei, Yes, the RISCV version is same as the ArmPkg version. The ArmPkg version=20 is almost similar to UefiCpuPkg version, excapt that UefiCpuPkg version=20 doesn't have MMIO methods on CpuIoServiceRead and CpuIoServiceWrite, the=20 MMIO methods have been added in the patch 20, please check. Thanks, Chao On 2023/11/18 04:15, Andrei Warkentin wrote: > So are you saying the UefiCpuPkg version of CpuIo2 is equivalent in funct= ion to the OvmfPkg one? > >> -----Original Message----- >> From: Chao Li >> Sent: Friday, November 17, 2023 4:02 AM >> To:devel@edk2.groups.io >> Cc: Sunil V L; Warkentin, Andrei >> >> Subject: [PATCH v3 23/39] OvmfPkg/RiscVVirt: Enable UefiCpuPkg version >> CpuIo2Dxe >> >> Since the UefiCpuPkg/CpuIo2Dxe already supports MMIO, it is enabled at >> this thime. >> >> Build-tested only (with "RiscVVirtQemu.dsc"). >> >> BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=3D4584 >> >> Cc: Sunil V L >> Cc: Andrei Warkentin >> --- >> OvmfPkg/RiscVVirt/RiscVVirtQemu.dsc | 4 +++- >> OvmfPkg/RiscVVirt/RiscVVirtQemu.fdf | 2 +- >> 2 files changed, 4 insertions(+), 2 deletions(-) >> >> diff --git a/OvmfPkg/RiscVVirt/RiscVVirtQemu.dsc >> b/OvmfPkg/RiscVVirt/RiscVVirtQemu.dsc >> index 34b2037824..499902e445 100644 >> --- a/OvmfPkg/RiscVVirt/RiscVVirtQemu.dsc >> +++ b/OvmfPkg/RiscVVirt/RiscVVirtQemu.dsc >> @@ -143,6 +143,8 @@ >> >> gEfiMdeModulePkgTokenSpaceGuid.PcdTurnOffUsbLegacySupport|TRUE >> >> + gEfiMdePkgTokenSpaceGuid.PcdPciIoTranslationIsEnabled|TRUE >> + >> [PcdsFixedAtBuild.common] >> gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x2000 >> gEfiMdeModulePkgTokenSpaceGuid.PcdMaxAuthVariableSize|0x2800 >> @@ -445,7 +447,7 @@ >> # >> # PCI support >> # >> - OvmfPkg/RiscVVirt/PciCpuIo2Dxe/PciCpuIo2Dxe.inf { >> + UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf { >> >> NULL|OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf >> } >> diff --git a/OvmfPkg/RiscVVirt/RiscVVirtQemu.fdf >> b/OvmfPkg/RiscVVirt/RiscVVirtQemu.fdf >> index 40d12e0f4c..dd138957a0 100644 >> --- a/OvmfPkg/RiscVVirt/RiscVVirtQemu.fdf >> +++ b/OvmfPkg/RiscVVirt/RiscVVirtQemu.fdf >> @@ -184,7 +184,7 @@ INF OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf >> # >> # PCI support >> # >> -INF OvmfPkg/RiscVVirt/PciCpuIo2Dxe/PciCpuIo2Dxe.inf >> +INF UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf >> INF MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf >> INF MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf >> INF OvmfPkg/PciHotPlugInitDxe/PciHotPlugInit.inf >> -- >> 2.27.0 > > >=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 (#111437): https://edk2.groups.io/g/devel/message/111437 Mute This Topic: https://groups.io/mt/102655144/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- --------------8SyfPanQKV67B5sz3Twy80Kk Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

Hi Andrei,

Yes, the RISCV version is same as the ArmPkg version. The ArmPkg version is almost similar to UefiCpuPkg version, excapt that UefiCpuPkg version doesn't have MMIO methods on CpuIoServiceRead and CpuIoServiceWrite, the MMIO methods have been added in the patch 20, please check.


=
Thanks,
Chao
On 2023/11/18 04:15, Andrei Warkentin wrote:
So are you saying the UefiCpuP=
kg version of CpuIo2 is equivalent in function to the OvmfPkg one?

-----Original Message-----
From: Chao Li <lichao@loongson.cn>
Sent: Friday, November 17, 2023 4:02 AM
To: devel@edk2.groups.io
Cc: Sunil V L <sunilvl@ventanamicro.com>; Warkentin, Andrei
<andrei.warkentin@intel.com>
Subject: [PATCH v3 23/39] OvmfPkg/RiscVVirt: Enable UefiCpuPkg version
CpuIo2Dxe

Since the UefiCpuPkg/CpuIo2Dxe already supports MMIO, it is enabled at
this thime.

Build-tested only (with "RiscVVirtQemu.dsc").

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=
=3D4584

Cc: Sunil V L <sunilvl@ventanamicro.com>
Cc: Andrei Warkentin <andrei.warkentin@intel.com>
---
 OvmfPkg/RiscVVirt/RiscVVirtQemu.dsc | 4 +++-
OvmfPkg/RiscVVirt/RiscVVirtQemu.fdf | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/OvmfPkg/RiscVVirt/RiscVVirtQemu.dsc
b/OvmfPkg/RiscVVirt/RiscVVirtQemu.dsc
index 34b2037824..499902e445 100644
--- a/OvmfPkg/RiscVVirt/RiscVVirtQemu.dsc
+++ b/OvmfPkg/RiscVVirt/RiscVVirtQemu.dsc
@@ -143,6 +143,8 @@

   gEfiMdeModulePkgTokenSpaceGuid.PcdTurnOffUsbLegacySupport|TRUE

+  gEfiMdePkgTokenSpaceGuid.PcdPciIoTranslationIsEnabled|TRUE
+
 [PcdsFixedAtBuild.common]
   gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x2000
   gEfiMdeModulePkgTokenSpaceGuid.PcdMaxAuthVariableSize|0x2800
@@ -445,7 +447,7 @@
   #
   # PCI support
   #
-  OvmfPkg/RiscVVirt/PciCpuIo2Dxe/PciCpuIo2Dxe.inf {
+  UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf {
     <LibraryClasses>
       NULL|OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
   }
diff --git a/OvmfPkg/RiscVVirt/RiscVVirtQemu.fdf
b/OvmfPkg/RiscVVirt/RiscVVirtQemu.fdf
index 40d12e0f4c..dd138957a0 100644
--- a/OvmfPkg/RiscVVirt/RiscVVirtQemu.fdf
+++ b/OvmfPkg/RiscVVirt/RiscVVirtQemu.fdf
@@ -184,7 +184,7 @@ INF  OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf
 #
 # PCI support
 #
-INF  OvmfPkg/RiscVVirt/PciCpuIo2Dxe/PciCpuIo2Dxe.inf
+INF  UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf
 INF  MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf
 INF  MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf
 INF  OvmfPkg/PciHotPlugInitDxe/PciHotPlugInit.inf
--
2.27.0




_._,_._,_

Groups.io Links:

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

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

_._,_._,_
--------------8SyfPanQKV67B5sz3Twy80Kk--