public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH V3 00/12] Migrate ArmVirtPkg modules to OvmfPkg
@ 2021-09-30  0:45 Abner Chang
  2021-09-30  0:45 ` [PATCH V3 01/12] ArmVirtPkg/FdtClintDxe: Move FdtClientDxe to EmbeddedPkg Abner Chang
                   ` (16 more replies)
  0 siblings, 17 replies; 27+ messages in thread
From: Abner Chang @ 2021-09-30  0:45 UTC (permalink / raw)
  To: devel
  Cc: Ard Biesheuvel, Leif Lindholm, Sami Mujawar, Jiewen Yao,
	Jordan Justen, Gerd Hoffmann, Daniel Schaefer, Sunil V L,
	Liming Gao, Zhiguang Liu, Michael D Kinney

In V3: Address comments on V2.
In V2: Remove HPE license on the files that just moved around or
       the changes in the file are just code removal.

edk2 BZ #: 3665
edk2 platform corresponding changes will be submitted after
this pactch set is reviewed.

This pacthes set is to migrate some modules from ArmVirtPkg
to under OvmfPkg for the upcoming RiscVVirtPkg that can leverage
those modules without the dependency with Arm*Pkg.

The modules moved from ArmVirtPkg to OvmfPkg are,
- FdtClientDxe
- PciPcdProducerLib
- HighMemDxe
- QemuFwCfgLib
- FdtPciHostBridgeLib
- VirtioFdtDxe

Below PCDs are moved to under MdePkg and leverage by RiscVVirtPkg.
This change also remove the dependency on ArmPkg of OvmfPkg.
- PcdPciIoTranslation
- PcdPciIoTranslation
- PcdPciMmio32(64)Translation

Signed-off-by: Abner Chang <abner.chang@hpe.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Sami Mujawar <sami.mujawar@arm.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Daniel Schaefer <daniel.schaefer@hpe.com>
Cc: Sunil V L <sunilvl@ventanamicro.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>

Abner Chang (12):
  ArmVirtPkg/FdtClintDxe: Move FdtClientDxe to EmbeddedPkg
  MdePkg: Add PcdPciIoTranslation PCD
  ArmPkg: Use PcdPciIoTranslation PCD from MdePkg
  ArmVirtPkg/FdtPciPcdProducerLib: Relocate PciPcdProducerLib to OvmfPkg
  ArmVirtPkg/HighMemDxe: Relocate HighMemDxe to OvmfPkg
  OvmfPkg/HighMemDxe: Add RISC-V in the supported arch.
  ArmVirtPkg/QemuFwCfgLib: Relocate QemuFwCfgLib to OvmfPkg
  OvmfPkg/QemuFwCfgLibMMIO: Add RISC-V arch support
  MdePkg: Add PcdPciMmio32(64)Translation PCDs
  ArmVirtPkg/FdtPciHostBridgeLib: Relocate FdtPciHostBridgeLib to
    OvmfPkg/Fdt
  OvmfPkg/FdtPciHostBridgeLib: Add RISC-V in the supported arch.
  ArmVirtPkg/VirtioFdtDxe: Relocate VirtioFdtDxe to OvmfPkg/Fdt

 ArmPkg/ArmPkg.dec                             | 15 ++++++--------
 ArmVirtPkg/ArmVirtPkg.dec                     |  3 ---
 EmbeddedPkg/EmbeddedPkg.dec                   |  1 +
 MdePkg/MdePkg.dec                             | 12 +++++++++++
 ArmVirtPkg/ArmVirtCloudHv.dsc                 | 18 ++++++++---------
 ArmVirtPkg/ArmVirtKvmTool.dsc                 | 18 ++++++++---------
 ArmVirtPkg/ArmVirtQemu.dsc                    | 20 +++++++++----------
 ArmVirtPkg/ArmVirtQemuKernel.dsc              | 20 +++++++++----------
 ArmVirtPkg/ArmVirtXen.dsc                     |  2 +-
 EmbeddedPkg/EmbeddedPkg.dsc                   |  1 +
 ArmVirtPkg/ArmVirtCloudHv.fdf                 |  6 +++---
 ArmVirtPkg/ArmVirtKvmTool.fdf                 |  6 +++---
 ArmVirtPkg/ArmVirtXen.fdf                     |  2 +-
 ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc          |  6 +++---
 .../ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf       |  2 +-
 .../ArmVirtGicArchLib/ArmVirtGicArchLib.inf   |  1 +
 .../ArmVirtPL031FdtClientLib.inf              |  1 +
 .../ArmVirtPsciResetSystemLib.inf             |  1 +
 .../ArmVirtTimerFdtClientLib.inf              |  1 +
 .../KvmtoolRtcFdtClientLib.inf                |  1 +
 .../NorFlashKvmtoolLib/NorFlashKvmtoolLib.inf |  1 +
 .../NorFlashQemuLib/NorFlashQemuLib.inf       |  1 +
 .../XenAcpiPlatformDxe/XenAcpiPlatformDxe.inf |  1 +
 ArmVirtPkg/XenioFdtDxe/XenioFdtDxe.inf        |  1 +
 .../Drivers}/FdtClientDxe/FdtClientDxe.inf    |  1 -
 .../FdtPciHostBridgeLib.inf                   | 11 +++++-----
 .../FdtPciPcdProducerLib.inf                  |  5 ++---
 .../Fdt}/HighMemDxe/HighMemDxe.inf            |  7 ++++---
 .../Fdt}/VirtioFdtDxe/VirtioFdtDxe.inf        |  2 +-
 .../Library/QemuFwCfgLib/QemuFwCfgLibMmio.inf |  6 +++---
 .../Include/Protocol/FdtClient.h              |  0
 .../Drivers}/FdtClientDxe/FdtClientDxe.c      |  0
 .../FdtPciHostBridgeLib/FdtPciHostBridgeLib.c |  0
 .../FdtPciPcdProducerLib.c                    |  0
 .../Fdt}/HighMemDxe/HighMemDxe.c              |  3 ++-
 .../Fdt}/VirtioFdtDxe/VirtioFdtDxe.c          |  0
 .../Library/QemuFwCfgLib/QemuFwCfgLibMmio.c   |  7 ++++---
 Maintainers.txt                               |  6 ++++++
 38 files changed, 106 insertions(+), 83 deletions(-)
 rename {ArmVirtPkg => EmbeddedPkg/Drivers}/FdtClientDxe/FdtClientDxe.inf (92%)
 rename {ArmVirtPkg/Library => OvmfPkg/Fdt}/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf (77%)
 rename {ArmVirtPkg/Library => OvmfPkg/Fdt}/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf (87%)
 rename {ArmVirtPkg => OvmfPkg/Fdt}/HighMemDxe/HighMemDxe.inf (83%)
 rename {ArmVirtPkg => OvmfPkg/Fdt}/VirtioFdtDxe/VirtioFdtDxe.inf (92%)
 rename ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLib.inf => OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibMmio.inf (86%)
 rename {ArmVirtPkg => EmbeddedPkg}/Include/Protocol/FdtClient.h (100%)
 rename {ArmVirtPkg => EmbeddedPkg/Drivers}/FdtClientDxe/FdtClientDxe.c (100%)
 rename {ArmVirtPkg/Library => OvmfPkg/Fdt}/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c (100%)
 rename {ArmVirtPkg/Library => OvmfPkg/Fdt}/FdtPciPcdProducerLib/FdtPciPcdProducerLib.c (100%)
 rename {ArmVirtPkg => OvmfPkg/Fdt}/HighMemDxe/HighMemDxe.c (95%)
 rename {ArmVirtPkg => OvmfPkg/Fdt}/VirtioFdtDxe/VirtioFdtDxe.c (100%)
 rename ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLib.c => OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibMmio.c (93%)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [PATCH V3 01/12] ArmVirtPkg/FdtClintDxe: Move FdtClientDxe to EmbeddedPkg
  2021-09-30  0:45 [PATCH V3 00/12] Migrate ArmVirtPkg modules to OvmfPkg Abner Chang
@ 2021-09-30  0:45 ` Abner Chang
  2021-09-30  0:45 ` [PATCH V3 02/12] MdePkg: Add PcdPciIoTranslation PCD Abner Chang
                   ` (15 subsequent siblings)
  16 siblings, 0 replies; 27+ messages in thread
From: Abner Chang @ 2021-09-30  0:45 UTC (permalink / raw)
  To: devel
  Cc: Ard Biesheuvel, Leif Lindholm, Sami Mujawar, Gerd Hoffmann,
	Daniel Schaefer, Sunil V L

This is one of the series patches to restructure the location of modules under
ArmVirtPkg for RiscVVirtPkg. RiscVVirtPkg leverage FDT Client protocol to
parse FDT nodes.

Signed-off-by: Abner Chang <abner.chang@hpe.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Sami Mujawar <sami.mujawar@arm.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Daniel Schaefer <daniel.schaefer@hpe.com>
Cc: Sunil V L <sunilvl@ventanamicro.com>
---
 ArmVirtPkg/ArmVirtPkg.dec                                      | 3 ---
 EmbeddedPkg/EmbeddedPkg.dec                                    | 1 +
 ArmVirtPkg/ArmVirtCloudHv.dsc                                  | 2 +-
 ArmVirtPkg/ArmVirtKvmTool.dsc                                  | 2 +-
 ArmVirtPkg/ArmVirtQemu.dsc                                     | 2 +-
 ArmVirtPkg/ArmVirtQemuKernel.dsc                               | 2 +-
 ArmVirtPkg/ArmVirtXen.dsc                                      | 2 +-
 EmbeddedPkg/EmbeddedPkg.dsc                                    | 1 +
 ArmVirtPkg/ArmVirtCloudHv.fdf                                  | 2 +-
 ArmVirtPkg/ArmVirtKvmTool.fdf                                  | 2 +-
 ArmVirtPkg/ArmVirtXen.fdf                                      | 2 +-
 ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc                           | 2 +-
 ArmVirtPkg/HighMemDxe/HighMemDxe.inf                           | 1 +
 ArmVirtPkg/Library/ArmVirtGicArchLib/ArmVirtGicArchLib.inf     | 1 +
 .../ArmVirtPL031FdtClientLib/ArmVirtPL031FdtClientLib.inf      | 1 +
 .../ArmVirtPsciResetSystemLib/ArmVirtPsciResetSystemLib.inf    | 1 +
 .../ArmVirtTimerFdtClientLib/ArmVirtTimerFdtClientLib.inf      | 1 +
 ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf | 1 +
 .../Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf      | 1 +
 .../Library/KvmtoolRtcFdtClientLib/KvmtoolRtcFdtClientLib.inf  | 1 +
 ArmVirtPkg/Library/NorFlashKvmtoolLib/NorFlashKvmtoolLib.inf   | 1 +
 ArmVirtPkg/Library/NorFlashQemuLib/NorFlashQemuLib.inf         | 1 +
 ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLib.inf               | 1 +
 ArmVirtPkg/VirtioFdtDxe/VirtioFdtDxe.inf                       | 1 +
 ArmVirtPkg/XenAcpiPlatformDxe/XenAcpiPlatformDxe.inf           | 1 +
 ArmVirtPkg/XenioFdtDxe/XenioFdtDxe.inf                         | 1 +
 .../Drivers}/FdtClientDxe/FdtClientDxe.inf                     | 1 -
 {ArmVirtPkg => EmbeddedPkg}/Include/Protocol/FdtClient.h       | 0
 .../Drivers}/FdtClientDxe/FdtClientDxe.c                       | 0
 29 files changed, 25 insertions(+), 13 deletions(-)
 rename {ArmVirtPkg => EmbeddedPkg/Drivers}/FdtClientDxe/FdtClientDxe.inf (92%)
 rename {ArmVirtPkg => EmbeddedPkg}/Include/Protocol/FdtClient.h (100%)
 rename {ArmVirtPkg => EmbeddedPkg/Drivers}/FdtClientDxe/FdtClientDxe.c (100%)

diff --git a/ArmVirtPkg/ArmVirtPkg.dec b/ArmVirtPkg/ArmVirtPkg.dec
index 4e4d758015..4e165f6cd8 100644
--- a/ArmVirtPkg/ArmVirtPkg.dec
+++ b/ArmVirtPkg/ArmVirtPkg.dec
@@ -35,9 +35,6 @@
 
   gArmVirtVariableGuid   = { 0x50bea1e5, 0xa2c5, 0x46e9, { 0x9b, 0x3a, 0x59, 0x59, 0x65, 0x16, 0xb0, 0x0a } }
 
-[Protocols]
-  gFdtClientProtocolGuid = { 0xE11FACA0, 0x4710, 0x4C8E, { 0xA7, 0xA2, 0x01, 0xBA, 0xA2, 0x59, 0x1B, 0x4C } }
-
 [PcdsFeatureFlag]
   #
   # Feature Flag PCD that defines whether TPM2 support is enabled
diff --git a/EmbeddedPkg/EmbeddedPkg.dec b/EmbeddedPkg/EmbeddedPkg.dec
index 7638aaaade..637888e0fd 100644
--- a/EmbeddedPkg/EmbeddedPkg.dec
+++ b/EmbeddedPkg/EmbeddedPkg.dec
@@ -79,6 +79,7 @@
   gPlatformGpioProtocolGuid = { 0x52ce9845, 0x5af4, 0x43e2, {0xba, 0xfd, 0x23, 0x08, 0x12, 0x54, 0x7a, 0xc2 }}
   gPlatformVirtualKeyboardProtocolGuid = { 0x0e3606d2, 0x1dc3, 0x4e6f, { 0xbe, 0x65, 0x39, 0x49, 0x82, 0xa2, 0x65, 0x47 }}
   gAndroidBootImgProtocolGuid = { 0x9859bb19, 0x407c, 0x4f8b, {0xbc, 0xe1, 0xf8, 0xda, 0x65, 0x65, 0xf4, 0xa5 }}
+  gFdtClientProtocolGuid = { 0xE11FACA0, 0x4710, 0x4C8E, { 0xA7, 0xA2, 0x01, 0xBA, 0xA2, 0x59, 0x1B, 0x4C } }
 
 [Ppis]
   gEdkiiEmbeddedGpioPpiGuid = { 0x21c3b115, 0x4e0b, 0x470c, { 0x85, 0xc7, 0xe1, 0x05, 0xa5, 0x75, 0xc9, 0x7b }}
diff --git a/ArmVirtPkg/ArmVirtCloudHv.dsc b/ArmVirtPkg/ArmVirtCloudHv.dsc
index f292ba6079..07313e1e67 100644
--- a/ArmVirtPkg/ArmVirtCloudHv.dsc
+++ b/ArmVirtPkg/ArmVirtCloudHv.dsc
@@ -293,7 +293,7 @@
   # Platform Driver
   #
   ArmVirtPkg/VirtioFdtDxe/VirtioFdtDxe.inf
-  ArmVirtPkg/FdtClientDxe/FdtClientDxe.inf
+  EmbeddedPkg/Drivers/FdtClientDxe/FdtClientDxe.inf
   ArmVirtPkg/HighMemDxe/HighMemDxe.inf
   OvmfPkg/VirtioBlkDxe/VirtioBlk.inf
   OvmfPkg/VirtioScsiDxe/VirtioScsi.inf
diff --git a/ArmVirtPkg/ArmVirtKvmTool.dsc b/ArmVirtPkg/ArmVirtKvmTool.dsc
index 3bd1cc72a1..745eae347b 100644
--- a/ArmVirtPkg/ArmVirtKvmTool.dsc
+++ b/ArmVirtPkg/ArmVirtKvmTool.dsc
@@ -292,7 +292,7 @@
   #
   ArmVirtPkg/KvmtoolPlatformDxe/KvmtoolPlatformDxe.inf
   ArmVirtPkg/VirtioFdtDxe/VirtioFdtDxe.inf
-  ArmVirtPkg/FdtClientDxe/FdtClientDxe.inf
+  EmbeddedPkg/Drivers/FdtClientDxe/FdtClientDxe.inf
   ArmVirtPkg/HighMemDxe/HighMemDxe.inf
   OvmfPkg/VirtioBlkDxe/VirtioBlk.inf
   OvmfPkg/VirtioScsiDxe/VirtioScsi.inf
diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc
index 97539edef7..5030174fe3 100644
--- a/ArmVirtPkg/ArmVirtQemu.dsc
+++ b/ArmVirtPkg/ArmVirtQemu.dsc
@@ -404,7 +404,7 @@
   # Platform Driver
   #
   ArmVirtPkg/VirtioFdtDxe/VirtioFdtDxe.inf
-  ArmVirtPkg/FdtClientDxe/FdtClientDxe.inf
+  EmbeddedPkg/Drivers/FdtClientDxe/FdtClientDxe.inf
   ArmVirtPkg/HighMemDxe/HighMemDxe.inf
   OvmfPkg/VirtioBlkDxe/VirtioBlk.inf
   OvmfPkg/VirtioScsiDxe/VirtioScsi.inf
diff --git a/ArmVirtPkg/ArmVirtQemuKernel.dsc b/ArmVirtPkg/ArmVirtQemuKernel.dsc
index 28064199c8..5e0a2ee0c6 100644
--- a/ArmVirtPkg/ArmVirtQemuKernel.dsc
+++ b/ArmVirtPkg/ArmVirtQemuKernel.dsc
@@ -340,7 +340,7 @@
   # Platform Driver
   #
   ArmVirtPkg/VirtioFdtDxe/VirtioFdtDxe.inf
-  ArmVirtPkg/FdtClientDxe/FdtClientDxe.inf
+  EmbeddedPkg/Drivers/FdtClientDxe/FdtClientDxe.inf
   ArmVirtPkg/HighMemDxe/HighMemDxe.inf
   OvmfPkg/VirtioBlkDxe/VirtioBlk.inf
   OvmfPkg/VirtioScsiDxe/VirtioScsi.inf
diff --git a/ArmVirtPkg/ArmVirtXen.dsc b/ArmVirtPkg/ArmVirtXen.dsc
index 2b07a5ba19..73b4a90f3e 100644
--- a/ArmVirtPkg/ArmVirtXen.dsc
+++ b/ArmVirtPkg/ArmVirtXen.dsc
@@ -196,7 +196,7 @@
   # Platform Driver
   #
   ArmVirtPkg/XenioFdtDxe/XenioFdtDxe.inf
-  ArmVirtPkg/FdtClientDxe/FdtClientDxe.inf
+  EmbeddedPkg/Drivers/FdtClientDxe/FdtClientDxe.inf
 
   #
   # FAT filesystem + GPT/MBR partitioning + UDF filesystem
diff --git a/EmbeddedPkg/EmbeddedPkg.dsc b/EmbeddedPkg/EmbeddedPkg.dsc
index c41864e8a5..f7ed61545c 100644
--- a/EmbeddedPkg/EmbeddedPkg.dsc
+++ b/EmbeddedPkg/EmbeddedPkg.dsc
@@ -238,6 +238,7 @@
 
   EmbeddedPkg/Drivers/ConsolePrefDxe/ConsolePrefDxe.inf
   EmbeddedPkg/Drivers/DtPlatformDxe/DtPlatformDxe.inf
+  EmbeddedPkg/Drivers/FdtClientDxe/FdtClientDxe.inf
 
   EmbeddedPkg/Drivers/NonCoherentIoMmuDxe/NonCoherentIoMmuDxe.inf {
     <LibraryClasses>
diff --git a/ArmVirtPkg/ArmVirtCloudHv.fdf b/ArmVirtPkg/ArmVirtCloudHv.fdf
index 13fe8061c3..1bb452ebb8 100644
--- a/ArmVirtPkg/ArmVirtCloudHv.fdf
+++ b/ArmVirtPkg/ArmVirtCloudHv.fdf
@@ -106,7 +106,7 @@ READ_LOCK_STATUS   = TRUE
   INF MdeModulePkg/Core/Dxe/DxeMain.inf
   INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
   INF ArmVirtPkg/VirtioFdtDxe/VirtioFdtDxe.inf
-  INF ArmVirtPkg/FdtClientDxe/FdtClientDxe.inf
+  INF EmbeddedPkg/Drivers/FdtClientDxe/FdtClientDxe.inf
   INF ArmVirtPkg/HighMemDxe/HighMemDxe.inf
 
   #
diff --git a/ArmVirtPkg/ArmVirtKvmTool.fdf b/ArmVirtPkg/ArmVirtKvmTool.fdf
index 152453dc4b..1dac8b7880 100644
--- a/ArmVirtPkg/ArmVirtKvmTool.fdf
+++ b/ArmVirtPkg/ArmVirtKvmTool.fdf
@@ -120,7 +120,7 @@ READ_LOCK_STATUS   = TRUE
   INF MdeModulePkg/Core/Dxe/DxeMain.inf
   INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
   INF ArmVirtPkg/VirtioFdtDxe/VirtioFdtDxe.inf
-  INF ArmVirtPkg/FdtClientDxe/FdtClientDxe.inf
+  INF EmbeddedPkg/Drivers/FdtClientDxe/FdtClientDxe.inf
   INF ArmVirtPkg/KvmtoolPlatformDxe/KvmtoolPlatformDxe.inf
   INF ArmVirtPkg/HighMemDxe/HighMemDxe.inf
 
diff --git a/ArmVirtPkg/ArmVirtXen.fdf b/ArmVirtPkg/ArmVirtXen.fdf
index 9597465cf5..132480f030 100644
--- a/ArmVirtPkg/ArmVirtXen.fdf
+++ b/ArmVirtPkg/ArmVirtXen.fdf
@@ -139,7 +139,7 @@ READ_LOCK_STATUS   = TRUE
   INF MdeModulePkg/Core/Dxe/DxeMain.inf
   INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
   INF ArmVirtPkg/XenioFdtDxe/XenioFdtDxe.inf
-  INF ArmVirtPkg/FdtClientDxe/FdtClientDxe.inf
+  INF EmbeddedPkg/Drivers/FdtClientDxe/FdtClientDxe.inf
 
   #
   # PI DXE Drivers producing Architectural Protocols (EFI Services)
diff --git a/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc b/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc
index 26f13f6a21..e9518dd273 100644
--- a/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc
+++ b/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc
@@ -41,7 +41,7 @@ READ_LOCK_STATUS   = TRUE
   INF MdeModulePkg/Core/Dxe/DxeMain.inf
   INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
   INF ArmVirtPkg/VirtioFdtDxe/VirtioFdtDxe.inf
-  INF ArmVirtPkg/FdtClientDxe/FdtClientDxe.inf
+  INF EmbeddedPkg/Drivers/FdtClientDxe/FdtClientDxe.inf
   INF ArmVirtPkg/HighMemDxe/HighMemDxe.inf
 
   #
diff --git a/ArmVirtPkg/HighMemDxe/HighMemDxe.inf b/ArmVirtPkg/HighMemDxe/HighMemDxe.inf
index e510880b0d..168fc90d2a 100644
--- a/ArmVirtPkg/HighMemDxe/HighMemDxe.inf
+++ b/ArmVirtPkg/HighMemDxe/HighMemDxe.inf
@@ -20,6 +20,7 @@
   HighMemDxe.c
 
 [Packages]
+  EmbeddedPkg/EmbeddedPkg.dec
   MdePkg/MdePkg.dec
   MdeModulePkg/MdeModulePkg.dec
   ArmPkg/ArmPkg.dec
diff --git a/ArmVirtPkg/Library/ArmVirtGicArchLib/ArmVirtGicArchLib.inf b/ArmVirtPkg/Library/ArmVirtGicArchLib/ArmVirtGicArchLib.inf
index 43fcb0b73b..23cc64ab93 100644
--- a/ArmVirtPkg/Library/ArmVirtGicArchLib/ArmVirtGicArchLib.inf
+++ b/ArmVirtPkg/Library/ArmVirtGicArchLib/ArmVirtGicArchLib.inf
@@ -30,6 +30,7 @@
 [Packages]
   ArmPkg/ArmPkg.dec
   ArmVirtPkg/ArmVirtPkg.dec
+  EmbeddedPkg/EmbeddedPkg.dec
   MdePkg/MdePkg.dec
 
 [Protocols]
diff --git a/ArmVirtPkg/Library/ArmVirtPL031FdtClientLib/ArmVirtPL031FdtClientLib.inf b/ArmVirtPkg/Library/ArmVirtPL031FdtClientLib/ArmVirtPL031FdtClientLib.inf
index 52027d5101..2cfb2b6af5 100644
--- a/ArmVirtPkg/Library/ArmVirtPL031FdtClientLib/ArmVirtPL031FdtClientLib.inf
+++ b/ArmVirtPkg/Library/ArmVirtPL031FdtClientLib/ArmVirtPL031FdtClientLib.inf
@@ -22,6 +22,7 @@
 [Packages]
   ArmPlatformPkg/ArmPlatformPkg.dec
   ArmVirtPkg/ArmVirtPkg.dec
+  EmbeddedPkg/EmbeddedPkg.dec
   MdePkg/MdePkg.dec
 
 [LibraryClasses]
diff --git a/ArmVirtPkg/Library/ArmVirtPsciResetSystemLib/ArmVirtPsciResetSystemLib.inf b/ArmVirtPkg/Library/ArmVirtPsciResetSystemLib/ArmVirtPsciResetSystemLib.inf
index 954a6ac8a6..4fde5e443f 100644
--- a/ArmVirtPkg/Library/ArmVirtPsciResetSystemLib/ArmVirtPsciResetSystemLib.inf
+++ b/ArmVirtPkg/Library/ArmVirtPsciResetSystemLib/ArmVirtPsciResetSystemLib.inf
@@ -24,6 +24,7 @@
 [Packages]
   ArmPkg/ArmPkg.dec
   ArmVirtPkg/ArmVirtPkg.dec
+  EmbeddedPkg/EmbeddedPkg.dec
   MdeModulePkg/MdeModulePkg.dec
   MdePkg/MdePkg.dec
 
diff --git a/ArmVirtPkg/Library/ArmVirtTimerFdtClientLib/ArmVirtTimerFdtClientLib.inf b/ArmVirtPkg/Library/ArmVirtTimerFdtClientLib/ArmVirtTimerFdtClientLib.inf
index 382e3004e1..9e6f6f63a5 100644
--- a/ArmVirtPkg/Library/ArmVirtTimerFdtClientLib/ArmVirtTimerFdtClientLib.inf
+++ b/ArmVirtPkg/Library/ArmVirtTimerFdtClientLib/ArmVirtTimerFdtClientLib.inf
@@ -23,6 +23,7 @@
 [Packages]
   ArmPkg/ArmPkg.dec
   ArmVirtPkg/ArmVirtPkg.dec
+  EmbeddedPkg/EmbeddedPkg.dec
   MdePkg/MdePkg.dec
 
 [LibraryClasses]
diff --git a/ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf b/ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf
index b813a0851d..1549f9d884 100644
--- a/ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf
+++ b/ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf
@@ -29,6 +29,7 @@
 [Packages]
   ArmPkg/ArmPkg.dec
   ArmVirtPkg/ArmVirtPkg.dec
+  EmbeddedPkg/EmbeddedPkg.dec
   MdeModulePkg/MdeModulePkg.dec
   MdePkg/MdePkg.dec
   OvmfPkg/OvmfPkg.dec
diff --git a/ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf b/ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
index 337a5488fc..bb055a5beb 100644
--- a/ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
+++ b/ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
@@ -22,6 +22,7 @@
 [Packages]
   ArmPkg/ArmPkg.dec
   ArmVirtPkg/ArmVirtPkg.dec
+  EmbeddedPkg/EmbeddedPkg.dec
   MdeModulePkg/MdeModulePkg.dec
   MdePkg/MdePkg.dec
 
diff --git a/ArmVirtPkg/Library/KvmtoolRtcFdtClientLib/KvmtoolRtcFdtClientLib.inf b/ArmVirtPkg/Library/KvmtoolRtcFdtClientLib/KvmtoolRtcFdtClientLib.inf
index deb3bf635c..f0a7c19ca5 100644
--- a/ArmVirtPkg/Library/KvmtoolRtcFdtClientLib/KvmtoolRtcFdtClientLib.inf
+++ b/ArmVirtPkg/Library/KvmtoolRtcFdtClientLib/KvmtoolRtcFdtClientLib.inf
@@ -21,6 +21,7 @@
 
 [Packages]
   ArmVirtPkg/ArmVirtPkg.dec
+  EmbeddedPkg/EmbeddedPkg.dec
   MdePkg/MdePkg.dec
   PcAtChipsetPkg/PcAtChipsetPkg.dec
 
diff --git a/ArmVirtPkg/Library/NorFlashKvmtoolLib/NorFlashKvmtoolLib.inf b/ArmVirtPkg/Library/NorFlashKvmtoolLib/NorFlashKvmtoolLib.inf
index 95e4ba89a4..04d6723295 100644
--- a/ArmVirtPkg/Library/NorFlashKvmtoolLib/NorFlashKvmtoolLib.inf
+++ b/ArmVirtPkg/Library/NorFlashKvmtoolLib/NorFlashKvmtoolLib.inf
@@ -22,6 +22,7 @@
   ArmPkg/ArmPkg.dec
   ArmPlatformPkg/ArmPlatformPkg.dec
   ArmVirtPkg/ArmVirtPkg.dec
+  EmbeddedPkg/EmbeddedPkg.dec
   MdePkg/MdePkg.dec
   MdeModulePkg/MdeModulePkg.dec
 
diff --git a/ArmVirtPkg/Library/NorFlashQemuLib/NorFlashQemuLib.inf b/ArmVirtPkg/Library/NorFlashQemuLib/NorFlashQemuLib.inf
index 9aad84ca6d..4c3683bf5d 100644
--- a/ArmVirtPkg/Library/NorFlashQemuLib/NorFlashQemuLib.inf
+++ b/ArmVirtPkg/Library/NorFlashQemuLib/NorFlashQemuLib.inf
@@ -24,6 +24,7 @@
   ArmPlatformPkg/ArmPlatformPkg.dec
   ArmPkg/ArmPkg.dec
   ArmVirtPkg/ArmVirtPkg.dec
+  EmbeddedPkg/EmbeddedPkg.dec
 
 [LibraryClasses]
   BaseLib
diff --git a/ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLib.inf b/ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLib.inf
index feceed5f93..f3cc827907 100644
--- a/ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLib.inf
+++ b/ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLib.inf
@@ -32,6 +32,7 @@
 [Packages]
   MdePkg/MdePkg.dec
   OvmfPkg/OvmfPkg.dec
+  EmbeddedPkg/EmbeddedPkg.dec
   ArmVirtPkg/ArmVirtPkg.dec
 
 [LibraryClasses]
diff --git a/ArmVirtPkg/VirtioFdtDxe/VirtioFdtDxe.inf b/ArmVirtPkg/VirtioFdtDxe/VirtioFdtDxe.inf
index 8fd92f17df..9d5ae7b12f 100644
--- a/ArmVirtPkg/VirtioFdtDxe/VirtioFdtDxe.inf
+++ b/ArmVirtPkg/VirtioFdtDxe/VirtioFdtDxe.inf
@@ -21,6 +21,7 @@
 
 [Packages]
   ArmVirtPkg/ArmVirtPkg.dec
+  EmbeddedPkg/EmbeddedPkg.dec
   MdePkg/MdePkg.dec
   OvmfPkg/OvmfPkg.dec
 
diff --git a/ArmVirtPkg/XenAcpiPlatformDxe/XenAcpiPlatformDxe.inf b/ArmVirtPkg/XenAcpiPlatformDxe/XenAcpiPlatformDxe.inf
index 5881d6b515..9bd31790ca 100644
--- a/ArmVirtPkg/XenAcpiPlatformDxe/XenAcpiPlatformDxe.inf
+++ b/ArmVirtPkg/XenAcpiPlatformDxe/XenAcpiPlatformDxe.inf
@@ -26,6 +26,7 @@
 
 [Packages]
   ArmVirtPkg/ArmVirtPkg.dec
+  EmbeddedPkg/EmbeddedPkg.dec
   MdePkg/MdePkg.dec
   MdeModulePkg/MdeModulePkg.dec
 
diff --git a/ArmVirtPkg/XenioFdtDxe/XenioFdtDxe.inf b/ArmVirtPkg/XenioFdtDxe/XenioFdtDxe.inf
index 59e53cad80..10038d5625 100644
--- a/ArmVirtPkg/XenioFdtDxe/XenioFdtDxe.inf
+++ b/ArmVirtPkg/XenioFdtDxe/XenioFdtDxe.inf
@@ -21,6 +21,7 @@
 
 [Packages]
   ArmVirtPkg/ArmVirtPkg.dec
+  EmbeddedPkg/EmbeddedPkg.dec
   MdePkg/MdePkg.dec
   OvmfPkg/OvmfPkg.dec
 
diff --git a/ArmVirtPkg/FdtClientDxe/FdtClientDxe.inf b/EmbeddedPkg/Drivers/FdtClientDxe/FdtClientDxe.inf
similarity index 92%
rename from ArmVirtPkg/FdtClientDxe/FdtClientDxe.inf
rename to EmbeddedPkg/Drivers/FdtClientDxe/FdtClientDxe.inf
index d7ba17a0c9..ff80ed8b6a 100644
--- a/ArmVirtPkg/FdtClientDxe/FdtClientDxe.inf
+++ b/EmbeddedPkg/Drivers/FdtClientDxe/FdtClientDxe.inf
@@ -19,7 +19,6 @@
   FdtClientDxe.c
 
 [Packages]
-  ArmVirtPkg/ArmVirtPkg.dec
   EmbeddedPkg/EmbeddedPkg.dec
   MdeModulePkg/MdeModulePkg.dec
   MdePkg/MdePkg.dec
diff --git a/ArmVirtPkg/Include/Protocol/FdtClient.h b/EmbeddedPkg/Include/Protocol/FdtClient.h
similarity index 100%
rename from ArmVirtPkg/Include/Protocol/FdtClient.h
rename to EmbeddedPkg/Include/Protocol/FdtClient.h
diff --git a/ArmVirtPkg/FdtClientDxe/FdtClientDxe.c b/EmbeddedPkg/Drivers/FdtClientDxe/FdtClientDxe.c
similarity index 100%
rename from ArmVirtPkg/FdtClientDxe/FdtClientDxe.c
rename to EmbeddedPkg/Drivers/FdtClientDxe/FdtClientDxe.c
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [PATCH V3 02/12] MdePkg: Add PcdPciIoTranslation PCD
  2021-09-30  0:45 [PATCH V3 00/12] Migrate ArmVirtPkg modules to OvmfPkg Abner Chang
  2021-09-30  0:45 ` [PATCH V3 01/12] ArmVirtPkg/FdtClintDxe: Move FdtClientDxe to EmbeddedPkg Abner Chang
@ 2021-09-30  0:45 ` Abner Chang
  2021-09-30  0:45 ` [PATCH V3 03/12] ArmPkg: Use PcdPciIoTranslation PCD from MdePkg Abner Chang
                   ` (14 subsequent siblings)
  16 siblings, 0 replies; 27+ messages in thread
From: Abner Chang @ 2021-09-30  0:45 UTC (permalink / raw)
  To: devel
  Cc: Michael D Kinney, Liming Gao, Zhiguang Liu, Ard Biesheuvel,
	Leif Lindholm, Sami Mujawar, Gerd Hoffmann, Daniel Schaefer,
	Sunil V L

This PCD is moved from ArmPkg that is used to set the base address
of PCI MMIO window that provides I/O access. We relocate this PCD
because this PCD is common to ARM and RSIC-V arch.

Signed-off-by: Abner Chang <abner.chang@hpe.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Sami Mujawar <sami.mujawar@arm.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Daniel Schaefer <daniel.schaefer@hpe.com>
Cc: Sunil V L <sunilvl@ventanamicro.com>
---
 MdePkg/MdePkg.dec | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec
index a28a2daaff..08d259764a 100644
--- a/MdePkg/MdePkg.dec
+++ b/MdePkg/MdePkg.dec
@@ -2302,6 +2302,10 @@
   # @Prompt PCI Express Base Address.
   gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0xE0000000|UINT64|0x0000000a
 
+  ## This value is used to set the base address of PCI MMIO window that provides I/O access.
+  # @Prompt PCI I/O Memory Map Window Base Address.
+  gEfiMdePkgTokenSpaceGuid.PcdPciIoTranslation|0x0|UINT64|0x00000040
+
   ## This value is used to set the size of PCI express hierarchy. The default is 256 MB.
   # @Prompt PCI Express Base Size.
   gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseSize|0x10000000|UINT64|0x0000000f
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [PATCH V3 03/12] ArmPkg: Use PcdPciIoTranslation PCD from MdePkg
  2021-09-30  0:45 [PATCH V3 00/12] Migrate ArmVirtPkg modules to OvmfPkg Abner Chang
  2021-09-30  0:45 ` [PATCH V3 01/12] ArmVirtPkg/FdtClintDxe: Move FdtClientDxe to EmbeddedPkg Abner Chang
  2021-09-30  0:45 ` [PATCH V3 02/12] MdePkg: Add PcdPciIoTranslation PCD Abner Chang
@ 2021-09-30  0:45 ` Abner Chang
  2021-09-30  0:45 ` [PATCH V3 04/12] ArmVirtPkg/FdtPciPcdProducerLib: Relocate PciPcdProducerLib to OvmfPkg Abner Chang
                   ` (13 subsequent siblings)
  16 siblings, 0 replies; 27+ messages in thread
