[PATCH v2 00/19] hw/arm/raspi4b: working PCIe and GENET (real networking)

Marcelo Manzo posted 19 patches 2 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260811143557.7862-1-marcelomanzo@gmail.com
Maintainers: Peter Maydell <peter.maydell@linaro.org>, "Philippe Mathieu-Daudé" <philmd@mailo.com>, Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>, Jason Wang <jasowangio@gmail.com>
docs/system/arm/raspi.rst               |    6 +-
hw/arm/bcm2838.c                        |   15 +
hw/arm/bcm2838_pcie.c                   |  308 +++++++
hw/arm/bcm2838_peripherals.c            |   46 +
hw/arm/meson.build                      |    4 +-
hw/arm/raspi4b.c                        |    2 -
hw/arm/trace-events                     |    4 +
hw/net/bcm2838_genet.c                  | 1119 +++++++++++++++++++++++
hw/net/meson.build                      |    2 +
hw/net/trace-events                     |   16 +
include/hw/arm/bcm2838_pcie.h           |   75 ++
include/hw/arm/bcm2838_peripherals.h    |    7 +
include/hw/net/bcm2838_genet.h          |  428 +++++++++
tests/functional/aarch64/test_raspi4.py |   30 +
14 files changed, 2057 insertions(+), 5 deletions(-)
create mode 100644 hw/arm/bcm2838_pcie.c
create mode 100644 hw/net/bcm2838_genet.c
create mode 100644 include/hw/arm/bcm2838_pcie.h
create mode 100644 include/hw/net/bcm2838_genet.h
[PATCH v2 00/19] hw/arm/raspi4b: working PCIe and GENET (real networking)
Posted by Marcelo Manzo 2 weeks ago
This series gets raspi4b's PCIe root complex and GENET Ethernet
controller working end to end: the PCIe link comes up and devices on
it actually enumerate, and GENET passes real network traffic (DHCP,
SSH) under both older and newer guest kernels.

v2: per Peter Maydell's review of two follow-up series posted after
this one ("hw/arm/bcm2838_pcie: make PCI device enumeration work" and
half of "hw/arm/raspi4b: fix watchdog and GENET bugs hit by modern
distro kernels"), folded both of those bugfixes directly into the
patches here that introduce the affected code, since neither
bcm2838_pcie.c nor bcm2838_genet.c is in upstream git yet:

  - patch 2 ("add BCM2838 PCIe host") and patch 3 ("enable BCM2838
    PCIe host bridge") now include the PCI enumeration fix (config
    space read/write underflow, missing pcie_host_mmcfg_init(),
    wrongly-overridden config_read/config_write, and the MMIO window
    address-translation fix) instead of introducing it broken and
    fixing it in a later series;
  - patch 6, 9, 10, 12, and 13 now include the per-ring DMA
    status/RX-ring-selection fix (proper per-ring enable bitmask for
    both RDMA and TDMA, a queued-packet flush on ring enable, and
    scanning for the first active ring instead of assuming the last
    one) instead of introducing that bug and fixing it afterwards;
  - patch 18 carries the accompanying docs note about PCIe MSI/MSI-X
    not being implemented (use msi=off,msix=off).

Those two follow-up threads are superseded by this v2 and shouldn't be
applied standalone. No functional changes beyond what those two fixes
already did -- this is purely relocating the same diffs to where the
buggy code was first introduced. checkpatch.pl is clean (0 errors)
across all 19 patches, the series builds standalone from a clean
worktree (--target-list=aarch64-softmmu), and the full
tests/functional/aarch64/test_raspi4.py suite passes, including the
GENET and PCIe tests that exercise exactly the folded-in fixes.

Marcelo Manzo (10):
  hw/arm/bcm2838_pcie: add BCM2838 PCIe Root Complex
  hw/arm/bcm2838_pcie: add BCM2838 PCIe host
  hw/arm/bcm2838: enable BCM2838 PCIe host bridge
  hw/net/bcm2838_genet: add GENET stub device
  hw/arm/bcm2838: enable BCM2838 GENET controller
  hw/net/bcm2838_genet: fix PHY autonegotiation-restart deadlock
  hw/net/bcm2838_genet: fix bogus RX checksum reporting
  hw/net/bcm2838_genet: fix TX ring activation check
  docs/system/arm/raspi: move PCIe/GENET from missing to implemented
  tests/functional/aarch64: add raspi4b GENET networking test

Sergey Kambalin (9):
  hw/net/bcm2838_genet: add GENET register structs, part 1/4
  hw/net/bcm2838_genet: add GENET register structs, part 2/4
  hw/net/bcm2838_genet: add GENET register structs, part 3/4
  hw/net/bcm2838_genet: add GENET register structs, part 4/4
  hw/net/bcm2838_genet: add GENET register access macros
  hw/net/bcm2838_genet: implement GENET register ops
  hw/net/bcm2838_genet: implement GENET MDIO
  hw/net/bcm2838_genet: implement GENET TX path
  hw/net/bcm2838_genet: implement GENET RX path

 docs/system/arm/raspi.rst               |    6 +-
 hw/arm/bcm2838.c                        |   15 +
 hw/arm/bcm2838_pcie.c                   |  308 +++++++
 hw/arm/bcm2838_peripherals.c            |   46 +
 hw/arm/meson.build                      |    4 +-
 hw/arm/raspi4b.c                        |    2 -
 hw/arm/trace-events                     |    4 +
 hw/net/bcm2838_genet.c                  | 1119 +++++++++++++++++++++++
 hw/net/meson.build                      |    2 +
 hw/net/trace-events                     |   16 +
 include/hw/arm/bcm2838_pcie.h           |   75 ++
 include/hw/arm/bcm2838_peripherals.h    |    7 +
 include/hw/net/bcm2838_genet.h          |  428 +++++++++
 tests/functional/aarch64/test_raspi4.py |   30 +
 14 files changed, 2057 insertions(+), 5 deletions(-)
 create mode 100644 hw/arm/bcm2838_pcie.c
 create mode 100644 hw/net/bcm2838_genet.c
 create mode 100644 include/hw/arm/bcm2838_pcie.h
 create mode 100644 include/hw/net/bcm2838_genet.h

-- 
2.47.1