From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AF4EEC5B572 for ; Tue, 11 Aug 2026 14:36:57 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wtnaF-0000EO-91; Tue, 11 Aug 2026 10:36:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wtnaD-0000E5-RL for qemu-arm@nongnu.org; Tue, 11 Aug 2026 10:36:01 -0400 Received: from mail-qv1-xf2a.google.com ([2607:f8b0:4864:20::f2a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wtnaC-0001q1-6V for qemu-arm@nongnu.org; Tue, 11 Aug 2026 10:36:01 -0400 Received: by mail-qv1-xf2a.google.com with SMTP id 6a1803df08f44-8f0e5e36912so5324906d6.2 for ; Tue, 11 Aug 2026 07:35:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1786458959; x=1787063759; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=MOPsIRAHmnpYPNJRCDGGvnlTaDui8VBb2s0z+7gjrio=; b=W6EVVtrWyM2PGfuPVn6pOJoG5WDaxIV6Yr5mXoPrAAIGECxbe3FIMK7rpX8Lvj/jKh vWeRR6dLjwvpZtsXjLd44C1Zw9gFA3DFoaF20kVIyeb+Xm9VKs5q2CRl/8mNqFIDs6pA 5p4XRCBD5TW8WVvsK2S/p6I75qjTTd6Tuqb8pu8X7zyH/HorXrdBC9alGB5VdYKWIDXA t4z8456HbFb2ihD9kfd1OT4UL93IZKgE8W/7BDJum49HIWvGq/R9NU8EHLTggFSz/EtV XmAUFBYN35W92kZuVP8aD2fm0ec3iYJQCWbuJ3E/z5f7HpsieLbDqB8RkfOmYO5mnYvW Vd9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786458959; x=1787063759; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=MOPsIRAHmnpYPNJRCDGGvnlTaDui8VBb2s0z+7gjrio=; b=IYK0ikgDfqr7mP2nCm0ZL6HHU1cUsknF5XNHFYE123tJBgm6zszgigtZKs9OlycDtN yl2YQ+OFdV2romwTk3g/5EK4Hzdhw4u69xPzi5Yfdy6VgAjDIDhUeXRpz1PV1UpnpOOx hp1CboGreFNqTIImnpEWzoajSwVuu4imZ5Dd63ij1ZhIk+qEmdXnZCBs6C7rmouEauKs 9bcL08XSj10I65ypWhgBB96VuEv4W2bA+JpOJFAoislFDtLQIrP5N8APKrRt/EBVxTst dqTnK+NI0CbEo8ZEBwofnWV+JaAunqmCnHgeGGdzUU6G01YQ4K2bVDi/Nm86FBuaDVH3 xW1w== X-Forwarded-Encrypted: i=1; AHgh+RoYsDvqTyYpXP5/e7POt/lbYV4YLMz3pt6rLYlEW4n1S8wo+G8L/fQYE7hlddWLNls6+rV3/W1oJw==@nongnu.org X-Gm-Message-State: AOJu0YxMsi2e74TlwfNZf6BeGlDdmmNvNK/DBvFM0OzO+HqpH1uNccuC IFQCyCKn/9cyZ5TmRseuAZvrqRFdCe7FCSPVxWAEpj6bDPiq6yqLk7uD X-Gm-Gg: AR+sD13/vxXpLm4yT/QHVXDKGQZffuu8mUnjAE7JSfTOGs6VbaBICunezjKyTRb0V8U ewdj9WtCLO8EQGNKhMtYybaFYHNmCgn6mPSu2ofXL70JLwHnnO9HgHJpgQ1r2nJQFt7Y7X4vyn7 FN+c59JdNujWq3hlzc8UbI42SDkw9Nb80ZwTenV9dUDtIyDdpebFvkHHBQj9RBUbqxdMXZlRJlr lClXrXe+wS2SEyjQY1kxnJ5Q7O6GslU2ie3LRZ7pUqI7lxtxki3XLosbx4wuv7i0LL1vs7Nx78w QfRtdS2MhitWlazJXQ8Qb8GZ5dEVpcyGYbwLcmYCiezCbvXhGLtp5UdvV0BETnk/gjN5E5isF3M XGyoZC9tSfSEyvEyTXxq+6F/upQMH8UpzI9VECIddb0putjNmeF3wUEjy1zhydBarlm+J1wvNSF AWkFLq8LxSNdbWdxPQo/GudrKRlYcca03JypVMIe73xN4aAzusNuKsFIx0j6THqCg8W+xRN73QF H9koLUm2VopnMIEBu8= X-Received: by 2002:a05:6214:3d8a:b0:908:92e3:a37 with SMTP id 6a1803df08f44-90a6c258352mr3659486d6.32.1786458959163; Tue, 11 Aug 2026 07:35:59 -0700 (PDT) Received: from localhost.localdomain ([198.16.145.87]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-90a6c26e074sm681286d6.2.2026.08.11.07.35.58 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 11 Aug 2026 07:35:58 -0700 (PDT) From: Marcelo Manzo To: qemu-devel@nongnu.org, qemu-arm@nongnu.org Cc: Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Marcelo Manzo Subject: [PATCH v2 00/19] hw/arm/raspi4b: working PCIe and GENET (real networking) Date: Tue, 11 Aug 2026 10:35:37 -0400 Message-ID: <20260811143557.7862-1-marcelomanzo@gmail.com> X-Mailer: git-send-email 2.47.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::f2a; envelope-from=marcelomanzo@gmail.com; helo=mail-qv1-xf2a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-arm@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-arm-bounces+qemu-arm=archiver.kernel.org@nongnu.org Sender: qemu-arm-bounces+qemu-arm=archiver.kernel.org@nongnu.org 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