From: Abner Chang @ 2021-09-30  0:45 UTC (permalink / raw)
  To: devel
  Cc: Ard Biesheuvel, Leif Lindholm, Sami Mujawar, Gerd Hoffmann,
	Daniel Schaefer, Sunil V L

PcdPciIoTranslation PCD is relocated to MdePkg and leveraged by
both ARM and RISC-V arch. This patch removes the one from ArmPkg
and address the corresponding changes required for other modules
under ArmVirtPkg.

Signed-off-by: Abner Chang <abner.chang@hpe.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Sami Mujawar <sami.mujawar@arm.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Daniel Schaefer <daniel.schaefer@hpe.com>
Cc: Sunil V L <sunilvl@ventanamicro.com>
Reviewed-by: Daniel Schaefer <daniel.schaefer@hpe.com>
---
 ArmPkg/ArmPkg.dec                                            | 5 ++---
 ArmVirtPkg/ArmVirtCloudHv.dsc                                | 2 +-
 ArmVirtPkg/ArmVirtKvmTool.dsc                                | 2 +-
 ArmVirtPkg/ArmVirtQemu.dsc                                   | 2 +-
 ArmVirtPkg/ArmVirtQemuKernel.dsc                             | 2 +-
 ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf           | 2 +-
 .../Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf      | 2 +-
 .../Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf    | 2 +-
 8 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/ArmPkg/ArmPkg.dec b/ArmPkg/ArmPkg.dec
index 6ed51edd03..12584fb319 100644
--- a/ArmPkg/ArmPkg.dec
+++ b/ArmPkg/ArmPkg.dec
@@ -337,7 +337,7 @@
   #   UINT64 Mmio32CpuBase; // mapping target in 64-bit cpu-physical space
   #   UINT64 Mmio64CpuBase; // mapping target in 64-bit cpu-physical space
   #
-  #   PcdPciIoTranslation     = IoCpuBase     - PcdPciIoBase;
+  #   gEfiMdePkgTokenSpaceGuid.PcdPciIoTranslation = IoCpuBase - PcdPciIoBase;
   #   PcdPciMmio32Translation = Mmio32CpuBase - (UINT64)PcdPciMmio32Base;
   #   PcdPciMmio64Translation = Mmio64CpuBase - PcdPciMmio64Base;
   #
@@ -356,7 +356,7 @@
   #   UINT64 TranslatedMmio64Address;   // output parameter
   #
   #   TranslatedIoAddress     = UntranslatedIoAddress +
-  #                             PcdPciIoTranslation;
+  #                             gEfiMdePkgTokenSpaceGuid.PcdPciIoTranslation;
   #   TranslatedMmio32Address = (UINT64)UntranslatedMmio32Address +
   #                             PcdPciMmio32Translation;
   #   TranslatedMmio64Address = UntranslatedMmio64Address +
@@ -369,7 +369,6 @@
   #
   gArmTokenSpaceGuid.PcdPciIoBase|0x0|UINT64|0x00000050
   gArmTokenSpaceGuid.PcdPciIoSize|0x0|UINT64|0x00000051
-  gArmTokenSpaceGuid.PcdPciIoTranslation|0x0|UINT64|0x00000052
   gArmTokenSpaceGuid.PcdPciMmio32Base|0x0|UINT32|0x00000053
   gArmTokenSpaceGuid.PcdPciMmio32Size|0x0|UINT32|0x00000054
   gArmTokenSpaceGuid.PcdPciMmio32Translation|0x0|UINT64|0x00000055
diff --git a/ArmVirtPkg/ArmVirtCloudHv.dsc b/ArmVirtPkg/ArmVirtCloudHv.dsc
index 07313e1e67..f159754bf4 100644
--- a/ArmVirtPkg/ArmVirtCloudHv.dsc
+++ b/ArmVirtPkg/ArmVirtCloudHv.dsc
@@ -192,7 +192,7 @@
   # PCD and PcdPciDisableBusEnumeration above have not been assigned yet
   gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0xFFFFFFFFFFFFFFFF
 
-  gArmTokenSpaceGuid.PcdPciIoTranslation|0
+  gEfiMdePkgTokenSpaceGuid.PcdPciIoTranslation|0
 
   gEfiSecurityPkgTokenSpaceGuid.PcdTpmBaseAddress|0x0
 
diff --git a/ArmVirtPkg/ArmVirtKvmTool.dsc b/ArmVirtPkg/ArmVirtKvmTool.dsc
index 745eae347b..ff70509542 100644
--- a/ArmVirtPkg/ArmVirtKvmTool.dsc
+++ b/ArmVirtPkg/ArmVirtKvmTool.dsc
@@ -184,7 +184,7 @@
   # PCD and PcdPciDisableBusEnumeration above have not been assigned yet
   gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0xFFFFFFFFFFFFFFFF
 
-  gArmTokenSpaceGuid.PcdPciIoTranslation|0x0
+  gEfiMdePkgTokenSpaceGuid.PcdPciIoTranslation|0x0
 
   #
   # Set video resolution for boot options and for text setup.
diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc
index 5030174fe3..f4bb14903f 100644
--- a/ArmVirtPkg/ArmVirtQemu.dsc
+++ b/ArmVirtPkg/ArmVirtQemu.dsc
@@ -247,7 +247,7 @@
   # PCD and PcdPciDisableBusEnumeration above have not been assigned yet
   gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0xFFFFFFFFFFFFFFFF
 
-  gArmTokenSpaceGuid.PcdPciIoTranslation|0x0
+  gEfiMdePkgTokenSpaceGuid.PcdPciIoTranslation|0x0
 
   #
   # Set video resolution for boot options and for text setup.
diff --git a/ArmVirtPkg/ArmVirtQemuKernel.dsc b/ArmVirtPkg/ArmVirtQemuKernel.dsc
index 5e0a2ee0c6..eecef1a063 100644
--- a/ArmVirtPkg/ArmVirtQemuKernel.dsc
+++ b/ArmVirtPkg/ArmVirtQemuKernel.dsc
@@ -227,7 +227,7 @@
   # PCD and PcdPciDisableBusEnumeration above have not been assigned yet
   gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0xFFFFFFFFFFFFFFFF
 
-  gArmTokenSpaceGuid.PcdPciIoTranslation|0x0
+  gEfiMdePkgTokenSpaceGuid.PcdPciIoTranslation|0x0
 
   #
   # Set video resolution for boot options and for text setup.
diff --git a/ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf b/ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf
index 2bc4571d06..9339c2b532 100644
--- a/ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf
+++ b/ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf
@@ -38,7 +38,7 @@
   UefiBootServicesTableLib
 
 [Pcd]
-  gArmTokenSpaceGuid.PcdPciIoTranslation
+  gEfiMdePkgTokenSpaceGuid.PcdPciIoTranslation
 
 [Protocols]
   gEfiCpuIo2ProtocolGuid                         ## PRODUCES
diff --git a/ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf b/ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf
index 1549f9d884..f149693fa2 100644
--- a/ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf
+++ b/ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf
@@ -48,7 +48,7 @@
   gArmTokenSpaceGuid.PcdPciMmio64Translation
 
 [Pcd]
-  gArmTokenSpaceGuid.PcdPciIoTranslation
+  gEfiMdePkgTokenSpaceGuid.PcdPciIoTranslation
   gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress
 
 [Depex]
diff --git a/ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf b/ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
index bb055a5beb..1dfe779f6c 100644
--- a/ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
+++ b/ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
@@ -36,7 +36,7 @@
   gFdtClientProtocolGuid                                      ## CONSUMES
 
 [Pcd]
-  gArmTokenSpaceGuid.PcdPciIoTranslation                      ## PRODUCES
+  gEfiMdePkgTokenSpaceGuid.PcdPciIoTranslation                ## PRODUCES
   gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress           ## PRODUCES
   gEfiMdeModulePkgTokenSpaceGuid.PcdPciDisableBusEnumeration  ## PRODUCES
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [PATCH V3 04/12] ArmVirtPkg/FdtPciPcdProducerLib: Relocate PciPcdProducerLib to OvmfPkg
  2021-09-30  0:45 [PATCH V3 00/12] Migrate ArmVirtPkg modules to OvmfPkg Abner Chang
                   ` (2 preceding siblings ...)
  2021-09-30  0:45 ` [PATCH V3 03/12] ArmPkg: Use PcdPciIoTranslation PCD from MdePkg Abner Chang
@ 2021-09-30  0:45 ` Abner Chang
  2021-09-30  0:45 ` [PATCH V3 05/12] ArmVirtPkg/HighMemDxe: Relocate HighMemDxe " Abner Chang
                   ` (12 subsequent siblings)
  16 siblings, 0 replies; 27+ messages in thread
From: Abner Chang @ 2021-09-30  0:45 UTC (permalink / raw)
  To: devel
  Cc: Ard Biesheuvel, Leif Lindholm, Sami Mujawar, Jiewen Yao,
	Jordan Justen, Gerd Hoffmann, Daniel Schaefer, Sunil V L

Relocate PciPcdProducerLib to OvmfPkg/Fdt, this library is
leverage by both ARM and RISC-V archs.

Add OvmfPkg/Fdt maintainers in Maintainers.txt

Signed-off-by: Abner Chang <abner.chang@hpe.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Sami Mujawar <sami.mujawar@arm.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Daniel Schaefer <daniel.schaefer@hpe.com>
Cc: Sunil V L <sunilvl@ventanamicro.com>
Reviewed-by: Daniel Schaefer <daniel.schaefer@hpe.com>
---
 ArmVirtPkg/ArmVirtCloudHv.dsc                             | 8 ++++----
 ArmVirtPkg/ArmVirtKvmTool.dsc                             | 8 ++++----
 ArmVirtPkg/ArmVirtQemu.dsc                                | 8 ++++----
 ArmVirtPkg/ArmVirtQemuKernel.dsc                          | 8 ++++----
 .../Fdt}/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf    | 2 --
 .../Fdt}/FdtPciPcdProducerLib/FdtPciPcdProducerLib.c      | 0
 Maintainers.txt                                           | 6 ++++++
 7 files changed, 22 insertions(+), 18 deletions(-)
 rename {ArmVirtPkg/Library => OvmfPkg/Fdt}/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf (92%)
 rename {ArmVirtPkg/Library => OvmfPkg/Fdt}/FdtPciPcdProducerLib/FdtPciPcdProducerLib.c (100%)

diff --git a/ArmVirtPkg/ArmVirtCloudHv.dsc b/ArmVirtPkg/ArmVirtCloudHv.dsc
index f159754bf4..2928b9adb5 100644
--- a/ArmVirtPkg/ArmVirtCloudHv.dsc
+++ b/ArmVirtPkg/ArmVirtCloudHv.dsc
@@ -49,7 +49,7 @@
   FrameBufferBltLib|MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.inf
   QemuBootOrderLib|OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.inf
   FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf
-  PciPcdProducerLib|ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
+  PciPcdProducerLib|OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
   PciSegmentLib|MdePkg/Library/BasePciSegmentLibPci/BasePciSegmentLibPci.inf
   PciHostBridgeLib|ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf
   PciHostBridgeUtilityLib|ArmVirtPkg/Library/ArmVirtPciHostBridgeUtilityLib/ArmVirtPciHostBridgeUtilityLib.inf
@@ -341,12 +341,12 @@
   #
   ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf {
     <LibraryClasses>
-      NULL|ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
+      NULL|OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
   }
   MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf
   MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf {
     <LibraryClasses>
-      NULL|ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
+      NULL|OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
   }
   OvmfPkg/PciHotPlugInitDxe/PciHotPlugInit.inf
   OvmfPkg/VirtioPciDeviceDxe/VirtioPciDeviceDxe.inf
@@ -360,5 +360,5 @@
   MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf
   ArmVirtPkg/CloudHvAcpiPlatformDxe/CloudHvAcpiPlatformDxe.inf {
     <LibraryClasses>
-      NULL|ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
+      NULL|OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
   }
diff --git a/ArmVirtPkg/ArmVirtKvmTool.dsc b/ArmVirtPkg/ArmVirtKvmTool.dsc
index ff70509542..3cc182545c 100644
--- a/ArmVirtPkg/ArmVirtKvmTool.dsc
+++ b/ArmVirtPkg/ArmVirtKvmTool.dsc
@@ -57,7 +57,7 @@
 
   FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf
 
-  PciPcdProducerLib|ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
+  PciPcdProducerLib|OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
   PciSegmentLib|MdePkg/Library/BasePciSegmentLibPci/BasePciSegmentLibPci.inf
   PciHostBridgeLib|ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf
   PciHostBridgeUtilityLib|ArmVirtPkg/Library/ArmVirtPciHostBridgeUtilityLib/ArmVirtPciHostBridgeUtilityLib.inf
@@ -338,17 +338,17 @@
   #
   ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf {
     <LibraryClasses>
-      NULL|ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
+      NULL|OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
       NULL|ArmVirtPkg/Library/BaseCachingPciExpressLib/BaseCachingPciExpressLib.inf
   }
   MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf {
     <LibraryClasses>
-      NULL|ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
+      NULL|OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
       NULL|ArmVirtPkg/Library/BaseCachingPciExpressLib/BaseCachingPciExpressLib.inf
   }
   MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf {
     <LibraryClasses>
-      NULL|ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
+      NULL|OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
       NULL|ArmVirtPkg/Library/BaseCachingPciExpressLib/BaseCachingPciExpressLib.inf
   }
   OvmfPkg/VirtioPciDeviceDxe/VirtioPciDeviceDxe.inf
diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc
index f4bb14903f..85fcf5f310 100644
--- a/ArmVirtPkg/ArmVirtQemu.dsc
+++ b/ArmVirtPkg/ArmVirtQemu.dsc
@@ -77,7 +77,7 @@
   FrameBufferBltLib|MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.inf
   QemuBootOrderLib|OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.inf
   FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf
-  PciPcdProducerLib|ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
+  PciPcdProducerLib|OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
   PciSegmentLib|MdePkg/Library/BasePciSegmentLibPci/BasePciSegmentLibPci.inf
   PciHostBridgeLib|ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf
   PciHostBridgeUtilityLib|OvmfPkg/Library/PciHostBridgeUtilityLib/PciHostBridgeUtilityLib.inf
@@ -487,12 +487,12 @@
   #
   ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf {
     <LibraryClasses>
-      NULL|ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
+      NULL|OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
   }
   MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf
   MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf {
     <LibraryClasses>
-      NULL|ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
+      NULL|OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
   }
   OvmfPkg/PciHotPlugInitDxe/PciHotPlugInit.inf
   OvmfPkg/VirtioPciDeviceDxe/VirtioPciDeviceDxe.inf
@@ -543,5 +543,5 @@
   MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf
   OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpiPlatformDxe.inf {
     <LibraryClasses>
-      NULL|ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
+      NULL|OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
   }
diff --git a/ArmVirtPkg/ArmVirtQemuKernel.dsc b/ArmVirtPkg/ArmVirtQemuKernel.dsc
index eecef1a063..909968d13a 100644
--- a/ArmVirtPkg/ArmVirtQemuKernel.dsc
+++ b/ArmVirtPkg/ArmVirtQemuKernel.dsc
@@ -75,7 +75,7 @@
   FrameBufferBltLib|MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.inf
   QemuBootOrderLib|OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.inf
   FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf
-  PciPcdProducerLib|ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
+  PciPcdProducerLib|OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
   PciSegmentLib|MdePkg/Library/BasePciSegmentLibPci/BasePciSegmentLibPci.inf
   PciHostBridgeLib|ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf
   PciHostBridgeUtilityLib|OvmfPkg/Library/PciHostBridgeUtilityLib/PciHostBridgeUtilityLib.inf
@@ -423,12 +423,12 @@
   #
   ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf {
     <LibraryClasses>
-      NULL|ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
+      NULL|OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
   }
   MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf
   MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf {
     <LibraryClasses>
-      NULL|ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
+      NULL|OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
   }
   OvmfPkg/PciHotPlugInitDxe/PciHotPlugInit.inf
   OvmfPkg/VirtioPciDeviceDxe/VirtioPciDeviceDxe.inf
@@ -459,5 +459,5 @@
   MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf
   OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpiPlatformDxe.inf {
     <LibraryClasses>
-      NULL|ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
+      NULL|OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
   }
diff --git a/ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf b/OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
similarity index 92%
rename from ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
rename to OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
index 1dfe779f6c..0f5156615b 100644
--- a/ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
+++ b/OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
@@ -20,8 +20,6 @@
   FdtPciPcdProducerLib.c
 
 [Packages]
-  ArmPkg/ArmPkg.dec
-  ArmVirtPkg/ArmVirtPkg.dec
   EmbeddedPkg/EmbeddedPkg.dec
   MdeModulePkg/MdeModulePkg.dec
   MdePkg/MdePkg.dec
diff --git a/ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.c b/OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.c
similarity index 100%
rename from ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.c
rename to OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.c
diff --git a/Maintainers.txt b/Maintainers.txt
index 41f491bcae..ac2526f574 100644
--- a/Maintainers.txt
+++ b/Maintainers.txt
@@ -463,6 +463,12 @@ R: Jiewen Yao <jiewen.yao@intel.com> [jyao1]
 R: Min Xu <min.m.xu@intel.com> [mxu9]
 R: Tom Lendacky <thomas.lendacky@amd.com> [tlendacky]
 
+OvmfPkg: FDT related modules
+F: OvmfPkg/Fdt
+R: Leif Lindholm <leif@nuviainc.com>
+R: Gerd Hoffmann <kraxel@redhat.com>
+R: Abner Chang <abner.chang@hpe.com>
+
 OvmfPkg: LsiScsi driver
 F: OvmfPkg/LsiScsiDxe/
 R: Gary Lin <glin@suse.com>
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [PATCH V3 05/12] ArmVirtPkg/HighMemDxe: Relocate HighMemDxe to OvmfPkg
  2021-09-30  0:45 [PATCH V3 00/12] Migrate ArmVirtPkg modules to OvmfPkg Abner Chang
                   ` (3 preceding siblings ...)
  2021-09-30  0:45 ` [PATCH V3 04/12] ArmVirtPkg/FdtPciPcdProducerLib: Relocate PciPcdProducerLib to OvmfPkg Abner Chang
@ 2021-09-30  0:45 ` Abner Chang
  2021-09-30  0:45 ` [PATCH V3 06/12] OvmfPkg/HighMemDxe: Add RISC-V in the supported arch Abner Chang
                   ` (11 subsequent siblings)
  16 siblings, 0 replies; 27+ messages in thread
From: Abner Chang @ 2021-09-30  0:45 UTC (permalink / raw)
  To: devel
  Cc: Ard Biesheuvel, Leif Lindholm, Sami Mujawar, Jiewen Yao,
	Jordan Justen, Gerd Hoffmann, Daniel Schaefer, Sunil V L

Relocate HighMemDxe to OvmfPkg/Fdt, this library is leverage by
both ARM and RISC-V archs.

Signed-off-by: Abner Chang <abner.chang@hpe.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Sami Mujawar <sami.mujawar@arm.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Daniel Schaefer <daniel.schaefer@hpe.com>
Cc: Sunil V L <sunilvl@ventanamicro.com>
---
 ArmVirtPkg/ArmVirtCloudHv.dsc                         | 2 +-
 ArmVirtPkg/ArmVirtKvmTool.dsc                         | 2 +-
 ArmVirtPkg/ArmVirtQemu.dsc                            | 2 +-
 ArmVirtPkg/ArmVirtQemuKernel.dsc                      | 2 +-
 ArmVirtPkg/ArmVirtCloudHv.fdf                         | 2 +-
 ArmVirtPkg/ArmVirtKvmTool.fdf                         | 2 +-
 ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc                  | 2 +-
 {ArmVirtPkg => OvmfPkg/Fdt}/HighMemDxe/HighMemDxe.inf | 3 +--
 {ArmVirtPkg => OvmfPkg/Fdt}/HighMemDxe/HighMemDxe.c   | 0
 9 files changed, 8 insertions(+), 9 deletions(-)
 rename {ArmVirtPkg => OvmfPkg/Fdt}/HighMemDxe/HighMemDxe.inf (91%)
 rename {ArmVirtPkg => OvmfPkg/Fdt}/HighMemDxe/HighMemDxe.c (100%)

diff --git a/ArmVirtPkg/ArmVirtCloudHv.dsc b/ArmVirtPkg/ArmVirtCloudHv.dsc
index 2928b9adb5..4470fa3b14 100644
--- a/ArmVirtPkg/ArmVirtCloudHv.dsc
+++ b/ArmVirtPkg/ArmVirtCloudHv.dsc
@@ -294,7 +294,7 @@
   #
   ArmVirtPkg/VirtioFdtDxe/VirtioFdtDxe.inf
   EmbeddedPkg/Drivers/FdtClientDxe/FdtClientDxe.inf
-  ArmVirtPkg/HighMemDxe/HighMemDxe.inf
+  OvmfPkg/Fdt/HighMemDxe/HighMemDxe.inf
   OvmfPkg/VirtioBlkDxe/VirtioBlk.inf
   OvmfPkg/VirtioScsiDxe/VirtioScsi.inf
   OvmfPkg/VirtioNetDxe/VirtioNet.inf
diff --git a/ArmVirtPkg/ArmVirtKvmTool.dsc b/ArmVirtPkg/ArmVirtKvmTool.dsc
index 3cc182545c..97fc98d778 100644
--- a/ArmVirtPkg/ArmVirtKvmTool.dsc
+++ b/ArmVirtPkg/ArmVirtKvmTool.dsc
@@ -293,7 +293,7 @@
   ArmVirtPkg/KvmtoolPlatformDxe/KvmtoolPlatformDxe.inf
   ArmVirtPkg/VirtioFdtDxe/VirtioFdtDxe.inf
   EmbeddedPkg/Drivers/FdtClientDxe/FdtClientDxe.inf
-  ArmVirtPkg/HighMemDxe/HighMemDxe.inf
+  OvmfPkg/Fdt/HighMemDxe/HighMemDxe.inf
   OvmfPkg/VirtioBlkDxe/VirtioBlk.inf
   OvmfPkg/VirtioScsiDxe/VirtioScsi.inf
   OvmfPkg/VirtioNetDxe/VirtioNet.inf
diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc
index 85fcf5f310..07f9699c79 100644
--- a/ArmVirtPkg/ArmVirtQemu.dsc
+++ b/ArmVirtPkg/ArmVirtQemu.dsc
@@ -405,7 +405,7 @@
   #
   ArmVirtPkg/VirtioFdtDxe/VirtioFdtDxe.inf
   EmbeddedPkg/Drivers/FdtClientDxe/FdtClientDxe.inf
-  ArmVirtPkg/HighMemDxe/HighMemDxe.inf
+  OvmfPkg/Fdt/HighMemDxe/HighMemDxe.inf
   OvmfPkg/VirtioBlkDxe/VirtioBlk.inf
   OvmfPkg/VirtioScsiDxe/VirtioScsi.inf
   OvmfPkg/VirtioNetDxe/VirtioNet.inf
diff --git a/ArmVirtPkg/ArmVirtQemuKernel.dsc b/ArmVirtPkg/ArmVirtQemuKernel.dsc
index 909968d13a..cf7a2b4463 100644
--- a/ArmVirtPkg/ArmVirtQemuKernel.dsc
+++ b/ArmVirtPkg/ArmVirtQemuKernel.dsc
@@ -341,7 +341,7 @@
   #
   ArmVirtPkg/VirtioFdtDxe/VirtioFdtDxe.inf
   EmbeddedPkg/Drivers/FdtClientDxe/FdtClientDxe.inf
-  ArmVirtPkg/HighMemDxe/HighMemDxe.inf
+  OvmfPkg/Fdt/HighMemDxe/HighMemDxe.inf
   OvmfPkg/VirtioBlkDxe/VirtioBlk.inf
   OvmfPkg/VirtioScsiDxe/VirtioScsi.inf
   OvmfPkg/VirtioNetDxe/VirtioNet.inf
diff --git a/ArmVirtPkg/ArmVirtCloudHv.fdf b/ArmVirtPkg/ArmVirtCloudHv.fdf
index 1bb452ebb8..7ecf5ca88d 100644
--- a/ArmVirtPkg/ArmVirtCloudHv.fdf
+++ b/ArmVirtPkg/ArmVirtCloudHv.fdf
@@ -107,7 +107,7 @@ READ_LOCK_STATUS   = TRUE
   INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
   INF ArmVirtPkg/VirtioFdtDxe/VirtioFdtDxe.inf
   INF EmbeddedPkg/Drivers/FdtClientDxe/FdtClientDxe.inf
-  INF ArmVirtPkg/HighMemDxe/HighMemDxe.inf
+  INF OvmfPkg/Fdt/HighMemDxe/HighMemDxe.inf
 
   #
   # PI DXE Drivers producing Architectural Protocols (EFI Services)
diff --git a/ArmVirtPkg/ArmVirtKvmTool.fdf b/ArmVirtPkg/ArmVirtKvmTool.fdf
index 1dac8b7880..0535d36b7d 100644
--- a/ArmVirtPkg/ArmVirtKvmTool.fdf
+++ b/ArmVirtPkg/ArmVirtKvmTool.fdf
@@ -122,7 +122,7 @@ READ_LOCK_STATUS   = TRUE
   INF ArmVirtPkg/VirtioFdtDxe/VirtioFdtDxe.inf
   INF EmbeddedPkg/Drivers/FdtClientDxe/FdtClientDxe.inf
   INF ArmVirtPkg/KvmtoolPlatformDxe/KvmtoolPlatformDxe.inf
-  INF ArmVirtPkg/HighMemDxe/HighMemDxe.inf
+  INF OvmfPkg/Fdt/HighMemDxe/HighMemDxe.inf
 
   #
   # PI DXE Drivers producing Architectural Protocols (EFI Services)
diff --git a/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc b/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc
index e9518dd273..279b905edd 100644
--- a/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc
+++ b/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc
@@ -42,7 +42,7 @@ READ_LOCK_STATUS   = TRUE
   INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
   INF ArmVirtPkg/VirtioFdtDxe/VirtioFdtDxe.inf
   INF EmbeddedPkg/Drivers/FdtClientDxe/FdtClientDxe.inf
-  INF ArmVirtPkg/HighMemDxe/HighMemDxe.inf
+  INF OvmfPkg/Fdt/HighMemDxe/HighMemDxe.inf
 
   #
   # PI DXE Drivers producing Architectural Protocols (EFI Services)
diff --git a/ArmVirtPkg/HighMemDxe/HighMemDxe.inf b/OvmfPkg/Fdt/HighMemDxe/HighMemDxe.inf
similarity index 91%
rename from ArmVirtPkg/HighMemDxe/HighMemDxe.inf
rename to OvmfPkg/Fdt/HighMemDxe/HighMemDxe.inf
index 168fc90d2a..45779a2d59 100644
--- a/ArmVirtPkg/HighMemDxe/HighMemDxe.inf
+++ b/OvmfPkg/Fdt/HighMemDxe/HighMemDxe.inf
@@ -23,8 +23,7 @@
   EmbeddedPkg/EmbeddedPkg.dec
   MdePkg/MdePkg.dec
   MdeModulePkg/MdeModulePkg.dec
-  ArmPkg/ArmPkg.dec
-  ArmVirtPkg/ArmVirtPkg.dec
+  OvmfPkg/OvmfPkg.dec
 
 [LibraryClasses]
   BaseLib
diff --git a/ArmVirtPkg/HighMemDxe/HighMemDxe.c b/OvmfPkg/Fdt/HighMemDxe/HighMemDxe.c
similarity index 100%
rename from ArmVirtPkg/HighMemDxe/HighMemDxe.c
rename to OvmfPkg/Fdt/HighMemDxe/HighMemDxe.c
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [PATCH V3 06/12] OvmfPkg/HighMemDxe: Add RISC-V in the supported arch.
  2021-09-30  0:45 [PATCH V3 00/12] Migrate ArmVirtPkg modules to OvmfPkg Abner Chang
                   ` (4 preceding siblings ...)
  2021-09-30  0:45 ` [PATCH V3 05/12] ArmVirtPkg/HighMemDxe: Relocate HighMemDxe " Abner Chang
@ 2021-09-30  0:45 ` Abner Chang
  2021-09-30  0:45 ` [PATCH V3 07/12] ArmVirtPkg/QemuFwCfgLib: Relocate QemuFwCfgLib to OvmfPkg Abner Chang
                   ` (10 subsequent siblings)
  16 siblings, 0 replies; 27+ messages in thread
From: Abner Chang @ 2021-09-30  0:45 UTC (permalink / raw)
  To: devel; +Cc: Leif Lindholm, Gerd Hoffmann, Daniel Schaefer, Sunil V L

Add RISC-V VM in the file header.
Add RISC-V to the supported arch.

Signed-off-by: Abner Chang <abner.chang@hpe.com>
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Daniel Schaefer <daniel.schaefer@hpe.com>
Cc: Sunil V L <sunilvl@ventanamicro.com>
---
 OvmfPkg/Fdt/HighMemDxe/HighMemDxe.inf | 3 ++-
 OvmfPkg/Fdt/HighMemDxe/HighMemDxe.c   | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/OvmfPkg/Fdt/HighMemDxe/HighMemDxe.inf b/OvmfPkg/Fdt/HighMemDxe/HighMemDxe.inf
index 45779a2d59..c7dde9f455 100644
--- a/OvmfPkg/Fdt/HighMemDxe/HighMemDxe.inf
+++ b/OvmfPkg/Fdt/HighMemDxe/HighMemDxe.inf
@@ -1,5 +1,6 @@
 ## @file
-#  High memory node enumeration DXE driver for ARM Virtual Machines
+#  High memory node enumeration DXE driver for ARM and RISC-V
+#  Virtual Machines
 #
 #  Copyright (c) 2015-2016, Linaro Ltd. All rights reserved.
 #
diff --git a/OvmfPkg/Fdt/HighMemDxe/HighMemDxe.c b/OvmfPkg/Fdt/HighMemDxe/HighMemDxe.c
index c383757364..3bcd3eb213 100644
--- a/OvmfPkg/Fdt/HighMemDxe/HighMemDxe.c
+++ b/OvmfPkg/Fdt/HighMemDxe/HighMemDxe.c
@@ -1,5 +1,6 @@
 /** @file
-*  High memory node enumeration DXE driver for ARM Virtual Machines
+*  High memory node enumeration DXE driver for ARM and RISC-V
+*  Virtual Machines
 *
 *  Copyright (c) 2015-2016, Linaro Ltd. All rights reserved.
 *
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [PATCH V3 07/12] ArmVirtPkg/QemuFwCfgLib: Relocate QemuFwCfgLib to OvmfPkg
  2021-09-30  0:45 [PATCH V3 00/12] Migrate ArmVirtPkg modules to OvmfPkg Abner Chang
                   ` (5 preceding siblings ...)
  2021-09-30  0:45 ` [PATCH V3 06/12] OvmfPkg/HighMemDxe: Add RISC-V in the supported arch Abner Chang
@ 2021-09-30  0:45 ` Abner Chang
  2021-09-30  0:45 ` [PATCH V3 08/12] OvmfPkg/QemuFwCfgLibMMIO: Add RISC-V arch support Abner Chang
                   ` (9 subsequent siblings)
  16 siblings, 0 replies; 27+ messages in thread
From: Abner Chang @ 2021-09-30  0:45 UTC (permalink / raw)
  To: devel
  Cc: Ard Biesheuvel, Leif Lindholm, Sami Mujawar, Jiewen Yao,
	Jordan Justen, Gerd Hoffmann, Daniel Schaefer, Sunil V L

Relocate QemuFwCfgLib to OvmfPkg/Library/QemuFwCfgLib and rename
it to QemuFwCfgLibMmio, this library is leverage by both ARM and
RISC-V archs.

Signed-off-by: Abner Chang <abner.chang@hpe.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Sami Mujawar <sami.mujawar@arm.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Daniel Schaefer <daniel.schaefer@hpe.com>
Cc: Sunil V L <sunilvl@ventanamicro.com>
---
 ArmVirtPkg/ArmVirtQemu.dsc                                     | 2 +-
 ArmVirtPkg/ArmVirtQemuKernel.dsc                               | 2 +-
 .../Library/QemuFwCfgLib/QemuFwCfgLibMmio.inf                  | 3 +--
 .../Library/QemuFwCfgLib/QemuFwCfgLibMmio.c                    | 0
 4 files changed, 3 insertions(+), 4 deletions(-)
 rename ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLib.inf => OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibMmio.inf (91%)
 rename ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLib.c => OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibMmio.c (100%)

diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc
index 07f9699c79..d4ada5c541 100644
--- a/ArmVirtPkg/ArmVirtQemu.dsc
+++ b/ArmVirtPkg/ArmVirtQemu.dsc
@@ -59,7 +59,7 @@
   # Virtio Support
   VirtioLib|OvmfPkg/Library/VirtioLib/VirtioLib.inf
   VirtioMmioDeviceLib|OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDeviceLib.inf
-  QemuFwCfgLib|ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLib.inf
+  QemuFwCfgLib|OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibMmio.inf
   QemuFwCfgS3Lib|OvmfPkg/Library/QemuFwCfgS3Lib/BaseQemuFwCfgS3LibNull.inf
   QemuFwCfgSimpleParserLib|OvmfPkg/Library/QemuFwCfgSimpleParserLib/QemuFwCfgSimpleParserLib.inf
   QemuLoadImageLib|OvmfPkg/Library/GenericQemuLoadImageLib/GenericQemuLoadImageLib.inf
diff --git a/ArmVirtPkg/ArmVirtQemuKernel.dsc b/ArmVirtPkg/ArmVirtQemuKernel.dsc
index cf7a2b4463..70ce0b0cfa 100644
--- a/ArmVirtPkg/ArmVirtQemuKernel.dsc
+++ b/ArmVirtPkg/ArmVirtQemuKernel.dsc
@@ -57,7 +57,7 @@
   # Virtio Support
   VirtioLib|OvmfPkg/Library/VirtioLib/VirtioLib.inf
   VirtioMmioDeviceLib|OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDeviceLib.inf
-  QemuFwCfgLib|ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLib.inf
+  QemuFwCfgLib|OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibMmio.inf
   QemuFwCfgS3Lib|OvmfPkg/Library/QemuFwCfgS3Lib/BaseQemuFwCfgS3LibNull.inf
   QemuFwCfgSimpleParserLib|OvmfPkg/Library/QemuFwCfgSimpleParserLib/QemuFwCfgSimpleParserLib.inf
   QemuLoadImageLib|OvmfPkg/Library/GenericQemuLoadImageLib/GenericQemuLoadImageLib.inf
diff --git a/ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLib.inf b/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibMmio.inf
similarity index 91%
rename from ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLib.inf
rename to OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibMmio.inf
index f3cc827907..67531517b7 100644
--- a/ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLib.inf
+++ b/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibMmio.inf
@@ -27,13 +27,12 @@
 #
 
 [Sources]
-  QemuFwCfgLib.c
+  QemuFwCfgLibMmio.c
 
 [Packages]
   MdePkg/MdePkg.dec
   OvmfPkg/OvmfPkg.dec
   EmbeddedPkg/EmbeddedPkg.dec
-  ArmVirtPkg/ArmVirtPkg.dec
 
 [LibraryClasses]
   BaseLib
diff --git a/ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLib.c b/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibMmio.c
similarity index 100%
rename from ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLib.c
rename to OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibMmio.c
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [PATCH V3 08/12] OvmfPkg/QemuFwCfgLibMMIO: Add RISC-V arch support
  2021-09-30  0:45 [PATCH V3 00/12] Migrate ArmVirtPkg modules to OvmfPkg Abner Chang
                   ` (6 preceding siblings ...)
  2021-09-30  0:45 ` [PATCH V3 07/12] ArmVirtPkg/QemuFwCfgLib: Relocate QemuFwCfgLib to OvmfPkg Abner Chang
