[edk2-devel] [PATCH edk2-platforms 0/2] Platform/ARM/Juno: remove explicit PCIe enumeration

Ard Biesheuvel posted 2 patches 4 years, 4 months ago
Failed in applying to current master (apply log)
.../JunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c   | 163 ++++--------------
.../JunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.inf |   1 -
2 files changed, 31 insertions(+), 133 deletions(-)
[edk2-devel] [PATCH edk2-platforms 0/2] Platform/ARM/Juno: remove explicit PCIe enumeration
Posted by Ard Biesheuvel 4 years, 4 months ago
The platform DXE driver of the Juno platform enumerates the PCIe explicitly
by calling ConnectController on the PCIe root bridge, in order to ensure
that all PCI I/O protocols have been instantiated when we try to locate the
one describing the Marvel Yukon NIC, so that we can program its MAC address.

Taking control of core firmware behavior like this has already caused
confusion when reasoning about why and when PCIe option ROMs get dispatched,
and is likely to cause more confusion down the road.

So let's fix this, by triggering the MAC programming via a protocol notify
on the PCI I/O protocol.

This has been build tested only at the moment.

Cc: Sami Mujawar <sami.mujawar@arm.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Leif Lindholm <leif.lindholm@linaro.org>

Ard Biesheuvel (2):
  Platform/ARM/ArmJunoDxe: make mAcpiRegistration STATIC
  Platform/ARM/ArmJunoDxe: use PciIo protocol notify to program the MAC

 .../JunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c   | 163 ++++--------------
 .../JunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.inf |   1 -
 2 files changed, 31 insertions(+), 133 deletions(-)

-- 
2.17.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#51828): https://edk2.groups.io/g/devel/message/51828
Mute This Topic: https://groups.io/mt/67467391/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [PATCH edk2-platforms 0/2] Platform/ARM/Juno: remove explicit PCIe enumeration
Posted by Leif Lindholm 4 years, 4 months ago
On Fri, Dec 06, 2019 at 11:02:17 +0000, Ard Biesheuvel wrote:
> The platform DXE driver of the Juno platform enumerates the PCIe explicitly
> by calling ConnectController on the PCIe root bridge, in order to ensure
> that all PCI I/O protocols have been instantiated when we try to locate the
> one describing the Marvel Yukon NIC, so that we can program its MAC address.
> 
> Taking control of core firmware behavior like this has already caused
> confusion when reasoning about why and when PCIe option ROMs get dispatched,
> and is likely to cause more confusion down the road.
> 
> So let's fix this, by triggering the MAC programming via a protocol notify
> on the PCI I/O protocol.
> 
> This has been build tested only at the moment.
> 
> Cc: Sami Mujawar <sami.mujawar@arm.com>
> Cc: Laszlo Ersek <lersek@redhat.com>
> Cc: Leif Lindholm <leif.lindholm@linaro.org>

This looks sensible to me (and way more can-of-wormish than I would
have expected) - so:
Acked-by: Leif Lindholm <leif.lindholm@linaro.org>
*but* we need tested-by from somewhere before merging 2/2.

1/2 could go in whenever.

/
    Leif

> Ard Biesheuvel (2):
>   Platform/ARM/ArmJunoDxe: make mAcpiRegistration STATIC
>   Platform/ARM/ArmJunoDxe: use PciIo protocol notify to program the MAC
> 
>  .../JunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c   | 163 ++++--------------
>  .../JunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.inf |   1 -
>  2 files changed, 31 insertions(+), 133 deletions(-)
> 
> -- 
> 2.17.1
> 

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#51833): https://edk2.groups.io/g/devel/message/51833
Mute This Topic: https://groups.io/mt/67467391/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [PATCH edk2-platforms 0/2] Platform/ARM/Juno: remove explicit PCIe enumeration
Posted by Sami Mujawar 4 years, 4 months ago
Tested on Juno R2, the MAC address for Marvel Yukon NIC is programmed correctly.

Tested-by: Sami Mujawar <sami.mujawar@arm.com>

Regards,

Sami Mujawar
-----Original Message-----
From: Leif Lindholm <leif.lindholm@linaro.org>
Sent: 06 December 2019 11:13 AM
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: devel@edk2.groups.io; Sami Mujawar <Sami.Mujawar@arm.com>; Laszlo Ersek <lersek@redhat.com>
Subject: Re: [PATCH edk2-platforms 0/2] Platform/ARM/Juno: remove explicit PCIe enumeration

On Fri, Dec 06, 2019 at 11:02:17 +0000, Ard Biesheuvel wrote:
> The platform DXE driver of the Juno platform enumerates the PCIe
> explicitly by calling ConnectController on the PCIe root bridge, in
> order to ensure that all PCI I/O protocols have been instantiated when
> we try to locate the one describing the Marvel Yukon NIC, so that we can program its MAC address.
>
> Taking control of core firmware behavior like this has already caused
> confusion when reasoning about why and when PCIe option ROMs get
> dispatched, and is likely to cause more confusion down the road.
>
> So let's fix this, by triggering the MAC programming via a protocol
> notify on the PCI I/O protocol.
>
> This has been build tested only at the moment.
>
> Cc: Sami Mujawar <sami.mujawar@arm.com>
> Cc: Laszlo Ersek <lersek@redhat.com>
> Cc: Leif Lindholm <leif.lindholm@linaro.org>

This looks sensible to me (and way more can-of-wormish than I would have expected) - so:
Acked-by: Leif Lindholm <leif.lindholm@linaro.org>
*but* we need tested-by from somewhere before merging 2/2.

1/2 could go in whenever.

/
    Leif

> Ard Biesheuvel (2):
>   Platform/ARM/ArmJunoDxe: make mAcpiRegistration STATIC
>   Platform/ARM/ArmJunoDxe: use PciIo protocol notify to program the
> MAC
>
>  .../JunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c   | 163 ++++--------------
>  .../JunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.inf |   1 -
>  2 files changed, 31 insertions(+), 133 deletions(-)
>
> --
> 2.17.1
>
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#51868): https://edk2.groups.io/g/devel/message/51868
Mute This Topic: https://groups.io/mt/67467391/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [PATCH edk2-platforms 0/2] Platform/ARM/Juno: remove explicit PCIe enumeration
Posted by Ard Biesheuvel 4 years, 4 months ago
On Fri, 6 Dec 2019 at 11:41, Sami Mujawar <Sami.Mujawar@arm.com> wrote:
>
> Tested on Juno R2, the MAC address for Marvel Yukon NIC is programmed correctly.
>
> Tested-by: Sami Mujawar <sami.mujawar@arm.com>
>

Thanks all

Pushed as 8b72f720d53e..1e4952d63b63 (with two instances of EFI_EVENT
converted to VOID*)

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#51957): https://edk2.groups.io/g/devel/message/51957
Mute This Topic: https://groups.io/mt/67467391/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-