[PATCH 0/2] Migrate ArmVirtPkg BaseCachingPciExpressLib


Abner Chang
 

Clone BaseCachingPciExpressLib library from ArmVirtPkg to under OvmfPkg.
RISC-V Virt platform can leverage the same library to access PCI Express
registers through PCI Express base address set in PcdPciExpressBaseAddress
and cached in a global variable. Also remove the one under ArmVirtPkg.

Signed-off-by: Abner Chang <abner.chang@hpe.com>
Cc: Daniel Schaefer <daniel.schaefer@hpe.com>
Cc: Sunil V L <sunilvl@ventanamicro.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: Leif Lindholm <leif@nuviainc.com>
Cc: Sami Mujawar <sami.mujawar@arm.com>

Abner Chang (2):
OvmfPkg/BaseCachingPciExpressLib: Clone ArmVirtPkg
BaseCachingPciExpressLib
ArmVirtPkg/BaseCachingPciExpressLib: Remove BaseCachingPciExpressLib

ArmVirtPkg/ArmVirt.dsc.inc | 2 +-
ArmVirtPkg/ArmVirtKvmTool.dsc | 6 +++---
.../BaseCachingPciExpressLib/BaseCachingPciExpressLib.inf | 5 +++--
.../Library/BaseCachingPciExpressLib/PciExpressLib.c | 0
4 files changed, 7 insertions(+), 6 deletions(-)
rename {ArmVirtPkg => OvmfPkg}/Library/BaseCachingPciExpressLib/BaseCachingPciExpressLib.inf (87%)
rename {ArmVirtPkg => OvmfPkg}/Library/BaseCachingPciExpressLib/PciExpressLib.c (100%)

--
2.31.1


Gerd Hoffmann
 

On Mon, Jan 24, 2022 at 09:52:07PM +0800, Abner Chang wrote:
Clone BaseCachingPciExpressLib library from ArmVirtPkg to under OvmfPkg.
RISC-V Virt platform can leverage the same library to access PCI Express
registers through PCI Express base address set in PcdPciExpressBaseAddress
and cached in a global variable. Also remove the one under ArmVirtPkg.

Signed-off-by: Abner Chang <abner.chang@hpe.com>
Cc: Daniel Schaefer <daniel.schaefer@hpe.com>
Cc: Sunil V L <sunilvl@ventanamicro.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: Leif Lindholm <leif@nuviainc.com>
Cc: Sami Mujawar <sami.mujawar@arm.com>
Given you are mostly moving code around as git noticed ...

rename {ArmVirtPkg => OvmfPkg}/Library/BaseCachingPciExpressLib/BaseCachingPciExpressLib.inf (87%)
rename {ArmVirtPkg => OvmfPkg}/Library/BaseCachingPciExpressLib/PciExpressLib.c (100%)
... it doesn't make sense to split that into two patches.

Just using "git mv" instead has the additional advantage to keep the git
history intact (using 'git log --follow').

take care,
Gerd


Abner Chang
 

Hi package owners,
Please take a look at this patch, this patch moves ArmVirtPkg BaseCachingPciExpressLib to OvmfPkg for OvmfRiscV64.

Thanks
Abner


From: devel@edk2.groups.io <devel@edk2.groups.io> on behalf of Abner Chang <abner.chang@...>
Sent: Monday, January 24, 2022 9:52 PM
To: devel@edk2.groups.io <devel@edk2.groups.io>
Cc: Chang, Abner (HPS SW/FW Technologist) <abner.chang@...>; Schaefer, Daniel (ROM Janitor) <daniel.schaefer@...>; Sunil V L <sunilvl@...>; Ard Biesheuvel <ardb+tianocore@...>; Jiewen Yao <jiewen.yao@...>; Jordan Justen <jordan.l.justen@...>; Gerd Hoffmann <kraxel@...>; Leif Lindholm <leif@...>; Sami Mujawar <sami.mujawar@...>
Subject: [edk2-devel] [PATCH 0/2] Migrate ArmVirtPkg BaseCachingPciExpressLib
 
Clone BaseCachingPciExpressLib library from ArmVirtPkg to under OvmfPkg.
RISC-V Virt platform can leverage the same library to access PCI Express
registers through PCI Express base address set in PcdPciExpressBaseAddress
and cached in a global variable. Also remove the one under ArmVirtPkg.

Signed-off-by: Abner Chang <abner.chang@...>
Cc: Daniel Schaefer <daniel.schaefer@...>
Cc: Sunil V L <sunilvl@...>
Cc: Ard Biesheuvel <ardb+tianocore@...>
Cc: Jiewen Yao <jiewen.yao@...>
Cc: Jordan Justen <jordan.l.justen@...>
Cc: Gerd Hoffmann <kraxel@...>
Cc: Leif Lindholm <leif@...>
Cc: Sami Mujawar <sami.mujawar@...>