@ 2021-09-30  0:45 ` Abner Chang
  2021-09-30  0:45 ` [PATCH V3 09/12] MdePkg: Add PcdPciMmio32(64)Translation PCDs Abner Chang
                   ` (8 subsequent siblings)
  16 siblings, 0 replies; 27+ messages in thread
From: Abner Chang @ 2021-09-30  0:45 UTC (permalink / raw)
  To: devel
  Cc: Ard Biesheuvel, Jiewen Yao, Jordan Justen, Gerd Hoffmann,
	Daniel Schaefer, Sunil V L

Signed-off-by: Abner Chang <abner.chang@hpe.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Daniel Schaefer <daniel.schaefer@hpe.com>
Cc: Sunil V L <sunilvl@ventanamicro.com>
---
 OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibMmio.inf | 2 +-
 OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibMmio.c   | 7 ++++---
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibMmio.inf b/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibMmio.inf
index 67531517b7..4b0dfbcb0d 100644
--- a/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibMmio.inf
+++ b/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibMmio.inf
@@ -23,7 +23,7 @@
 # The following information is for reference only and not required by the build
 # tools.
 #
-#  VALID_ARCHITECTURES           = ARM AARCH64
+#  VALID_ARCHITECTURES           = ARM AARCH64 RISCV64
 #
 
 [Sources]
diff --git a/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibMmio.c b/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibMmio.c
index e2ac4108d1..b953f2eb6c 100644
--- a/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibMmio.c
+++ b/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibMmio.c
@@ -4,6 +4,7 @@
 
   Copyright (C) 2013 - 2014, Red Hat, Inc.
   Copyright (c) 2011 - 2013, Intel Corporation. All rights reserved.<BR>
+  (C) Copyright 2021 Hewlett Packard Enterprise Development LP<BR>
 
   SPDX-License-Identifier: BSD-2-Clause-Patent
 **/
@@ -239,7 +240,7 @@ MmioReadBytes (
   UINT8 *Ptr;
   UINT8 *End;
 
-#ifdef MDE_CPU_AARCH64
+#if defined(MDE_CPU_AARCH64) || defined(MDE_CPU_RISCV64)
   Left = Size & 7;
 #else
   Left = Size & 3;
@@ -249,7 +250,7 @@ MmioReadBytes (
   Ptr = Buffer;
   End = Ptr + Size;
 
-#ifdef MDE_CPU_AARCH64
+#if defined(MDE_CPU_AARCH64) || defined(MDE_CPU_RISCV64)
   while (Ptr < End) {
     *(UINT64 *)Ptr = MmioRead64 (mFwCfgDataAddress);
     Ptr += 8;
@@ -322,7 +323,7 @@ DmaTransferBytes (
   //
   // This will fire off the transfer.
   //
-#ifdef MDE_CPU_AARCH64
+#if defined(MDE_CPU_AARCH64) || defined(MDE_CPU_RISCV64)
   MmioWrite64 (mFwCfgDmaAddress, SwapBytes64 ((UINT64)&Access));
 #else
   MmioWrite32 ((UINT32)(mFwCfgDmaAddress + 4), SwapBytes32 ((UINT32)&Access));
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [PATCH V3 09/12] MdePkg: Add PcdPciMmio32(64)Translation PCDs
  2021-09-30  0:45 [PATCH V3 00/12] Migrate ArmVirtPkg modules to OvmfPkg Abner Chang
                   ` (7 preceding siblings ...)
  2021-09-30  0:45 ` [PATCH V3 08/12] OvmfPkg/QemuFwCfgLibMMIO: Add RISC-V arch support Abner Chang
@ 2021-09-30  0:45 ` Abner Chang
  2021-09-30  0:45 ` [PATCH V3 10/12] ArmVirtPkg/FdtPciHostBridgeLib: Relocate FdtPciHostBridgeLib to OvmfPkg/Fdt Abner Chang
                   ` (7 subsequent siblings)
  16 siblings, 0 replies; 27+ messages in thread
From: Abner Chang @ 2021-09-30  0:45 UTC (permalink / raw)
  To: devel
  Cc: Michael D Kinney, Liming Gao, Zhiguang Liu, Ard Biesheuvel,
	Leif Lindholm, Sami Mujawar, Gerd Hoffmann, Daniel Schaefer,
	Sunil V L

PcdPciMmio32Translation and PcdPciMmio64Translation PCDs are added
to MdePkg as the common PCDs for ARM and RSIC-V archs.

The one under ArmPkg is removed in the next patch.

Signed-off-by: Abner Chang <abner.chang@hpe.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Sami Mujawar <sami.mujawar@arm.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Daniel Schaefer <daniel.schaefer@hpe.com>
Cc: Sunil V L <sunilvl@ventanamicro.com>
---
 MdePkg/MdePkg.dec | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec
index 08d259764a..9df95abc50 100644
--- a/MdePkg/MdePkg.dec
+++ b/MdePkg/MdePkg.dec
@@ -2306,6 +2306,14 @@
   # @Prompt PCI I/O Memory Map Window Base Address.
   gEfiMdePkgTokenSpaceGuid.PcdPciIoTranslation|0x0|UINT64|0x00000040
 
+  ## This value is used for the 32-bit PCI memory map I/O base address translation.
+  # @Prompt 32-bit PCI Memory Map I/O Base Address translation.
+  gEfiMdePkgTokenSpaceGuid.PcdPciMmio32Translation|0x0|UINT64|0x00000041
+
+  ## This value is used for the 64-bit PCI memory map I/O base address translation.
+  # @Prompt 64-bit PCI Memory Map I/O Base Address translation.
+  gEfiMdePkgTokenSpaceGuid.PcdPciMmio64Translation|0x0|UINT64|0x00000042
+
   ## This value is used to set the size of PCI express hierarchy. The default is 256 MB.
   # @Prompt PCI Express Base Size.
   gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseSize|0x10000000|UINT64|0x0000000f
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [PATCH V3 10/12] ArmVirtPkg/FdtPciHostBridgeLib: Relocate FdtPciHostBridgeLib to OvmfPkg/Fdt
  2021-09-30  0:45 [PATCH V3 00/12] Migrate ArmVirtPkg modules to OvmfPkg Abner Chang
                   ` (8 preceding siblings ...)
  2021-09-30  0:45 ` [PATCH V3 09/12] MdePkg: Add PcdPciMmio32(64)Translation PCDs Abner Chang
@ 2021-09-30  0:45 ` Abner Chang
  2021-09-30  0:45 ` [PATCH V3 11/12] OvmfPkg/FdtPciHostBridgeLib: Add RISC-V in the supported arch Abner Chang
                   ` (6 subsequent siblings)
  16 siblings, 0 replies; 27+ messages in thread
From: Abner Chang @ 2021-09-30  0:45 UTC (permalink / raw)
  To: devel
  Cc: Ard Biesheuvel, Leif Lindholm, Sami Mujawar, Jiewen Yao,
	Jordan Justen, Gerd Hoffmann, Daniel Schaefer, Sunil V L

Relocate FdtPciHostBridgeLib to OvmfPkg/Fdt, this library is
leverage by both ARM and RISC-V archs. Also use
PcdPciMmio32Translation and PcdPciMmio64Translation
PCDs provided by MdePkg instead of ArmPkg.

Signed-off-by: Abner Chang <abner.chang@hpe.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Sami Mujawar <sami.mujawar@arm.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Daniel Schaefer <daniel.schaefer@hpe.com>
Cc: Sunil V L <sunilvl@ventanamicro.com>
---
 ArmPkg/ArmPkg.dec                                      | 10 ++++------
 ArmVirtPkg/ArmVirtCloudHv.dsc                          |  2 +-
 ArmVirtPkg/ArmVirtKvmTool.dsc                          |  2 +-
 ArmVirtPkg/ArmVirtQemu.dsc                             |  2 +-
 ArmVirtPkg/ArmVirtQemuKernel.dsc                       |  2 +-
 .../Fdt}/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf   |  6 ++----
 .../Fdt}/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c     |  0
 7 files changed, 10 insertions(+), 14 deletions(-)
 rename {ArmVirtPkg/Library => OvmfPkg/Fdt}/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf (85%)
 rename {ArmVirtPkg/Library => OvmfPkg/Fdt}/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c (100%)

diff --git a/ArmPkg/ArmPkg.dec b/ArmPkg/ArmPkg.dec
index 12584fb319..5935663fa9 100644
--- a/ArmPkg/ArmPkg.dec
+++ b/ArmPkg/ArmPkg.dec
@@ -338,8 +338,8 @@
   #   UINT64 Mmio64CpuBase; // mapping target in 64-bit cpu-physical space
   #
   #   gEfiMdePkgTokenSpaceGuid.PcdPciIoTranslation = IoCpuBase - PcdPciIoBase;
-  #   PcdPciMmio32Translation = Mmio32CpuBase - (UINT64)PcdPciMmio32Base;
-  #   PcdPciMmio64Translation = Mmio64CpuBase - PcdPciMmio64Base;
+  #   gEfiMdePkgTokenSpaceGuid.PcdPciMmio32Translation = Mmio32CpuBase - (UINT64)PcdPciMmio32Base;
+  #   gEfiMdePkgTokenSpaceGuid.PcdPciMmio64Translation = Mmio64CpuBase - PcdPciMmio64Base;
   #
   # because (a) the target address space (ie. the cpu-physical space) is
   # 64-bit, and (b) the translation values are meant as offsets for *modular*
@@ -358,9 +358,9 @@
   #   TranslatedIoAddress     = UntranslatedIoAddress +
   #                             gEfiMdePkgTokenSpaceGuid.PcdPciIoTranslation;
   #   TranslatedMmio32Address = (UINT64)UntranslatedMmio32Address +
-  #                             PcdPciMmio32Translation;
+  #                             gEfiMdePkgTokenSpaceGuid.PcdPciMmio32Translation;
   #   TranslatedMmio64Address = UntranslatedMmio64Address +
-  #                             PcdPciMmio64Translation;
+  #                             gEfiMdePkgTokenSpaceGuid.PcdPciMmio64Translation;
   #
   #  The modular arithmetic performed in UINT64 ensures that the translation
   #  works correctly regardless of the relation between IoCpuBase and
@@ -371,10 +371,8 @@
   gArmTokenSpaceGuid.PcdPciIoSize|0x0|UINT64|0x00000051
   gArmTokenSpaceGuid.PcdPciMmio32Base|0x0|UINT32|0x00000053
   gArmTokenSpaceGuid.PcdPciMmio32Size|0x0|UINT32|0x00000054
-  gArmTokenSpaceGuid.PcdPciMmio32Translation|0x0|UINT64|0x00000055
   gArmTokenSpaceGuid.PcdPciMmio64Base|0x0|UINT64|0x00000056
   gArmTokenSpaceGuid.PcdPciMmio64Size|0x0|UINT64|0x00000057
-  gArmTokenSpaceGuid.PcdPciMmio64Translation|0x0|UINT64|0x00000058
 
   #
   # Inclusive range of allowed PCI buses.
diff --git a/ArmVirtPkg/ArmVirtCloudHv.dsc b/ArmVirtPkg/ArmVirtCloudHv.dsc
index 4470fa3b14..0f26c10aab 100644
--- a/ArmVirtPkg/ArmVirtCloudHv.dsc
+++ b/ArmVirtPkg/ArmVirtCloudHv.dsc
@@ -51,7 +51,7 @@
   FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf
   PciPcdProducerLib|OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
   PciSegmentLib|MdePkg/Library/BasePciSegmentLibPci/BasePciSegmentLibPci.inf
-  PciHostBridgeLib|ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf
+  PciHostBridgeLib|OvmfPkg/Fdt/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf
   PciHostBridgeUtilityLib|ArmVirtPkg/Library/ArmVirtPciHostBridgeUtilityLib/ArmVirtPciHostBridgeUtilityLib.inf
 
   TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurementLibNull.inf
diff --git a/ArmVirtPkg/ArmVirtKvmTool.dsc b/ArmVirtPkg/ArmVirtKvmTool.dsc
index 97fc98d778..0c5da4427e 100644
--- a/ArmVirtPkg/ArmVirtKvmTool.dsc
+++ b/ArmVirtPkg/ArmVirtKvmTool.dsc
@@ -59,7 +59,7 @@
 
   PciPcdProducerLib|OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
   PciSegmentLib|MdePkg/Library/BasePciSegmentLibPci/BasePciSegmentLibPci.inf
-  PciHostBridgeLib|ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf
+  PciHostBridgeLib|OvmfPkg/Fdt/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf
   PciHostBridgeUtilityLib|ArmVirtPkg/Library/ArmVirtPciHostBridgeUtilityLib/ArmVirtPciHostBridgeUtilityLib.inf
 
   TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurementLibNull.inf
diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc
index d4ada5c541..ac86f20e68 100644
--- a/ArmVirtPkg/ArmVirtQemu.dsc
+++ b/ArmVirtPkg/ArmVirtQemu.dsc
@@ -79,7 +79,7 @@
   FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf
   PciPcdProducerLib|OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
   PciSegmentLib|MdePkg/Library/BasePciSegmentLibPci/BasePciSegmentLibPci.inf
-  PciHostBridgeLib|ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf
+  PciHostBridgeLib|OvmfPkg/Fdt/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf
   PciHostBridgeUtilityLib|OvmfPkg/Library/PciHostBridgeUtilityLib/PciHostBridgeUtilityLib.inf
 
 !if $(TPM2_ENABLE) == TRUE
diff --git a/ArmVirtPkg/ArmVirtQemuKernel.dsc b/ArmVirtPkg/ArmVirtQemuKernel.dsc
index 70ce0b0cfa..ca0d872264 100644
--- a/ArmVirtPkg/ArmVirtQemuKernel.dsc
+++ b/ArmVirtPkg/ArmVirtQemuKernel.dsc
@@ -77,7 +77,7 @@
   FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf
   PciPcdProducerLib|OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
   PciSegmentLib|MdePkg/Library/BasePciSegmentLibPci/BasePciSegmentLibPci.inf
-  PciHostBridgeLib|ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf
+  PciHostBridgeLib|OvmfPkg/Fdt/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf
   PciHostBridgeUtilityLib|OvmfPkg/Library/PciHostBridgeUtilityLib/PciHostBridgeUtilityLib.inf
   TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurementLibNull.inf
 
diff --git a/ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf b/OvmfPkg/Fdt/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf
similarity index 85%
rename from ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf
rename to OvmfPkg/Fdt/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf
index f149693fa2..f015480685 100644
--- a/ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf
+++ b/OvmfPkg/Fdt/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf
@@ -27,8 +27,6 @@
   FdtPciHostBridgeLib.c
 
 [Packages]
-  ArmPkg/ArmPkg.dec
-  ArmVirtPkg/ArmVirtPkg.dec
   EmbeddedPkg/EmbeddedPkg.dec
   MdeModulePkg/MdeModulePkg.dec
   MdePkg/MdePkg.dec
@@ -44,8 +42,8 @@
   PciPcdProducerLib
 
 [FixedPcd]
-  gArmTokenSpaceGuid.PcdPciMmio32Translation
-  gArmTokenSpaceGuid.PcdPciMmio64Translation
+  gEfiMdePkgTokenSpaceGuid.PcdPciMmio32Translation
+  gEfiMdePkgTokenSpaceGuid.PcdPciMmio64Translation
 
 [Pcd]
   gEfiMdePkgTokenSpaceGuid.PcdPciIoTranslation
diff --git a/ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c b/OvmfPkg/Fdt/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c
similarity index 100%
rename from ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c
rename to OvmfPkg/Fdt/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [PATCH V3 11/12] OvmfPkg/FdtPciHostBridgeLib: Add RISC-V in the supported arch.
  2021-09-30  0:45 [PATCH V3 00/12] Migrate ArmVirtPkg modules to OvmfPkg Abner Chang
                   ` (9 preceding siblings ...)
  2021-09-30  0:45 ` [PATCH V3 10/12] ArmVirtPkg/FdtPciHostBridgeLib: Relocate FdtPciHostBridgeLib to OvmfPkg/Fdt Abner Chang
@ 2021-09-30  0:45 ` Abner Chang
  2021-09-30  0:45 ` [PATCH V3 12/12] ArmVirtPkg/VirtioFdtDxe: Relocate VirtioFdtDxe to OvmfPkg/Fdt Abner Chang
                   ` (5 subsequent siblings)
  16 siblings, 0 replies; 27+ messages in thread
From: Abner Chang @ 2021-09-30  0:45 UTC (permalink / raw)
  To: devel; +Cc: Leif Lindholm, Gerd Hoffmann, Daniel Schaefer, Sunil V L

Signed-off-by: Abner Chang <abner.chang@hpe.com>
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Daniel Schaefer <daniel.schaefer@hpe.com>
Cc: Sunil V L <sunilvl@ventanamicro.com>
Reviewed-by: Daniel Schaefer <daniel.schaefer@hpe.com>
---
 OvmfPkg/Fdt/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/OvmfPkg/Fdt/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf b/OvmfPkg/Fdt/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf
index f015480685..e610e3d03f 100644
--- a/OvmfPkg/Fdt/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf
+++ b/OvmfPkg/Fdt/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf
@@ -20,7 +20,7 @@
 # The following information is for reference only and not required by the build
 # tools.
 #
-#  VALID_ARCHITECTURES           = AARCH64 ARM
+#  VALID_ARCHITECTURES           = AARCH64 ARM RISCV64
 #
 
 [Sources]
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [PATCH V3 12/12] ArmVirtPkg/VirtioFdtDxe: Relocate VirtioFdtDxe to OvmfPkg/Fdt
  2021-09-30  0:45 [PATCH V3 00/12] Migrate ArmVirtPkg modules to OvmfPkg Abner Chang
                   ` (10 preceding siblings ...)
  2021-09-30  0:45 ` [PATCH V3 11/12] OvmfPkg/FdtPciHostBridgeLib: Add RISC-V in the supported arch Abner Chang
@ 2021-09-30  0:45 ` Abner Chang
  2021-09-30  2:39 ` [edk2-devel] [PATCH V3 00/12] Migrate ArmVirtPkg modules to OvmfPkg Yao, Jiewen
                   ` (4 subsequent siblings)
  16 siblings, 0 replies; 27+ messages in thread
From: Abner Chang @ 2021-09-30  0:45 UTC (permalink / raw)
  To: devel
  Cc: Ard Biesheuvel, Leif Lindholm, Sami Mujawar, Jiewen Yao,
	Jordan Justen, Gerd Hoffmann, Daniel Schaefer, Sunil V L

Relocate VirtioFdtDxe to OvmfPkg/Fdt, this driver is leverage by
both ARM and RISC-V archs.

Signed-off-by: Abner Chang <abner.chang@hpe.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Sami Mujawar <sami.mujawar@arm.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Daniel Schaefer <daniel.schaefer@hpe.com>
Cc: Sunil V L <sunilvl@ventanamicro.com>
Reviewed-by: Daniel Schaefer <daniel.schaefer@hpe.com>
---
 ArmVirtPkg/ArmVirtCloudHv.dsc                             | 2 +-
 ArmVirtPkg/ArmVirtKvmTool.dsc                             | 2 +-
 ArmVirtPkg/ArmVirtQemu.dsc                                | 2 +-
 ArmVirtPkg/ArmVirtQemuKernel.dsc                          | 2 +-
 ArmVirtPkg/ArmVirtCloudHv.fdf                             | 2 +-
 ArmVirtPkg/ArmVirtKvmTool.fdf                             | 2 +-
 ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc                      | 2 +-
 {ArmVirtPkg => OvmfPkg/Fdt}/VirtioFdtDxe/VirtioFdtDxe.inf | 1 -
 {ArmVirtPkg => OvmfPkg/Fdt}/VirtioFdtDxe/VirtioFdtDxe.c   | 0
 9 files changed, 7 insertions(+), 8 deletions(-)
 rename {ArmVirtPkg => OvmfPkg/Fdt}/VirtioFdtDxe/VirtioFdtDxe.inf (93%)
 rename {ArmVirtPkg => OvmfPkg/Fdt}/VirtioFdtDxe/VirtioFdtDxe.c (100%)

diff --git a/ArmVirtPkg/ArmVirtCloudHv.dsc b/ArmVirtPkg/ArmVirtCloudHv.dsc
index 0f26c10aab..9ad124522f 100644
--- a/ArmVirtPkg/ArmVirtCloudHv.dsc
+++ b/ArmVirtPkg/ArmVirtCloudHv.dsc
@@ -292,7 +292,7 @@
   #
   # Platform Driver
   #
-  ArmVirtPkg/VirtioFdtDxe/VirtioFdtDxe.inf
+  OvmfPkg/Fdt/VirtioFdtDxe/VirtioFdtDxe.inf
   EmbeddedPkg/Drivers/FdtClientDxe/FdtClientDxe.inf
   OvmfPkg/Fdt/HighMemDxe/HighMemDxe.inf
   OvmfPkg/VirtioBlkDxe/VirtioBlk.inf
diff --git a/ArmVirtPkg/ArmVirtKvmTool.dsc b/ArmVirtPkg/ArmVirtKvmTool.dsc
index 0c5da4427e..9d23072d8f 100644
--- a/ArmVirtPkg/ArmVirtKvmTool.dsc
+++ b/ArmVirtPkg/ArmVirtKvmTool.dsc
@@ -291,7 +291,7 @@
   # Platform Driver
   #
   ArmVirtPkg/KvmtoolPlatformDxe/KvmtoolPlatformDxe.inf
-  ArmVirtPkg/VirtioFdtDxe/VirtioFdtDxe.inf
+  OvmfPkg/Fdt/VirtioFdtDxe/VirtioFdtDxe.inf
   EmbeddedPkg/Drivers/FdtClientDxe/FdtClientDxe.inf
   OvmfPkg/Fdt/HighMemDxe/HighMemDxe.inf
   OvmfPkg/VirtioBlkDxe/VirtioBlk.inf
diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc
index ac86f20e68..adb490ed5a 100644
--- a/ArmVirtPkg/ArmVirtQemu.dsc
+++ b/ArmVirtPkg/ArmVirtQemu.dsc
@@ -403,7 +403,7 @@
   #
   # Platform Driver
   #
-  ArmVirtPkg/VirtioFdtDxe/VirtioFdtDxe.inf
+  OvmfPkg/Fdt/VirtioFdtDxe/VirtioFdtDxe.inf
   EmbeddedPkg/Drivers/FdtClientDxe/FdtClientDxe.inf
   OvmfPkg/Fdt/HighMemDxe/HighMemDxe.inf
   OvmfPkg/VirtioBlkDxe/VirtioBlk.inf
diff --git a/ArmVirtPkg/ArmVirtQemuKernel.dsc b/ArmVirtPkg/ArmVirtQemuKernel.dsc
index ca0d872264..aaceb5daab 100644
--- a/ArmVirtPkg/ArmVirtQemuKernel.dsc
+++ b/ArmVirtPkg/ArmVirtQemuKernel.dsc
@@ -339,7 +339,7 @@
   #
   # Platform Driver
   #
-  ArmVirtPkg/VirtioFdtDxe/VirtioFdtDxe.inf
+  OvmfPkg/Fdt/VirtioFdtDxe/VirtioFdtDxe.inf
   EmbeddedPkg/Drivers/FdtClientDxe/FdtClientDxe.inf
   OvmfPkg/Fdt/HighMemDxe/HighMemDxe.inf
   OvmfPkg/VirtioBlkDxe/VirtioBlk.inf
diff --git a/ArmVirtPkg/ArmVirtCloudHv.fdf b/ArmVirtPkg/ArmVirtCloudHv.fdf
index 7ecf5ca88d..81c539590a 100644
--- a/ArmVirtPkg/ArmVirtCloudHv.fdf
+++ b/ArmVirtPkg/ArmVirtCloudHv.fdf
@@ -105,7 +105,7 @@ READ_LOCK_STATUS   = TRUE
 
   INF MdeModulePkg/Core/Dxe/DxeMain.inf
   INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
-  INF ArmVirtPkg/VirtioFdtDxe/VirtioFdtDxe.inf
+  INF OvmfPkg/Fdt/VirtioFdtDxe/VirtioFdtDxe.inf
   INF EmbeddedPkg/Drivers/FdtClientDxe/FdtClientDxe.inf
   INF OvmfPkg/Fdt/HighMemDxe/HighMemDxe.inf
 
diff --git a/ArmVirtPkg/ArmVirtKvmTool.fdf b/ArmVirtPkg/ArmVirtKvmTool.fdf
index 0535d36b7d..14a5fce43a 100644
--- a/ArmVirtPkg/ArmVirtKvmTool.fdf
+++ b/ArmVirtPkg/ArmVirtKvmTool.fdf
@@ -119,7 +119,7 @@ READ_LOCK_STATUS   = TRUE
 
   INF MdeModulePkg/Core/Dxe/DxeMain.inf
   INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
-  INF ArmVirtPkg/VirtioFdtDxe/VirtioFdtDxe.inf
+  INF OvmfPkg/Fdt/VirtioFdtDxe/VirtioFdtDxe.inf
   INF EmbeddedPkg/Drivers/FdtClientDxe/FdtClientDxe.inf
   INF ArmVirtPkg/KvmtoolPlatformDxe/KvmtoolPlatformDxe.inf
   INF OvmfPkg/Fdt/HighMemDxe/HighMemDxe.inf
diff --git a/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc b/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc
index 279b905edd..f6a538df72 100644
--- a/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc
+++ b/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc
@@ -40,7 +40,7 @@ READ_LOCK_STATUS   = TRUE
 
   INF MdeModulePkg/Core/Dxe/DxeMain.inf
   INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
-  INF ArmVirtPkg/VirtioFdtDxe/VirtioFdtDxe.inf
+  INF OvmfPkg/Fdt/VirtioFdtDxe/VirtioFdtDxe.inf
   INF EmbeddedPkg/Drivers/FdtClientDxe/FdtClientDxe.inf
   INF OvmfPkg/Fdt/HighMemDxe/HighMemDxe.inf
 
diff --git a/ArmVirtPkg/VirtioFdtDxe/VirtioFdtDxe.inf b/OvmfPkg/Fdt/VirtioFdtDxe/VirtioFdtDxe.inf
similarity index 93%
rename from ArmVirtPkg/VirtioFdtDxe/VirtioFdtDxe.inf
rename to OvmfPkg/Fdt/VirtioFdtDxe/VirtioFdtDxe.inf
index 9d5ae7b12f..dece5c806b 100644
--- a/ArmVirtPkg/VirtioFdtDxe/VirtioFdtDxe.inf
+++ b/OvmfPkg/Fdt/VirtioFdtDxe/VirtioFdtDxe.inf
@@ -20,7 +20,6 @@
   VirtioFdtDxe.c
 
 [Packages]
-  ArmVirtPkg/ArmVirtPkg.dec
   EmbeddedPkg/EmbeddedPkg.dec
   MdePkg/MdePkg.dec
   OvmfPkg/OvmfPkg.dec
diff --git a/ArmVirtPkg/VirtioFdtDxe/VirtioFdtDxe.c b/OvmfPkg/Fdt/VirtioFdtDxe/VirtioFdtDxe.c
similarity index 100%
rename from ArmVirtPkg/VirtioFdtDxe/VirtioFdtDxe.c
rename to OvmfPkg/Fdt/VirtioFdtDxe/VirtioFdtDxe.c
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* Re: [edk2-devel] [PATCH V3 00/12] Migrate ArmVirtPkg modules to OvmfPkg
  2021-09-30  0:45 [PATCH V3 00/12] Migrate ArmVirtPkg modules to OvmfPkg Abner Chang
                   ` (11 preceding siblings ...)
  2021-09-30  0:45 ` [PATCH V3 12/12] ArmVirtPkg/VirtioFdtDxe: Relocate VirtioFdtDxe to OvmfPkg/Fdt Abner Chang
@ 2021-09-30  2:39 ` Yao, Jiewen
  2021-09-30  7:12 ` Gerd Hoffmann
                   ` (3 subsequent siblings)
  16 siblings, 0 replies; 27+ messages in thread
From: Yao, Jiewen @ 2021-09-30  2:39 UTC (permalink / raw)
  To: devel@edk2.groups.io, Chang, Abner
  Cc: Ard Biesheuvel, Leif Lindholm, Sami Mujawar, Justen, Jordan L,
	Gerd Hoffmann, Schaefer, Daniel, Sunil V L, Liming Gao,
	Liu, Zhiguang, Kinney, Michael D

For OvmfPkg change, Acked-by: Jiewen Yao <Jiewen.yao@intel.com>
Need ARM/RISC-V expert to give Reviewed-by.

Thank you
Yao Jiewen

> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Abner
> Chang
> Sent: Thursday, September 30, 2021 8:46 AM
> To: devel@edk2.groups.io
> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>; Leif Lindholm
> <leif@nuviainc.com>; Sami Mujawar <sami.mujawar@arm.com>; Yao, Jiewen
> <jiewen.yao@intel.com>; Justen, Jordan L <jordan.l.justen@intel.com>; Gerd
> Hoffmann <kraxel@redhat.com>; Schaefer, Daniel <daniel.schaefer@hpe.com>;
> Sunil V L <sunilvl@ventanamicro.com>; Liming Gao
> <gaoliming@byosoft.com.cn>; Liu, Zhiguang <zhiguang.liu@intel.com>; Kinney,
> Michael D <michael.d.kinney@intel.com>
> Subject: [edk2-devel] [PATCH V3 00/12] Migrate ArmVirtPkg modules to
> OvmfPkg
> 
> In V3: Address comments on V2.
> In V2: Remove HPE license on the files that just moved around or
>        the changes in the file are just code removal.
> 
> edk2 BZ #: 3665
> edk2 platform corresponding changes will be submitted after
> this pactch set is reviewed.
> 
> This pacthes set is to migrate some modules from ArmVirtPkg
> to under OvmfPkg for the upcoming RiscVVirtPkg that can leverage
> those modules without the dependency with Arm*Pkg.
> 
> The modules moved from ArmVirtPkg to OvmfPkg are,
> - FdtClientDxe
> - PciPcdProducerLib
> - HighMemDxe
> - QemuFwCfgLib
> - FdtPciHostBridgeLib
> - VirtioFdtDxe
> 
> Below PCDs are moved to under MdePkg and leverage by RiscVVirtPkg.
> This change also remove the dependency on ArmPkg of OvmfPkg.
> - PcdPciIoTranslation
> - PcdPciIoTranslation
> - PcdPciMmio32(64)Translation
> 
> Signed-off-by: Abner Chang <abner.chang@hpe.com>
> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
> Cc: Leif Lindholm <leif@nuviainc.com>
> Cc: Sami Mujawar <sami.mujawar@arm.com>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Jordan Justen <jordan.l.justen@intel.com>
> Cc: Gerd Hoffmann <kraxel@redhat.com>
> Cc: Daniel Schaefer <daniel.schaefer@hpe.com>
> Cc: Sunil V L <sunilvl@ventanamicro.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Zhiguang Liu <zhiguang.liu@intel.com>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> 
> Abner Chang (12):
>   ArmVirtPkg/FdtClintDxe: Move FdtClientDxe to EmbeddedPkg
>   MdePkg: Add PcdPciIoTranslation PCD
>   ArmPkg: Use PcdPciIoTranslation PCD from MdePkg
>   ArmVirtPkg/FdtPciPcdProducerLib: Relocate PciPcdProducerLib to OvmfPkg
>   ArmVirtPkg/HighMemDxe: Relocate HighMemDxe to OvmfPkg
>   OvmfPkg/HighMemDxe: Add RISC-V in the supported arch.
>   ArmVirtPkg/QemuFwCfgLib: Relocate QemuFwCfgLib to OvmfPkg
>   OvmfPkg/QemuFwCfgLibMMIO: Add RISC-V arch support
>   MdePkg: Add PcdPciMmio32(64)Translation PCDs
>   ArmVirtPkg/FdtPciHostBridgeLib: Relocate FdtPciHostBridgeLib to
>     OvmfPkg/Fdt
>   OvmfPkg/FdtPciHostBridgeLib: Add RISC-V in the supported arch.
>   ArmVirtPkg/VirtioFdtDxe: Relocate VirtioFdtDxe to OvmfPkg/Fdt
> 
>  ArmPkg/ArmPkg.dec                             | 15 ++++++--------
>  ArmVirtPkg/ArmVirtPkg.dec                     |  3 ---
>  EmbeddedPkg/EmbeddedPkg.dec                   |  1 +
>  MdePkg/MdePkg.dec                             | 12 +++++++++++
>  ArmVirtPkg/ArmVirtCloudHv.dsc                 | 18 ++++++++---------
>  ArmVirtPkg/ArmVirtKvmTool.dsc                 | 18 ++++++++---------
>  ArmVirtPkg/ArmVirtQemu.dsc                    | 20 +++++++++----------
>  ArmVirtPkg/ArmVirtQemuKernel.dsc              | 20 +++++++++----------
>  ArmVirtPkg/ArmVirtXen.dsc                     |  2 +-
>  EmbeddedPkg/EmbeddedPkg.dsc                   |  1 +
>  ArmVirtPkg/ArmVirtCloudHv.fdf                 |  6 +++---
>  ArmVirtPkg/ArmVirtKvmTool.fdf                 |  6 +++---
>  ArmVirtPkg/ArmVirtXen.fdf                     |  2 +-
>  ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc          |  6 +++---
>  .../ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf       |  2 +-
>  .../ArmVirtGicArchLib/ArmVirtGicArchLib.inf   |  1 +
>  .../ArmVirtPL031FdtClientLib.inf              |  1 +
>  .../ArmVirtPsciResetSystemLib.inf             |  1 +
>  .../ArmVirtTimerFdtClientLib.inf              |  1 +
>  .../KvmtoolRtcFdtClientLib.inf                |  1 +
>  .../NorFlashKvmtoolLib/NorFlashKvmtoolLib.inf |  1 +
>  .../NorFlashQemuLib/NorFlashQemuLib.inf       |  1 +
>  .../XenAcpiPlatformDxe/XenAcpiPlatformDxe.inf |  1 +
>  ArmVirtPkg/XenioFdtDxe/XenioFdtDxe.inf        |  1 +
>  .../Drivers}/FdtClientDxe/FdtClientDxe.inf    |  1 -
>  .../FdtPciHostBridgeLib.inf                   | 11 +++++-----
>  .../FdtPciPcdProducerLib.inf                  |  5 ++---
>  .../Fdt}/HighMemDxe/HighMemDxe.inf            |  7 ++++---
>  .../Fdt}/VirtioFdtDxe/VirtioFdtDxe.inf        |  2 +-
>  .../Library/QemuFwCfgLib/QemuFwCfgLibMmio.inf |  6 +++---
>  .../Include/Protocol/FdtClient.h              |  0
>  .../Drivers}/FdtClientDxe/FdtClientDxe.c      |  0
>  .../FdtPciHostBridgeLib/FdtPciHostBridgeLib.c |  0
>  .../FdtPciPcdProducerLib.c                    |  0
>  .../Fdt}/HighMemDxe/HighMemDxe.c              |  3 ++-
>  .../Fdt}/VirtioFdtDxe/VirtioFdtDxe.c          |  0
>  .../Library/QemuFwCfgLib/QemuFwCfgLibMmio.c   |  7 ++++---
>  Maintainers.txt                               |  6 ++++++
>  38 files changed, 106 insertions(+), 83 deletions(-)
>  rename {ArmVirtPkg => EmbeddedPkg/Drivers}/FdtClientDxe/FdtClientDxe.inf
> (92%)
>  rename {ArmVirtPkg/Library =>
> OvmfPkg/Fdt}/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf (77%)
>  rename {ArmVirtPkg/Library =>
> OvmfPkg/Fdt}/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf (87%)
>  rename {ArmVirtPkg => OvmfPkg/Fdt}/HighMemDxe/HighMemDxe.inf (83%)
>  rename {ArmVirtPkg => OvmfPkg/Fdt}/VirtioFdtDxe/VirtioFdtDxe.inf (92%)
>  rename ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLib.inf =>
> OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibMmio.inf (86%)
>  rename {ArmVirtPkg => EmbeddedPkg}/Include/Protocol/FdtClient.h (100%)
>  rename {ArmVirtPkg => EmbeddedPkg/Drivers}/FdtClientDxe/FdtClientDxe.c
> (100%)
>  rename {ArmVirtPkg/Library =>
> OvmfPkg/Fdt}/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c (100%)
>  rename {ArmVirtPkg/Library =>
> OvmfPkg/Fdt}/FdtPciPcdProducerLib/FdtPciPcdProducerLib.c (100%)
>  rename {ArmVirtPkg => OvmfPkg/Fdt}/HighMemDxe/HighMemDxe.c (95%)
>  rename {ArmVirtPkg => OvmfPkg/Fdt}/VirtioFdtDxe/VirtioFdtDxe.c (100%)
>  rename ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLib.c =>
> OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibMmio.c (93%)
> 
> --
> 2.17.1
> 
> 
> 
> 
> 


