[edk2-devel] [PATCH edk2-platforms v2 0/7] Add Broadcom GENET driver for RPi4

Ard Biesheuvel posted 7 patches 3 years, 11 months ago
Failed in applying to current master (apply log)
There is a newer version of this series
Silicon/Broadcom/Bcm27xx/Bcm27xx.dec          |   2 +
Silicon/Broadcom/Drivers/Net/BcmNet.dec       |   8 +-
Platform/RaspberryPi/RPi4/RPi4.dsc            |   8 +-
Platform/RaspberryPi/RPi4/RPi4.fdf            |   1 -
.../RaspberryPi/AcpiTables/AcpiTables.inf     |   2 +-
.../Drivers/ConfigDxe/ConfigDxe.inf           |  29 +-
.../Library/PlatformPcdLib/PlatformPcdLib.inf |  43 -
.../Drivers/Net/BcmGenetDxe/BcmGenetDxe.inf   |  46 +-
.../Include/IndustryStandard/Bcm2711.h        |   3 +
.../Drivers/Net/BcmGenetDxe/GenericPhy.h      | 106 +++
.../Drivers/Net/BcmGenetDxe/GenetUtil.h       | 364 ++++++++
.../Broadcom/Drivers/Net/Include/Net/Genet.h  |  21 -
.../Include/Protocol/BcmGenetPlatformDevice.h |  24 +
.../RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c | 108 ++-
.../Library/PlatformPcdLib/PlatformPcdLib.c   |  45 -
.../Drivers/Net/BcmGenetDxe/ComponentName.c   | 198 +++++
.../Drivers/Net/BcmGenetDxe/DriverBinding.c   | 408 +++++++++
.../Drivers/Net/BcmGenetDxe/GenericPhy.c      | 405 +++++++++
.../Broadcom/Drivers/Net/BcmGenetDxe/Genet.c  | 114 ---
.../Drivers/Net/BcmGenetDxe/GenetUtil.c       | 816 +++++++++++++++++
.../Drivers/Net/BcmGenetDxe/SimpleNetwork.c   | 834 ++++++++++++++++++
Platform/RaspberryPi/AcpiTables/Dsdt.asl      |   2 +-
22 files changed, 3319 insertions(+), 268 deletions(-)
delete mode 100644 Platform/RaspberryPi/Library/PlatformPcdLib/PlatformPcdLib.inf
create mode 100644 Silicon/Broadcom/Drivers/Net/BcmGenetDxe/GenericPhy.h
create mode 100644 Silicon/Broadcom/Drivers/Net/BcmGenetDxe/GenetUtil.h
delete mode 100644 Silicon/Broadcom/Drivers/Net/Include/Net/Genet.h
create mode 100644 Silicon/Broadcom/Drivers/Net/Include/Protocol/BcmGenetPlatformDevice.h
delete mode 100644 Platform/RaspberryPi/Library/PlatformPcdLib/PlatformPcdLib.c
create mode 100644 Silicon/Broadcom/Drivers/Net/BcmGenetDxe/ComponentName.c
create mode 100644 Silicon/Broadcom/Drivers/Net/BcmGenetDxe/DriverBinding.c
create mode 100644 Silicon/Broadcom/Drivers/Net/BcmGenetDxe/GenericPhy.c
delete mode 100644 Silicon/Broadcom/Drivers/Net/BcmGenetDxe/Genet.c
create mode 100644 Silicon/Broadcom/Drivers/Net/BcmGenetDxe/GenetUtil.c
create mode 100644 Silicon/Broadcom/Drivers/Net/BcmGenetDxe/SimpleNetwork.c
[edk2-devel] [PATCH edk2-platforms v2 0/7] Add Broadcom GENET driver for RPi4
Posted by Ard Biesheuvel 3 years, 11 months ago
This is a followup to Samer's v1 [0], and incorporates all the delta
changes posted for review over the past couple of days. This is a
roundup of all that work, and therefore supersedes it.

It provides an implementation of the SimpleNetworkProtocol for the
Raspberry Pi4's GENET network controller, in a way that adheres to the
UEFI driver model.

The original submission was provided by Jared, based on Jeremy's MAC
programming-only driver and the existing BSD driver for the GENET IP.
Cumulative changes and fixes as well as review feedback were provided
by all of the below.