Abner Chang (2):
  OvmfPkg/BaseCachingPciExpressLib: Clone ArmVirtPkg
    BaseCachingPciExpressLib
  ArmVirtPkg/BaseCachingPciExpressLib: Remove BaseCachingPciExpressLib

 ArmVirtPkg/ArmVirt.dsc.inc                                  | 2 +-
 ArmVirtPkg/ArmVirtKvmTool.dsc                               | 6 +++---
 .../BaseCachingPciExpressLib/BaseCachingPciExpressLib.inf   | 5 +++--
 .../Library/BaseCachingPciExpressLib/PciExpressLib.c        | 0
 4 files changed, 7 insertions(+), 6 deletions(-)
 rename {ArmVirtPkg => OvmfPkg}/Library/BaseCachingPciExpressLib/BaseCachingPciExpressLib.inf (87%)
 rename {ArmVirtPkg => OvmfPkg}/Library/BaseCachingPciExpressLib/PciExpressLib.c (100%)

--
2.31.1







Ard Biesheuvel
 

On Fri, 28 Jan 2022 at 17:14, Abner Chang <abner.chang@hpe.com> wrote:

Hi package owners,
Please take a look at this patch, this patch moves ArmVirtPkg BaseCachingPciExpressLib to OvmfPkg for OvmfRiscV64.
Do you intend to incorporate Gerd's feedback?


________________________________
From: devel@edk2.groups.io <devel@edk2.groups.io> on behalf of Abner Chang <abner.chang@hpe.com>
Sent: Monday, January 24, 2022 9:52 PM
To: devel@edk2.groups.io <devel@edk2.groups.io>
Cc: Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com>; Schaefer, Daniel (ROM Janitor) <daniel.schaefer@hpe.com>; Sunil V L <sunilvl@ventanamicro.com>; Ard Biesheuvel <ardb+tianocore@kernel.org>; Jiewen Yao <jiewen.yao@intel.com>; Jordan Justen <jordan.l.justen@intel.com>; Gerd Hoffmann <kraxel@redhat.com>; Leif Lindholm <leif@nuviainc.com>; Sami Mujawar <sami.mujawar@arm.com>
Subject: [edk2-devel] [PATCH 0/2] Migrate ArmVirtPkg BaseCachingPciExpressLib

Clone BaseCachingPciExpressLib library from ArmVirtPkg to under OvmfPkg.
RISC-V Virt platform can leverage the same library to access PCI Express
registers through PCI Express base address set in PcdPciExpressBaseAddress
and cached in a global variable. Also remove the one under ArmVirtPkg.

Signed-off-by: Abner Chang <abner.chang@hpe.com>
Cc: Daniel Schaefer <daniel.schaefer@hpe.com>
Cc: Sunil V L <sunilvl@ventanamicro.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: Leif Lindholm <leif@nuviainc.com>
Cc: Sami Mujawar <sami.mujawar@arm.com>

Abner Chang (2):
OvmfPkg/BaseCachingPciExpressLib: Clone ArmVirtPkg
BaseCachingPciExpressLib
ArmVirtPkg/BaseCachingPciExpressLib: Remove BaseCachingPciExpressLib

ArmVirtPkg/ArmVirt.dsc.inc | 2 +-
ArmVirtPkg/ArmVirtKvmTool.dsc | 6 +++---
.../BaseCachingPciExpressLib/BaseCachingPciExpressLib.inf | 5 +++--
.../Library/BaseCachingPciExpressLib/PciExpressLib.c | 0
4 files changed, 7 insertions(+), 6 deletions(-)
rename {ArmVirtPkg => OvmfPkg}/Library/BaseCachingPciExpressLib/BaseCachingPciExpressLib.inf (87%)
rename {ArmVirtPkg => OvmfPkg}/Library/BaseCachingPciExpressLib/PciExpressLib.c (100%)

--
2.31.1







Abner Chang
 

Thanks for the reminder. Apparently, I missed Gerd's feedback. His reply is buried with another patch set he sent in my mailbox.

Abner


From: Ard Biesheuvel <ardb@...>
Sent: Saturday, January 29, 2022 2:06 AM
To: edk2-devel-groups-io <devel@edk2.groups.io>; Chang, Abner (HPS SW/FW Technologist) <abner.chang@...>
Cc: Schaefer, Daniel (ROM Janitor) <daniel.schaefer@...>; Sunil V L <sunilvl@...>; Ard Biesheuvel <ardb+tianocore@...>; Jiewen Yao <jiewen.yao@...>; Jordan Justen <jordan.l.justen@...>; Gerd Hoffmann <kraxel@...>; Leif Lindholm <leif@...>; Sami Mujawar <sami.mujawar@...>
Subject: Re: [edk2-devel] [PATCH 0/2] Migrate ArmVirtPkg BaseCachingPciExpressLib
 
On Fri, 28 Jan 2022 at 17:14, Abner Chang <abner.chang@...> wrote:
>
> Hi package owners,
> Please take a look at this patch, this patch moves ArmVirtPkg BaseCachingPciExpressLib to OvmfPkg for OvmfRiscV64.
>

Do you intend to incorporate Gerd's feedback?