^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH V3 00/12] Migrate ArmVirtPkg modules to OvmfPkg
  2021-09-30  0:45 [PATCH V3 00/12] Migrate ArmVirtPkg modules to OvmfPkg Abner Chang
                   ` (12 preceding siblings ...)
  2021-09-30  2:39 ` [edk2-devel] [PATCH V3 00/12] Migrate ArmVirtPkg modules to OvmfPkg Yao, Jiewen
@ 2021-09-30  7:12 ` Gerd Hoffmann
  2021-10-03  8:11 ` Daniel Schaefer
                   ` (2 subsequent siblings)
  16 siblings, 0 replies; 27+ messages in thread
From: Gerd Hoffmann @ 2021-09-30  7:12 UTC (permalink / raw)
  To: Abner Chang
  Cc: devel, Ard Biesheuvel, Leif Lindholm, Sami Mujawar, Jiewen Yao,
	Jordan Justen, Daniel Schaefer, Sunil V L, Liming Gao,
	Zhiguang Liu, Michael D Kinney

On Thu, Sep 30, 2021 at 08:45:36AM +0800, Abner Chang wrote:
> In V3: Address comments on V2.
> In V2: Remove HPE license on the files that just moved around or
>        the changes in the file are just code removal.
> 
> edk2 BZ #: 3665
> edk2 platform corresponding changes will be submitted after
> this pactch set is reviewed.
> 
> This pacthes set is to migrate some modules from ArmVirtPkg
> to under OvmfPkg for the upcoming RiscVVirtPkg that can leverage
> those modules without the dependency with Arm*Pkg.
> 
> The modules moved from ArmVirtPkg to OvmfPkg are,
> - FdtClientDxe
> - PciPcdProducerLib
> - HighMemDxe
> - QemuFwCfgLib
> - FdtPciHostBridgeLib
> - VirtioFdtDxe
> 
> Below PCDs are moved to under MdePkg and leverage by RiscVVirtPkg.
> This change also remove the dependency on ArmPkg of OvmfPkg.
> - PcdPciIoTranslation
> - PcdPciIoTranslation
> - PcdPciMmio32(64)Translation

Acked-by: Gerd Hoffmann <kraxel@redhat.com>


^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH V3 00/12] Migrate ArmVirtPkg modules to OvmfPkg
  2021-09-30  0:45 [PATCH V3 00/12] Migrate ArmVirtPkg modules to OvmfPkg Abner Chang
                   ` (13 preceding siblings ...)
  2021-09-30  7:12 ` Gerd Hoffmann
@ 2021-10-03  8:11 ` Daniel Schaefer
  2021-10-04 10:05 ` Sunil V L
  2021-10-05  9:30 ` [edk2-devel] " Ard Biesheuvel
  16 siblings, 0 replies; 27+ messages in thread
From: Daniel Schaefer @ 2021-10-03  8:11 UTC (permalink / raw)
  To: Abner Chang, devel
  Cc: Ard Biesheuvel, Leif Lindholm, Sami Mujawar, Jiewen Yao,
	Jordan Justen, Gerd Hoffmann, Sunil V L, Liming Gao, Zhiguang Liu,
	Michael D Kinney

I'm happy. For the commits that I hadn't given it:

Reviewed-By: Daniel Schaefer <daniel.schaefer@hpe.com>

Thanks!

On 9/30/21 08:45, Abner Chang wrote:
> In V3: Address comments on V2.
> In V2: Remove HPE license on the files that just moved around or
>        the changes in the file are just code removal.
> 
> edk2 BZ #: 3665
> edk2 platform corresponding changes will be submitted after
> this pactch set is reviewed.
> 
> This pacthes set is to migrate some modules from ArmVirtPkg
> to under OvmfPkg for the upcoming RiscVVirtPkg that can leverage
> those modules without the dependency with Arm*Pkg.
> 
> The modules moved from ArmVirtPkg to OvmfPkg are,
> - FdtClientDxe
> - PciPcdProducerLib
> - HighMemDxe
> - QemuFwCfgLib
> - FdtPciHostBridgeLib
> - VirtioFdtDxe
> 
> Below PCDs are moved to under MdePkg and leverage by RiscVVirtPkg.
> This change also remove the dependency on ArmPkg of OvmfPkg.
> - PcdPciIoTranslation
> - PcdPciIoTranslation
> - PcdPciMmio32(64)Translation
> 
> Signed-off-by: Abner Chang <abner.chang@hpe.com>
> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
> Cc: Leif Lindholm <leif@nuviainc.com>
> Cc: Sami Mujawar <sami.mujawar@arm.com>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Jordan Justen <jordan.l.justen@intel.com>
> Cc: Gerd Hoffmann <kraxel@redhat.com>
> Cc: Daniel Schaefer <daniel.schaefer@hpe.com>
> Cc: Sunil V L <sunilvl@ventanamicro.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Zhiguang Liu <zhiguang.liu@intel.com>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> 
> Abner Chang (12):
>   ArmVirtPkg/FdtClintDxe: Move FdtClientDxe to EmbeddedPkg
>   MdePkg: Add PcdPciIoTranslation PCD
>   ArmPkg: Use PcdPciIoTranslation PCD from MdePkg
>   ArmVirtPkg/FdtPciPcdProducerLib: Relocate PciPcdProducerLib to OvmfPkg
>   ArmVirtPkg/HighMemDxe: Relocate HighMemDxe to OvmfPkg
>   OvmfPkg/HighMemDxe: Add RISC-V in the supported arch.
>   ArmVirtPkg/QemuFwCfgLib: Relocate QemuFwCfgLib to OvmfPkg
>   OvmfPkg/QemuFwCfgLibMMIO: Add RISC-V arch support
>   MdePkg: Add PcdPciMmio32(64)Translation PCDs
>   ArmVirtPkg/FdtPciHostBridgeLib: Relocate FdtPciHostBridgeLib to
>     OvmfPkg/Fdt
>   OvmfPkg/FdtPciHostBridgeLib: Add RISC-V in the supported arch.
>   ArmVirtPkg/VirtioFdtDxe: Relocate VirtioFdtDxe to OvmfPkg/Fdt
> 
>  ArmPkg/ArmPkg.dec                             | 15 ++++++--------
>  ArmVirtPkg/ArmVirtPkg.dec                     |  3 ---
>  EmbeddedPkg/EmbeddedPkg.dec                   |  1 +
>  MdePkg/MdePkg.dec                             | 12 +++++++++++
>  ArmVirtPkg/ArmVirtCloudHv.dsc                 | 18 ++++++++---------
>  ArmVirtPkg/ArmVirtKvmTool.dsc                 | 18 ++++++++---------
>  ArmVirtPkg/ArmVirtQemu.dsc                    | 20 +++++++++----------
>  ArmVirtPkg/ArmVirtQemuKernel.dsc              | 20 +++++++++----------
>  ArmVirtPkg/ArmVirtXen.dsc                     |  2 +-
>  EmbeddedPkg/EmbeddedPkg.dsc                   |  1 +
>  ArmVirtPkg/ArmVirtCloudHv.fdf                 |  6 +++---
>  ArmVirtPkg/ArmVirtKvmTool.fdf                 |  6 +++---
>  ArmVirtPkg/ArmVirtXen.fdf                     |  2 +-
>  ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc          |  6 +++---
>  .../ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf       |  2 +-
>  .../ArmVirtGicArchLib/ArmVirtGicArchLib.inf   |  1 +
>  .../ArmVirtPL031FdtClientLib.inf              |  1 +
>  .../ArmVirtPsciResetSystemLib.inf             |  1 +
>  .../ArmVirtTimerFdtClientLib.inf              |  1 +
>  .../KvmtoolRtcFdtClientLib.inf                |  1 +
>  .../NorFlashKvmtoolLib/NorFlashKvmtoolLib.inf |  1 +
>  .../NorFlashQemuLib/NorFlashQemuLib.inf       |  1 +
>  .../XenAcpiPlatformDxe/XenAcpiPlatformDxe.inf |  1 +
>  ArmVirtPkg/XenioFdtDxe/XenioFdtDxe.inf        |  1 +
>  .../Drivers}/FdtClientDxe/FdtClientDxe.inf    |  1 -
>  .../FdtPciHostBridgeLib.inf                   | 11 +++++-----
>  .../FdtPciPcdProducerLib.inf                  |  5 ++---
>  .../Fdt}/HighMemDxe/HighMemDxe.inf            |  7 ++++---
>  .../Fdt}/VirtioFdtDxe/VirtioFdtDxe.inf        |  2 +-
>  .../Library/QemuFwCfgLib/QemuFwCfgLibMmio.inf |  6 +++---
>  .../Include/Protocol/FdtClient.h              |  0
>  .../Drivers}/FdtClientDxe/FdtClientDxe.c      |  0
>  .../FdtPciHostBridgeLib/FdtPciHostBridgeLib.c |  0
>  .../FdtPciPcdProducerLib.c                    |  0
>  .../Fdt}/HighMemDxe/HighMemDxe.c              |  3 ++-
>  .../Fdt}/VirtioFdtDxe/VirtioFdtDxe.c          |  0
>  .../Library/QemuFwCfgLib/QemuFwCfgLibMmio.c   |  7 ++++---
>  Maintainers.txt                               |  6 ++++++
>  38 files changed, 106 insertions(+), 83 deletions(-)
>  rename {ArmVirtPkg => EmbeddedPkg/Drivers}/FdtClientDxe/FdtClientDxe.inf (92%)
>  rename {ArmVirtPkg/Library => OvmfPkg/Fdt}/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf (77%)
>  rename {ArmVirtPkg/Library => OvmfPkg/Fdt}/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf (87%)
>  rename {ArmVirtPkg => OvmfPkg/Fdt}/HighMemDxe/HighMemDxe.inf (83%)
>  rename {ArmVirtPkg => OvmfPkg/Fdt}/VirtioFdtDxe/VirtioFdtDxe.inf (92%)
>  rename ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLib.inf => OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibMmio.inf (86%)
>  rename {ArmVirtPkg => EmbeddedPkg}/Include/Protocol/FdtClient.h (100%)
>  rename {ArmVirtPkg => EmbeddedPkg/Drivers}/FdtClientDxe/FdtClientDxe.c (100%)
>  rename {ArmVirtPkg/Library => OvmfPkg/Fdt}/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c (100%)
>  rename {ArmVirtPkg/Library => OvmfPkg/Fdt}/FdtPciPcdProducerLib/FdtPciPcdProducerLib.c (100%)
>  rename {ArmVirtPkg => OvmfPkg/Fdt}/HighMemDxe/HighMemDxe.c (95%)
>  rename {ArmVirtPkg => OvmfPkg/Fdt}/VirtioFdtDxe/VirtioFdtDxe.c (100%)
>  rename ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLib.c => OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibMmio.c (93%)
> 

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH V3 00/12] Migrate ArmVirtPkg modules to OvmfPkg
  2021-09-30  0:45 [PATCH V3 00/12] Migrate ArmVirtPkg modules to OvmfPkg Abner Chang
                   ` (14 preceding siblings ...)
  2021-10-03  8:11 ` Daniel Schaefer
@ 2021-10-04 10:05 ` Sunil V L
  2021-10-05  9:30 ` [edk2-devel] " Ard Biesheuvel
  16 siblings, 0 replies; 27+ messages in thread
From: Sunil V L @ 2021-10-04 10:05 UTC (permalink / raw)
  To: Abner Chang
  Cc: devel, Ard Biesheuvel, Leif Lindholm, Sami Mujawar, Jiewen Yao,
	Jordan Justen, Gerd Hoffmann, Daniel Schaefer, Liming Gao,
	Zhiguang Liu, Michael D Kinney

The patch set for edk2 looks fine to me. 

Reviewed-by: Sunil V L <sunilvl@ventanamicro.com>

Thanks
Sunil

On Thu, Sep 30, 2021 at 08:45:36AM +0800, Abner Chang wrote:
> In V3: Address comments on V2.
> In V2: Remove HPE license on the files that just moved around or
>        the changes in the file are just code removal.
> 
> edk2 BZ #: 3665
> edk2 platform corresponding changes will be submitted after
> this pactch set is reviewed.
> 
> This pacthes set is to migrate some modules from ArmVirtPkg
> to under OvmfPkg for the upcoming RiscVVirtPkg that can leverage
> those modules without the dependency with Arm*Pkg.
> 
> The modules moved from ArmVirtPkg to OvmfPkg are,
> - FdtClientDxe
> - PciPcdProducerLib
> - HighMemDxe
> - QemuFwCfgLib
> - FdtPciHostBridgeLib
> - VirtioFdtDxe
> 
> Below PCDs are moved to under MdePkg and leverage by RiscVVirtPkg.
> This change also remove the dependency on ArmPkg of OvmfPkg.
> - PcdPciIoTranslation
> - PcdPciIoTranslation
> - PcdPciMmio32(64)Translation
> 
> Signed-off-by: Abner Chang <abner.chang@hpe.com>
> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
> Cc: Leif Lindholm <leif@nuviainc.com>
> Cc: Sami Mujawar <sami.mujawar@arm.com>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Jordan Justen <jordan.l.justen@intel.com>
> Cc: Gerd Hoffmann <kraxel@redhat.com>
> Cc: Daniel Schaefer <daniel.schaefer@hpe.com>
> Cc: Sunil V L <sunilvl@ventanamicro.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Zhiguang Liu <zhiguang.liu@intel.com>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> 
> Abner Chang (12):
>   ArmVirtPkg/FdtClintDxe: Move FdtClientDxe to EmbeddedPkg
>   MdePkg: Add PcdPciIoTranslation PCD
>   ArmPkg: Use PcdPciIoTranslation PCD from MdePkg
>   ArmVirtPkg/FdtPciPcdProducerLib: Relocate PciPcdProducerLib to OvmfPkg
>   ArmVirtPkg/HighMemDxe: Relocate HighMemDxe to OvmfPkg
>   OvmfPkg/HighMemDxe: Add RISC-V in the supported arch.
>   ArmVirtPkg/QemuFwCfgLib: Relocate QemuFwCfgLib to OvmfPkg
>   OvmfPkg/QemuFwCfgLibMMIO: Add RISC-V arch support
>   MdePkg: Add PcdPciMmio32(64)Translation PCDs
>   ArmVirtPkg/FdtPciHostBridgeLib: Relocate FdtPciHostBridgeLib to
>     OvmfPkg/Fdt
>   OvmfPkg/FdtPciHostBridgeLib: Add RISC-V in the supported arch.
>   ArmVirtPkg/VirtioFdtDxe: Relocate VirtioFdtDxe to OvmfPkg/Fdt
> 
>  ArmPkg/ArmPkg.dec                             | 15 ++++++--------
>  ArmVirtPkg/ArmVirtPkg.dec                     |  3 ---
>  EmbeddedPkg/EmbeddedPkg.dec                   |  1 +
>  MdePkg/MdePkg.dec                             | 12 +++++++++++
>  ArmVirtPkg/ArmVirtCloudHv.dsc                 | 18 ++++++++---------
>  ArmVirtPkg/ArmVirtKvmTool.dsc                 | 18 ++++++++---------
>  ArmVirtPkg/ArmVirtQemu.dsc                    | 20 +++++++++----------
>  ArmVirtPkg/ArmVirtQemuKernel.dsc              | 20 +++++++++----------
>  ArmVirtPkg/ArmVirtXen.dsc                     |  2 +-
>  EmbeddedPkg/EmbeddedPkg.dsc                   |  1 +
>  ArmVirtPkg/ArmVirtCloudHv.fdf                 |  6 +++---
>  ArmVirtPkg/ArmVirtKvmTool.fdf                 |  6 +++---
>  ArmVirtPkg/ArmVirtXen.fdf                     |  2 +-
>  ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc          |  6 +++---
>  .../ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf       |  2 +-
>  .../ArmVirtGicArchLib/ArmVirtGicArchLib.inf   |  1 +
>  .../ArmVirtPL031FdtClientLib.inf              |  1 +
>  .../ArmVirtPsciResetSystemLib.inf             |  1 +
>  .../ArmVirtTimerFdtClientLib.inf              |  1 +
>  .../KvmtoolRtcFdtClientLib.inf                |  1 +
>  .../NorFlashKvmtoolLib/NorFlashKvmtoolLib.inf |  1 +
>  .../NorFlashQemuLib/NorFlashQemuLib.inf       |  1 +
>  .../XenAcpiPlatformDxe/XenAcpiPlatformDxe.inf |  1 +
>  ArmVirtPkg/XenioFdtDxe/XenioFdtDxe.inf        |  1 +
>  .../Drivers}/FdtClientDxe/FdtClientDxe.inf    |  1 -
>  .../FdtPciHostBridgeLib.inf                   | 11 +++++-----
>  .../FdtPciPcdProducerLib.inf                  |  5 ++---
>  .../Fdt}/HighMemDxe/HighMemDxe.inf            |  7 ++++---
>  .../Fdt}/VirtioFdtDxe/VirtioFdtDxe.inf        |  2 +-
>  .../Library/QemuFwCfgLib/QemuFwCfgLibMmio.inf |  6 +++---
>  .../Include/Protocol/FdtClient.h              |  0
>  .../Drivers}/FdtClientDxe/FdtClientDxe.c      |  0
>  .../FdtPciHostBridgeLib/FdtPciHostBridgeLib.c |  0
>  .../FdtPciPcdProducerLib.c                    |  0
>  .../Fdt}/HighMemDxe/HighMemDxe.c              |  3 ++-
>  .../Fdt}/VirtioFdtDxe/VirtioFdtDxe.c          |  0
>  .../Library/QemuFwCfgLib/QemuFwCfgLibMmio.c   |  7 ++++---
>  Maintainers.txt                               |  6 ++++++
>  38 files changed, 106 insertions(+), 83 deletions(-)
>  rename {ArmVirtPkg => EmbeddedPkg/Drivers}/FdtClientDxe/FdtClientDxe.inf (92%)
>  rename {ArmVirtPkg/Library => OvmfPkg/Fdt}/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf (77%)
>  rename {ArmVirtPkg/Library => OvmfPkg/Fdt}/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf (87%)
>  rename {ArmVirtPkg => OvmfPkg/Fdt}/HighMemDxe/HighMemDxe.inf (83%)
>  rename {ArmVirtPkg => OvmfPkg/Fdt}/VirtioFdtDxe/VirtioFdtDxe.inf (92%)
>  rename ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLib.inf => OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibMmio.inf (86%)
>  rename {ArmVirtPkg => EmbeddedPkg}/Include/Protocol/FdtClient.h (100%)
>  rename {ArmVirtPkg => EmbeddedPkg/Drivers}/FdtClientDxe/FdtClientDxe.c (100%)
>  rename {ArmVirtPkg/Library => OvmfPkg/Fdt}/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c (100%)
>  rename {ArmVirtPkg/Library => OvmfPkg/Fdt}/FdtPciPcdProducerLib/FdtPciPcdProducerLib.c (100%)
>  rename {ArmVirtPkg => OvmfPkg/Fdt}/HighMemDxe/HighMemDxe.c (95%)
>  rename {ArmVirtPkg => OvmfPkg/Fdt}/VirtioFdtDxe/VirtioFdtDxe.c (100%)
>  rename ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLib.c => OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibMmio.c (93%)
> 
> -- 
> 2.17.1
> 

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [edk2-devel] [PATCH V3 00/12] Migrate ArmVirtPkg modules to OvmfPkg
  2021-09-30  0:45 [PATCH V3 00/12] Migrate ArmVirtPkg modules to OvmfPkg Abner Chang
                   ` (15 preceding siblings ...)
  2021-10-04 10:05 ` Sunil V L
@ 2021-10-05  9:30 ` Ard Biesheuvel
  2021-10-05 15:00   ` Abner Chang
       [not found]   ` <16AB2A90260D3DD8.20282@groups.io>
  16 siblings, 2 replies; 27+ messages in thread
From: Ard Biesheuvel @ 2021-10-05  9:30 UTC (permalink / raw)
  To: edk2-devel-groups-io, Abner Chang
  Cc: Ard Biesheuvel, Leif Lindholm, Sami Mujawar, Jiewen Yao,
	Jordan Justen, Gerd Hoffmann, Daniel Schaefer, Sunil V L,
	Liming Gao, Zhiguang Liu, Michael D Kinney

On Thu, 30 Sept 2021 at 03:43, Abner Chang <abner.chang@hpe.com> wrote:
>
> In V3: Address comments on V2.
> In V2: Remove HPE license on the files that just moved around or
>        the changes in the file are just code removal.
>
> edk2 BZ #: 3665
> edk2 platform corresponding changes will be submitted after
> this pactch set is reviewed.
>
> This pacthes set is to migrate some modules from ArmVirtPkg
> to under OvmfPkg for the upcoming RiscVVirtPkg that can leverage
> those modules without the dependency with Arm*Pkg.
>
> The modules moved from ArmVirtPkg to OvmfPkg are,
> - FdtClientDxe
> - PciPcdProducerLib
> - HighMemDxe
> - QemuFwCfgLib
> - FdtPciHostBridgeLib
> - VirtioFdtDxe
>
> Below PCDs are moved to under MdePkg and leverage by RiscVVirtPkg.
> This change also remove the dependency on ArmPkg of OvmfPkg.
> - PcdPciIoTranslation
> - PcdPciIoTranslation
> - PcdPciMmio32(64)Translation
>
> Signed-off-by: Abner Chang <abner.chang@hpe.com>
> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
> Cc: Leif Lindholm <leif@nuviainc.com>
> Cc: Sami Mujawar <sami.mujawar@arm.com>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Jordan Justen <jordan.l.justen@intel.com>
> Cc: Gerd Hoffmann <kraxel@redhat.com>
> Cc: Daniel Schaefer <daniel.schaefer@hpe.com>
> Cc: Sunil V L <sunilvl@ventanamicro.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Zhiguang Liu <zhiguang.liu@intel.com>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
>
> Abner Chang (12):
>   ArmVirtPkg/FdtClintDxe: Move FdtClientDxe to EmbeddedPkg
>   MdePkg: Add PcdPciIoTranslation PCD
>   ArmPkg: Use PcdPciIoTranslation PCD from MdePkg
>   ArmVirtPkg/FdtPciPcdProducerLib: Relocate PciPcdProducerLib to OvmfPkg
>   ArmVirtPkg/HighMemDxe: Relocate HighMemDxe to OvmfPkg
>   OvmfPkg/HighMemDxe: Add RISC-V in the supported arch.
>   ArmVirtPkg/QemuFwCfgLib: Relocate QemuFwCfgLib to OvmfPkg
>   OvmfPkg/QemuFwCfgLibMMIO: Add RISC-V arch support
>   MdePkg: Add PcdPciMmio32(64)Translation PCDs
>   ArmVirtPkg/FdtPciHostBridgeLib: Relocate FdtPciHostBridgeLib to
>     OvmfPkg/Fdt
>   OvmfPkg/FdtPciHostBridgeLib: Add RISC-V in the supported arch.
>   ArmVirtPkg/VirtioFdtDxe: Relocate VirtioFdtDxe to OvmfPkg/Fdt
>

Hello all,

These patches look ok to me, but I wonder if the MdePkg maintainers
are happy taking these PCD declaration changes. Translations for PCIe
are typically defined per host bridge, and I would rather move away
from using PCDs for this entirely than 'promote' them by carrying them
in MdePkg.

As this issue is somewhat orthogonal to what Abner is trying to fix,
perhaps it is better to avoid MdePkg changes for now, and just
duplicate these PCDs into OvmfPkg. This is reasonable, given that we
know that QEMU only exposes a single host bridge.

The one in ArmPkg can hopefully be removed and replaced with something
that is more appropriate.


>  ArmPkg/ArmPkg.dec                             | 15 ++++++--------
>  ArmVirtPkg/ArmVirtPkg.dec                     |  3 ---
>  EmbeddedPkg/EmbeddedPkg.dec                   |  1 +
>  MdePkg/MdePkg.dec                             | 12 +++++++++++
>  ArmVirtPkg/ArmVirtCloudHv.dsc                 | 18 ++++++++---------
>  ArmVirtPkg/ArmVirtKvmTool.dsc                 | 18 ++++++++---------
>  ArmVirtPkg/ArmVirtQemu.dsc                    | 20 +++++++++----------
>  ArmVirtPkg/ArmVirtQemuKernel.dsc              | 20 +++++++++----------
>  ArmVirtPkg/ArmVirtXen.dsc                     |  2 +-
>  EmbeddedPkg/EmbeddedPkg.dsc                   |  1 +
>  ArmVirtPkg/ArmVirtCloudHv.fdf                 |  6 +++---
>  ArmVirtPkg/ArmVirtKvmTool.fdf                 |  6 +++---
>  ArmVirtPkg/ArmVirtXen.fdf                     |  2 +-
>  ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc          |  6 +++---
>  .../ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf       |  2 +-
>  .../ArmVirtGicArchLib/ArmVirtGicArchLib.inf   |  1 +
>  .../ArmVirtPL031FdtClientLib.inf              |  1 +
>  .../ArmVirtPsciResetSystemLib.inf             |  1 +
>  .../ArmVirtTimerFdtClientLib.inf              |  1 +
>  .../KvmtoolRtcFdtClientLib.inf                |  1 +
>  .../NorFlashKvmtoolLib/NorFlashKvmtoolLib.inf |  1 +
>  .../NorFlashQemuLib/NorFlashQemuLib.inf       |  1 +
>  .../XenAcpiPlatformDxe/XenAcpiPlatformDxe.inf |  1 +
>  ArmVirtPkg/XenioFdtDxe/XenioFdtDxe.inf        |  1 +
>  .../Drivers}/FdtClientDxe/FdtClientDxe.inf    |  1 -
>  .../FdtPciHostBridgeLib.inf                   | 11 +++++-----
>  .../FdtPciPcdProducerLib.inf                  |  5 ++---
>  .../Fdt}/HighMemDxe/HighMemDxe.inf            |  7 ++++---
>  .../Fdt}/VirtioFdtDxe/VirtioFdtDxe.inf        |  2 +-
>  .../Library/QemuFwCfgLib/QemuFwCfgLibMmio.inf |  6 +++---
>  .../Include/Protocol/FdtClient.h              |  0
>  .../Drivers}/FdtClientDxe/FdtClientDxe.c      |  0
>  .../FdtPciHostBridgeLib/FdtPciHostBridgeLib.c |  0
>  .../FdtPciPcdProducerLib.c                    |  0
>  .../Fdt}/HighMemDxe/HighMemDxe.c              |  3 ++-
>  .../Fdt}/VirtioFdtDxe/VirtioFdtDxe.c          |  0
>  .../Library/QemuFwCfgLib/QemuFwCfgLibMmio.c   |  7 ++++---
>  Maintainers.txt                               |  6 ++++++
>  38 files changed, 106 insertions(+), 83 deletions(-)
>  rename {ArmVirtPkg => EmbeddedPkg/Drivers}/FdtClientDxe/FdtClientDxe.inf (92%)
>  rename {ArmVirtPkg/Library => OvmfPkg/Fdt}/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf (77%)
>  rename {ArmVirtPkg/Library => OvmfPkg/Fdt}/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf (87%)
>  rename {ArmVirtPkg => OvmfPkg/Fdt}/HighMemDxe/HighMemDxe.inf (83%)
>  rename {ArmVirtPkg => OvmfPkg/Fdt}/VirtioFdtDxe/VirtioFdtDxe.inf (92%)
>  rename ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLib.inf => OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibMmio.inf (86%)
>  rename {ArmVirtPkg => EmbeddedPkg}/Include/Protocol/FdtClient.h (100%)
>  rename {ArmVirtPkg => EmbeddedPkg/Drivers}/FdtClientDxe/FdtClientDxe.c (100%)
>  rename {ArmVirtPkg/Library => OvmfPkg/Fdt}/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c (100%)
>  rename {ArmVirtPkg/Library => OvmfPkg/Fdt}/FdtPciPcdProducerLib/FdtPciPcdProducerLib.c (100%)
>  rename {ArmVirtPkg => OvmfPkg/Fdt}/HighMemDxe/HighMemDxe.c (95%)
>  rename {ArmVirtPkg => OvmfPkg/Fdt}/VirtioFdtDxe/VirtioFdtDxe.c (100%)
>  rename ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLib.c => OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibMmio.c (93%)
>
> --
> 2.17.1
>
>
>
> 
>
>

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [edk2-devel] [PATCH V3 00/12] Migrate ArmVirtPkg modules to OvmfPkg
  2021-10-05  9:30 ` [edk2-devel] " Ard Biesheuvel
@ 2021-10-05 15:00   ` Abner Chang
       [not found]   ` <16AB2A90260D3DD8.20282@groups.io>
  1 sibling, 0 replies; 27+ messages in thread
From: Abner Chang @ 2021-10-05 15:00 UTC (permalink / raw)
  To: edk2-devel-groups-io, ardb@kernel.org
  Cc: Ard Biesheuvel, Leif Lindholm, Sami Mujawar, Jiewen Yao,
	Jordan Justen, Gerd Hoffmann, Schaefer, Daniel, Sunil V L,
	Liming Gao, Zhiguang Liu, Michael D Kinney

[-- Attachment #1: Type: text/plain, Size: 7379 bytes --]

Hi Ard,
This way reduces the impact of MdePkg. We can try it.

Thanks
Abner

________________________________
From: devel@edk2.groups.io <devel@edk2.groups.io> on behalf of Ard Biesheuvel <ardb@kernel.org>
Sent: Tuesday, October 5, 2021 5:30 PM
To: edk2-devel-groups-io <devel@edk2.groups.io>; Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>; Leif Lindholm <leif@nuviainc.com>; Sami Mujawar <sami.mujawar@arm.com>; Jiewen Yao <jiewen.yao@intel.com>; Jordan Justen <jordan.l.justen@intel.com>; Gerd Hoffmann <kraxel@redhat.com>; Schaefer, Daniel <daniel.schaefer@hpe.com>; Sunil V L <sunilvl@ventanamicro.com>; Liming Gao <gaoliming@byosoft.com.cn>; Zhiguang Liu <zhiguang.liu@intel.com>; Michael D Kinney <michael.d.kinney@intel.com>
Subject: Re: [edk2-devel] [PATCH V3 00/12] Migrate ArmVirtPkg modules to OvmfPkg

On Thu, 30 Sept 2021 at 03:43, Abner Chang <abner.chang@hpe.com> wrote:
>
> In V3: Address comments on V2.
> In V2: Remove HPE license on the files that just moved around or
>        the changes in the file are just code removal.
>
> edk2 BZ #: 3665
> edk2 platform corresponding changes will be submitted after
> this pactch set is reviewed.
>
> This pacthes set is to migrate some modules from ArmVirtPkg
> to under OvmfPkg for the upcoming RiscVVirtPkg that can leverage
> those modules without the dependency with Arm*Pkg.
>
> The modules moved from ArmVirtPkg to OvmfPkg are,
> - FdtClientDxe
> - PciPcdProducerLib
> - HighMemDxe
> - QemuFwCfgLib
> - FdtPciHostBridgeLib
> - VirtioFdtDxe
>
> Below PCDs are moved to under MdePkg and leverage by RiscVVirtPkg.
> This change also remove the dependency on ArmPkg of OvmfPkg.
> - PcdPciIoTranslation
> - PcdPciIoTranslation
> - PcdPciMmio32(64)Translation
>
> Signed-off-by: Abner Chang <abner.chang@hpe.com>
> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
> Cc: Leif Lindholm <leif@nuviainc.com>
> Cc: Sami Mujawar <sami.mujawar@arm.com>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Jordan Justen <jordan.l.justen@intel.com>
> Cc: Gerd Hoffmann <kraxel@redhat.com>
> Cc: Daniel Schaefer <daniel.schaefer@hpe.com>
> Cc: Sunil V L <sunilvl@ventanamicro.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Zhiguang Liu <zhiguang.liu@intel.com>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
>
> Abner Chang (12):
>   ArmVirtPkg/FdtClintDxe: Move FdtClientDxe to EmbeddedPkg
>   MdePkg: Add PcdPciIoTranslation PCD
>   ArmPkg: Use PcdPciIoTranslation PCD from MdePkg
>   ArmVirtPkg/FdtPciPcdProducerLib: Relocate PciPcdProducerLib to OvmfPkg
>   ArmVirtPkg/HighMemDxe: Relocate HighMemDxe to OvmfPkg
>   OvmfPkg/HighMemDxe: Add RISC-V in the supported arch.
>   ArmVirtPkg/QemuFwCfgLib: Relocate QemuFwCfgLib to OvmfPkg
>   OvmfPkg/QemuFwCfgLibMMIO: Add RISC-V arch support
>   MdePkg: Add PcdPciMmio32(64)Translation PCDs
>   ArmVirtPkg/FdtPciHostBridgeLib: Relocate FdtPciHostBridgeLib to
>     OvmfPkg/Fdt
>   OvmfPkg/FdtPciHostBridgeLib: Add RISC-V in the supported arch.
>   ArmVirtPkg/VirtioFdtDxe: Relocate VirtioFdtDxe to OvmfPkg/Fdt
>

Hello all,

These patches look ok to me, but I wonder if the MdePkg maintainers
are happy taking these PCD declaration changes. Translations for PCIe
are typically defined per host bridge, and I would rather move away
from using PCDs for this entirely than 'promote' them by carrying them
in MdePkg.

As this issue is somewhat orthogonal to what Abner is trying to fix,
perhaps it is better to avoid MdePkg changes for now, and just
duplicate these PCDs into OvmfPkg. This is reasonable, given that we
know that QEMU only exposes a single host bridge.

The one in ArmPkg can hopefully be removed and replaced with something
that is more appropriate.


>  ArmPkg/ArmPkg.dec                             | 15 ++++++--------
>  ArmVirtPkg/ArmVirtPkg.dec                     |  3 ---
>  EmbeddedPkg/EmbeddedPkg.dec                   |  1 +
>  MdePkg/MdePkg.dec                             | 12 +++++++++++
>  ArmVirtPkg/ArmVirtCloudHv.dsc                 | 18 ++++++++---------
>  ArmVirtPkg/ArmVirtKvmTool.dsc                 | 18 ++++++++---------
>  ArmVirtPkg/ArmVirtQemu.dsc                    | 20 +++++++++----------
>  ArmVirtPkg/ArmVirtQemuKernel.dsc              | 20 +++++++++----------
>  ArmVirtPkg/ArmVirtXen.dsc                     |  2 +-
>  EmbeddedPkg/EmbeddedPkg.dsc                   |  1 +
>  ArmVirtPkg/ArmVirtCloudHv.fdf                 |  6 +++---
>  ArmVirtPkg/ArmVirtKvmTool.fdf                 |  6 +++---
>  ArmVirtPkg/ArmVirtXen.fdf                     |  2 +-
>  ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc          |  6 +++---
>  .../ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf       |  2 +-
>  .../ArmVirtGicArchLib/ArmVirtGicArchLib.inf   |  1 +
>  .../ArmVirtPL031FdtClientLib.inf              |  1 +
>  .../ArmVirtPsciResetSystemLib.inf             |  1 +
>  .../ArmVirtTimerFdtClientLib.inf              |  1 +
>  .../KvmtoolRtcFdtClientLib.inf                |  1 +
>  .../NorFlashKvmtoolLib/NorFlashKvmtoolLib.inf |  1 +
>  .../NorFlashQemuLib/NorFlashQemuLib.inf       |  1 +
>  .../XenAcpiPlatformDxe/XenAcpiPlatformDxe.inf |  1 +
>  ArmVirtPkg/XenioFdtDxe/XenioFdtDxe.inf        |  1 +
>  .../Drivers}/FdtClientDxe/FdtClientDxe.inf    |  1 -
>  .../FdtPciHostBridgeLib.inf                   | 11 +++++-----
>  .../FdtPciPcdProducerLib.inf                  |  5 ++---
>  .../Fdt}/HighMemDxe/HighMemDxe.inf            |  7 ++++---
>  .../Fdt}/VirtioFdtDxe/VirtioFdtDxe.inf        |  2 +-
>  .../Library/QemuFwCfgLib/QemuFwCfgLibMmio.inf |  6 +++---
>  .../Include/Protocol/FdtClient.h              |  0
>  .../Drivers}/FdtClientDxe/FdtClientDxe.c      |  0
>  .../FdtPciHostBridgeLib/FdtPciHostBridgeLib.c |  0
>  .../FdtPciPcdProducerLib.c                    |  0
>  .../Fdt}/HighMemDxe/HighMemDxe.c              |  3 ++-
>  .../Fdt}/VirtioFdtDxe/VirtioFdtDxe.c          |  0
>  .../Library/QemuFwCfgLib/QemuFwCfgLibMmio.c   |  7 ++++---
>  Maintainers.txt                               |  6 ++++++
>  38 files changed, 106 insertions(+), 83 deletions(-)
>  rename {ArmVirtPkg => EmbeddedPkg/Drivers}/FdtClientDxe/FdtClientDxe.inf (92%)
>  rename {ArmVirtPkg/Library => OvmfPkg/Fdt}/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf (77%)
>  rename {ArmVirtPkg/Library => OvmfPkg/Fdt}/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf (87%)
>  rename {ArmVirtPkg => OvmfPkg/Fdt}/HighMemDxe/HighMemDxe.inf (83%)
>  rename {ArmVirtPkg => OvmfPkg/Fdt}/VirtioFdtDxe/VirtioFdtDxe.inf (92%)
>  rename ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLib.inf => OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibMmio.inf (86%)
>  rename {ArmVirtPkg => EmbeddedPkg}/Include/Protocol/FdtClient.h (100%)
>  rename {ArmVirtPkg => EmbeddedPkg/Drivers}/FdtClientDxe/FdtClientDxe.c (100%)
>  rename {ArmVirtPkg/Library => OvmfPkg/Fdt}/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c (100%)
>  rename {ArmVirtPkg/Library => OvmfPkg/Fdt}/FdtPciPcdProducerLib/FdtPciPcdProducerLib.c (100%)
>  rename {ArmVirtPkg => OvmfPkg/Fdt}/HighMemDxe/HighMemDxe.c (95%)
>  rename {ArmVirtPkg => OvmfPkg/Fdt}/VirtioFdtDxe/VirtioFdtDxe.c (100%)
>  rename ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLib.c => OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibMmio.c (93%)
>
> --
> 2.17.1
>
>
>
>
>
>






