From: Marcelo Manzo <marcelomanzo@gmail.com>
To: qemu-devel@nongnu.org, qemu-arm@nongnu.org
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
"Philippe Mathieu-Daudé" <philmd@oss.qualcomm.com>,
"Marcelo Manzo" <marcelomanzo@gmail.com>
Subject: [PATCH v3 00/16] hw/arm/raspi4b: working PCIe and GENET (real networking)
Date: Thu, 15 Oct 2026 14:11:05 -0400 [thread overview]
Message-ID: <20261015181122.60608-1-marcelomanzo@gmail.com> (raw)
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 enumerate, and GENET passes real network traffic (DHCP, SSH, bulk
downloads) under both older (Debian 11, 5.15) and newer (Debian 13,
6.18) guest kernels. Most of the GENET code is Sergey Kambalin's
2024 series (patchwork series 829638), carried forward with his
authorship and Signed-off-by kept.
v3: thanks to Peter for the review (and for running it under UBSan),
and to Philippe.
- Fix the UB Peter found by running "make check-functional" under
clang's UBSan: bcm2838_genet_rdma() built the per-packet status
block by casting the (misaligned) RX buffer to a C struct. It now
fills the status block in with stl_le_p(), which is also correct
on big-endian hosts. The functional tests now run clean under
--enable-ubsan.
- Fold the three bugfix patches that were in v2 (PHY autonegotiation
restart, RX checksum reporting, TX ring activation check) into the
patches that introduce the code they fix: the MDIO patch, the TX
path patch and the RX path patch respectively. The series goes
from 19 patches to 16. Philippe's Reviewed-by on the old "fix TX
ring activation check" patch is not carried over, since that
change now lives inside the TX path patch.
- While in bcm2838_genet_rdma() I also found that the RX descriptor
index and the DMA write length come from guest-programmed
registers and were not checked against the size of the descriptor
array / our packet buffer. Add those checks (in the RX path
patch).
- Rebased on current master (7e8d3c7fc4).
This conflicts trivially (three files: raspi4b.c and
bcm2838_peripherals.[ch]) with the RNG200/thermal sensor series
("[PATCH v2 0/5] hw/arm/raspi4b: RNG200 and thermal sensor"), which is
posted separately. Whichever lands second, I will rebase.
Tested: checkpatch.pl reports no errors; the series builds on current
master and tests/functional/aarch64/test_raspi4.py passes, including
under clang --enable-ubsan; and unmodified Raspberry Pi OS Bullseye
and Trixie based images boot under raspi4b with a working network
(DHCP, ping, 2MB downloads) and SSH.
Marcelo Manzo (7):
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
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 | 1136 +++++++++++++++++++++++
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, 2074 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.55.0
next reply other threads:[~2026-10-15 18:17 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-15 18:11 Marcelo Manzo [this message]
2026-10-15 18:11 ` [PATCH v3 01/16] hw/arm/bcm2838_pcie: add BCM2838 PCIe Root Complex Marcelo Manzo
2026-10-15 18:11 ` [PATCH v3 02/16] hw/arm/bcm2838_pcie: add BCM2838 PCIe host Marcelo Manzo
2026-10-15 18:11 ` [PATCH v3 03/16] hw/arm/bcm2838: enable BCM2838 PCIe host bridge Marcelo Manzo
2026-10-15 18:11 ` [PATCH v3 04/16] hw/net/bcm2838_genet: add GENET stub device Marcelo Manzo
2026-10-15 18:11 ` [PATCH v3 05/16] hw/net/bcm2838_genet: add GENET register structs, part 1/4 Marcelo Manzo
2026-10-15 18:11 ` [PATCH v3 06/16] hw/net/bcm2838_genet: add GENET register structs, part 2/4 Marcelo Manzo
2026-10-15 18:11 ` [PATCH v3 07/16] hw/net/bcm2838_genet: add GENET register structs, part 3/4 Marcelo Manzo
2026-10-15 18:11 ` [PATCH v3 08/16] hw/net/bcm2838_genet: add GENET register structs, part 4/4 Marcelo Manzo
2026-10-15 18:11 ` [PATCH v3 09/16] hw/net/bcm2838_genet: add GENET register access macros Marcelo Manzo
2026-10-15 18:11 ` [PATCH v3 10/16] hw/net/bcm2838_genet: implement GENET register ops Marcelo Manzo
2026-10-15 18:11 ` [PATCH v3 11/16] hw/net/bcm2838_genet: implement GENET MDIO Marcelo Manzo
2026-10-15 18:11 ` [PATCH v3 12/16] hw/net/bcm2838_genet: implement GENET TX path Marcelo Manzo
2026-10-15 18:11 ` [PATCH v3 13/16] hw/net/bcm2838_genet: implement GENET RX path Marcelo Manzo
2026-10-15 18:11 ` [PATCH v3 14/16] hw/arm/bcm2838: enable BCM2838 GENET controller Marcelo Manzo
2026-10-15 18:11 ` [PATCH v3 15/16] docs/system/arm/raspi: move PCIe/GENET from missing to implemented Marcelo Manzo
2026-10-15 18:11 ` [PATCH v3 16/16] tests/functional/aarch64: add raspi4b GENET networking test Marcelo Manzo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261015181122.60608-1-marcelomanzo@gmail.com \
--to=marcelomanzo@gmail.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@oss.qualcomm.com \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.