>
> ________________________________
> From: devel@edk2.groups.io <devel@edk2.groups.io> on behalf of Abner Chang <abner.chang@...>
> Sent: Monday, January 24, 2022 9:52 PM
> To: devel@edk2.groups.io <devel@edk2.groups.io>
> Cc: Chang, Abner (HPS SW/FW Technologist) <abner.chang@...>; Schaefer, Daniel (ROM Janitor) <daniel.schaefer@...>; Sunil V L <sunilvl@...>; Ard Biesheuvel <ardb+tianocore@...>; Jiewen Yao <jiewen.yao@...>; Jordan Justen <jordan.l.justen@...>; Gerd Hoffmann <kraxel@...>; Leif Lindholm <leif@...>; Sami Mujawar <sami.mujawar@...>
> Subject: [edk2-devel] [PATCH 0/2] Migrate ArmVirtPkg BaseCachingPciExpressLib
>
> Clone BaseCachingPciExpressLib library from ArmVirtPkg to under OvmfPkg.
> RISC-V Virt platform can leverage the same library to access PCI Express
> registers through PCI Express base address set in PcdPciExpressBaseAddress
> and cached in a global variable. Also remove the one under ArmVirtPkg.
>
> Signed-off-by: Abner Chang <abner.chang@...>
> Cc: Daniel Schaefer <daniel.schaefer@...>
> Cc: Sunil V L <sunilvl@...>
> Cc: Ard Biesheuvel <ardb+tianocore@...>
> Cc: Jiewen Yao <jiewen.yao@...>
> Cc: Jordan Justen <jordan.l.justen@...>
> Cc: Gerd Hoffmann <kraxel@...>
> Cc: Leif Lindholm <leif@...>
> Cc: Sami Mujawar <sami.mujawar@...>
>
> Abner Chang (2):
>   OvmfPkg/BaseCachingPciExpressLib: Clone ArmVirtPkg
>     BaseCachingPciExpressLib
>   ArmVirtPkg/BaseCachingPciExpressLib: Remove BaseCachingPciExpressLib
>
>  ArmVirtPkg/ArmVirt.dsc.inc                                  | 2 +-
>  ArmVirtPkg/ArmVirtKvmTool.dsc                               | 6 +++---
>  .../BaseCachingPciExpressLib/BaseCachingPciExpressLib.inf   | 5 +++--
>  .../Library/BaseCachingPciExpressLib/PciExpressLib.c        | 0
>  4 files changed, 7 insertions(+), 6 deletions(-)
>  rename {ArmVirtPkg => OvmfPkg}/Library/BaseCachingPciExpressLib/BaseCachingPciExpressLib.inf (87%)
>  rename {ArmVirtPkg => OvmfPkg}/Library/BaseCachingPciExpressLib/PciExpressLib.c (100%)
>
> --
> 2.31.1
>
>
>
>
>
>


Abner Chang
 

-----Original Message-----
From: Gerd Hoffmann <kraxel@redhat.com>
Sent: Thursday, January 27, 2022 9:20 PM
To: devel@edk2.groups.io; Chang, Abner (HPS SW/FW Technologist)
<abner.chang@hpe.com>
Cc: Schaefer, Daniel (ROM Janitor) <daniel.schaefer@hpe.com>; Sunil V L
<sunilvl@ventanamicro.com>; Ard Biesheuvel <ardb+tianocore@kernel.org>;
Jiewen Yao <jiewen.yao@intel.com>; Jordan Justen
<jordan.l.justen@intel.com>; Leif Lindholm <leif@nuviainc.com>; Sami
Mujawar <sami.mujawar@arm.com>
Subject: Re: [edk2-devel] [PATCH 0/2] Migrate ArmVirtPkg
BaseCachingPciExpressLib

On Mon, Jan 24, 2022 at 09:52:07PM +0800, Abner Chang wrote:
Clone BaseCachingPciExpressLib library from ArmVirtPkg to under OvmfPkg.
RISC-V Virt platform can leverage the same library to access PCI Express
registers through PCI Express base address set in
PcdPciExpressBaseAddress
and cached in a global variable. Also remove the one under ArmVirtPkg.

Signed-off-by: Abner Chang <abner.chang@hpe.com>
Cc: Daniel Schaefer <daniel.schaefer@hpe.com>
Cc: Sunil V L <sunilvl@ventanamicro.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: Leif Lindholm <leif@nuviainc.com>
Cc: Sami Mujawar <sami.mujawar@arm.com>
Given you are mostly moving code around as git noticed ...

rename {ArmVirtPkg =>
OvmfPkg}/Library/BaseCachingPciExpressLib/BaseCachingPciExpressLib.inf
(87%)
rename {ArmVirtPkg =>
OvmfPkg}/Library/BaseCachingPciExpressLib/PciExpressLib.c (100%)

... it doesn't make sense to split that into two patches.
Hi Gerd,
I missed this message.
Because the movement impacts two packages thus I split this change into two patches. I just realized that you are the reviewer of these two packages, I will send the v2 that keeps the git history.

Thanks
Abner


Just using "git mv" instead has the additional advantage to keep the git
history intact (using 'git log --follow').

take care,
Gerd