[-- Attachment #2: Type: text/html, Size: 12943 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [edk2-devel] [PATCH V3 00/12] Migrate ArmVirtPkg modules to OvmfPkg
       [not found]   ` <16AB2A90260D3DD8.20282@groups.io>
@ 2021-10-06  9:27     ` Abner Chang
  2021-10-08  3:14       ` 回复: " gaoliming
  0 siblings, 1 reply; 27+ messages in thread
From: Abner Chang @ 2021-10-06  9:27 UTC (permalink / raw)
  To: edk2-devel-groups-io, ardb@kernel.org,
	Chang, Abner (HPS SW/FW Technologist)
  Cc: Ard Biesheuvel, Leif Lindholm, Sami Mujawar, Jiewen Yao,
	Jordan Justen, Gerd Hoffmann, Schaefer, Daniel, Sunil V L,
	Liming Gao, Zhiguang Liu, Michael D Kinney

[-- Attachment #1: Type: text/plain, Size: 9011 bytes --]

Hi Ard,
I realized there is a problem if we duplicate ArmPkg defined PCD to under OvmfPkg (e.g. PcdPciIoTranslate PCD) when I was duplicating this PCD to OvmfPkg.
FdtPciProducerLib is relocated to OvmfPkg/Fdt and uses PcdPciIoTranslate PCD declared with OvmfPkg namespace. FdtPciProducerLib is also used by both ArmVirtPkg  and RiscVVirtPkg.
ArmVirtPkg uses ArmPciCpuIoDxe provided by ArmPkg however PcdPciIoTranslate used by ArmPciCpuIoDxe  is declared with ArmPkg namespace.
I think this results in the problem because PcdPciIoTranslate(s) that are referred by ArmPkg and ArmVirtPkg come from two different namespaces, right? Unless ArmPciCpuIoDxe uses the one declared in OvmfPkg, but I don't think we want to do this.
Thought? Otherwise, we should still keep the original patch that relocates these PCDs under MdePkg.

Thanks
Abner


________________________________
From: devel@edk2.groups.io <devel@edk2.groups.io> on behalf of Abner Chang <abner.chang@hpe.com>
Sent: Tuesday, October 5, 2021 11:00 PM
To: edk2-devel-groups-io <devel@edk2.groups.io>; ardb@kernel.org <ardb@kernel.org>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>; Leif Lindholm <leif@nuviainc.com>; Sami Mujawar <sami.mujawar@arm.com>; Jiewen Yao <jiewen.yao@intel.com>; Jordan Justen <jordan.l.justen@intel.com>; Gerd Hoffmann <kraxel@redhat.com>; Schaefer, Daniel <daniel.schaefer@hpe.com>; Sunil V L <sunilvl@ventanamicro.com>; Liming Gao <gaoliming@byosoft.com.cn>; Zhiguang Liu <zhiguang.liu@intel.com>; Michael D Kinney <michael.d.kinney@intel.com>
Subject: Re: [edk2-devel] [PATCH V3 00/12] Migrate ArmVirtPkg modules to OvmfPkg

Hi Ard,
This way reduces the impact of MdePkg. We can try it.

Thanks
Abner

________________________________
From: devel@edk2.groups.io <devel@edk2.groups.io> on behalf of Ard Biesheuvel <ardb@kernel.org>
Sent: Tuesday, October 5, 2021 5:30 PM
To: edk2-devel-groups-io <devel@edk2.groups.io>; Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>; Leif Lindholm <leif@nuviainc.com>; Sami Mujawar <sami.mujawar@arm.com>; Jiewen Yao <jiewen.yao@intel.com>; Jordan Justen <jordan.l.justen@intel.com>; Gerd Hoffmann <kraxel@redhat.com>; Schaefer, Daniel <daniel.schaefer@hpe.com>; Sunil V L <sunilvl@ventanamicro.com>; Liming Gao <gaoliming@byosoft.com.cn>; Zhiguang Liu <zhiguang.liu@intel.com>; Michael D Kinney <michael.d.kinney@intel.com>
Subject: Re: [edk2-devel] [PATCH V3 00/12] Migrate ArmVirtPkg modules to OvmfPkg

On Thu, 30 Sept 2021 at 03:43, Abner Chang <abner.chang@hpe.com> wrote:
>
> In V3: Address comments on V2.
> In V2: Remove HPE license on the files that just moved around or
>        the changes in the file are just code removal.
>
> edk2 BZ #: 3665
> edk2 platform corresponding changes will be submitted after
> this pactch set is reviewed.
>
> This pacthes set is to migrate some modules from ArmVirtPkg
> to under OvmfPkg for the upcoming RiscVVirtPkg that can leverage
> those modules without the dependency with Arm*Pkg.
>
> The modules moved from ArmVirtPkg to OvmfPkg are,
> - FdtClientDxe
> - PciPcdProducerLib
> - HighMemDxe
> - QemuFwCfgLib
> - FdtPciHostBridgeLib
> - VirtioFdtDxe
>
> Below PCDs are moved to under MdePkg and leverage by RiscVVirtPkg.
> This change also remove the dependency on ArmPkg of OvmfPkg.
> - PcdPciIoTranslation
> - PcdPciIoTranslation
> - PcdPciMmio32(64)Translation
>
> Signed-off-by: Abner Chang <abner.chang@hpe.com>
> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
> Cc: Leif Lindholm <leif@nuviainc.com>
> Cc: Sami Mujawar <sami.mujawar@arm.com>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Jordan Justen <jordan.l.justen@intel.com>
> Cc: Gerd Hoffmann <kraxel@redhat.com>
> Cc: Daniel Schaefer <daniel.schaefer@hpe.com>
> Cc: Sunil V L <sunilvl@ventanamicro.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Zhiguang Liu <zhiguang.liu@intel.com>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
>
> Abner Chang (12):
>   ArmVirtPkg/FdtClintDxe: Move FdtClientDxe to EmbeddedPkg
>   MdePkg: Add PcdPciIoTranslation PCD
>   ArmPkg: Use PcdPciIoTranslation PCD from MdePkg
>   ArmVirtPkg/FdtPciPcdProducerLib: Relocate PciPcdProducerLib to OvmfPkg
>   ArmVirtPkg/HighMemDxe: Relocate HighMemDxe to OvmfPkg
>   OvmfPkg/HighMemDxe: Add RISC-V in the supported arch.
>   ArmVirtPkg/QemuFwCfgLib: Relocate QemuFwCfgLib to OvmfPkg
>   OvmfPkg/QemuFwCfgLibMMIO: Add RISC-V arch support
>   MdePkg: Add PcdPciMmio32(64)Translation PCDs
>   ArmVirtPkg/FdtPciHostBridgeLib: Relocate FdtPciHostBridgeLib to
>     OvmfPkg/Fdt
>   OvmfPkg/FdtPciHostBridgeLib: Add RISC-V in the supported arch.
>   ArmVirtPkg/VirtioFdtDxe: Relocate VirtioFdtDxe to OvmfPkg/Fdt
>

Hello all,

These patches look ok to me, but I wonder if the MdePkg maintainers
are happy taking these PCD declaration changes. Translations for PCIe
are typically defined per host bridge, and I would rather move away
from using PCDs for this entirely than 'promote' them by carrying them
in MdePkg.

As this issue is somewhat orthogonal to what Abner is trying to fix,
perhaps it is better to avoid MdePkg changes for now, and just
duplicate these PCDs into OvmfPkg. This is reasonable, given that we
know that QEMU only exposes a single host bridge.

The one in ArmPkg can hopefully be removed and replaced with something
that is more appropriate.


>  ArmPkg/ArmPkg.dec                             | 15 ++++++--------
>  ArmVirtPkg/ArmVirtPkg.dec                     |  3 ---
>  EmbeddedPkg/EmbeddedPkg.dec                   |  1 +
>  MdePkg/MdePkg.dec                             | 12 +++++++++++
>  ArmVirtPkg/ArmVirtCloudHv.dsc                 | 18 ++++++++---------
>  ArmVirtPkg/ArmVirtKvmTool.dsc                 | 18 ++++++++---------
>  ArmVirtPkg/ArmVirtQemu.dsc                    | 20 +++++++++----------
>  ArmVirtPkg/ArmVirtQemuKernel.dsc              | 20 +++++++++----------
>  ArmVirtPkg/ArmVirtXen.dsc                     |  2 +-
>  EmbeddedPkg/EmbeddedPkg.dsc                   |  1 +
>  ArmVirtPkg/ArmVirtCloudHv.fdf                 |  6 +++---
>  ArmVirtPkg/ArmVirtKvmTool.fdf                 |  6 +++---
>  ArmVirtPkg/ArmVirtXen.fdf                     |  2 +-
>  ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc          |  6 +++---
>  .../ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf       |  2 +-
>  .../ArmVirtGicArchLib/ArmVirtGicArchLib.inf   |  1 +
>  .../ArmVirtPL031FdtClientLib.inf              |  1 +
>  .../ArmVirtPsciResetSystemLib.inf             |  1 +
>  .../ArmVirtTimerFdtClientLib.inf              |  1 +
>  .../KvmtoolRtcFdtClientLib.inf                |  1 +
>  .../NorFlashKvmtoolLib/NorFlashKvmtoolLib.inf |  1 +
>  .../NorFlashQemuLib/NorFlashQemuLib.inf       |  1 +
>  .../XenAcpiPlatformDxe/XenAcpiPlatformDxe.inf |  1 +
>  ArmVirtPkg/XenioFdtDxe/XenioFdtDxe.inf        |  1 +
>  .../Drivers}/FdtClientDxe/FdtClientDxe.inf    |  1 -
>  .../FdtPciHostBridgeLib.inf                   | 11 +++++-----
>  .../FdtPciPcdProducerLib.inf                  |  5 ++---
>  .../Fdt}/HighMemDxe/HighMemDxe.inf            |  7 ++++---
>  .../Fdt}/VirtioFdtDxe/VirtioFdtDxe.inf        |  2 +-
>  .../Library/QemuFwCfgLib/QemuFwCfgLibMmio.inf |  6 +++---
>  .../Include/Protocol/FdtClient.h              |  0
>  .../Drivers}/FdtClientDxe/FdtClientDxe.c      |  0
>  .../FdtPciHostBridgeLib/FdtPciHostBridgeLib.c |  0
>  .../FdtPciPcdProducerLib.c                    |  0
>  .../Fdt}/HighMemDxe/HighMemDxe.c              |  3 ++-
>  .../Fdt}/VirtioFdtDxe/VirtioFdtDxe.c          |  0
>  .../Library/QemuFwCfgLib/QemuFwCfgLibMmio.c   |  7 ++++---
>  Maintainers.txt                               |  6 ++++++
>  38 files changed, 106 insertions(+), 83 deletions(-)
>  rename {ArmVirtPkg => EmbeddedPkg/Drivers}/FdtClientDxe/FdtClientDxe.inf (92%)
>  rename {ArmVirtPkg/Library => OvmfPkg/Fdt}/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf (77%)
>  rename {ArmVirtPkg/Library => OvmfPkg/Fdt}/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf (87%)
>  rename {ArmVirtPkg => OvmfPkg/Fdt}/HighMemDxe/HighMemDxe.inf (83%)
>  rename {ArmVirtPkg => OvmfPkg/Fdt}/VirtioFdtDxe/VirtioFdtDxe.inf (92%)
>  rename ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLib.inf => OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibMmio.inf (86%)
>  rename {ArmVirtPkg => EmbeddedPkg}/Include/Protocol/FdtClient.h (100%)
>  rename {ArmVirtPkg => EmbeddedPkg/Drivers}/FdtClientDxe/FdtClientDxe.c (100%)
>  rename {ArmVirtPkg/Library => OvmfPkg/Fdt}/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c (100%)
>  rename {ArmVirtPkg/Library => OvmfPkg/Fdt}/FdtPciPcdProducerLib/FdtPciPcdProducerLib.c (100%)
>  rename {ArmVirtPkg => OvmfPkg/Fdt}/HighMemDxe/HighMemDxe.c (95%)
>  rename {ArmVirtPkg => OvmfPkg/Fdt}/VirtioFdtDxe/VirtioFdtDxe.c (100%)
>  rename ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLib.c => OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibMmio.c (93%)
>
> --
> 2.17.1
>
>
>
>
>
>







[-- Attachment #2: Type: text/html, Size: 19447 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread

* 回复: [edk2-devel] [PATCH V3 00/12] Migrate ArmVirtPkg modules to OvmfPkg
  2021-10-06  9:27     ` Abner Chang
@ 2021-10-08  3:14       ` gaoliming
  2021-10-08  3:39         ` Abner Chang
  0 siblings, 1 reply; 27+ messages in thread
From: gaoliming @ 2021-10-08  3:14 UTC (permalink / raw)
  To: 'Chang, Abner (HPS SW/FW Technologist)',
	'edk2-devel-groups-io', ardb
  Cc: 'Ard Biesheuvel', 'Leif Lindholm',
	'Sami Mujawar', 'Jiewen Yao',
	'Jordan Justen', 'Gerd Hoffmann',
	'Schaefer, Daniel', 'Sunil V L',
	'Zhiguang Liu', 'Michael D Kinney'

[-- Attachment #1: Type: text/plain, Size: 11487 bytes --]

Ard and Abner:

 I am OK to add these three PCDs PcdPciMmio32Translation,
PcdPciMmio64Translation, PcdPciIoTranslation to MdePkg. 

 

Thanks

Liming

发件人: Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com> 
发送时间: 2021年10月6日 17:27
收件人: edk2-devel-groups-io <devel@edk2.groups.io>; ardb@kernel.org; Chang,
Abner (HPS SW/FW Technologist) <abner.chang@hpe.com>
抄送: Ard Biesheuvel <ardb+tianocore@kernel.org>; Leif Lindholm
<leif@nuviainc.com>; Sami Mujawar <sami.mujawar@arm.com>; Jiewen Yao
<jiewen.yao@intel.com>; Jordan Justen <jordan.l.justen@intel.com>; Gerd
Hoffmann <kraxel@redhat.com>; Schaefer, Daniel <daniel.schaefer@hpe.com>;
Sunil V L <sunilvl@ventanamicro.com>; Liming Gao <gaoliming@byosoft.com.cn>;
Zhiguang Liu <zhiguang.liu@intel.com>; Michael D Kinney
<michael.d.kinney@intel.com>
主题: Re: [edk2-devel] [PATCH V3 00/12] Migrate ArmVirtPkg modules to
OvmfPkg

 

Hi Ard,

I realized there is a problem if we duplicate ArmPkg defined PCD to under
OvmfPkg (e.g. PcdPciIoTranslate PCD) when I was duplicating this PCD to
OvmfPkg.

FdtPciProducerLib is relocated to OvmfPkg/Fdt and uses PcdPciIoTranslate PCD
declared with OvmfPkg namespace. FdtPciProducerLib is also used by both
ArmVirtPkg  and RiscVVirtPkg.

ArmVirtPkg uses ArmPciCpuIoDxe provided by ArmPkg however PcdPciIoTranslate
used by ArmPciCpuIoDxe  is declared with ArmPkg namespace.

I think this results in the problem because PcdPciIoTranslate(s) that are
referred by ArmPkg and ArmVirtPkg come from two different namespaces, right?
Unless ArmPciCpuIoDxe uses the one declared in OvmfPkg, but I don't think we
want to do this.

Thought? Otherwise, we should still keep the original patch that relocates
these PCDs under MdePkg.

 

Thanks

Abner

 

 

  _____  

From: devel@edk2.groups.io <mailto:devel@edk2.groups.io>
<devel@edk2.groups.io <mailto:devel@edk2.groups.io> > on behalf of Abner
Chang <abner.chang@hpe.com <mailto:abner.chang@hpe.com> >
Sent: Tuesday, October 5, 2021 11:00 PM
To: edk2-devel-groups-io <devel@edk2.groups.io <mailto:devel@edk2.groups.io>
>; ardb@kernel.org <mailto:ardb@kernel.org>  <ardb@kernel.org
<mailto:ardb@kernel.org> >
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org <mailto:ardb+tianocore@kernel.
org> >; Leif Lindholm <leif@nuviainc.com <mailto:leif@nuviainc.com> >; Sami
Mujawar <sami.mujawar@arm.com <mailto:sami.mujawar@arm.com> >; Jiewen Yao
<jiewen.yao@intel.com <mailto:jiewen.yao@intel.com> >; Jordan Justen
<jordan.l.justen@intel.com <mailto:jordan.l.justen@intel.com> >; Gerd
Hoffmann <kraxel@redhat.com <mailto:kraxel@redhat.com> >; Schaefer, Daniel
<daniel.schaefer@hpe.com <mailto:daniel.schaefer@hpe.com> >; Sunil V L
<sunilvl@ventanamicro.com <mailto:sunilvl@ventanamicro.com> >; Liming Gao
<gaoliming@byosoft.com.cn <mailto:gaoliming@byosoft.com.cn> >; Zhiguang Liu
<zhiguang.liu@intel.com <mailto:zhiguang.liu@intel.com> >; Michael D Kinney
<michael.d.kinney@intel.com <mailto:michael.d.kinney@intel.com> >
Subject: Re: [edk2-devel] [PATCH V3 00/12] Migrate ArmVirtPkg modules to
OvmfPkg 

 

Hi Ard,

This way reduces the impact of MdePkg. We can try it.

 

Thanks

Abner

 

  _____  

From: devel@edk2.groups.io <mailto:devel@edk2.groups.io>
<devel@edk2.groups.io <mailto:devel@edk2.groups.io> > on behalf of Ard
Biesheuvel <ardb@kernel.org <mailto:ardb@kernel.org> >
Sent: Tuesday, October 5, 2021 5:30 PM
To: edk2-devel-groups-io <devel@edk2.groups.io <mailto:devel@edk2.groups.io>
>; Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com <mailto:abner.
chang@hpe.com> >
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org <mailto:ardb+tianocore@kernel.
org> >; Leif Lindholm <leif@nuviainc.com <mailto:leif@nuviainc.com> >; Sami
Mujawar <sami.mujawar@arm.com <mailto:sami.mujawar@arm.com> >; Jiewen Yao
<jiewen.yao@intel.com <mailto:jiewen.yao@intel.com> >; Jordan Justen
<jordan.l.justen@intel.com <mailto:jordan.l.justen@intel.com> >; Gerd
Hoffmann <kraxel@redhat.com <mailto:kraxel@redhat.com> >; Schaefer, Daniel
<daniel.schaefer@hpe.com <mailto:daniel.schaefer@hpe.com> >; Sunil V L
<sunilvl@ventanamicro.com <mailto:sunilvl@ventanamicro.com> >; Liming Gao
<gaoliming@byosoft.com.cn <mailto:gaoliming@byosoft.com.cn> >; Zhiguang Liu
<zhiguang.liu@intel.com <mailto:zhiguang.liu@intel.com> >; Michael D Kinney
<michael.d.kinney@intel.com <mailto:michael.d.kinney@intel.com> >
Subject: Re: [edk2-devel] [PATCH V3 00/12] Migrate ArmVirtPkg modules to
OvmfPkg 

 

On Thu, 30 Sept 2021 at 03:43, Abner Chang <abner.chang@hpe.com
<mailto:abner.chang@hpe.com> > wrote:
>
> In V3: Address comments on V2.
> In V2: Remove HPE license on the files that just moved around or
>        the changes in the file are just code removal.
>
> edk2 BZ #: 3665
> edk2 platform corresponding changes will be submitted after
> this pactch set is reviewed.
>
> This pacthes set is to migrate some modules from ArmVirtPkg
> to under OvmfPkg for the upcoming RiscVVirtPkg that can leverage
> those modules without the dependency with Arm*Pkg.
>
> The modules moved from ArmVirtPkg to OvmfPkg are,
> - FdtClientDxe
> - PciPcdProducerLib
> - HighMemDxe
> - QemuFwCfgLib
> - FdtPciHostBridgeLib
> - VirtioFdtDxe
>
> Below PCDs are moved to under MdePkg and leverage by RiscVVirtPkg.
> This change also remove the dependency on ArmPkg of OvmfPkg.
> - PcdPciIoTranslation
> - PcdPciIoTranslation
> - PcdPciMmio32(64)Translation
>
> Signed-off-by: Abner Chang <abner.chang@hpe.com
<mailto:abner.chang@hpe.com> >
> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org
<mailto:ardb+tianocore@kernel.org> >
> Cc: Leif Lindholm <leif@nuviainc.com <mailto:leif@nuviainc.com> >
> Cc: Sami Mujawar <sami.mujawar@arm.com <mailto:sami.mujawar@arm.com> >
> Cc: Jiewen Yao <jiewen.yao@intel.com <mailto:jiewen.yao@intel.com> >
> Cc: Jordan Justen <jordan.l.justen@intel.com
<mailto:jordan.l.justen@intel.com> >
> Cc: Gerd Hoffmann <kraxel@redhat.com <mailto:kraxel@redhat.com> >
> Cc: Daniel Schaefer <daniel.schaefer@hpe.com
<mailto:daniel.schaefer@hpe.com> >
> Cc: Sunil V L <sunilvl@ventanamicro.com <mailto:sunilvl@ventanamicro.com>
>
> Cc: Liming Gao <gaoliming@byosoft.com.cn <mailto:gaoliming@byosoft.com.cn>
>
> Cc: Zhiguang Liu <zhiguang.liu@intel.com <mailto:zhiguang.liu@intel.com> >
> Cc: Michael D Kinney <michael.d.kinney@intel.com
<mailto:michael.d.kinney@intel.com> >
>
> Abner Chang (12):
>   ArmVirtPkg/FdtClintDxe: Move FdtClientDxe to EmbeddedPkg
>   MdePkg: Add PcdPciIoTranslation PCD
>   ArmPkg: Use PcdPciIoTranslation PCD from MdePkg
>   ArmVirtPkg/FdtPciPcdProducerLib: Relocate PciPcdProducerLib to OvmfPkg
>   ArmVirtPkg/HighMemDxe: Relocate HighMemDxe to OvmfPkg
>   OvmfPkg/HighMemDxe: Add RISC-V in the supported arch.
>   ArmVirtPkg/QemuFwCfgLib: Relocate QemuFwCfgLib to OvmfPkg
>   OvmfPkg/QemuFwCfgLibMMIO: Add RISC-V arch support
>   MdePkg: Add PcdPciMmio32(64)Translation PCDs
>   ArmVirtPkg/FdtPciHostBridgeLib: Relocate FdtPciHostBridgeLib to
>     OvmfPkg/Fdt
>   OvmfPkg/FdtPciHostBridgeLib: Add RISC-V in the supported arch.
>   ArmVirtPkg/VirtioFdtDxe: Relocate VirtioFdtDxe to OvmfPkg/Fdt
>

Hello all,

These patches look ok to me, but I wonder if the MdePkg maintainers
are happy taking these PCD declaration changes. Translations for PCIe
are typically defined per host bridge, and I would rather move away
from using PCDs for this entirely than 'promote' them by carrying them
in MdePkg.

As this issue is somewhat orthogonal to what Abner is trying to fix,
perhaps it is better to avoid MdePkg changes for now, and just
duplicate these PCDs into OvmfPkg. This is reasonable, given that we
know that QEMU only exposes a single host bridge.

The one in ArmPkg can hopefully be removed and replaced with something
that is more appropriate.


>  ArmPkg/ArmPkg.dec                             | 15 ++++++--------
>  ArmVirtPkg/ArmVirtPkg.dec                     |  3 ---
>  EmbeddedPkg/EmbeddedPkg.dec                   |  1 +
>  MdePkg/MdePkg.dec                             | 12 +++++++++++
>  ArmVirtPkg/ArmVirtCloudHv.dsc                 | 18 ++++++++---------
>  ArmVirtPkg/ArmVirtKvmTool.dsc                 | 18 ++++++++---------
>  ArmVirtPkg/ArmVirtQemu.dsc                    | 20 +++++++++----------
>  ArmVirtPkg/ArmVirtQemuKernel.dsc              | 20 +++++++++----------
>  ArmVirtPkg/ArmVirtXen.dsc                     |  2 +-
>  EmbeddedPkg/EmbeddedPkg.dsc                   |  1 +
>  ArmVirtPkg/ArmVirtCloudHv.fdf                 |  6 +++---
>  ArmVirtPkg/ArmVirtKvmTool.fdf                 |  6 +++---
>  ArmVirtPkg/ArmVirtXen.fdf                     |  2 +-
>  ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc          |  6 +++---
>  .../ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf       |  2 +-
>  .../ArmVirtGicArchLib/ArmVirtGicArchLib.inf   |  1 +
>  .../ArmVirtPL031FdtClientLib.inf              |  1 +
>  .../ArmVirtPsciResetSystemLib.inf             |  1 +
>  .../ArmVirtTimerFdtClientLib.inf              |  1 +
>  .../KvmtoolRtcFdtClientLib.inf                |  1 +
>  .../NorFlashKvmtoolLib/NorFlashKvmtoolLib.inf |  1 +
>  .../NorFlashQemuLib/NorFlashQemuLib.inf       |  1 +
>  .../XenAcpiPlatformDxe/XenAcpiPlatformDxe.inf |  1 +
>  ArmVirtPkg/XenioFdtDxe/XenioFdtDxe.inf        |  1 +
>  .../Drivers}/FdtClientDxe/FdtClientDxe.inf    |  1 -
>  .../FdtPciHostBridgeLib.inf                   | 11 +++++-----
>  .../FdtPciPcdProducerLib.inf                  |  5 ++---
>  .../Fdt}/HighMemDxe/HighMemDxe.inf            |  7 ++++---
>  .../Fdt}/VirtioFdtDxe/VirtioFdtDxe.inf        |  2 +-
>  .../Library/QemuFwCfgLib/QemuFwCfgLibMmio.inf |  6 +++---
>  .../Include/Protocol/FdtClient.h              |  0
>  .../Drivers}/FdtClientDxe/FdtClientDxe.c      |  0
>  .../FdtPciHostBridgeLib/FdtPciHostBridgeLib.c |  0
>  .../FdtPciPcdProducerLib.c                    |  0
>  .../Fdt}/HighMemDxe/HighMemDxe.c              |  3 ++-
>  .../Fdt}/VirtioFdtDxe/VirtioFdtDxe.c          |  0
>  .../Library/QemuFwCfgLib/QemuFwCfgLibMmio.c   |  7 ++++---
>  Maintainers.txt                               |  6 ++++++
>  38 files changed, 106 insertions(+), 83 deletions(-)
>  rename {ArmVirtPkg => EmbeddedPkg/Drivers}/FdtClientDxe/FdtClientDxe.inf
(92%)
>  rename {ArmVirtPkg/Library =>
OvmfPkg/Fdt}/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf (77%)
>  rename {ArmVirtPkg/Library =>
OvmfPkg/Fdt}/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf (87%)
>  rename {ArmVirtPkg => OvmfPkg/Fdt}/HighMemDxe/HighMemDxe.inf (83%)
>  rename {ArmVirtPkg => OvmfPkg/Fdt}/VirtioFdtDxe/VirtioFdtDxe.inf (92%)
>  rename ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLib.inf =>
OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibMmio.inf (86%)
>  rename {ArmVirtPkg => EmbeddedPkg}/Include/Protocol/FdtClient.h (100%)
>  rename {ArmVirtPkg => EmbeddedPkg/Drivers}/FdtClientDxe/FdtClientDxe.c
(100%)
>  rename {ArmVirtPkg/Library =>
OvmfPkg/Fdt}/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c (100%)
>  rename {ArmVirtPkg/Library =>
OvmfPkg/Fdt}/FdtPciPcdProducerLib/FdtPciPcdProducerLib.c (100%)
>  rename {ArmVirtPkg => OvmfPkg/Fdt}/HighMemDxe/HighMemDxe.c (95%)
>  rename {ArmVirtPkg => OvmfPkg/Fdt}/VirtioFdtDxe/VirtioFdtDxe.c (100%)
>  rename ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLib.c =>
OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibMmio.c (93%)
>
> --
> 2.17.1
>
>
>
> 
>
>