https://github.com/ardbiesheuvel/edk2-platforms/tree/rpi4_genet_combi_v2

Cc: Pete Batard <pete@akeo.ie>
Cc: Jared McNeill <jmcneill@invisible.ca>
Cc: Andrei Warkentin <awarkentin@vmware.com>
Cc: Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>
Cc: Jeremy Linton <jeremy.linton@arm.com>

Andrei Warkentin (1):
  Platform/RaspberryPi4: Remove PlatformPcdLib

Ard Biesheuvel (6):
  Platform/RaspberryPi4: set DMA translation for BCM Genet driver
  Silicon/Broadcom: Add BcmGenetPlatformDevice protocol
  Silicon/Broadcom/BcmGenetDxe: Add GENET driver
  Platform/RaspberryPi4: Clean up PCDs out of the GENET driver
  Platform/RaspberryPi4: Register GENET platform device protocol
  Platform/RaspberryPi4: remove ASIX 88772b driver

 Silicon/Broadcom/Bcm27xx/Bcm27xx.dec          |   2 +
 Silicon/Broadcom/Drivers/Net/BcmNet.dec       |   8 +-
 Platform/RaspberryPi/RPi4/RPi4.dsc            |   8 +-
 Platform/RaspberryPi/RPi4/RPi4.fdf            |   1 -
 .../RaspberryPi/AcpiTables/AcpiTables.inf     |   2 +-
 .../Drivers/ConfigDxe/ConfigDxe.inf           |  29 +-
 .../Library/PlatformPcdLib/PlatformPcdLib.inf |  43 -
 .../Drivers/Net/BcmGenetDxe/BcmGenetDxe.inf   |  46 +-
 .../Include/IndustryStandard/Bcm2711.h        |   3 +
 .../Drivers/Net/BcmGenetDxe/GenericPhy.h      | 106 +++
 .../Drivers/Net/BcmGenetDxe/GenetUtil.h       | 364 ++++++++
 .../Broadcom/Drivers/Net/Include/Net/Genet.h  |  21 -
 .../Include/Protocol/BcmGenetPlatformDevice.h |  24 +
 .../RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c | 108 ++-
 .../Library/PlatformPcdLib/PlatformPcdLib.c   |  45 -
 .../Drivers/Net/BcmGenetDxe/ComponentName.c   | 198 +++++
 .../Drivers/Net/BcmGenetDxe/DriverBinding.c   | 408 +++++++++
 .../Drivers/Net/BcmGenetDxe/GenericPhy.c      | 405 +++++++++
 .../Broadcom/Drivers/Net/BcmGenetDxe/Genet.c  | 114 ---
 .../Drivers/Net/BcmGenetDxe/GenetUtil.c       | 816 +++++++++++++++++
 .../Drivers/Net/BcmGenetDxe/SimpleNetwork.c   | 834 ++++++++++++++++++
 Platform/RaspberryPi/AcpiTables/Dsdt.asl      |   2 +-
 22 files changed, 3319 insertions(+), 268 deletions(-)
 delete mode 100644 Platform/RaspberryPi/Library/PlatformPcdLib/PlatformPcdLib.inf
 create mode 100644 Silicon/Broadcom/Drivers/Net/BcmGenetDxe/GenericPhy.h
 create mode 100644 Silicon/Broadcom/Drivers/Net/BcmGenetDxe/GenetUtil.h
 delete mode 100644 Silicon/Broadcom/Drivers/Net/Include/Net/Genet.h
 create mode 100644 Silicon/Broadcom/Drivers/Net/Include/Protocol/BcmGenetPlatformDevice.h
 delete mode 100644 Platform/RaspberryPi/Library/PlatformPcdLib/PlatformPcdLib.c
 create mode 100644 Silicon/Broadcom/Drivers/Net/BcmGenetDxe/ComponentName.c
 create mode 100644 Silicon/Broadcom/Drivers/Net/BcmGenetDxe/DriverBinding.c
 create mode 100644 Silicon/Broadcom/Drivers/Net/BcmGenetDxe/GenericPhy.c
 delete mode 100644 Silicon/Broadcom/Drivers/Net/BcmGenetDxe/Genet.c
 create mode 100644 Silicon/Broadcom/Drivers/Net/BcmGenetDxe/GenetUtil.c
 create mode 100644 Silicon/Broadcom/Drivers/Net/BcmGenetDxe/SimpleNetwork.c

