From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by mx.groups.io with SMTP id smtpd.web09.23280.1633426228008924281 for ; Tue, 05 Oct 2021 02:30:28 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DaOta92E; spf=pass (domain: kernel.org, ip: 198.145.29.99, mailfrom: ardb@kernel.org) Received: by mail.kernel.org (Postfix) with ESMTPSA id 5730461507 for ; Tue, 5 Oct 2021 09:30:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1633426227; bh=JmGFp8r5SjwntcvlgZdVCsTE5TCa4vk+t7JNI9W7U9U=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=DaOta92E1HDApc1SX8gJqryncHuvHNhaXvR/pNP9zHpLfwcXnj1nrL7FALFFPm0/E RV9jFV/XMk0TscFV4Em7NTrGyRJgPyNmuYiXAqITPtzO0As18pwB8raLP/3ykz9qJ/ 02lBtc8cYC0/vX4rHWnfxWbeFfhAHo6KXSQas39UqglgUbcZgQBjgst1cJPyY2uDTR bSJ/ZNKRVI8wQ5TqnUSK5gx0K41dSU+jKgMDbRxyTRaK5mGeBLceOX54k5yJ4u7tAg Vy73L1ekDNyKnV/GsUjCVTuvNwJNF4eLNGzGnTHHOSkysmhHqV8nTBiXW57QMr3hAo KbiCDfiLbeyOw== Received: by mail-oi1-f180.google.com with SMTP id w206so25407761oiw.4 for ; Tue, 05 Oct 2021 02:30:27 -0700 (PDT) X-Gm-Message-State: AOAM5321Nhi2FmYpyXrWOhq+OmTJMld64gfoiwUhAXGlYzTHBCKpPEvS Ptm9Sn2h0XB57v4yDMsXYHrNPu35Akp3hJU8YA0= X-Google-Smtp-Source: ABdhPJwbZ6bijpnsFjFHcXt1e0k4k/H4Z+Ow7kK/dkF/AkJRMscMJiIhU8QyKqZ8poR9ROxDxMxcVSVb3hY9g9uol4s= X-Received: by 2002:aca:32c2:: with SMTP id y185mr1647607oiy.47.1633426226697; Tue, 05 Oct 2021 02:30:26 -0700 (PDT) MIME-Version: 1.0 References: <20210930004548.3033-1-abner.chang@hpe.com> In-Reply-To: <20210930004548.3033-1-abner.chang@hpe.com> From: "Ard Biesheuvel" Date: Tue, 5 Oct 2021 11:30:15 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [edk2-devel] [PATCH V3 00/12] Migrate ArmVirtPkg modules to OvmfPkg 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 Content-Type: text/plain; charset="UTF-8" On Thu, 30 Sept 2021 at 03:43, 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 > Cc: Ard Biesheuvel > Cc: Leif Lindholm > Cc: Sami Mujawar > Cc: Jiewen Yao > Cc: Jordan Justen > Cc: Gerd Hoffmann > Cc: Daniel Schaefer > Cc: Sunil V L > Cc: Liming Gao > Cc: Zhiguang Liu > Cc: Michael D Kinney > > 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 > > > > > >