[-- Attachment #2: Type: text/html, Size: 22429 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [edk2-devel] [PATCH V3 00/12] Migrate ArmVirtPkg modules to OvmfPkg
  2021-10-08  3:14       ` 回复: " gaoliming
@ 2021-10-08  3:39         ` Abner Chang
  2021-10-11  1:22           ` 回复: " gaoliming
  0 siblings, 1 reply; 27+ messages in thread
From: Abner Chang @ 2021-10-08  3:39 UTC (permalink / raw)
  To: devel@edk2.groups.io, gaoliming@byosoft.com.cn, ardb@kernel.org
  Cc: 'Ard Biesheuvel', 'Leif Lindholm',
	'Sami Mujawar', 'Jiewen Yao',
	'Jordan Justen', 'Gerd Hoffmann',
	Schaefer, Daniel, 'Sunil V L', 'Zhiguang Liu',
	'Michael D Kinney'

[-- Attachment #1: Type: text/plain, Size: 12679 bytes --]

Thanks Liming, could you please also give the reviewed-by.

Hi Ard, also need your reviewed-by for ArmPkg. Then this changes could be upstream and finished.
Thanks
Abner


From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of gaoliming
Sent: Friday, October 8, 2021 11:14 AM
To: Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com>; 'edk2-devel-groups-io' <devel@edk2.groups.io>; ardb@kernel.org
Cc: 'Ard Biesheuvel' <ardb+tianocore@kernel.org>; 'Leif Lindholm' <leif@nuviainc.com>; 'Sami Mujawar' <sami.mujawar@arm.com>; 'Jiewen Yao' <jiewen.yao@intel.com>; 'Jordan Justen' <jordan.l.justen@intel.com>; 'Gerd Hoffmann' <kraxel@redhat.com>; Schaefer, Daniel <daniel.schaefer@hpe.com>; 'Sunil V L' <sunilvl@ventanamicro.com>; 'Zhiguang Liu' <zhiguang.liu@intel.com>; 'Michael D Kinney' <michael.d.kinney@intel.com>
Subject: 回复: [edk2-devel] [PATCH V3 00/12] Migrate ArmVirtPkg modules to OvmfPkg

Ard and Abner:
 I am OK to add these three PCDs PcdPciMmio32Translation, PcdPciMmio64Translation, PcdPciIoTranslation to MdePkg.

Thanks
Liming
发件人: Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com<mailto:abner.chang@hpe.com>>
发送时间: 2021年10月6日 17:27
收件人: edk2-devel-groups-io <devel@edk2.groups.io<mailto:devel@edk2.groups.io>>; ardb@kernel.org<mailto:ardb@kernel.org>; Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com<mailto:abner.chang@hpe.com>>
抄送: Ard Biesheuvel <ardb+tianocore@kernel.org<mailto:ardb+tianocore@kernel.org>>; Leif Lindholm <leif@nuviainc.com<mailto:leif@nuviainc.com>>; Sami Mujawar <sami.mujawar@arm.com<mailto:sami.mujawar@arm.com>>; Jiewen Yao <jiewen.yao@intel.com<mailto:jiewen.yao@intel.com>>; Jordan Justen <jordan.l.justen@intel.com<mailto:jordan.l.justen@intel.com>>; Gerd Hoffmann <kraxel@redhat.com<mailto:kraxel@redhat.com>>; Schaefer, Daniel <daniel.schaefer@hpe.com<mailto:daniel.schaefer@hpe.com>>; Sunil V L <sunilvl@ventanamicro.com<mailto:sunilvl@ventanamicro.com>>; Liming Gao <gaoliming@byosoft.com.cn<mailto:gaoliming@byosoft.com.cn>>; Zhiguang Liu <zhiguang.liu@intel.com<mailto:zhiguang.liu@intel.com>>; Michael D Kinney <michael.d.kinney@intel.com<mailto:michael.d.kinney@intel.com>>
主题: Re: [edk2-devel] [PATCH V3 00/12] Migrate ArmVirtPkg modules to OvmfPkg

Hi Ard,
I realized there is a problem if we duplicate ArmPkg defined PCD to under OvmfPkg (e.g. PcdPciIoTranslate PCD) when I was duplicating this PCD to OvmfPkg.
FdtPciProducerLib is relocated to OvmfPkg/Fdt and uses PcdPciIoTranslate PCD declared with OvmfPkg namespace. FdtPciProducerLib is also used by both ArmVirtPkg  and RiscVVirtPkg.
ArmVirtPkg uses ArmPciCpuIoDxe provided by ArmPkg however PcdPciIoTranslate used by ArmPciCpuIoDxe  is declared with ArmPkg namespace.
I think this results in the problem because PcdPciIoTranslate(s) that are referred by ArmPkg and ArmVirtPkg come from two different namespaces, right? Unless ArmPciCpuIoDxe uses the one declared in OvmfPkg, but I don't think we want to do this.
Thought? Otherwise, we should still keep the original patch that relocates these PCDs under MdePkg.

Thanks
Abner


________________________________
From: devel@edk2.groups.io<mailto:devel@edk2.groups.io> <devel@edk2.groups.io<mailto:devel@edk2.groups.io>> on behalf of Abner Chang <abner.chang@hpe.com<mailto:abner.chang@hpe.com>>
Sent: Tuesday, October 5, 2021 11:00 PM
To: edk2-devel-groups-io <devel@edk2.groups.io<mailto:devel@edk2.groups.io>>; ardb@kernel.org<mailto:ardb@kernel.org> <ardb@kernel.org<mailto:ardb@kernel.org>>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org<mailto:ardb+tianocore@kernel.org>>; Leif Lindholm <leif@nuviainc.com<mailto:leif@nuviainc.com>>; Sami Mujawar <sami.mujawar@arm.com<mailto:sami.mujawar@arm.com>>; Jiewen Yao <jiewen.yao@intel.com<mailto:jiewen.yao@intel.com>>; Jordan Justen <jordan.l.justen@intel.com<mailto:jordan.l.justen@intel.com>>; Gerd Hoffmann <kraxel@redhat.com<mailto:kraxel@redhat.com>>; Schaefer, Daniel <daniel.schaefer@hpe.com<mailto:daniel.schaefer@hpe.com>>; Sunil V L <sunilvl@ventanamicro.com<mailto:sunilvl@ventanamicro.com>>; Liming Gao <gaoliming@byosoft.com.cn<mailto:gaoliming@byosoft.com.cn>>; Zhiguang Liu <zhiguang.liu@intel.com<mailto:zhiguang.liu@intel.com>>; Michael D Kinney <michael.d.kinney@intel.com<mailto:michael.d.kinney@intel.com>>
Subject: Re: [edk2-devel] [PATCH V3 00/12] Migrate ArmVirtPkg modules to OvmfPkg

Hi Ard,
This way reduces the impact of MdePkg. We can try it.

Thanks
Abner

________________________________
From: devel@edk2.groups.io<mailto:devel@edk2.groups.io> <devel@edk2.groups.io<mailto:devel@edk2.groups.io>> on behalf of Ard Biesheuvel <ardb@kernel.org<mailto:ardb@kernel.org>>
Sent: Tuesday, October 5, 2021 5:30 PM
To: edk2-devel-groups-io <devel@edk2.groups.io<mailto:devel@edk2.groups.io>>; Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com<mailto:abner.chang@hpe.com>>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org<mailto:ardb+tianocore@kernel.org>>; Leif Lindholm <leif@nuviainc.com<mailto:leif@nuviainc.com>>; Sami Mujawar <sami.mujawar@arm.com<mailto:sami.mujawar@arm.com>>; Jiewen Yao <jiewen.yao@intel.com<mailto:jiewen.yao@intel.com>>; Jordan Justen <jordan.l.justen@intel.com<mailto:jordan.l.justen@intel.com>>; Gerd Hoffmann <kraxel@redhat.com<mailto:kraxel@redhat.com>>; Schaefer, Daniel <daniel.schaefer@hpe.com<mailto:daniel.schaefer@hpe.com>>; Sunil V L <sunilvl@ventanamicro.com<mailto:sunilvl@ventanamicro.com>>; Liming Gao <gaoliming@byosoft.com.cn<mailto:gaoliming@byosoft.com.cn>>; Zhiguang Liu <zhiguang.liu@intel.com<mailto:zhiguang.liu@intel.com>>; Michael D Kinney <michael.d.kinney@intel.com<mailto:michael.d.kinney@intel.com>>
Subject: Re: [edk2-devel] [PATCH V3 00/12] Migrate ArmVirtPkg modules to OvmfPkg

On Thu, 30 Sept 2021 at 03:43, Abner Chang <abner.chang@hpe.com<mailto:abner.chang@hpe.com>> wrote:
>
> In V3: Address comments on V2.
> In V2: Remove HPE license on the files that just moved around or
>        the changes in the file are just code removal.
>
> edk2 BZ #: 3665
> edk2 platform corresponding changes will be submitted after
> this pactch set is reviewed.
>
> This pacthes set is to migrate some modules from ArmVirtPkg
> to under OvmfPkg for the upcoming RiscVVirtPkg that can leverage
> those modules without the dependency with Arm*Pkg.
>
> The modules moved from ArmVirtPkg to OvmfPkg are,
> - FdtClientDxe
> - PciPcdProducerLib
> - HighMemDxe
> - QemuFwCfgLib
> - FdtPciHostBridgeLib
> - VirtioFdtDxe
>
> Below PCDs are moved to under MdePkg and leverage by RiscVVirtPkg.
> This change also remove the dependency on ArmPkg of OvmfPkg.
> - PcdPciIoTranslation
> - PcdPciIoTranslation
> - PcdPciMmio32(64)Translation
>
> Signed-off-by: Abner Chang <abner.chang@hpe.com<mailto:abner.chang@hpe.com>>
> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org<mailto:ardb+tianocore@kernel.org>>
> Cc: Leif Lindholm <leif@nuviainc.com<mailto:leif@nuviainc.com>>
> Cc: Sami Mujawar <sami.mujawar@arm.com<mailto:sami.mujawar@arm.com>>
> Cc: Jiewen Yao <jiewen.yao@intel.com<mailto:jiewen.yao@intel.com>>
> Cc: Jordan Justen <jordan.l.justen@intel.com<mailto:jordan.l.justen@intel.com>>
> Cc: Gerd Hoffmann <kraxel@redhat.com<mailto:kraxel@redhat.com>>
> Cc: Daniel Schaefer <daniel.schaefer@hpe.com<mailto:daniel.schaefer@hpe.com>>
> Cc: Sunil V L <sunilvl@ventanamicro.com<mailto:sunilvl@ventanamicro.com>>
> Cc: Liming Gao <gaoliming@byosoft.com.cn<mailto:gaoliming@byosoft.com.cn>>
> Cc: Zhiguang Liu <zhiguang.liu@intel.com<mailto:zhiguang.liu@intel.com>>
> Cc: Michael D Kinney <michael.d.kinney@intel.com<mailto:michael.d.kinney@intel.com>>
>
> Abner Chang (12):
>   ArmVirtPkg/FdtClintDxe: Move FdtClientDxe to EmbeddedPkg
>   MdePkg: Add PcdPciIoTranslation PCD
>   ArmPkg: Use PcdPciIoTranslation PCD from MdePkg
>   ArmVirtPkg/FdtPciPcdProducerLib: Relocate PciPcdProducerLib to OvmfPkg
>   ArmVirtPkg/HighMemDxe: Relocate HighMemDxe to OvmfPkg
>   OvmfPkg/HighMemDxe: Add RISC-V in the supported arch.
>   ArmVirtPkg/QemuFwCfgLib: Relocate QemuFwCfgLib to OvmfPkg
>   OvmfPkg/QemuFwCfgLibMMIO: Add RISC-V arch support
>   MdePkg: Add PcdPciMmio32(64)Translation PCDs
>   ArmVirtPkg/FdtPciHostBridgeLib: Relocate FdtPciHostBridgeLib to
>     OvmfPkg/Fdt
>   OvmfPkg/FdtPciHostBridgeLib: Add RISC-V in the supported arch.
>   ArmVirtPkg/VirtioFdtDxe: Relocate VirtioFdtDxe to OvmfPkg/Fdt
>

Hello all,

These patches look ok to me, but I wonder if the MdePkg maintainers
are happy taking these PCD declaration changes. Translations for PCIe
are typically defined per host bridge, and I would rather move away
from using PCDs for this entirely than 'promote' them by carrying them
in MdePkg.

As this issue is somewhat orthogonal to what Abner is trying to fix,
perhaps it is better to avoid MdePkg changes for now, and just
duplicate these PCDs into OvmfPkg. This is reasonable, given that we
know that QEMU only exposes a single host bridge.

The one in ArmPkg can hopefully be removed and replaced with something
that is more appropriate.


>  ArmPkg/ArmPkg.dec                             | 15 ++++++--------
>  ArmVirtPkg/ArmVirtPkg.dec                     |  3 ---
>  EmbeddedPkg/EmbeddedPkg.dec                   |  1 +
>  MdePkg/MdePkg.dec                             | 12 +++++++++++
>  ArmVirtPkg/ArmVirtCloudHv.dsc                 | 18 ++++++++---------
>  ArmVirtPkg/ArmVirtKvmTool.dsc                 | 18 ++++++++---------
>  ArmVirtPkg/ArmVirtQemu.dsc                    | 20 +++++++++----------
>  ArmVirtPkg/ArmVirtQemuKernel.dsc              | 20 +++++++++----------
>  ArmVirtPkg/ArmVirtXen.dsc                     |  2 +-
>  EmbeddedPkg/EmbeddedPkg.dsc                   |  1 +
>  ArmVirtPkg/ArmVirtCloudHv.fdf                 |  6 +++---
>  ArmVirtPkg/ArmVirtKvmTool.fdf                 |  6 +++---
>  ArmVirtPkg/ArmVirtXen.fdf                     |  2 +-
>  ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc          |  6 +++---
>  .../ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf       |  2 +-
>  .../ArmVirtGicArchLib/ArmVirtGicArchLib.inf   |  1 +
>  .../ArmVirtPL031FdtClientLib.inf              |  1 +
>  .../ArmVirtPsciResetSystemLib.inf             |  1 +
>  .../ArmVirtTimerFdtClientLib.inf              |  1 +
>  .../KvmtoolRtcFdtClientLib.inf                |  1 +
>  .../NorFlashKvmtoolLib/NorFlashKvmtoolLib.inf |  1 +
>  .../NorFlashQemuLib/NorFlashQemuLib.inf       |  1 +
>  .../XenAcpiPlatformDxe/XenAcpiPlatformDxe.inf |  1 +
>  ArmVirtPkg/XenioFdtDxe/XenioFdtDxe.inf        |  1 +
>  .../Drivers}/FdtClientDxe/FdtClientDxe.inf    |  1 -
>  .../FdtPciHostBridgeLib.inf                   | 11 +++++-----
>  .../FdtPciPcdProducerLib.inf                  |  5 ++---
>  .../Fdt}/HighMemDxe/HighMemDxe.inf            |  7 ++++---
>  .../Fdt}/VirtioFdtDxe/VirtioFdtDxe.inf        |  2 +-
>  .../Library/QemuFwCfgLib/QemuFwCfgLibMmio.inf |  6 +++---
>  .../Include/Protocol/FdtClient.h              |  0
>  .../Drivers}/FdtClientDxe/FdtClientDxe.c      |  0
>  .../FdtPciHostBridgeLib/FdtPciHostBridgeLib.c |  0
>  .../FdtPciPcdProducerLib.c                    |  0
>  .../Fdt}/HighMemDxe/HighMemDxe.c              |  3 ++-
>  .../Fdt}/VirtioFdtDxe/VirtioFdtDxe.c          |  0
>  .../Library/QemuFwCfgLib/QemuFwCfgLibMmio.c   |  7 ++++---
>  Maintainers.txt                               |  6 ++++++
>  38 files changed, 106 insertions(+), 83 deletions(-)
>  rename {ArmVirtPkg => EmbeddedPkg/Drivers}/FdtClientDxe/FdtClientDxe.inf (92%)
>  rename {ArmVirtPkg/Library => OvmfPkg/Fdt}/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf (77%)
>  rename {ArmVirtPkg/Library => OvmfPkg/Fdt}/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf (87%)
>  rename {ArmVirtPkg => OvmfPkg/Fdt}/HighMemDxe/HighMemDxe.inf (83%)
>  rename {ArmVirtPkg => OvmfPkg/Fdt}/VirtioFdtDxe/VirtioFdtDxe.inf (92%)
>  rename ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLib.inf => OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibMmio.inf (86%)
>  rename {ArmVirtPkg => EmbeddedPkg}/Include/Protocol/FdtClient.h (100%)
>  rename {ArmVirtPkg => EmbeddedPkg/Drivers}/FdtClientDxe/FdtClientDxe.c (100%)
>  rename {ArmVirtPkg/Library => OvmfPkg/Fdt}/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c (100%)
>  rename {ArmVirtPkg/Library => OvmfPkg/Fdt}/FdtPciPcdProducerLib/FdtPciPcdProducerLib.c (100%)
>  rename {ArmVirtPkg => OvmfPkg/Fdt}/HighMemDxe/HighMemDxe.c (95%)
>  rename {ArmVirtPkg => OvmfPkg/Fdt}/VirtioFdtDxe/VirtioFdtDxe.c (100%)
>  rename ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLib.c => OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibMmio.c (93%)
>
> --
> 2.17.1
>
>
>
>
>
>





[-- Attachment #2: Type: text/html, Size: 25756 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread

* 回复: [edk2-devel] [PATCH V3 00/12] Migrate ArmVirtPkg modules to OvmfPkg
  2021-10-08  3:39         ` Abner Chang
@ 2021-10-11  1:22           ` gaoliming
  2021-10-12  4:16             ` Abner Chang
  0 siblings, 1 reply; 27+ messages in thread
From: gaoliming @ 2021-10-11  1:22 UTC (permalink / raw)
  To: devel, abner.chang, ardb
  Cc: 'Ard Biesheuvel', 'Leif Lindholm',
	'Sami Mujawar', 'Jiewen Yao',
	'Jordan Justen', 'Gerd Hoffmann',
	'Schaefer, Daniel', 'Sunil V L',
	'Zhiguang Liu', 'Michael D Kinney'

[-- Attachment #1: Type: text/plain, Size: 14143 bytes --]

The change in MdePkg is good to me. Reviewed-by: Liming Gao
<gaoliming@byosoft.com.cn>

 

发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Abner Chang
发送时间: 2021年10月8日 11:39
收件人: devel@edk2.groups.io; gaoliming@byosoft.com.cn; ardb@kernel.org
抄送: 'Ard Biesheuvel' <ardb+tianocore@kernel.org>; 'Leif Lindholm'
<leif@nuviainc.com>; 'Sami Mujawar' <sami.mujawar@arm.com>; 'Jiewen Yao'
<jiewen.yao@intel.com>; 'Jordan Justen' <jordan.l.justen@intel.com>; 'Gerd
Hoffmann' <kraxel@redhat.com>; Schaefer, Daniel <daniel.schaefer@hpe.com>;
'Sunil V L' <sunilvl@ventanamicro.com>; 'Zhiguang Liu'
<zhiguang.liu@intel.com>; 'Michael D Kinney' <michael.d.kinney@intel.com>
主题: Re: [edk2-devel] [PATCH V3 00/12] Migrate ArmVirtPkg modules to
OvmfPkg

 

Thanks Liming, could you please also give the reviewed-by.

 

Hi Ard, also need your reviewed-by for ArmPkg. Then this changes could be
upstream and finished. 

Thanks 

Abner

 

 

From: devel@edk2.groups.io <mailto:devel@edk2.groups.io>
[mailto:devel@edk2.groups.io] On Behalf Of gaoliming
Sent: Friday, October 8, 2021 11:14 AM
To: Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com
<mailto:abner.chang@hpe.com> >; 'edk2-devel-groups-io' <devel@edk2.groups.io
<mailto:devel@edk2.groups.io> >; ardb@kernel.org <mailto:ardb@kernel.org> 
Cc: 'Ard Biesheuvel' <ardb+tianocore@kernel.org
<mailto:ardb+tianocore@kernel.org> >; 'Leif Lindholm' <leif@nuviainc.com
<mailto:leif@nuviainc.com> >; 'Sami Mujawar' <sami.mujawar@arm.com
<mailto:sami.mujawar@arm.com> >; 'Jiewen Yao' <jiewen.yao@intel.com
<mailto:jiewen.yao@intel.com> >; 'Jordan Justen' <jordan.l.justen@intel.com
<mailto:jordan.l.justen@intel.com> >; 'Gerd Hoffmann' <kraxel@redhat.com
<mailto:kraxel@redhat.com> >; Schaefer, Daniel <daniel.schaefer@hpe.com
<mailto:daniel.schaefer@hpe.com> >; 'Sunil V L' <sunilvl@ventanamicro.com
<mailto:sunilvl@ventanamicro.com> >; 'Zhiguang Liu' <zhiguang.liu@intel.com
<mailto:zhiguang.liu@intel.com> >; 'Michael D Kinney'
<michael.d.kinney@intel.com <mailto:michael.d.kinney@intel.com> >
Subject: 回复: [edk2-devel] [PATCH V3 00/12] Migrate ArmVirtPkg modules to
OvmfPkg

 

Ard and Abner:

 I am OK to add these three PCDs PcdPciMmio32Translation,
PcdPciMmio64Translation, PcdPciIoTranslation to MdePkg. 

 

Thanks

Liming

发件人: Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com
<mailto:abner.chang@hpe.com> > 
发送时间: 2021年10月6日 17:27
收件人: edk2-devel-groups-io <devel@edk2.groups.io>; ardb@kernel.org
<mailto:ardb@kernel.org> ; Chang, Abner (HPS SW/FW Technologist)
<abner.chang@hpe.com <mailto:abner.chang@hpe.com> >
抄送: Ard Biesheuvel <ardb+tianocore@kernel.org
<mailto:ardb+tianocore@kernel.org> >; Leif Lindholm <leif@nuviainc.com
<mailto:leif@nuviainc.com> >; Sami Mujawar <sami.mujawar@arm.com
<mailto:sami.mujawar@arm.com> >; Jiewen Yao <jiewen.yao@intel.com
<mailto:jiewen.yao@intel.com> >; Jordan Justen <jordan.l.justen@intel.com
<mailto:jordan.l.justen@intel.com> >; Gerd Hoffmann <kraxel@redhat.com
<mailto:kraxel@redhat.com> >; Schaefer, Daniel <daniel.schaefer@hpe.com
<mailto:daniel.schaefer@hpe.com> >; Sunil V L <sunilvl@ventanamicro.com
<mailto:sunilvl@ventanamicro.com> >; Liming Gao <gaoliming@byosoft.com.cn
<mailto:gaoliming@byosoft.com.cn> >; Zhiguang Liu <zhiguang.liu@intel.com
<mailto:zhiguang.liu@intel.com> >; Michael D Kinney <michael.d.kinney@intel.
com <mailto:michael.d.kinney@intel.com> >
主题: Re: [edk2-devel] [PATCH V3 00/12] Migrate ArmVirtPkg modules to
OvmfPkg

 

Hi Ard,

I realized there is a problem if we duplicate ArmPkg defined PCD to under
OvmfPkg (e.g. PcdPciIoTranslate PCD) when I was duplicating this PCD to
OvmfPkg.

FdtPciProducerLib is relocated to OvmfPkg/Fdt and uses PcdPciIoTranslate PCD
declared with OvmfPkg namespace. FdtPciProducerLib is also used by both
ArmVirtPkg  and RiscVVirtPkg.

ArmVirtPkg uses ArmPciCpuIoDxe provided by ArmPkg however PcdPciIoTranslate
used by ArmPciCpuIoDxe  is declared with ArmPkg namespace.

I think this results in the problem because PcdPciIoTranslate(s) that are
referred by ArmPkg and ArmVirtPkg come from two different namespaces, right?
Unless ArmPciCpuIoDxe uses the one declared in OvmfPkg, but I don't think we
want to do this.

Thought? Otherwise, we should still keep the original patch that relocates
these PCDs under MdePkg.

 

Thanks

Abner

 

 

  _____  

From: devel@edk2.groups.io <mailto:devel@edk2.groups.io>
<devel@edk2.groups.io <mailto:devel@edk2.groups.io> > on behalf of Abner
Chang <abner.chang@hpe.com <mailto:abner.chang@hpe.com> >
Sent: Tuesday, October 5, 2021 11:00 PM
To: edk2-devel-groups-io <devel@edk2.groups.io <mailto:devel@edk2.groups.io>
>; ardb@kernel.org <mailto:ardb@kernel.org>  <ardb@kernel.org
<mailto:ardb@kernel.org> >
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org <mailto:ardb+tianocore@kernel.
org> >; Leif Lindholm <leif@nuviainc.com <mailto:leif@nuviainc.com> >; Sami
Mujawar <sami.mujawar@arm.com <mailto:sami.mujawar@arm.com> >; Jiewen Yao
<jiewen.yao@intel.com <mailto:jiewen.yao@intel.com> >; Jordan Justen
<jordan.l.justen@intel.com <mailto:jordan.l.justen@intel.com> >; Gerd
Hoffmann <kraxel@redhat.com <mailto:kraxel@redhat.com> >; Schaefer, Daniel
<daniel.schaefer@hpe.com <mailto:daniel.schaefer@hpe.com> >; Sunil V L
<sunilvl@ventanamicro.com <mailto:sunilvl@ventanamicro.com> >; Liming Gao
<gaoliming@byosoft.com.cn <mailto:gaoliming@byosoft.com.cn> >; Zhiguang Liu
<zhiguang.liu@intel.com <mailto:zhiguang.liu@intel.com> >; Michael D Kinney
<michael.d.kinney@intel.com <mailto:michael.d.kinney@intel.com> >
Subject: Re: [edk2-devel] [PATCH V3 00/12] Migrate ArmVirtPkg modules to
OvmfPkg 

 

Hi Ard,

This way reduces the impact of MdePkg. We can try it.

 

Thanks

Abner

 

  _____  

From: devel@edk2.groups.io <mailto:devel@edk2.groups.io>
<devel@edk2.groups.io <mailto:devel@edk2.groups.io> > on behalf of Ard
Biesheuvel <ardb@kernel.org <mailto:ardb@kernel.org> >
Sent: Tuesday, October 5, 2021 5:30 PM
To: edk2-devel-groups-io <devel@edk2.groups.io <mailto:devel@edk2.groups.io>
>; Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com <mailto:abner.
chang@hpe.com> >
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org <mailto:ardb+tianocore@kernel.
org> >; Leif Lindholm <leif@nuviainc.com <mailto:leif@nuviainc.com> >; Sami
Mujawar <sami.mujawar@arm.com <mailto:sami.mujawar@arm.com> >; Jiewen Yao
<jiewen.yao@intel.com <mailto:jiewen.yao@intel.com> >; Jordan Justen
<jordan.l.justen@intel.com <mailto:jordan.l.justen@intel.com> >; Gerd
Hoffmann <kraxel@redhat.com <mailto:kraxel@redhat.com> >; Schaefer, Daniel
<daniel.schaefer@hpe.com <mailto:daniel.schaefer@hpe.com> >; Sunil V L
<sunilvl@ventanamicro.com <mailto:sunilvl@ventanamicro.com> >; Liming Gao
<gaoliming@byosoft.com.cn <mailto:gaoliming@byosoft.com.cn> >; Zhiguang Liu
<zhiguang.liu@intel.com <mailto:zhiguang.liu@intel.com> >; Michael D Kinney
<michael.d.kinney@intel.com <mailto:michael.d.kinney@intel.com> >
Subject: Re: [edk2-devel] [PATCH V3 00/12] Migrate ArmVirtPkg modules to
OvmfPkg 

 

On Thu, 30 Sept 2021 at 03:43, Abner Chang <abner.chang@hpe.com
<mailto:abner.chang@hpe.com> > wrote:
>
> In V3: Address comments on V2.
> In V2: Remove HPE license on the files that just moved around or
>        the changes in the file are just code removal.
>
> edk2 BZ #: 3665
> edk2 platform corresponding changes will be submitted after
> this pactch set is reviewed.
>
> This pacthes set is to migrate some modules from ArmVirtPkg
> to under OvmfPkg for the upcoming RiscVVirtPkg that can leverage
> those modules without the dependency with Arm*Pkg.
>
> The modules moved from ArmVirtPkg to OvmfPkg are,
> - FdtClientDxe
> - PciPcdProducerLib
> - HighMemDxe
> - QemuFwCfgLib
> - FdtPciHostBridgeLib
> - VirtioFdtDxe
>
> Below PCDs are moved to under MdePkg and leverage by RiscVVirtPkg.
> This change also remove the dependency on ArmPkg of OvmfPkg.
> - PcdPciIoTranslation
> - PcdPciIoTranslation
> - PcdPciMmio32(64)Translation
>
> Signed-off-by: Abner Chang <abner.chang@hpe.com
<mailto:abner.chang@hpe.com> >
> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org
<mailto:ardb+tianocore@kernel.org> >
> Cc: Leif Lindholm <leif@nuviainc.com <mailto:leif@nuviainc.com> >
> Cc: Sami Mujawar <sami.mujawar@arm.com <mailto:sami.mujawar@arm.com> >
> Cc: Jiewen Yao <jiewen.yao@intel.com <mailto:jiewen.yao@intel.com> >
> Cc: Jordan Justen <jordan.l.justen@intel.com
<mailto:jordan.l.justen@intel.com> >
> Cc: Gerd Hoffmann <kraxel@redhat.com <mailto:kraxel@redhat.com> >
> Cc: Daniel Schaefer <daniel.schaefer@hpe.com
<mailto:daniel.schaefer@hpe.com> >
> Cc: Sunil V L <sunilvl@ventanamicro.com <mailto:sunilvl@ventanamicro.com>
>
> Cc: Liming Gao <gaoliming@byosoft.com.cn <mailto:gaoliming@byosoft.com.cn>
>
> Cc: Zhiguang Liu <zhiguang.liu@intel.com <mailto:zhiguang.liu@intel.com> >
> Cc: Michael D Kinney <michael.d.kinney@intel.com
<mailto:michael.d.kinney@intel.com> >
>
> Abner Chang (12):
>   ArmVirtPkg/FdtClintDxe: Move FdtClientDxe to EmbeddedPkg
>   MdePkg: Add PcdPciIoTranslation PCD
>   ArmPkg: Use PcdPciIoTranslation PCD from MdePkg
>   ArmVirtPkg/FdtPciPcdProducerLib: Relocate PciPcdProducerLib to OvmfPkg
>   ArmVirtPkg/HighMemDxe: Relocate HighMemDxe to OvmfPkg
>   OvmfPkg/HighMemDxe: Add RISC-V in the supported arch.
>   ArmVirtPkg/QemuFwCfgLib: Relocate QemuFwCfgLib to OvmfPkg
>   OvmfPkg/QemuFwCfgLibMMIO: Add RISC-V arch support
>   MdePkg: Add PcdPciMmio32(64)Translation PCDs
>   ArmVirtPkg/FdtPciHostBridgeLib: Relocate FdtPciHostBridgeLib to
>     OvmfPkg/Fdt
>   OvmfPkg/FdtPciHostBridgeLib: Add RISC-V in the supported arch.
>   ArmVirtPkg/VirtioFdtDxe: Relocate VirtioFdtDxe to OvmfPkg/Fdt
>

Hello all,

These patches look ok to me, but I wonder if the MdePkg maintainers
are happy taking these PCD declaration changes. Translations for PCIe
are typically defined per host bridge, and I would rather move away
from using PCDs for this entirely than 'promote' them by carrying them
in MdePkg.

As this issue is somewhat orthogonal to what Abner is trying to fix,
perhaps it is better to avoid MdePkg changes for now, and just
duplicate these PCDs into OvmfPkg. This is reasonable, given that we
know that QEMU only exposes a single host bridge.

The one in ArmPkg can hopefully be removed and replaced with something
that is more appropriate.


>  ArmPkg/ArmPkg.dec                             | 15 ++++++--------
>  ArmVirtPkg/ArmVirtPkg.dec                     |  3 ---
>  EmbeddedPkg/EmbeddedPkg.dec                   |  1 +
>  MdePkg/MdePkg.dec                             | 12 +++++++++++
>  ArmVirtPkg/ArmVirtCloudHv.dsc                 | 18 ++++++++---------
>  ArmVirtPkg/ArmVirtKvmTool.dsc                 | 18 ++++++++---------
>  ArmVirtPkg/ArmVirtQemu.dsc                    | 20 +++++++++----------
>  ArmVirtPkg/ArmVirtQemuKernel.dsc              | 20 +++++++++----------
>  ArmVirtPkg/ArmVirtXen.dsc                     |  2 +-
>  EmbeddedPkg/EmbeddedPkg.dsc                   |  1 +
>  ArmVirtPkg/ArmVirtCloudHv.fdf                 |  6 +++---
>  ArmVirtPkg/ArmVirtKvmTool.fdf                 |  6 +++---
>  ArmVirtPkg/ArmVirtXen.fdf                     |  2 +-
>  ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc          |  6 +++---
>  .../ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf       |  2 +-
>  .../ArmVirtGicArchLib/ArmVirtGicArchLib.inf   |  1 +
>  .../ArmVirtPL031FdtClientLib.inf              |  1 +
>  .../ArmVirtPsciResetSystemLib.inf             |  1 +
>  .../ArmVirtTimerFdtClientLib.inf              |  1 +
>  .../KvmtoolRtcFdtClientLib.inf                |  1 +
>  .../NorFlashKvmtoolLib/NorFlashKvmtoolLib.inf |  1 +
>  .../NorFlashQemuLib/NorFlashQemuLib.inf       |  1 +
>  .../XenAcpiPlatformDxe/XenAcpiPlatformDxe.inf |  1 +
>  ArmVirtPkg/XenioFdtDxe/XenioFdtDxe.inf        |  1 +
>  .../Drivers}/FdtClientDxe/FdtClientDxe.inf    |  1 -
>  .../FdtPciHostBridgeLib.inf                   | 11 +++++-----
>  .../FdtPciPcdProducerLib.inf                  |  5 ++---
>  .../Fdt}/HighMemDxe/HighMemDxe.inf            |  7 ++++---
>  .../Fdt}/VirtioFdtDxe/VirtioFdtDxe.inf        |  2 +-
>  .../Library/QemuFwCfgLib/QemuFwCfgLibMmio.inf |  6 +++---
>  .../Include/Protocol/FdtClient.h              |  0
>  .../Drivers}/FdtClientDxe/FdtClientDxe.c      |  0
>  .../FdtPciHostBridgeLib/FdtPciHostBridgeLib.c |  0
>  .../FdtPciPcdProducerLib.c                    |  0
>  .../Fdt}/HighMemDxe/HighMemDxe.c              |  3 ++-
>  .../Fdt}/VirtioFdtDxe/VirtioFdtDxe.c          |  0
>  .../Library/QemuFwCfgLib/QemuFwCfgLibMmio.c   |  7 ++++---
>  Maintainers.txt                               |  6 ++++++
>  38 files changed, 106 insertions(+), 83 deletions(-)
>  rename {ArmVirtPkg => EmbeddedPkg/Drivers}/FdtClientDxe/FdtClientDxe.inf
(92%)
>  rename {ArmVirtPkg/Library =>
OvmfPkg/Fdt}/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf (77%)
>  rename {ArmVirtPkg/Library =>
OvmfPkg/Fdt}/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf (87%)
>  rename {ArmVirtPkg => OvmfPkg/Fdt}/HighMemDxe/HighMemDxe.inf (83%)
>  rename {ArmVirtPkg => OvmfPkg/Fdt}/VirtioFdtDxe/VirtioFdtDxe.inf (92%)
>  rename ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLib.inf =>
OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibMmio.inf (86%)
>  rename {ArmVirtPkg => EmbeddedPkg}/Include/Protocol/FdtClient.h (100%)
>  rename {ArmVirtPkg => EmbeddedPkg/Drivers}/FdtClientDxe/FdtClientDxe.c
(100%)
>  rename {ArmVirtPkg/Library =>
OvmfPkg/Fdt}/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c (100%)
>  rename {ArmVirtPkg/Library =>
OvmfPkg/Fdt}/FdtPciPcdProducerLib/FdtPciPcdProducerLib.c (100%)
>  rename {ArmVirtPkg => OvmfPkg/Fdt}/HighMemDxe/HighMemDxe.c (95%)
>  rename {ArmVirtPkg => OvmfPkg/Fdt}/VirtioFdtDxe/VirtioFdtDxe.c (100%)
>  rename ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLib.c =>
OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibMmio.c (93%)
>
> --
> 2.17.1
>
>
>
> 
>
>