-- 
2.17.1


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

View/Reply Online (#59247): https://edk2.groups.io/g/devel/message/59247
Mute This Topic: https://groups.io/mt/74154329/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 v2 0/7] Add Broadcom GENET driver for RPi4
Posted by Ard Biesheuvel 3 years, 11 months ago
On 5/12/20 9:55 AM, Ard Biesheuvel wrote:
> This is a followup to Samer's v1 [0], and incorporates all the delta
> changes posted for review over the past couple of days. This is a
> roundup of all that work, and therefore supersedes it.
> 
> It provides an implementation of the SimpleNetworkProtocol for the
> Raspberry Pi4's GENET network controller, in a way that adheres to the
> UEFI driver model.
> 
> The original submission was provided by Jared, based on Jeremy's MAC
> programming-only driver and the existing BSD driver for the GENET IP.
> Cumulative changes and fixes as well as review feedback were provided
> by all of the below.
> 
> https://github.com/ardbiesheuvel/edk2-platforms/tree/rpi4_genet_combi_v2
> 
> Cc: Pete Batard <pete@akeo.ie>
> Cc: Jared McNeill <jmcneill@invisible.ca>
> Cc: Andrei Warkentin <awarkentin@vmware.com>
> Cc: Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>
> Cc: Jeremy Linton <jeremy.linton@arm.com>
> 

[0] https://edk2.groups.io/g/devel/message/58903

> Andrei Warkentin (1):
>    Platform/RaspberryPi4: Remove PlatformPcdLib
> 
> Ard Biesheuvel (6):
>    Platform/RaspberryPi4: set DMA translation for BCM Genet driver
>    Silicon/Broadcom: Add BcmGenetPlatformDevice protocol
>    Silicon/Broadcom/BcmGenetDxe: Add GENET driver
>    Platform/RaspberryPi4: Clean up PCDs out of the GENET driver
>    Platform/RaspberryPi4: Register GENET platform device protocol
>    Platform/RaspberryPi4: remove ASIX 88772b driver
> 
>   Silicon/Broadcom/Bcm27xx/Bcm27xx.dec          |   2 +
>   Silicon/Broadcom/Drivers/Net/BcmNet.dec       |   8 +-
>   Platform/RaspberryPi/RPi4/RPi4.dsc            |   8 +-
>   Platform/RaspberryPi/RPi4/RPi4.fdf            |   1 -
>   .../RaspberryPi/AcpiTables/AcpiTables.inf     |   2 +-
>   .../Drivers/ConfigDxe/ConfigDxe.inf           |  29 +-
>   .../Library/PlatformPcdLib/PlatformPcdLib.inf |  43 -
>   .../Drivers/Net/BcmGenetDxe/BcmGenetDxe.inf   |  46 +-
>   .../Include/IndustryStandard/Bcm2711.h        |   3 +
>   .../Drivers/Net/BcmGenetDxe/GenericPhy.h      | 106 +++
>   .../Drivers/Net/BcmGenetDxe/GenetUtil.h       | 364 ++++++++
>   .../Broadcom/Drivers/Net/Include/Net/Genet.h  |  21 -
>   .../Include/Protocol/BcmGenetPlatformDevice.h |  24 +
>   .../RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c | 108 ++-
>   .../Library/PlatformPcdLib/PlatformPcdLib.c   |  45 -
>   .../Drivers/Net/BcmGenetDxe/ComponentName.c   | 198 +++++
>   .../Drivers/Net/BcmGenetDxe/DriverBinding.c   | 408 +++++++++
>   .../Drivers/Net/BcmGenetDxe/GenericPhy.c      | 405 +++++++++
>   .../Broadcom/Drivers/Net/BcmGenetDxe/Genet.c  | 114 ---
>   .../Drivers/Net/BcmGenetDxe/GenetUtil.c       | 816 +++++++++++++++++
>   .../Drivers/Net/BcmGenetDxe/SimpleNetwork.c   | 834 ++++++++++++++++++
>   Platform/RaspberryPi/AcpiTables/Dsdt.asl      |   2 +-
>   22 files changed, 3319 insertions(+), 268 deletions(-)
>   delete mode 100644 Platform/RaspberryPi/Library/PlatformPcdLib/PlatformPcdLib.inf
>   create mode 100644 Silicon/Broadcom/Drivers/Net/BcmGenetDxe/GenericPhy.h
>   create mode 100644 Silicon/Broadcom/Drivers/Net/BcmGenetDxe/GenetUtil.h
>   delete mode 100644 Silicon/Broadcom/Drivers/Net/Include/Net/Genet.h
>   create mode 100644 Silicon/Broadcom/Drivers/Net/Include/Protocol/BcmGenetPlatformDevice.h
>   delete mode 100644 Platform/RaspberryPi/Library/PlatformPcdLib/PlatformPcdLib.c
>   create mode 100644 Silicon/Broadcom/Drivers/Net/BcmGenetDxe/ComponentName.c
>   create mode 100644 Silicon/Broadcom/Drivers/Net/BcmGenetDxe/DriverBinding.c
>   create mode 100644 Silicon/Broadcom/Drivers/Net/BcmGenetDxe/GenericPhy.c
>   delete mode 100644 Silicon/Broadcom/Drivers/Net/BcmGenetDxe/Genet.c
>   create mode 100644 Silicon/Broadcom/Drivers/Net/BcmGenetDxe/GenetUtil.c
>   create mode 100644 Silicon/Broadcom/Drivers/Net/BcmGenetDxe/SimpleNetwork.c
> 


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

View/Reply Online (#59255): https://edk2.groups.io/g/devel/message/59255
Mute This Topic: https://groups.io/mt/74154329/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 v2 0/7] Add Broadcom GENET driver for RPi4
Posted by Ard Biesheuvel 3 years, 11 months ago
On 5/12/20 9:55 AM, Ard Biesheuvel wrote:
> This is a followup to Samer's v1 [0], and incorporates all the delta
> changes posted for review over the past couple of days. This is a
> roundup of all that work, and therefore supersedes it.
> 
> It provides an implementation of the SimpleNetworkProtocol for the
> Raspberry Pi4's GENET network controller, in a way that adheres to the
> UEFI driver model.
> 
> The original submission was provided by Jared, based on Jeremy's MAC
> programming-only driver and the existing BSD driver for the GENET IP.
> Cumulative changes and fixes as well as review feedback were provided
> by all of the below.
> 
> https://github.com/ardbiesheuvel/edk2-platforms/tree/rpi4_genet_combi_v2
> 

FYI in an off list discussion, Leif pointed out the the practice of 
having one 'master' .h file including everything, which is included by 
the .c files is not acceptable practice, even though it is widespread in 
EDK2.

I pushed a delta patch to the branch above that fixes this, but I will 
wait for other feedback before sending it out, or sending out a v3, 
whichever is more appropriate.



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

View/Reply Online (#59283): https://edk2.groups.io/g/devel/message/59283
Mute This Topic: https://groups.io/mt/74154329/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 v2 0/7] Add Broadcom GENET driver for RPi4
Posted by Leif Lindholm 3 years, 11 months ago
On Tue, May 12, 2020 at 09:55:05 +0200, Ard Biesheuvel wrote:
> This is a followup to Samer's v1 [0], and incorporates all the delta
> changes posted for review over the past couple of days. This is a
> roundup of all that work, and therefore supersedes it.
> 
> It provides an implementation of the SimpleNetworkProtocol for the
> Raspberry Pi4's GENET network controller, in a way that adheres to the
> UEFI driver model.
> 
> The original submission was provided by Jared, based on Jeremy's MAC
> programming-only driver and the existing BSD driver for the GENET IP.
> Cumulative changes and fixes as well as review feedback were provided
> by all of the below.
> 
> https://github.com/ardbiesheuvel/edk2-platforms/tree/rpi4_genet_combi_v2
> 
> Cc: Pete Batard <pete@akeo.ie>
> Cc: Jared McNeill <jmcneill@invisible.ca>
> Cc: Andrei Warkentin <awarkentin@vmware.com>
> Cc: Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>
> Cc: Jeremy Linton <jeremy.linton@arm.com>

For 1-2,4,6-7/7:
Reviewed-by: Leif Lindholm <leif@nuviainc.com>

> Andrei Warkentin (1):
>   Platform/RaspberryPi4: Remove PlatformPcdLib
> 
> Ard Biesheuvel (6):
>   Platform/RaspberryPi4: set DMA translation for BCM Genet driver
>   Silicon/Broadcom: Add BcmGenetPlatformDevice protocol
>   Silicon/Broadcom/BcmGenetDxe: Add GENET driver
>   Platform/RaspberryPi4: Clean up PCDs out of the GENET driver
>   Platform/RaspberryPi4: Register GENET platform device protocol
>   Platform/RaspberryPi4: remove ASIX 88772b driver
> 
>  Silicon/Broadcom/Bcm27xx/Bcm27xx.dec          |   2 +
>  Silicon/Broadcom/Drivers/Net/BcmNet.dec       |   8 +-
>  Platform/RaspberryPi/RPi4/RPi4.dsc            |   8 +-
>  Platform/RaspberryPi/RPi4/RPi4.fdf            |   1 -
>  .../RaspberryPi/AcpiTables/AcpiTables.inf     |   2 +-
>  .../Drivers/ConfigDxe/ConfigDxe.inf           |  29 +-
>  .../Library/PlatformPcdLib/PlatformPcdLib.inf |  43 -
>  .../Drivers/Net/BcmGenetDxe/BcmGenetDxe.inf   |  46 +-
>  .../Include/IndustryStandard/Bcm2711.h        |   3 +
>  .../Drivers/Net/BcmGenetDxe/GenericPhy.h      | 106 +++
>  .../Drivers/Net/BcmGenetDxe/GenetUtil.h       | 364 ++++++++
>  .../Broadcom/Drivers/Net/Include/Net/Genet.h  |  21 -
>  .../Include/Protocol/BcmGenetPlatformDevice.h |  24 +
>  .../RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c | 108 ++-
>  .../Library/PlatformPcdLib/PlatformPcdLib.c   |  45 -
>  .../Drivers/Net/BcmGenetDxe/ComponentName.c   | 198 +++++
>  .../Drivers/Net/BcmGenetDxe/DriverBinding.c   | 408 +++++++++
>  .../Drivers/Net/BcmGenetDxe/GenericPhy.c      | 405 +++++++++
>  .../Broadcom/Drivers/Net/BcmGenetDxe/Genet.c  | 114 ---
>  .../Drivers/Net/BcmGenetDxe/GenetUtil.c       | 816 +++++++++++++++++
>  .../Drivers/Net/BcmGenetDxe/SimpleNetwork.c   | 834 ++++++++++++++++++
>  Platform/RaspberryPi/AcpiTables/Dsdt.asl      |   2 +-
>  22 files changed, 3319 insertions(+), 268 deletions(-)
>  delete mode 100644 Platform/RaspberryPi/Library/PlatformPcdLib/PlatformPcdLib.inf
>  create mode 100644 Silicon/Broadcom/Drivers/Net/BcmGenetDxe/GenericPhy.h
>  create mode 100644 Silicon/Broadcom/Drivers/Net/BcmGenetDxe/GenetUtil.h
>  delete mode 100644 Silicon/Broadcom/Drivers/Net/Include/Net/Genet.h
>  create mode 100644 Silicon/Broadcom/Drivers/Net/Include/Protocol/BcmGenetPlatformDevice.h
>  delete mode 100644 Platform/RaspberryPi/Library/PlatformPcdLib/PlatformPcdLib.c
>  create mode 100644 Silicon/Broadcom/Drivers/Net/BcmGenetDxe/ComponentName.c
>  create mode 100644 Silicon/Broadcom/Drivers/Net/BcmGenetDxe/DriverBinding.c
>  create mode 100644 Silicon/Broadcom/Drivers/Net/BcmGenetDxe/GenericPhy.c
>  delete mode 100644 Silicon/Broadcom/Drivers/Net/BcmGenetDxe/Genet.c
>  create mode 100644 Silicon/Broadcom/Drivers/Net/BcmGenetDxe/GenetUtil.c
>  create mode 100644 Silicon/Broadcom/Drivers/Net/BcmGenetDxe/SimpleNetwork.c
> 
> -- 
> 2.17.1
> 

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

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