[-- Attachment #2: Type: text/html, Size: 27753 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [edk2-devel] [PATCH V3 00/12] Migrate ArmVirtPkg modules to OvmfPkg
  2021-10-11  1:22           ` 回复: " gaoliming
@ 2021-10-12  4:16             ` Abner Chang
  2021-10-14  9:51               ` Ard Biesheuvel
  0 siblings, 1 reply; 27+ messages in thread
From: Abner Chang @ 2021-10-12  4:16 UTC (permalink / raw)
  To: gaoliming, devel@edk2.groups.io, ardb@kernel.org
  Cc: 'Ard Biesheuvel', 'Leif Lindholm',
	'Sami Mujawar', 'Jiewen Yao',
	'Jordan Justen', 'Gerd Hoffmann',
	Schaefer, Daniel, 'Sunil V L', 'Zhiguang Liu',
	'Michael D Kinney'

[-- Attachment #1: Type: text/plain, Size: 15403 bytes --]

Hi package maintainers,
The review process of this patch set is almost done and please allow me to merge it because the corresponding changes on edk2-platform is also required to merge.

Ard and Leif, do I need the Reviewed-by or Acked-by from either of you? Or I can just proceed the merge process as Ard has no problem with this patch set?

Abner

From: gaoliming [mailto:gaoliming@byosoft.com.cn]
Sent: Monday, October 11, 2021 9:22 AM
To: devel@edk2.groups.io; Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com>; ardb@kernel.org
Cc: 'Ard Biesheuvel' <ardb+tianocore@kernel.org>; 'Leif Lindholm' <leif@nuviainc.com>; 'Sami Mujawar' <sami.mujawar@arm.com>; 'Jiewen Yao' <jiewen.yao@intel.com>; 'Jordan Justen' <jordan.l.justen@intel.com>; 'Gerd Hoffmann' <kraxel@redhat.com>; Schaefer, Daniel <daniel.schaefer@hpe.com>; 'Sunil V L' <sunilvl@ventanamicro.com>; 'Zhiguang Liu' <zhiguang.liu@intel.com>; 'Michael D Kinney' <michael.d.kinney@intel.com>
Subject: 回复: [edk2-devel] [PATCH V3 00/12] Migrate ArmVirtPkg modules to OvmfPkg

The change in MdePkg is good to me. Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn<mailto:gaoliming@byosoft.com.cn>>

发件人: devel@edk2.groups.io<mailto:devel@edk2.groups.io> <devel@edk2.groups.io<mailto:devel@edk2.groups.io>> 代表 Abner Chang
发送时间: 2021年10月8日 11:39
收件人: devel@edk2.groups.io<mailto:devel@edk2.groups.io>; gaoliming@byosoft.com.cn<mailto:gaoliming@byosoft.com.cn>; ardb@kernel.org<mailto:ardb@kernel.org>
抄送: 'Ard Biesheuvel' <ardb+tianocore@kernel.org<mailto:ardb+tianocore@kernel.org>>; 'Leif Lindholm' <leif@nuviainc.com<mailto:leif@nuviainc.com>>; 'Sami Mujawar' <sami.mujawar@arm.com<mailto:sami.mujawar@arm.com>>; 'Jiewen Yao' <jiewen.yao@intel.com<mailto:jiewen.yao@intel.com>>; 'Jordan Justen' <jordan.l.justen@intel.com<mailto:jordan.l.justen@intel.com>>; 'Gerd Hoffmann' <kraxel@redhat.com<mailto:kraxel@redhat.com>>; Schaefer, Daniel <daniel.schaefer@hpe.com<mailto:daniel.schaefer@hpe.com>>; 'Sunil V L' <sunilvl@ventanamicro.com<mailto:sunilvl@ventanamicro.com>>; 'Zhiguang Liu' <zhiguang.liu@intel.com<mailto:zhiguang.liu@intel.com>>; 'Michael D Kinney' <michael.d.kinney@intel.com<mailto:michael.d.kinney@intel.com>>
主题: Re: [edk2-devel] [PATCH V3 00/12] Migrate ArmVirtPkg modules to OvmfPkg

Thanks Liming, could you please also give the reviewed-by.

Hi Ard, also need your reviewed-by for ArmPkg. Then this changes could be upstream and finished.
Thanks
Abner


From: devel@edk2.groups.io<mailto:devel@edk2.groups.io> [mailto:devel@edk2.groups.io] On Behalf Of gaoliming
Sent: Friday, October 8, 2021 11:14 AM
To: Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com<mailto:abner.chang@hpe.com>>; 'edk2-devel-groups-io' <devel@edk2.groups.io<mailto:devel@edk2.groups.io>>; ardb@kernel.org<mailto:ardb@kernel.org>
Cc: 'Ard Biesheuvel' <ardb+tianocore@kernel.org<mailto:ardb+tianocore@kernel.org>>; 'Leif Lindholm' <leif@nuviainc.com<mailto:leif@nuviainc.com>>; 'Sami Mujawar' <sami.mujawar@arm.com<mailto:sami.mujawar@arm.com>>; 'Jiewen Yao' <jiewen.yao@intel.com<mailto:jiewen.yao@intel.com>>; 'Jordan Justen' <jordan.l.justen@intel.com<mailto:jordan.l.justen@intel.com>>; 'Gerd Hoffmann' <kraxel@redhat.com<mailto:kraxel@redhat.com>>; Schaefer, Daniel <daniel.schaefer@hpe.com<mailto:daniel.schaefer@hpe.com>>; 'Sunil V L' <sunilvl@ventanamicro.com<mailto:sunilvl@ventanamicro.com>>; 'Zhiguang Liu' <zhiguang.liu@intel.com<mailto:zhiguang.liu@intel.com>>; 'Michael D Kinney' <michael.d.kinney@intel.com<mailto:michael.d.kinney@intel.com>>
Subject: 回复: [edk2-devel] [PATCH V3 00/12] Migrate ArmVirtPkg modules to OvmfPkg

Ard and Abner:
 I am OK to add these three PCDs PcdPciMmio32Translation, PcdPciMmio64Translation, PcdPciIoTranslation to MdePkg.

Thanks
Liming
发件人: Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com<mailto:abner.chang@hpe.com>>
发送时间: 2021年10月6日 17:27
收件人: edk2-devel-groups-io <devel@edk2.groups.io<mailto:devel@edk2.groups.io>>; ardb@kernel.org<mailto:ardb@kernel.org>; Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com<mailto:abner.chang@hpe.com>>
抄送: Ard Biesheuvel <ardb+tianocore@kernel.org<mailto:ardb+tianocore@kernel.org>>; Leif Lindholm <leif@nuviainc.com<mailto:leif@nuviainc.com>>; Sami Mujawar <sami.mujawar@arm.com<mailto:sami.mujawar@arm.com>>; Jiewen Yao <jiewen.yao@intel.com<mailto:jiewen.yao@intel.com>>; Jordan Justen <jordan.l.justen@intel.com<mailto:jordan.l.justen@intel.com>>; Gerd Hoffmann <kraxel@redhat.com<mailto:kraxel@redhat.com>>; Schaefer, Daniel <daniel.schaefer@hpe.com<mailto:daniel.schaefer@hpe.com>>; Sunil V L <sunilvl@ventanamicro.com<mailto:sunilvl@ventanamicro.com>>; Liming Gao <gaoliming@byosoft.com.cn<mailto:gaoliming@byosoft.com.cn>>; Zhiguang Liu <zhiguang.liu@intel.com<mailto:zhiguang.liu@intel.com>>; Michael D Kinney <michael.d.kinney@intel.com<mailto:michael.d.kinney@intel.com>>
主题: Re: [edk2-devel] [PATCH V3 00/12] Migrate ArmVirtPkg modules to OvmfPkg

Hi Ard,
I realized there is a problem if we duplicate ArmPkg defined PCD to under OvmfPkg (e.g. PcdPciIoTranslate PCD) when I was duplicating this PCD to OvmfPkg.
FdtPciProducerLib is relocated to OvmfPkg/Fdt and uses PcdPciIoTranslate PCD declared with OvmfPkg namespace. FdtPciProducerLib is also used by both ArmVirtPkg  and RiscVVirtPkg.
ArmVirtPkg uses ArmPciCpuIoDxe provided by ArmPkg however PcdPciIoTranslate used by ArmPciCpuIoDxe  is declared with ArmPkg namespace.
I think this results in the problem because PcdPciIoTranslate(s) that are referred by ArmPkg and ArmVirtPkg come from two different namespaces, right? Unless ArmPciCpuIoDxe uses the one declared in OvmfPkg, but I don't think we want to do this.
Thought? Otherwise, we should still keep the original patch that relocates these PCDs under MdePkg.

Thanks
Abner


________________________________
From: devel@edk2.groups.io<mailto:devel@edk2.groups.io> <devel@edk2.groups.io<mailto:devel@edk2.groups.io>> on behalf of Abner Chang <abner.chang@hpe.com<mailto:abner.chang@hpe.com>>
Sent: Tuesday, October 5, 2021 11:00 PM
To: edk2-devel-groups-io <devel@edk2.groups.io<mailto:devel@edk2.groups.io>>; ardb@kernel.org<mailto:ardb@kernel.org> <ardb@kernel.org<mailto:ardb@kernel.org>>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org<mailto:ardb+tianocore@kernel.org>>; Leif Lindholm <leif@nuviainc.com<mailto:leif@nuviainc.com>>; Sami Mujawar <sami.mujawar@arm.com<mailto:sami.mujawar@arm.com>>; Jiewen Yao <jiewen.yao@intel.com<mailto:jiewen.yao@intel.com>>; Jordan Justen <jordan.l.justen@intel.com<mailto:jordan.l.justen@intel.com>>; Gerd Hoffmann <kraxel@redhat.com<mailto:kraxel@redhat.com>>; Schaefer, Daniel <daniel.schaefer@hpe.com<mailto:daniel.schaefer@hpe.com>>; Sunil V L <sunilvl@ventanamicro.com<mailto:sunilvl@ventanamicro.com>>; Liming Gao <gaoliming@byosoft.com.cn<mailto:gaoliming@byosoft.com.cn>>; Zhiguang Liu <zhiguang.liu@intel.com<mailto:zhiguang.liu@intel.com>>; Michael D Kinney <michael.d.kinney@intel.com<mailto:michael.d.kinney@intel.com>>
Subject: Re: [edk2-devel] [PATCH V3 00/12] Migrate ArmVirtPkg modules to OvmfPkg

Hi Ard,
This way reduces the impact of MdePkg. We can try it.

Thanks
Abner

________________________________
From: devel@edk2.groups.io<mailto:devel@edk2.groups.io> <devel@edk2.groups.io<mailto:devel@edk2.groups.io>> on behalf of Ard Biesheuvel <ardb@kernel.org<mailto:ardb@kernel.org>>
Sent: Tuesday, October 5, 2021 5:30 PM
To: edk2-devel-groups-io <devel@edk2.groups.io<mailto:devel@edk2.groups.io>>; Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com<mailto:abner.chang@hpe.com>>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org<mailto:ardb+tianocore@kernel.org>>; Leif Lindholm <leif@nuviainc.com<mailto:leif@nuviainc.com>>; Sami Mujawar <sami.mujawar@arm.com<mailto:sami.mujawar@arm.com>>; Jiewen Yao <jiewen.yao@intel.com<mailto:jiewen.yao@intel.com>>; Jordan Justen <jordan.l.justen@intel.com<mailto:jordan.l.justen@intel.com>>; Gerd Hoffmann <kraxel@redhat.com<mailto:kraxel@redhat.com>>; Schaefer, Daniel <daniel.schaefer@hpe.com<mailto:daniel.schaefer@hpe.com>>; Sunil V L <sunilvl@ventanamicro.com<mailto:sunilvl@ventanamicro.com>>; Liming Gao <gaoliming@byosoft.com.cn<mailto:gaoliming@byosoft.com.cn>>; Zhiguang Liu <zhiguang.liu@intel.com<mailto:zhiguang.liu@intel.com>>; Michael D Kinney <michael.d.kinney@intel.com<mailto:michael.d.kinney@intel.com>>
Subject: Re: [edk2-devel] [PATCH V3 00/12] Migrate ArmVirtPkg modules to OvmfPkg

On Thu, 30 Sept 2021 at 03:43, Abner Chang <abner.chang@hpe.com<mailto:abner.chang@hpe.com>> wrote:
>
> In V3: Address comments on V2.
> In V2: Remove HPE license on the files that just moved around or
>        the changes in the file are just code removal.
>
> edk2 BZ #: 3665
> edk2 platform corresponding changes will be submitted after
> this pactch set is reviewed.
>
> This pacthes set is to migrate some modules from ArmVirtPkg
> to under OvmfPkg for the upcoming RiscVVirtPkg that can leverage
> those modules without the dependency with Arm*Pkg.
>
> The modules moved from ArmVirtPkg to OvmfPkg are,
> - FdtClientDxe
> - PciPcdProducerLib
> - HighMemDxe
> - QemuFwCfgLib
> - FdtPciHostBridgeLib
> - VirtioFdtDxe
>
> Below PCDs are moved to under MdePkg and leverage by RiscVVirtPkg.
> This change also remove the dependency on ArmPkg of OvmfPkg.
> - PcdPciIoTranslation
> - PcdPciIoTranslation
> - PcdPciMmio32(64)Translation
>
> Signed-off-by: Abner Chang <abner.chang@hpe.com<mailto:abner.chang@hpe.com>>
> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org<mailto:ardb+tianocore@kernel.org>>
> Cc: Leif Lindholm <leif@nuviainc.com<mailto:leif@nuviainc.com>>
> Cc: Sami Mujawar <sami.mujawar@arm.com<mailto:sami.mujawar@arm.com>>
> Cc: Jiewen Yao <jiewen.yao@intel.com<mailto:jiewen.yao@intel.com>>
> Cc: Jordan Justen <jordan.l.justen@intel.com<mailto:jordan.l.justen@intel.com>>
> Cc: Gerd Hoffmann <kraxel@redhat.com<mailto:kraxel@redhat.com>>
> Cc: Daniel Schaefer <daniel.schaefer@hpe.com<mailto:daniel.schaefer@hpe.com>>
> Cc: Sunil V L <sunilvl@ventanamicro.com<mailto:sunilvl@ventanamicro.com>>
> Cc: Liming Gao <gaoliming@byosoft.com.cn<mailto:gaoliming@byosoft.com.cn>>
> Cc: Zhiguang Liu <zhiguang.liu@intel.com<mailto:zhiguang.liu@intel.com>>
> Cc: Michael D Kinney <michael.d.kinney@intel.com<mailto:michael.d.kinney@intel.com>>
>
> Abner Chang (12):
>   ArmVirtPkg/FdtClintDxe: Move FdtClientDxe to EmbeddedPkg
>   MdePkg: Add PcdPciIoTranslation PCD
>   ArmPkg: Use PcdPciIoTranslation PCD from MdePkg
>   ArmVirtPkg/FdtPciPcdProducerLib: Relocate PciPcdProducerLib to OvmfPkg
>   ArmVirtPkg/HighMemDxe: Relocate HighMemDxe to OvmfPkg
>   OvmfPkg/HighMemDxe: Add RISC-V in the supported arch.
>   ArmVirtPkg/QemuFwCfgLib: Relocate QemuFwCfgLib to OvmfPkg
>   OvmfPkg/QemuFwCfgLibMMIO: Add RISC-V arch support
>   MdePkg: Add PcdPciMmio32(64)Translation PCDs
>   ArmVirtPkg/FdtPciHostBridgeLib: Relocate FdtPciHostBridgeLib to
>     OvmfPkg/Fdt
>   OvmfPkg/FdtPciHostBridgeLib: Add RISC-V in the supported arch.
>   ArmVirtPkg/VirtioFdtDxe: Relocate VirtioFdtDxe to OvmfPkg/Fdt
>

Hello all,

These patches look ok to me, but I wonder if the MdePkg maintainers
are happy taking these PCD declaration changes. Translations for PCIe
are typically defined per host bridge, and I would rather move away
from using PCDs for this entirely than 'promote' them by carrying them
in MdePkg.

As this issue is somewhat orthogonal to what Abner is trying to fix,
perhaps it is better to avoid MdePkg changes for now, and just
duplicate these PCDs into OvmfPkg. This is reasonable, given that we
know that QEMU only exposes a single host bridge.

The one in ArmPkg can hopefully be removed and replaced with something
that is more appropriate.


>  ArmPkg/ArmPkg.dec                             | 15 ++++++--------
>  ArmVirtPkg/ArmVirtPkg.dec                     |  3 ---
>  EmbeddedPkg/EmbeddedPkg.dec                   |  1 +
>  MdePkg/MdePkg.dec                             | 12 +++++++++++
>  ArmVirtPkg/ArmVirtCloudHv.dsc                 | 18 ++++++++---------
>  ArmVirtPkg/ArmVirtKvmTool.dsc                 | 18 ++++++++---------
>  ArmVirtPkg/ArmVirtQemu.dsc                    | 20 +++++++++----------
>  ArmVirtPkg/ArmVirtQemuKernel.dsc              | 20 +++++++++----------
>  ArmVirtPkg/ArmVirtXen.dsc                     |  2 +-
>  EmbeddedPkg/EmbeddedPkg.dsc                   |  1 +
>  ArmVirtPkg/ArmVirtCloudHv.fdf                 |  6 +++---
>  ArmVirtPkg/ArmVirtKvmTool.fdf                 |  6 +++---
>  ArmVirtPkg/ArmVirtXen.fdf                     |  2 +-
>  ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc          |  6 +++---
>  .../ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf       |  2 +-
>  .../ArmVirtGicArchLib/ArmVirtGicArchLib.inf   |  1 +
>  .../ArmVirtPL031FdtClientLib.inf              |  1 +
>  .../ArmVirtPsciResetSystemLib.inf             |  1 +
>  .../ArmVirtTimerFdtClientLib.inf              |  1 +
>  .../KvmtoolRtcFdtClientLib.inf                |  1 +
>  .../NorFlashKvmtoolLib/NorFlashKvmtoolLib.inf |  1 +
>  .../NorFlashQemuLib/NorFlashQemuLib.inf       |  1 +
>  .../XenAcpiPlatformDxe/XenAcpiPlatformDxe.inf |  1 +
>  ArmVirtPkg/XenioFdtDxe/XenioFdtDxe.inf        |  1 +
>  .../Drivers}/FdtClientDxe/FdtClientDxe.inf    |  1 -
>  .../FdtPciHostBridgeLib.inf                   | 11 +++++-----
>  .../FdtPciPcdProducerLib.inf                  |  5 ++---
>  .../Fdt}/HighMemDxe/HighMemDxe.inf            |  7 ++++---
>  .../Fdt}/VirtioFdtDxe/VirtioFdtDxe.inf        |  2 +-
>  .../Library/QemuFwCfgLib/QemuFwCfgLibMmio.inf |  6 +++---
>  .../Include/Protocol/FdtClient.h              |  0
>  .../Drivers}/FdtClientDxe/FdtClientDxe.c      |  0
>  .../FdtPciHostBridgeLib/FdtPciHostBridgeLib.c |  0
>  .../FdtPciPcdProducerLib.c                    |  0
>  .../Fdt}/HighMemDxe/HighMemDxe.c              |  3 ++-
>  .../Fdt}/VirtioFdtDxe/VirtioFdtDxe.c          |  0
>  .../Library/QemuFwCfgLib/QemuFwCfgLibMmio.c   |  7 ++++---
>  Maintainers.txt                               |  6 ++++++
>  38 files changed, 106 insertions(+), 83 deletions(-)
>  rename {ArmVirtPkg => EmbeddedPkg/Drivers}/FdtClientDxe/FdtClientDxe.inf (92%)
>  rename {ArmVirtPkg/Library => OvmfPkg/Fdt}/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf (77%)
>  rename {ArmVirtPkg/Library => OvmfPkg/Fdt}/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf (87%)
>  rename {ArmVirtPkg => OvmfPkg/Fdt}/HighMemDxe/HighMemDxe.inf (83%)
>  rename {ArmVirtPkg => OvmfPkg/Fdt}/VirtioFdtDxe/VirtioFdtDxe.inf (92%)
>  rename ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLib.inf => OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibMmio.inf (86%)
>  rename {ArmVirtPkg => EmbeddedPkg}/Include/Protocol/FdtClient.h (100%)
>  rename {ArmVirtPkg => EmbeddedPkg/Drivers}/FdtClientDxe/FdtClientDxe.c (100%)
>  rename {ArmVirtPkg/Library => OvmfPkg/Fdt}/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c (100%)
>  rename {ArmVirtPkg/Library => OvmfPkg/Fdt}/FdtPciPcdProducerLib/FdtPciPcdProducerLib.c (100%)
>  rename {ArmVirtPkg => OvmfPkg/Fdt}/HighMemDxe/HighMemDxe.c (95%)
>  rename {ArmVirtPkg => OvmfPkg/Fdt}/VirtioFdtDxe/VirtioFdtDxe.c (100%)
>  rename ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLib.c => OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibMmio.c (93%)
>
> --
> 2.17.1
>
>
>
>
>
>



[-- Attachment #2: Type: text/html, Size: 32425 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [edk2-devel] [PATCH V3 00/12] Migrate ArmVirtPkg modules to OvmfPkg
  2021-10-12  4:16             ` Abner Chang
@ 2021-10-14  9:51               ` Ard Biesheuvel
  2021-10-14 10:13                 ` Abner Chang
  0 siblings, 1 reply; 27+ messages in thread
From: Ard Biesheuvel @ 2021-10-14  9:51 UTC (permalink / raw)
  To: edk2-devel-groups-io, Abner Chang
  Cc: gaoliming, Ard Biesheuvel, Leif Lindholm, Sami Mujawar,
	Jiewen Yao, Jordan Justen, Gerd Hoffmann, Schaefer, Daniel,
	Sunil V L, Zhiguang Liu, Michael D Kinney

On Tue, 12 Oct 2021 at 06:17, Abner Chang <abner.chang@hpe.com> wrote:
>
> Hi package maintainers,
>
> The review process of this patch set is almost done and please allow me to merge it because the corresponding changes on edk2-platform is also required to merge.
>
>
>
> Ard and Leif, do I need the Reviewed-by or Acked-by from either of you? Or I can just proceed the merge process as Ard has no problem with this patch set?
>
>

Hi Abner,

Where needed

Acked-by: Ard Biesheuvel <ardb@kernel.org>

Feel free to merge it whenever convenient for you.


>
> From: gaoliming [mailto:gaoliming@byosoft.com.cn]
> Sent: Monday, October 11, 2021 9:22 AM
> To: devel@edk2.groups.io; Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com>; ardb@kernel.org
> Cc: 'Ard Biesheuvel' <ardb+tianocore@kernel.org>; 'Leif Lindholm' <leif@nuviainc.com>; 'Sami Mujawar' <sami.mujawar@arm.com>; 'Jiewen Yao' <jiewen.yao@intel.com>; 'Jordan Justen' <jordan.l.justen@intel.com>; 'Gerd Hoffmann' <kraxel@redhat.com>; Schaefer, Daniel <daniel.schaefer@hpe.com>; 'Sunil V L' <sunilvl@ventanamicro.com>; 'Zhiguang Liu' <zhiguang.liu@intel.com>; 'Michael D Kinney' <michael.d.kinney@intel.com>
> Subject: 回复: [edk2-devel] [PATCH V3 00/12] Migrate ArmVirtPkg modules to OvmfPkg
>
>
>
> The change in MdePkg is good to me. Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
>
>
>
> 发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Abner Chang
> 发送时间: 2021年10月8日 11:39
> 收件人: devel@edk2.groups.io; gaoliming@byosoft.com.cn; ardb@kernel.org
> 抄送: 'Ard Biesheuvel' <ardb+tianocore@kernel.org>; 'Leif Lindholm' <leif@nuviainc.com>; 'Sami Mujawar' <sami.mujawar@arm.com>; 'Jiewen Yao' <jiewen.yao@intel.com>; 'Jordan Justen' <jordan.l.justen@intel.com>; 'Gerd Hoffmann' <kraxel@redhat.com>; Schaefer, Daniel <daniel.schaefer@hpe.com>; 'Sunil V L' <sunilvl@ventanamicro.com>; 'Zhiguang Liu' <zhiguang.liu@intel.com>; 'Michael D Kinney' <michael.d.kinney@intel.com>
> 主题: Re: [edk2-devel] [PATCH V3 00/12] Migrate ArmVirtPkg modules to OvmfPkg
>
>
>
> Thanks Liming, could you please also give the reviewed-by.
>
>
>
> Hi Ard, also need your reviewed-by for ArmPkg. Then this changes could be upstream and finished.
>
> Thanks
>
> Abner
>
>
>
>
>
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of gaoliming
> Sent: Friday, October 8, 2021 11:14 AM
> To: Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com>; 'edk2-devel-groups-io' <devel@edk2.groups.io>; ardb@kernel.org
> Cc: 'Ard Biesheuvel' <ardb+tianocore@kernel.org>; 'Leif Lindholm' <leif@nuviainc.com>; 'Sami Mujawar' <sami.mujawar@arm.com>; 'Jiewen Yao' <jiewen.yao@intel.com>; 'Jordan Justen' <jordan.l.justen@intel.com>; 'Gerd Hoffmann' <kraxel@redhat.com>; Schaefer, Daniel <daniel.schaefer@hpe.com>; 'Sunil V L' <sunilvl@ventanamicro.com>; 'Zhiguang Liu' <zhiguang.liu@intel.com>; 'Michael D Kinney' <michael.d.kinney@intel.com>
> Subject: 回复: [edk2-devel] [PATCH V3 00/12] Migrate ArmVirtPkg modules to OvmfPkg
>
>
>
> Ard and Abner:
>
>  I am OK to add these three PCDs PcdPciMmio32Translation, PcdPciMmio64Translation, PcdPciIoTranslation to MdePkg.
>
>
>
> Thanks
>
> Liming
>
> 发件人: Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com>
> 发送时间: 2021年10月6日 17:27
> 收件人: edk2-devel-groups-io <devel@edk2.groups.io>; ardb@kernel.org; Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com>
> 抄送: Ard Biesheuvel <ardb+tianocore@kernel.org>; Leif Lindholm <leif@nuviainc.com>; Sami Mujawar <sami.mujawar@arm.com>; Jiewen Yao <jiewen.yao@intel.com>; Jordan Justen <jordan.l.justen@intel.com>; Gerd Hoffmann <kraxel@redhat.com>; Schaefer, Daniel <daniel.schaefer@hpe.com>; Sunil V L <sunilvl@ventanamicro.com>; Liming Gao <gaoliming@byosoft.com.cn>; Zhiguang Liu <zhiguang.liu@intel.com>; Michael D Kinney <michael.d.kinney@intel.com>
> 主题: Re: [edk2-devel] [PATCH V3 00/12] Migrate ArmVirtPkg modules to OvmfPkg
>
>
>
> Hi Ard,
>
> I realized there is a problem if we duplicate ArmPkg defined PCD to under OvmfPkg (e.g. PcdPciIoTranslate PCD) when I was duplicating this PCD to OvmfPkg.
>
> FdtPciProducerLib is relocated to OvmfPkg/Fdt and uses PcdPciIoTranslate PCD declared with OvmfPkg namespace. FdtPciProducerLib is also used by both ArmVirtPkg  and RiscVVirtPkg.
>
> ArmVirtPkg uses ArmPciCpuIoDxe provided by ArmPkg however PcdPciIoTranslate used by ArmPciCpuIoDxe  is declared with ArmPkg namespace.
>
> I think this results in the problem because PcdPciIoTranslate(s) that are referred by ArmPkg and ArmVirtPkg come from two different namespaces, right? Unless ArmPciCpuIoDxe uses the one declared in OvmfPkg, but I don't think we want to do this.
>
> Thought? Otherwise, we should still keep the original patch that relocates these PCDs under MdePkg.
>
>
>
> Thanks
>
> Abner
>
>
>
>
>
> ________________________________
>
> From: devel@edk2.groups.io <devel@edk2.groups.io> on behalf of Abner Chang <abner.chang@hpe.com>
> Sent: Tuesday, October 5, 2021 11:00 PM
> To: edk2-devel-groups-io <devel@edk2.groups.io>; ardb@kernel.org <ardb@kernel.org>
> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>; Leif Lindholm <leif@nuviainc.com>; Sami Mujawar <sami.mujawar@arm.com>; Jiewen Yao <jiewen.yao@intel.com>; Jordan Justen <jordan.l.justen@intel.com>; Gerd Hoffmann <kraxel@redhat.com>; Schaefer, Daniel <daniel.schaefer@hpe.com>; Sunil V L <sunilvl@ventanamicro.com>; Liming Gao <gaoliming@byosoft.com.cn>; Zhiguang Liu <zhiguang.liu@intel.com>; Michael D Kinney <michael.d.kinney@intel.com>
> Subject: Re: [edk2-devel] [PATCH V3 00/12] Migrate ArmVirtPkg modules to OvmfPkg
>
>
>
> Hi Ard,
>
> This way reduces the impact of MdePkg. We can try it.
>
>
>
> Thanks
>
> Abner
>
>
>
> ________________________________
>
> From: devel@edk2.groups.io <devel@edk2.groups.io> on behalf of Ard Biesheuvel <ardb@kernel.org>
> Sent: Tuesday, October 5, 2021 5:30 PM
> To: edk2-devel-groups-io <devel@edk2.groups.io>; Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com>
> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>; Leif Lindholm <leif@nuviainc.com>; Sami Mujawar <sami.mujawar@arm.com>; Jiewen Yao <jiewen.yao@intel.com>; Jordan Justen <jordan.l.justen@intel.com>; Gerd Hoffmann <kraxel@redhat.com>; Schaefer, Daniel <daniel.schaefer@hpe.com>; Sunil V L <sunilvl@ventanamicro.com>; Liming Gao <gaoliming@byosoft.com.cn>; Zhiguang Liu <zhiguang.liu@intel.com>; Michael D Kinney <michael.d.kinney@intel.com>
> Subject: Re: [edk2-devel] [PATCH V3 00/12] Migrate ArmVirtPkg modules to OvmfPkg
>
>
>
> On Thu, 30 Sept 2021 at 03:43, Abner Chang <abner.chang@hpe.com> wrote:
> >
> > In V3: Address comments on V2.
> > In V2: Remove HPE license on the files that just moved around or
> >        the changes in the file are just code removal.
> >
> > edk2 BZ #: 3665
> > edk2 platform corresponding changes will be submitted after
> > this pactch set is reviewed.
> >
> > This pacthes set is to migrate some modules from ArmVirtPkg
> > to under OvmfPkg for the upcoming RiscVVirtPkg that can leverage
> > those modules without the dependency with Arm*Pkg.
> >
> > The modules moved from ArmVirtPkg to OvmfPkg are,
> > - FdtClientDxe
> > - PciPcdProducerLib
> > - HighMemDxe
> > - QemuFwCfgLib
> > - FdtPciHostBridgeLib
> > - VirtioFdtDxe
> >
> > Below PCDs are moved to under MdePkg and leverage by RiscVVirtPkg.
> > This change also remove the dependency on ArmPkg of OvmfPkg.
> > - PcdPciIoTranslation
> > - PcdPciIoTranslation
> > - PcdPciMmio32(64)Translation
> >
> > Signed-off-by: Abner Chang <abner.chang@hpe.com>
> > Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
> > Cc: Leif Lindholm <leif@nuviainc.com>
> > Cc: Sami Mujawar <sami.mujawar@arm.com>
> > Cc: Jiewen Yao <jiewen.yao@intel.com>
> > Cc: Jordan Justen <jordan.l.justen@intel.com>
> > Cc: Gerd Hoffmann <kraxel@redhat.com>
> > Cc: Daniel Schaefer <daniel.schaefer@hpe.com>
> > Cc: Sunil V L <sunilvl@ventanamicro.com>
> > Cc: Liming Gao <gaoliming@byosoft.com.cn>
> > Cc: Zhiguang Liu <zhiguang.liu@intel.com>
> > Cc: Michael D Kinney <michael.d.kinney@intel.com>
> >
> > Abner Chang (12):
> >   ArmVirtPkg/FdtClintDxe: Move FdtClientDxe to EmbeddedPkg
> >   MdePkg: Add PcdPciIoTranslation PCD
> >   ArmPkg: Use PcdPciIoTranslation PCD from MdePkg
> >   ArmVirtPkg/FdtPciPcdProducerLib: Relocate PciPcdProducerLib to OvmfPkg
> >   ArmVirtPkg/HighMemDxe: Relocate HighMemDxe to OvmfPkg
> >   OvmfPkg/HighMemDxe: Add RISC-V in the supported arch.
> >   ArmVirtPkg/QemuFwCfgLib: Relocate QemuFwCfgLib to OvmfPkg
> >   OvmfPkg/QemuFwCfgLibMMIO: Add RISC-V arch support
> >   MdePkg: Add PcdPciMmio32(64)Translation PCDs
> >   ArmVirtPkg/FdtPciHostBridgeLib: Relocate FdtPciHostBridgeLib to
> >     OvmfPkg/Fdt
> >   OvmfPkg/FdtPciHostBridgeLib: Add RISC-V in the supported arch.
> >   ArmVirtPkg/VirtioFdtDxe: Relocate VirtioFdtDxe to OvmfPkg/Fdt
> >
>
> Hello all,
>
> These patches look ok to me, but I wonder if the MdePkg maintainers
> are happy taking these PCD declaration changes. Translations for PCIe
> are typically defined per host bridge, and I would rather move away
> from using PCDs for this entirely than 'promote' them by carrying them
> in MdePkg.
>
> As this issue is somewhat orthogonal to what Abner is trying to fix,
> perhaps it is better to avoid MdePkg changes for now, and just
> duplicate these PCDs into OvmfPkg. This is reasonable, given that we
> know that QEMU only exposes a single host bridge.
>
> The one in ArmPkg can hopefully be removed and replaced with something
> that is more appropriate.
>
>
> >  ArmPkg/ArmPkg.dec                             | 15 ++++++--------
> >  ArmVirtPkg/ArmVirtPkg.dec                     |  3 ---
> >  EmbeddedPkg/EmbeddedPkg.dec                   |  1 +
> >  MdePkg/MdePkg.dec                             | 12 +++++++++++
> >  ArmVirtPkg/ArmVirtCloudHv.dsc                 | 18 ++++++++---------
> >  ArmVirtPkg/ArmVirtKvmTool.dsc                 | 18 ++++++++---------
> >  ArmVirtPkg/ArmVirtQemu.dsc                    | 20 +++++++++----------
> >  ArmVirtPkg/ArmVirtQemuKernel.dsc              | 20 +++++++++----------
> >  ArmVirtPkg/ArmVirtXen.dsc                     |  2 +-
> >  EmbeddedPkg/EmbeddedPkg.dsc                   |  1 +
> >  ArmVirtPkg/ArmVirtCloudHv.fdf                 |  6 +++---
> >  ArmVirtPkg/ArmVirtKvmTool.fdf                 |  6 +++---
> >  ArmVirtPkg/ArmVirtXen.fdf                     |  2 +-
> >  ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc          |  6 +++---
> >  .../ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf       |  2 +-
> >  .../ArmVirtGicArchLib/ArmVirtGicArchLib.inf   |  1 +
> >  .../ArmVirtPL031FdtClientLib.inf              |  1 +
> >  .../ArmVirtPsciResetSystemLib.inf             |  1 +
> >  .../ArmVirtTimerFdtClientLib.inf              |  1 +
> >  .../KvmtoolRtcFdtClientLib.inf                |  1 +
> >  .../NorFlashKvmtoolLib/NorFlashKvmtoolLib.inf |  1 +
> >  .../NorFlashQemuLib/NorFlashQemuLib.inf       |  1 +
> >  .../XenAcpiPlatformDxe/XenAcpiPlatformDxe.inf |  1 +
> >  ArmVirtPkg/XenioFdtDxe/XenioFdtDxe.inf        |  1 +
> >  .../Drivers}/FdtClientDxe/FdtClientDxe.inf    |  1 -
> >  .../FdtPciHostBridgeLib.inf                   | 11 +++++-----
> >  .../FdtPciPcdProducerLib.inf                  |  5 ++---
> >  .../Fdt}/HighMemDxe/HighMemDxe.inf            |  7 ++++---
> >  .../Fdt}/VirtioFdtDxe/VirtioFdtDxe.inf        |  2 +-
> >  .../Library/QemuFwCfgLib/QemuFwCfgLibMmio.inf |  6 +++---
> >  .../Include/Protocol/FdtClient.h              |  0
> >  .../Drivers}/FdtClientDxe/FdtClientDxe.c      |  0
> >  .../FdtPciHostBridgeLib/FdtPciHostBridgeLib.c |  0
> >  .../FdtPciPcdProducerLib.c                    |  0
> >  .../Fdt}/HighMemDxe/HighMemDxe.c              |  3 ++-
> >  .../Fdt}/VirtioFdtDxe/VirtioFdtDxe.c          |  0
> >  .../Library/QemuFwCfgLib/QemuFwCfgLibMmio.c   |  7 ++++---
> >  Maintainers.txt                               |  6 ++++++
> >  38 files changed, 106 insertions(+), 83 deletions(-)
> >  rename {ArmVirtPkg => EmbeddedPkg/Drivers}/FdtClientDxe/FdtClientDxe.inf (92%)
> >  rename {ArmVirtPkg/Library => OvmfPkg/Fdt}/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf (77%)
> >  rename {ArmVirtPkg/Library => OvmfPkg/Fdt}/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf (87%)
> >  rename {ArmVirtPkg => OvmfPkg/Fdt}/HighMemDxe/HighMemDxe.inf (83%)
> >  rename {ArmVirtPkg => OvmfPkg/Fdt}/VirtioFdtDxe/VirtioFdtDxe.inf (92%)
> >  rename ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLib.inf => OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibMmio.inf (86%)
> >  rename {ArmVirtPkg => EmbeddedPkg}/Include/Protocol/FdtClient.h (100%)
> >  rename {ArmVirtPkg => EmbeddedPkg/Drivers}/FdtClientDxe/FdtClientDxe.c (100%)
> >  rename {ArmVirtPkg/Library => OvmfPkg/Fdt}/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c (100%)
> >  rename {ArmVirtPkg/Library => OvmfPkg/Fdt}/FdtPciPcdProducerLib/FdtPciPcdProducerLib.c (100%)
> >  rename {ArmVirtPkg => OvmfPkg/Fdt}/HighMemDxe/HighMemDxe.c (95%)
> >  rename {ArmVirtPkg => OvmfPkg/Fdt}/VirtioFdtDxe/VirtioFdtDxe.c (100%)
> >  rename ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLib.c => OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibMmio.c (93%)
> >
> > --
> > 2.17.1
> >
> >
> >
> >
> >
> >
>
> 

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [edk2-devel] [PATCH V3 00/12] Migrate ArmVirtPkg modules to OvmfPkg
  2021-10-14  9:51               ` Ard Biesheuvel
@ 2021-10-14 10:13                 ` Abner Chang
  2021-10-14 10:57                   ` Ard Biesheuvel
  0 siblings, 1 reply; 27+ messages in thread
From: Abner Chang @ 2021-10-14 10:13 UTC (permalink / raw)
  To: Ard Biesheuvel, edk2-devel-groups-io
  Cc: gaoliming, Ard Biesheuvel, Leif Lindholm, Sami Mujawar,
	Jiewen Yao, Jordan Justen, Gerd Hoffmann, Schaefer, Daniel,
	Sunil V L, Zhiguang Liu, Michael D Kinney

[-- Attachment #1: Type: text/plain, Size: 14375 bytes --]

Hi Are, I am so sorry about that I just merged it two hours ago. Any process needed if we want to change the commit messages for adding your review tag?

Abner

Get Outlook for Android<https://aka.ms/AAb9ysg>
________________________________
From: Ard Biesheuvel <ardb@kernel.org>
Sent: Thursday, October 14, 2021 5:51:56 PM
To: edk2-devel-groups-io <devel@edk2.groups.io>; Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com>
Cc: gaoliming <gaoliming@byosoft.com.cn>; Ard Biesheuvel <ardb+tianocore@kernel.org>; Leif Lindholm <leif@nuviainc.com>; Sami Mujawar <sami.mujawar@arm.com>; Jiewen Yao <jiewen.yao@intel.com>; Jordan Justen <jordan.l.justen@intel.com>; Gerd Hoffmann <kraxel@redhat.com>; Schaefer, Daniel <daniel.schaefer@hpe.com>; Sunil V L <sunilvl@ventanamicro.com>; Zhiguang Liu <zhiguang.liu@intel.com>; Michael D Kinney <michael.d.kinney@intel.com>
Subject: Re: [edk2-devel] [PATCH V3 00/12] Migrate ArmVirtPkg modules to OvmfPkg

On Tue, 12 Oct 2021 at 06:17, Abner Chang <abner.chang@hpe.com> wrote:
>
> Hi package maintainers,
>
> The review process of this patch set is almost done and please allow me to merge it because the corresponding changes on edk2-platform is also required to merge.
>
>
>
> Ard and Leif, do I need the Reviewed-by or Acked-by from either of you? Or I can just proceed the merge process as Ard has no problem with this patch set?
>
>

Hi Abner,

Where needed

Acked-by: Ard Biesheuvel <ardb@kernel.org>

Feel free to merge it whenever convenient for you.


>
> From: gaoliming [mailto:gaoliming@byosoft.com.cn]
> Sent: Monday, October 11, 2021 9:22 AM
> To: devel@edk2.groups.io; Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com>; ardb@kernel.org
> Cc: 'Ard Biesheuvel' <ardb+tianocore@kernel.org>; 'Leif Lindholm' <leif@nuviainc.com>; 'Sami Mujawar' <sami.mujawar@arm.com>; 'Jiewen Yao' <jiewen.yao@intel.com>; 'Jordan Justen' <jordan.l.justen@intel.com>; 'Gerd Hoffmann' <kraxel@redhat.com>; Schaefer, Daniel <daniel.schaefer@hpe.com>; 'Sunil V L' <sunilvl@ventanamicro.com>; 'Zhiguang Liu' <zhiguang.liu@intel.com>; 'Michael D Kinney' <michael.d.kinney@intel.com>
> Subject: 回复: [edk2-devel] [PATCH V3 00/12] Migrate ArmVirtPkg modules to OvmfPkg
>
>
>
> The change in MdePkg is good to me. Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
>
>
>
> 发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Abner Chang
> 发送时间: 2021年10月8日 11:39
> 收件人: devel@edk2.groups.io; gaoliming@byosoft.com.cn; ardb@kernel.org
> 抄送: 'Ard Biesheuvel' <ardb+tianocore@kernel.org>; 'Leif Lindholm' <leif@nuviainc.com>; 'Sami Mujawar' <sami.mujawar@arm.com>; 'Jiewen Yao' <jiewen.yao@intel.com>; 'Jordan Justen' <jordan.l.justen@intel.com>; 'Gerd Hoffmann' <kraxel@redhat.com>; Schaefer, Daniel <daniel.schaefer@hpe.com>; 'Sunil V L' <sunilvl@ventanamicro.com>; 'Zhiguang Liu' <zhiguang.liu@intel.com>; 'Michael D Kinney' <michael.d.kinney@intel.com>
> 主题: Re: [edk2-devel] [PATCH V3 00/12] Migrate ArmVirtPkg modules to OvmfPkg
>
>
>
> Thanks Liming, could you please also give the reviewed-by.
>
>
>
> Hi Ard, also need your reviewed-by for ArmPkg. Then this changes could be upstream and finished.
>
> Thanks
>
> Abner
>
>
>
>
>
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of gaoliming
> Sent: Friday, October 8, 2021 11:14 AM
> To: Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com>; 'edk2-devel-groups-io' <devel@edk2.groups.io>; ardb@kernel.org
> Cc: 'Ard Biesheuvel' <ardb+tianocore@kernel.org>; 'Leif Lindholm' <leif@nuviainc.com>; 'Sami Mujawar' <sami.mujawar@arm.com>; 'Jiewen Yao' <jiewen.yao@intel.com>; 'Jordan Justen' <jordan.l.justen@intel.com>; 'Gerd Hoffmann' <kraxel@redhat.com>; Schaefer, Daniel <daniel.schaefer@hpe.com>; 'Sunil V L' <sunilvl@ventanamicro.com>; 'Zhiguang Liu' <zhiguang.liu@intel.com>; 'Michael D Kinney' <michael.d.kinney@intel.com>
> Subject: 回复: [edk2-devel] [PATCH V3 00/12] Migrate ArmVirtPkg modules to OvmfPkg
>
>
>
> Ard and Abner:
>
>  I am OK to add these three PCDs PcdPciMmio32Translation, PcdPciMmio64Translation, PcdPciIoTranslation to MdePkg.
>
>
>
> Thanks
>
> Liming
>
> 发件人: Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com>
> 发送时间: 2021年10月6日 17:27
> 收件人: edk2-devel-groups-io <devel@edk2.groups.io>; ardb@kernel.org; Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com>
> 抄送: Ard Biesheuvel <ardb+tianocore@kernel.org>; Leif Lindholm <leif@nuviainc.com>; Sami Mujawar <sami.mujawar@arm.com>; Jiewen Yao <jiewen.yao@intel.com>; Jordan Justen <jordan.l.justen@intel.com>; Gerd Hoffmann <kraxel@redhat.com>; Schaefer, Daniel <daniel.schaefer@hpe.com>; Sunil V L <sunilvl@ventanamicro.com>; Liming Gao <gaoliming@byosoft.com.cn>; Zhiguang Liu <zhiguang.liu@intel.com>; Michael D Kinney <michael.d.kinney@intel.com>
> 主题: Re: [edk2-devel] [PATCH V3 00/12] Migrate ArmVirtPkg modules to OvmfPkg
>
>
>
> Hi Ard,
>
> I realized there is a problem if we duplicate ArmPkg defined PCD to under OvmfPkg (e.g. PcdPciIoTranslate PCD) when I was duplicating this PCD to OvmfPkg.
>
> FdtPciProducerLib is relocated to OvmfPkg/Fdt and uses PcdPciIoTranslate PCD declared with OvmfPkg namespace. FdtPciProducerLib is also used by both ArmVirtPkg  and RiscVVirtPkg.
>
> ArmVirtPkg uses ArmPciCpuIoDxe provided by ArmPkg however PcdPciIoTranslate used by ArmPciCpuIoDxe  is declared with ArmPkg namespace.
>
> I think this results in the problem because PcdPciIoTranslate(s) that are referred by ArmPkg and ArmVirtPkg come from two different namespaces, right? Unless ArmPciCpuIoDxe uses the one declared in OvmfPkg, but I don't think we want to do this.
>
> Thought? Otherwise, we should still keep the original patch that relocates these PCDs under MdePkg.
>
>
>
> Thanks
>
> Abner
>
>
>
>
>
> ________________________________
>
> From: devel@edk2.groups.io <devel@edk2.groups.io> on behalf of Abner Chang <abner.chang@hpe.com>
> Sent: Tuesday, October 5, 2021 11:00 PM
> To: edk2-devel-groups-io <devel@edk2.groups.io>; ardb@kernel.org <ardb@kernel.org>
> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>; Leif Lindholm <leif@nuviainc.com>; Sami Mujawar <sami.mujawar@arm.com>; Jiewen Yao <jiewen.yao@intel.com>; Jordan Justen <jordan.l.justen@intel.com>; Gerd Hoffmann <kraxel@redhat.com>; Schaefer, Daniel <daniel.schaefer@hpe.com>; Sunil V L <sunilvl@ventanamicro.com>; Liming Gao <gaoliming@byosoft.com.cn>; Zhiguang Liu <zhiguang.liu@intel.com>; Michael D Kinney <michael.d.kinney@intel.com>
> Subject: Re: [edk2-devel] [PATCH V3 00/12] Migrate ArmVirtPkg modules to OvmfPkg
>
>
>
> Hi Ard,
>
> This way reduces the impact of MdePkg. We can try it.
>
>
>
> Thanks
>
> Abner
>
>
>
> ________________________________
>
> From: devel@edk2.groups.io <devel@edk2.groups.io> on behalf of Ard Biesheuvel <ardb@kernel.org>
> Sent: Tuesday, October 5, 2021 5:30 PM
> To: edk2-devel-groups-io <devel@edk2.groups.io>; Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com>
> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>; Leif Lindholm <leif@nuviainc.com>; Sami Mujawar <sami.mujawar@arm.com>; Jiewen Yao <jiewen.yao@intel.com>; Jordan Justen <jordan.l.justen@intel.com>; Gerd Hoffmann <kraxel@redhat.com>; Schaefer, Daniel <daniel.schaefer@hpe.com>; Sunil V L <sunilvl@ventanamicro.com>; Liming Gao <gaoliming@byosoft.com.cn>; Zhiguang Liu <zhiguang.liu@intel.com>; Michael D Kinney <michael.d.kinney@intel.com>
> Subject: Re: [edk2-devel] [PATCH V3 00/12] Migrate ArmVirtPkg modules to OvmfPkg
>
>
>
> On Thu, 30 Sept 2021 at 03:43, Abner Chang <abner.chang@hpe.com> wrote:
> >
> > In V3: Address comments on V2.
> > In V2: Remove HPE license on the files that just moved around or
> >        the changes in the file are just code removal.
> >
> > edk2 BZ #: 3665
> > edk2 platform corresponding changes will be submitted after
> > this pactch set is reviewed.
> >
> > This pacthes set is to migrate some modules from ArmVirtPkg
> > to under OvmfPkg for the upcoming RiscVVirtPkg that can leverage
> > those modules without the dependency with Arm*Pkg.
> >
> > The modules moved from ArmVirtPkg to OvmfPkg are,
> > - FdtClientDxe
> > - PciPcdProducerLib
> > - HighMemDxe
> > - QemuFwCfgLib
> > - FdtPciHostBridgeLib
> > - VirtioFdtDxe
> >
> > Below PCDs are moved to under MdePkg and leverage by RiscVVirtPkg.
> > This change also remove the dependency on ArmPkg of OvmfPkg.
> > - PcdPciIoTranslation
> > - PcdPciIoTranslation
> > - PcdPciMmio32(64)Translation
> >
> > Signed-off-by: Abner Chang <abner.chang@hpe.com>
> > Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
> > Cc: Leif Lindholm <leif@nuviainc.com>
> > Cc: Sami Mujawar <sami.mujawar@arm.com>
> > Cc: Jiewen Yao <jiewen.yao@intel.com>
> > Cc: Jordan Justen <jordan.l.justen@intel.com>
> > Cc: Gerd Hoffmann <kraxel@redhat.com>
> > Cc: Daniel Schaefer <daniel.schaefer@hpe.com>
> > Cc: Sunil V L <sunilvl@ventanamicro.com>
> > Cc: Liming Gao <gaoliming@byosoft.com.cn>
> > Cc: Zhiguang Liu <zhiguang.liu@intel.com>
> > Cc: Michael D Kinney <michael.d.kinney@intel.com>
> >
> > Abner Chang (12):
> >   ArmVirtPkg/FdtClintDxe: Move FdtClientDxe to EmbeddedPkg
> >   MdePkg: Add PcdPciIoTranslation PCD
> >   ArmPkg: Use PcdPciIoTranslation PCD from MdePkg
> >   ArmVirtPkg/FdtPciPcdProducerLib: Relocate PciPcdProducerLib to OvmfPkg
> >   ArmVirtPkg/HighMemDxe: Relocate HighMemDxe to OvmfPkg
> >   OvmfPkg/HighMemDxe: Add RISC-V in the supported arch.
> >   ArmVirtPkg/QemuFwCfgLib: Relocate QemuFwCfgLib to OvmfPkg
> >   OvmfPkg/QemuFwCfgLibMMIO: Add RISC-V arch support
> >   MdePkg: Add PcdPciMmio32(64)Translation PCDs
> >   ArmVirtPkg/FdtPciHostBridgeLib: Relocate FdtPciHostBridgeLib to
> >     OvmfPkg/Fdt
> >   OvmfPkg/FdtPciHostBridgeLib: Add RISC-V in the supported arch.
> >   ArmVirtPkg/VirtioFdtDxe: Relocate VirtioFdtDxe to OvmfPkg/Fdt
> >
>
> Hello all,
>
> These patches look ok to me, but I wonder if the MdePkg maintainers
> are happy taking these PCD declaration changes. Translations for PCIe
> are typically defined per host bridge, and I would rather move away
> from using PCDs for this entirely than 'promote' them by carrying them
> in MdePkg.
>
> As this issue is somewhat orthogonal to what Abner is trying to fix,
> perhaps it is better to avoid MdePkg changes for now, and just
> duplicate these PCDs into OvmfPkg. This is reasonable, given that we
> know that QEMU only exposes a single host bridge.
>
> The one in ArmPkg can hopefully be removed and replaced with something
> that is more appropriate.
>
>
> >  ArmPkg/ArmPkg.dec                             | 15 ++++++--------
> >  ArmVirtPkg/ArmVirtPkg.dec                     |  3 ---
> >  EmbeddedPkg/EmbeddedPkg.dec                   |  1 +
> >  MdePkg/MdePkg.dec                             | 12 +++++++++++
> >  ArmVirtPkg/ArmVirtCloudHv.dsc                 | 18 ++++++++---------
> >  ArmVirtPkg/ArmVirtKvmTool.dsc                 | 18 ++++++++---------
> >  ArmVirtPkg/ArmVirtQemu.dsc                    | 20 +++++++++----------
> >  ArmVirtPkg/ArmVirtQemuKernel.dsc              | 20 +++++++++----------
> >  ArmVirtPkg/ArmVirtXen.dsc                     |  2 +-
> >  EmbeddedPkg/EmbeddedPkg.dsc                   |  1 +
> >  ArmVirtPkg/ArmVirtCloudHv.fdf                 |  6 +++---
> >  ArmVirtPkg/ArmVirtKvmTool.fdf                 |  6 +++---
> >  ArmVirtPkg/ArmVirtXen.fdf                     |  2 +-
> >  ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc          |  6 +++---
> >  .../ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf       |  2 +-
> >  .../ArmVirtGicArchLib/ArmVirtGicArchLib.inf   |  1 +
> >  .../ArmVirtPL031FdtClientLib.inf              |  1 +
> >  .../ArmVirtPsciResetSystemLib.inf             |  1 +
> >  .../ArmVirtTimerFdtClientLib.inf              |  1 +
> >  .../KvmtoolRtcFdtClientLib.inf                |  1 +
> >  .../NorFlashKvmtoolLib/NorFlashKvmtoolLib.inf |  1 +
> >  .../NorFlashQemuLib/NorFlashQemuLib.inf       |  1 +
> >  .../XenAcpiPlatformDxe/XenAcpiPlatformDxe.inf |  1 +
> >  ArmVirtPkg/XenioFdtDxe/XenioFdtDxe.inf        |  1 +
> >  .../Drivers}/FdtClientDxe/FdtClientDxe.inf    |  1 -
> >  .../FdtPciHostBridgeLib.inf                   | 11 +++++-----
> >  .../FdtPciPcdProducerLib.inf                  |  5 ++---
> >  .../Fdt}/HighMemDxe/HighMemDxe.inf            |  7 ++++---
> >  .../Fdt}/VirtioFdtDxe/VirtioFdtDxe.inf        |  2 +-
> >  .../Library/QemuFwCfgLib/QemuFwCfgLibMmio.inf |  6 +++---
> >  .../Include/Protocol/FdtClient.h              |  0
> >  .../Drivers}/FdtClientDxe/FdtClientDxe.c      |  0
> >  .../FdtPciHostBridgeLib/FdtPciHostBridgeLib.c |  0
> >  .../FdtPciPcdProducerLib.c                    |  0
> >  .../Fdt}/HighMemDxe/HighMemDxe.c              |  3 ++-
> >  .../Fdt}/VirtioFdtDxe/VirtioFdtDxe.c          |  0
> >  .../Library/QemuFwCfgLib/QemuFwCfgLibMmio.c   |  7 ++++---
> >  Maintainers.txt                               |  6 ++++++
> >  38 files changed, 106 insertions(+), 83 deletions(-)
> >  rename {ArmVirtPkg => EmbeddedPkg/Drivers}/FdtClientDxe/FdtClientDxe.inf (92%)
> >  rename {ArmVirtPkg/Library => OvmfPkg/Fdt}/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf (77%)
> >  rename {ArmVirtPkg/Library => OvmfPkg/Fdt}/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf (87%)
> >  rename {ArmVirtPkg => OvmfPkg/Fdt}/HighMemDxe/HighMemDxe.inf (83%)
> >  rename {ArmVirtPkg => OvmfPkg/Fdt}/VirtioFdtDxe/VirtioFdtDxe.inf (92%)
> >  rename ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLib.inf => OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibMmio.inf (86%)
> >  rename {ArmVirtPkg => EmbeddedPkg}/Include/Protocol/FdtClient.h (100%)
> >  rename {ArmVirtPkg => EmbeddedPkg/Drivers}/FdtClientDxe/FdtClientDxe.c (100%)
> >  rename {ArmVirtPkg/Library => OvmfPkg/Fdt}/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c (100%)
> >  rename {ArmVirtPkg/Library => OvmfPkg/Fdt}/FdtPciPcdProducerLib/FdtPciPcdProducerLib.c (100%)
> >  rename {ArmVirtPkg => OvmfPkg/Fdt}/HighMemDxe/HighMemDxe.c (95%)
> >  rename {ArmVirtPkg => OvmfPkg/Fdt}/VirtioFdtDxe/VirtioFdtDxe.c (100%)
> >  rename ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLib.c => OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibMmio.c (93%)
> >
> > --
> > 2.17.1
> >
> >
> >
> >
> >
> >
>
> 

[-- Attachment #2: Type: text/html, Size: 21195 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [edk2-devel] [PATCH V3 00/12] Migrate ArmVirtPkg modules to OvmfPkg
  2021-10-14 10:13                 ` Abner Chang
@ 2021-10-14 10:57                   ` Ard Biesheuvel
  0 siblings, 0 replies; 27+ messages in thread
From: Ard Biesheuvel @ 2021-10-14 10:57 UTC (permalink / raw)
  To: Chang, Abner (HPS SW/FW Technologist)
  Cc: edk2-devel-groups-io, gaoliming, Ard Biesheuvel, Leif Lindholm,
	Sami Mujawar, Jiewen Yao, Jordan Justen, Gerd Hoffmann,
	Schaefer, Daniel, Sunil V L, Zhiguang Liu, Michael D Kinney

On Thu, 14 Oct 2021 at 12:14, Chang, Abner (HPS SW/FW Technologist)
<abner.chang@hpe.com> wrote:
>
> Hi Are, I am so sorry about that I just merged it two hours ago. Any process needed if we want to change the commit messages for adding your review tag?
>

Don't worry about it.


> ________________________________
> From: Ard Biesheuvel <ardb@kernel.org>
> Sent: Thursday, October 14, 2021 5:51:56 PM
> To: edk2-devel-groups-io <devel@edk2.groups.io>; Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com>
> Cc: gaoliming <gaoliming@byosoft.com.cn>; Ard Biesheuvel <ardb+tianocore@kernel.org>; Leif Lindholm <leif@nuviainc.com>; Sami Mujawar <sami.mujawar@arm.com>; Jiewen Yao <jiewen.yao@intel.com>; Jordan Justen <jordan.l.justen@intel.com>; Gerd Hoffmann <kraxel@redhat.com>; Schaefer, Daniel <daniel.schaefer@hpe.com>; Sunil V L <sunilvl@ventanamicro.com>; Zhiguang Liu <zhiguang.liu@intel.com>; Michael D Kinney <michael.d.kinney@intel.com>
> Subject: Re: [edk2-devel] [PATCH V3 00/12] Migrate ArmVirtPkg modules to OvmfPkg
>
> On Tue, 12 Oct 2021 at 06:17, Abner Chang <abner.chang@hpe.com> wrote:
> >
> > Hi package maintainers,
> >
> > The review process of this patch set is almost done and please allow me to merge it because the corresponding changes on edk2-platform is also required to merge.
> >
> >
> >
> > Ard and Leif, do I need the Reviewed-by or Acked-by from either of you? Or I can just proceed the merge process as Ard has no problem with this patch set?
> >
> >
>
> Hi Abner,
>
> Where needed
>
> Acked-by: Ard Biesheuvel <ardb@kernel.org>
>
> Feel free to merge it whenever convenient for you.
>
>
> >
> > From: gaoliming [mailto:gaoliming@byosoft.com.cn]
> > Sent: Monday, October 11, 2021 9:22 AM
> > To: devel@edk2.groups.io; Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com>; ardb@kernel.org
> > Cc: 'Ard Biesheuvel' <ardb+tianocore@kernel.org>; 'Leif Lindholm' <leif@nuviainc.com>; 'Sami Mujawar' <sami.mujawar@arm.com>; 'Jiewen Yao' <jiewen.yao@intel.com>; 'Jordan Justen' <jordan.l.justen@intel.com>; 'Gerd Hoffmann' <kraxel@redhat.com>; Schaefer, Daniel <daniel.schaefer@hpe.com>; 'Sunil V L' <sunilvl@ventanamicro.com>; 'Zhiguang Liu' <zhiguang.liu@intel.com>; 'Michael D Kinney' <michael.d.kinney@intel.com>
> > Subject: 回复: [edk2-devel] [PATCH V3 00/12] Migrate ArmVirtPkg modules to OvmfPkg
> >
> >
> >
> > The change in MdePkg is good to me. Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
> >
> >
> >
> > 发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Abner Chang
> > 发送时间: 2021年10月8日 11:39
> > 收件人: devel@edk2.groups.io; gaoliming@byosoft.com.cn; ardb@kernel.org
> > 抄送: 'Ard Biesheuvel' <ardb+tianocore@kernel.org>; 'Leif Lindholm' <leif@nuviainc.com>; 'Sami Mujawar' <sami.mujawar@arm.com>; 'Jiewen Yao' <jiewen.yao@intel.com>; 'Jordan Justen' <jordan.l.justen@intel.com>; 'Gerd Hoffmann' <kraxel@redhat.com>; Schaefer, Daniel <daniel.schaefer@hpe.com>; 'Sunil V L' <sunilvl@ventanamicro.com>; 'Zhiguang Liu' <zhiguang.liu@intel.com>; 'Michael D Kinney' <michael.d.kinney@intel.com>
> > 主题: Re: [edk2-devel] [PATCH V3 00/12] Migrate ArmVirtPkg modules to OvmfPkg
> >
> >
> >
> > Thanks Liming, could you please also give the reviewed-by.
> >
> >
> >
> > Hi Ard, also need your reviewed-by for ArmPkg. Then this changes could be upstream and finished.
> >
> > Thanks
> >
> > Abner
> >
> >
> >
> >
> >
> > From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of gaoliming
> > Sent: Friday, October 8, 2021 11:14 AM
> > To: Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com>; 'edk2-devel-groups-io' <devel@edk2.groups.io>; ardb@kernel.org
> > Cc: 'Ard Biesheuvel' <ardb+tianocore@kernel.org>; 'Leif Lindholm' <leif@nuviainc.com>; 'Sami Mujawar' <sami.mujawar@arm.com>; 'Jiewen Yao' <jiewen.yao@intel.com>; 'Jordan Justen' <jordan.l.justen@intel.com>; 'Gerd Hoffmann' <kraxel@redhat.com>; Schaefer, Daniel <daniel.schaefer@hpe.com>; 'Sunil V L' <sunilvl@ventanamicro.com>; 'Zhiguang Liu' <zhiguang.liu@intel.com>; 'Michael D Kinney' <michael.d.kinney@intel.com>
> > Subject: 回复: [edk2-devel] [PATCH V3 00/12] Migrate ArmVirtPkg modules to OvmfPkg
> >
> >
> >
> > Ard and Abner:
> >
> >  I am OK to add these three PCDs PcdPciMmio32Translation, PcdPciMmio64Translation, PcdPciIoTranslation to MdePkg.
> >
> >
> >
> > Thanks
> >
> > Liming
> >
> > 发件人: Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com>
> > 发送时间: 2021年10月6日 17:27
> > 收件人: edk2-devel-groups-io <devel@edk2.groups.io>; ardb@kernel.org; Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com>
> > 抄送: Ard Biesheuvel <ardb+tianocore@kernel.org>; Leif Lindholm <leif@nuviainc.com>; Sami Mujawar <sami.mujawar@arm.com>; Jiewen Yao <jiewen.yao@intel.com>; Jordan Justen <jordan.l.justen@intel.com>; Gerd Hoffmann <kraxel@redhat.com>; Schaefer, Daniel <daniel.schaefer@hpe.com>; Sunil V L <sunilvl@ventanamicro.com>; Liming Gao <gaoliming@byosoft.com.cn>; Zhiguang Liu <zhiguang.liu@intel.com>; Michael D Kinney <michael.d.kinney@intel.com>
> > 主题: Re: [edk2-devel] [PATCH V3 00/12] Migrate ArmVirtPkg modules to OvmfPkg
> >
> >
> >
> > Hi Ard,
> >
> > I realized there is a problem if we duplicate ArmPkg defined PCD to under OvmfPkg (e.g. PcdPciIoTranslate PCD) when I was duplicating this PCD to OvmfPkg.
> >
> > FdtPciProducerLib is relocated to OvmfPkg/Fdt and uses PcdPciIoTranslate PCD declared with OvmfPkg namespace. FdtPciProducerLib is also used by both ArmVirtPkg  and RiscVVirtPkg.
> >
> > ArmVirtPkg uses ArmPciCpuIoDxe provided by ArmPkg however PcdPciIoTranslate used by ArmPciCpuIoDxe  is declared with ArmPkg namespace.
> >
> > I think this results in the problem because PcdPciIoTranslate(s) that are referred by ArmPkg and ArmVirtPkg come from two different namespaces, right? Unless ArmPciCpuIoDxe uses the one declared in OvmfPkg, but I don't think we want to do this.
> >
> > Thought? Otherwise, we should still keep the original patch that relocates these PCDs under MdePkg.
> >
> >
> >
> > Thanks
> >
> > Abner
> >
> >
> >
> >
> >
> > ________________________________
> >
> > From: devel@edk2.groups.io <devel@edk2.groups.io> on behalf of Abner Chang <abner.chang@hpe.com>
> > Sent: Tuesday, October 5, 2021 11:00 PM
> > To: edk2-devel-groups-io <devel@edk2.groups.io>; ardb@kernel.org <ardb@kernel.org>
> > Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>; Leif Lindholm <leif@nuviainc.com>; Sami Mujawar <sami.mujawar@arm.com>; Jiewen Yao <jiewen.yao@intel.com>; Jordan Justen <jordan.l.justen@intel.com>; Gerd Hoffmann <kraxel@redhat.com>; Schaefer, Daniel <daniel.schaefer@hpe.com>; Sunil V L <sunilvl@ventanamicro.com>; Liming Gao <gaoliming@byosoft.com.cn>; Zhiguang Liu <zhiguang.liu@intel.com>; Michael D Kinney <michael.d.kinney@intel.com>
> > Subject: Re: [edk2-devel] [PATCH V3 00/12] Migrate ArmVirtPkg modules to OvmfPkg
> >
> >
> >
> > Hi Ard,
> >
> > This way reduces the impact of MdePkg. We can try it.
> >
> >
> >
> > Thanks
> >
> > Abner
> >
> >
> >
> > ________________________________
> >
> > From: devel@edk2.groups.io <devel@edk2.groups.io> on behalf of Ard Biesheuvel <ardb@kernel.org>
> > Sent: Tuesday, October 5, 2021 5:30 PM
> > To: edk2-devel-groups-io <devel@edk2.groups.io>; Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com>
> > Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>; Leif Lindholm <leif@nuviainc.com>; Sami Mujawar <sami.mujawar@arm.com>; Jiewen Yao <jiewen.yao@intel.com>; Jordan Justen <jordan.l.justen@intel.com>; Gerd Hoffmann <kraxel@redhat.com>; Schaefer, Daniel <daniel.schaefer@hpe.com>; Sunil V L <sunilvl@ventanamicro.com>; Liming Gao <gaoliming@byosoft.com.cn>; Zhiguang Liu <zhiguang.liu@intel.com>; Michael D Kinney <michael.d.kinney@intel.com>
> > Subject: Re: [edk2-devel] [PATCH V3 00/12] Migrate ArmVirtPkg modules to OvmfPkg
> >
> >
> >
> > On Thu, 30 Sept 2021 at 03:43, Abner Chang <abner.chang@hpe.com> wrote:
> > >
> > > In V3: Address comments on V2.
> > > In V2: Remove HPE license on the files that just moved around or
> > >        the changes in the file are just code removal.
> > >
> > > edk2 BZ #: 3665
> > > edk2 platform corresponding changes will be submitted after
> > > this pactch set is reviewed.
> > >
> > > This pacthes set is to migrate some modules from ArmVirtPkg
> > > to under OvmfPkg for the upcoming RiscVVirtPkg that can leverage
> > > those modules without the dependency with Arm*Pkg.
> > >
> > > The modules moved from ArmVirtPkg to OvmfPkg are,
> > > - FdtClientDxe
> > > - PciPcdProducerLib
> > > - HighMemDxe
> > > - QemuFwCfgLib
> > > - FdtPciHostBridgeLib
> > > - VirtioFdtDxe
> > >
> > > Below PCDs are moved to under MdePkg and leverage by RiscVVirtPkg.
> > > This change also remove the dependency on ArmPkg of OvmfPkg.
> > > - PcdPciIoTranslation
> > > - PcdPciIoTranslation
> > > - PcdPciMmio32(64)Translation
> > >
> > > Signed-off-by: Abner Chang <abner.chang@hpe.com>
> > > Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
> > > Cc: Leif Lindholm <leif@nuviainc.com>
> > > Cc: Sami Mujawar <sami.mujawar@arm.com>
> > > Cc: Jiewen Yao <jiewen.yao@intel.com>
> > > Cc: Jordan Justen <jordan.l.justen@intel.com>
> > > Cc: Gerd Hoffmann <kraxel@redhat.com>
> > > Cc: Daniel Schaefer <daniel.schaefer@hpe.com>
> > > Cc: Sunil V L <sunilvl@ventanamicro.com>
> > > Cc: Liming Gao <gaoliming@byosoft.com.cn>
> > > Cc: Zhiguang Liu <zhiguang.liu@intel.com>
> > > Cc: Michael D Kinney <michael.d.kinney@intel.com>
> > >
> > > Abner Chang (12):
> > >   ArmVirtPkg/FdtClintDxe: Move FdtClientDxe to EmbeddedPkg
> > >   MdePkg: Add PcdPciIoTranslation PCD
> > >   ArmPkg: Use PcdPciIoTranslation PCD from MdePkg
> > >   ArmVirtPkg/FdtPciPcdProducerLib: Relocate PciPcdProducerLib to OvmfPkg
> > >   ArmVirtPkg/HighMemDxe: Relocate HighMemDxe to OvmfPkg
> > >   OvmfPkg/HighMemDxe: Add RISC-V in the supported arch.
> > >   ArmVirtPkg/QemuFwCfgLib: Relocate QemuFwCfgLib to OvmfPkg
> > >   OvmfPkg/QemuFwCfgLibMMIO: Add RISC-V arch support
> > >   MdePkg: Add PcdPciMmio32(64)Translation PCDs
> > >   ArmVirtPkg/FdtPciHostBridgeLib: Relocate FdtPciHostBridgeLib to
> > >     OvmfPkg/Fdt
> > >   OvmfPkg/FdtPciHostBridgeLib: Add RISC-V in the supported arch.
> > >   ArmVirtPkg/VirtioFdtDxe: Relocate VirtioFdtDxe to OvmfPkg/Fdt
> > >
> >
> > Hello all,
> >
> > These patches look ok to me, but I wonder if the MdePkg maintainers
> > are happy taking these PCD declaration changes. Translations for PCIe
> > are typically defined per host bridge, and I would rather move away
> > from using PCDs for this entirely than 'promote' them by carrying them
> > in MdePkg.
> >
> > As this issue is somewhat orthogonal to what Abner is trying to fix,
> > perhaps it is better to avoid MdePkg changes for now, and just
> > duplicate these PCDs into OvmfPkg. This is reasonable, given that we
> > know that QEMU only exposes a single host bridge.
> >
> > The one in ArmPkg can hopefully be removed and replaced with something
> > that is more appropriate.
> >
> >
> > >  ArmPkg/ArmPkg.dec                             | 15 ++++++--------
> > >  ArmVirtPkg/ArmVirtPkg.dec                     |  3 ---
> > >  EmbeddedPkg/EmbeddedPkg.dec                   |  1 +
> > >  MdePkg/MdePkg.dec                             | 12 +++++++++++
> > >  ArmVirtPkg/ArmVirtCloudHv.dsc                 | 18 ++++++++---------
> > >  ArmVirtPkg/ArmVirtKvmTool.dsc                 | 18 ++++++++---------
> > >  ArmVirtPkg/ArmVirtQemu.dsc                    | 20 +++++++++----------
> > >  ArmVirtPkg/ArmVirtQemuKernel.dsc              | 20 +++++++++----------
> > >  ArmVirtPkg/ArmVirtXen.dsc                     |  2 +-
> > >  EmbeddedPkg/EmbeddedPkg.dsc                   |  1 +
> > >  ArmVirtPkg/ArmVirtCloudHv.fdf                 |  6 +++---
> > >  ArmVirtPkg/ArmVirtKvmTool.fdf                 |  6 +++---
> > >  ArmVirtPkg/ArmVirtXen.fdf                     |  2 +-
> > >  ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc          |  6 +++---
> > >  .../ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf       |  2 +-
> > >  .../ArmVirtGicArchLib/ArmVirtGicArchLib.inf   |  1 +
> > >  .../ArmVirtPL031FdtClientLib.inf              |  1 +
> > >  .../ArmVirtPsciResetSystemLib.inf             |  1 +
> > >  .../ArmVirtTimerFdtClientLib.inf              |  1 +
> > >  .../KvmtoolRtcFdtClientLib.inf                |  1 +
> > >  .../NorFlashKvmtoolLib/NorFlashKvmtoolLib.inf |  1 +
> > >  .../NorFlashQemuLib/NorFlashQemuLib.inf       |  1 +
> > >  .../XenAcpiPlatformDxe/XenAcpiPlatformDxe.inf |  1 +
> > >  ArmVirtPkg/XenioFdtDxe/XenioFdtDxe.inf        |  1 +
> > >  .../Drivers}/FdtClientDxe/FdtClientDxe.inf    |  1 -
> > >  .../FdtPciHostBridgeLib.inf                   | 11 +++++-----
> > >  .../FdtPciPcdProducerLib.inf                  |  5 ++---
> > >  .../Fdt}/HighMemDxe/HighMemDxe.inf            |  7 ++++---
> > >  .../Fdt}/VirtioFdtDxe/VirtioFdtDxe.inf        |  2 +-
> > >  .../Library/QemuFwCfgLib/QemuFwCfgLibMmio.inf |  6 +++---
> > >  .../Include/Protocol/FdtClient.h              |  0
> > >  .../Drivers}/FdtClientDxe/FdtClientDxe.c      |  0
> > >  .../FdtPciHostBridgeLib/FdtPciHostBridgeLib.c |  0
> > >  .../FdtPciPcdProducerLib.c                    |  0
> > >  .../Fdt}/HighMemDxe/HighMemDxe.c              |  3 ++-
> > >  .../Fdt}/VirtioFdtDxe/VirtioFdtDxe.c          |  0
> > >  .../Library/QemuFwCfgLib/QemuFwCfgLibMmio.c   |  7 ++++---
> > >  Maintainers.txt                               |  6 ++++++
> > >  38 files changed, 106 insertions(+), 83 deletions(-)
> > >  rename {ArmVirtPkg => EmbeddedPkg/Drivers}/FdtClientDxe/FdtClientDxe.inf (92%)
> > >  rename {ArmVirtPkg/Library => OvmfPkg/Fdt}/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf (77%)
> > >  rename {ArmVirtPkg/Library => OvmfPkg/Fdt}/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf (87%)
> > >  rename {ArmVirtPkg => OvmfPkg/Fdt}/HighMemDxe/HighMemDxe.inf (83%)
> > >  rename {ArmVirtPkg => OvmfPkg/Fdt}/VirtioFdtDxe/VirtioFdtDxe.inf (92%)
> > >  rename ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLib.inf => OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibMmio.inf (86%)
> > >  rename {ArmVirtPkg => EmbeddedPkg}/Include/Protocol/FdtClient.h (100%)
> > >  rename {ArmVirtPkg => EmbeddedPkg/Drivers}/FdtClientDxe/FdtClientDxe.c (100%)
> > >  rename {ArmVirtPkg/Library => OvmfPkg/Fdt}/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c (100%)
> > >  rename {ArmVirtPkg/Library => OvmfPkg/Fdt}/FdtPciPcdProducerLib/FdtPciPcdProducerLib.c (100%)
> > >  rename {ArmVirtPkg => OvmfPkg/Fdt}/HighMemDxe/HighMemDxe.c (95%)
> > >  rename {ArmVirtPkg => OvmfPkg/Fdt}/VirtioFdtDxe/VirtioFdtDxe.c (100%)
> > >  rename ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLib.c => OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibMmio.c (93%)
> > >
> > > --
> > > 2.17.1
> > >
> > >
> > >
> > >
> > >
> > >
> >
> > 

^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2021-10-14 10:57 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-09-30  0:45 [PATCH V3 00/12] Migrate ArmVirtPkg modules to OvmfPkg Abner Chang
2021-09-30  0:45 ` [PATCH V3 01/12] ArmVirtPkg/FdtClintDxe: Move FdtClientDxe to EmbeddedPkg Abner Chang
2021-09-30  0:45 ` [PATCH V3 02/12] MdePkg: Add PcdPciIoTranslation PCD Abner Chang
2021-09-30  0:45 ` [PATCH V3 03/12] ArmPkg: Use PcdPciIoTranslation PCD from MdePkg Abner Chang
2021-09-30  0:45 ` [PATCH V3 04/12] ArmVirtPkg/FdtPciPcdProducerLib: Relocate PciPcdProducerLib to OvmfPkg Abner Chang
2021-09-30  0:45 ` [PATCH V3 05/12] ArmVirtPkg/HighMemDxe: Relocate HighMemDxe " Abner Chang
2021-09-30  0:45 ` [PATCH V3 06/12] OvmfPkg/HighMemDxe: Add RISC-V in the supported arch Abner Chang
2021-09-30  0:45 ` [PATCH V3 07/12] ArmVirtPkg/QemuFwCfgLib: Relocate QemuFwCfgLib to OvmfPkg Abner Chang
2021-09-30  0:45 ` [PATCH V3 08/12] OvmfPkg/QemuFwCfgLibMMIO: Add RISC-V arch support Abner Chang
2021-09-30  0:45 ` [PATCH V3 09/12] MdePkg: Add PcdPciMmio32(64)Translation PCDs Abner Chang
2021-09-30  0:45 ` [PATCH V3 10/12] ArmVirtPkg/FdtPciHostBridgeLib: Relocate FdtPciHostBridgeLib to OvmfPkg/Fdt Abner Chang
2021-09-30  0:45 ` [PATCH V3 11/12] OvmfPkg/FdtPciHostBridgeLib: Add RISC-V in the supported arch Abner Chang
2021-09-30  0:45 ` [PATCH V3 12/12] ArmVirtPkg/VirtioFdtDxe: Relocate VirtioFdtDxe to OvmfPkg/Fdt Abner Chang
2021-09-30  2:39 ` [edk2-devel] [PATCH V3 00/12] Migrate ArmVirtPkg modules to OvmfPkg Yao, Jiewen
2021-09-30  7:12 ` Gerd Hoffmann
2021-10-03  8:11 ` Daniel Schaefer
2021-10-04 10:05 ` Sunil V L
2021-10-05  9:30 ` [edk2-devel] " Ard Biesheuvel
2021-10-05 15:00   ` Abner Chang
     [not found]   ` <16AB2A90260D3DD8.20282@groups.io>
2021-10-06  9:27     ` Abner Chang
2021-10-08  3:14       ` 回复: " gaoliming
2021-10-08  3:39         ` Abner Chang
2021-10-11  1:22           ` 回复: " gaoliming
2021-10-12  4:16             ` Abner Chang
2021-10-14  9:51               ` Ard Biesheuvel
2021-10-14 10:13                 ` Abner Chang
2021-10-14 10:57                   ` Ard Biesheuvel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox