Skip to content

wifi: brcmfmac: confine the Bluejay BCM4389 bring-up - #228

Merged
derekross merged 2 commits into
derekross:omamobilefrom
latentoperator:omamobile-bluejay-brcmfmac
Nov 15, 2026
Merged

derekross merged 2 commits into
derekross:omamobilefrom
latentoperator:omamobile-bluejay-brcmfmac

Conversation

@latentoperator

@latentoperator latentoperator commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Apply explicit endpoint device-tree policy before enabling restricted DMA bus mastering. Derive the permitted pool geometry from its memory-region and verify the attached, non-expanding pool below 4 GiB. Existing endpoints without the restricted-DMA property retain their original bus-master order.

The packet-buffer limit is now read once at PCI probe, stored in the bus message-buffer information and copied into the protocol state. No device-tree property is read in the packet paths. Oversized TX frames increment tx_oversize_dropped in msgbuf_stats and use brcmf_txfinalize(false), preserving pending authentication-frame completion and error accounting. Independent execution of the actual drop/finalize paths covers that accounting and the null-interface case, with the prior direct-free path failing the negative control.

All chip_only/identify-only diagnostic plumbing has been removed from this submission and remains in historical bring-up source. The DT policy binding is a separate first commit; the complete driver change is folded into one commit, so no intermediate commit changes unrelated boards' mastering order.

The matched DT-driven Bluejay restricted-DMA/station trial has now passed in the signed integration (runtime section below). The exact tested integration is published below; this is ready for maintainer review.

Runtime update — November 12–13, 2026

November 13 matched Bluejay restricted-DMA/station result:

Tested signed integration: 720a495233734e4328a09c33c095d72a8291e1c4, based on fc7086a68fcaaed8960d09f1bdf6c51c9926c759; uname -r = 7.3.0-rc6-omamobile-bluejay-review-20261111, with its matching Image, stage DTs and modules. This is an integration result containing the submitted changes, rather than a boot of each PR in isolation.

After a fresh isolated PCIe proof, the w2 stage performed one actual firmware/driver bind using this handset's existing provisioned firmware. No chip_only option was passed; that plumbing is absent from the revised driver. The kernel reported “restricted DMA attachment verified below 4GiB” against the 64 MiB pool at 0xc4000000.

One managed station associated, acquired IPv4 by DHCP and completed an interface-bound HTTPS request: HTTP 200, 16,932 bytes. The relevant IRQ count increased 725 → 744. msgbuf_stats reported tx_oversize_dropped = 0. That is an observed counter value, not a deliberate oversized-frame/drop-path runtime test. P2P was disabled (feature_disable=16); no hotspot, roaming or suspend claim is made. Fresh SSH and kernel-health postchecks passed with zero failed system units and no oops/BUG/panic.

One initial helper attempt stopped on a read-only preflight type error before any driver load or hardware action; after correcting it and passing explicit read-only preflight, exactly one actual bind was performed. No unload/rebind recovery was needed.

This supplies the matched 6a runtime evidence; the exact tested integration is available for review. These were attended headless stages with storage guards, a PID-1-owned 20-second watchdog, host logging and fresh SSH postchecks. They do not qualify the revised desktop/GPU path, native panel modesetting, suspend, endurance or a release installer. The historical graphical desktop has been restored. No kernel commit or DCO metadata changed; AUTO_WRITE=no and masked automatic boot-success remain in force.

Prior source/build validation

Validation on current upstream base fc7086a: independent source review found no remaining concrete blocker. The common integration passes policy, strict checkpatch without errors, W=1 builds of seven touched C files, ten Google device trees with no new dtbs_check warnings and four binding checks. New-file coverage warnings and one continuation-alignment check are disclosed. A full Image, Bluejay DTB and 1,828 modules also build for 7.3.0-rc6-omamobile-bluejay-review-20261111; matching dependency indexes and module resolution pass. The full build reports two format warnings in unchanged AoC ALSA code.

The human certified the final patches under DCO on November 11. Independent checks verify every author sign-off, all 22 commit objects including integration copies, and identical source trees and exact diffs before/after certification. Signing changed metadata only; the frozen source-build evidence remains applicable. Fresh published-head CI passed on 15fab5df236b7fd23905182d7d92fbbbbd067d62 (sign-offs, checkpatch, W=1 and device-tree/binding gates as applicable).

The original tested source c934e31 and known-good phone setup remain preserved. AUTO_WRITE=no, the automatic boot-success mask and the GS101 slot-marking hold remain in force. No firmware, private captures, credentials, device identifiers or calibration data are submitted. Development/source status is documented in Bluejay UPSTREAM, with historical bring-up isolated in mobile #565.

Published tested integration — November 14, 2026

The exact signed integration cited in the November 12–13 runtime report is now available on the fork's bringup/bluejay-reviewed-tested-20261111 branch, at 720a495233734e4328a09c33c095d72a8291e1c4. The commit, source tree and existing human sign-offs are unchanged; this publishes the source for inspection and adds no new runtime qualification.

@derekross

Copy link
Copy Markdown
Owner

Thanks, Chris — the restricted-pool check is careful, and the final diff leaves the 7 Pro alone. Two things before it leaves draft: please squash the two commits, because the first one changes bus-master order for every board and we rebase-merge; and could the Bluejay specifics come from the device tree (the memory region's own size, a property on the PCIe node) instead of machine-name checks and a fixed address in the driver? Those won't survive upstream and would be hard to share with the 6/6 Pro.

@derekross

Copy link
Copy Markdown
Owner

Thanks, Chris. Moving the policy into the device tree and folding the ordering fix into one commit both address what I raised, and the Pixel 7 Pro keeps its bus-master order. One thing remains: the max-DMA-size property is read from the device tree for every packet, on every phone. Could you read it once at probe and keep it in the bus info? I'd also count the frames dropped for size, and I'd still prefer chip_only to live in your bring-up branch.

Describe an endpoint that requires verified restricted DMA attachment,
its qualified maximum packet buffer and the bootloader's ASCII MAC ABI.
The pool itself supplies its address and size through memory-region.
No new property changes an existing board unless its DT opts in.

Assisted-by: LLM
Signed-off-by: Chris Gray <chrisgray70@gmail.com>
Require a matching, non-expanding restricted DMA attachment before
bus mastering when the endpoint requests it. Derive the allowed pool
extent from reserved memory instead of a Bluejay machine check or fixed
address. Preserve the original mastering order for other endpoints.

Cache the endpoint packet limit once during PCI probe and pass it to
msgbuf. Count oversized TX frames in msgbuf_stats before dropping them.
Read the provisioned ASCII MAC only when the endpoint requests it.
Keep the chip-only diagnostic in the private bring-up branch.

Assisted-by: LLM
Signed-off-by: Chris Gray <chrisgray70@gmail.com>
@latentoperator

Copy link
Copy Markdown
Contributor Author

November 13 matched Bluejay restricted-DMA/station result:

Tested signed integration: 720a495233734e4328a09c33c095d72a8291e1c4, based on fc7086a68fcaaed8960d09f1bdf6c51c9926c759; uname -r = 7.3.0-rc6-omamobile-bluejay-review-20261111, with its matching Image, stage DTs and modules. This is an integration result containing the submitted changes, rather than a boot of each PR in isolation.

After a fresh isolated PCIe proof, the w2 stage performed one actual firmware/driver bind using this handset's existing provisioned firmware. No chip_only option was passed; that plumbing is absent from the revised driver. The kernel reported “restricted DMA attachment verified below 4GiB” against the 64 MiB pool at 0xc4000000.

One managed station associated, acquired IPv4 by DHCP and completed an interface-bound HTTPS request: HTTP 200, 16,932 bytes. The relevant IRQ count increased 725 → 744. msgbuf_stats reported tx_oversize_dropped = 0. That is an observed counter value, not a deliberate oversized-frame/drop-path runtime test. P2P was disabled (feature_disable=16); no hotspot, roaming or suspend claim is made. Fresh SSH and kernel-health postchecks passed with zero failed system units and no oops/BUG/panic.

One initial helper attempt stopped on a read-only preflight type error before any driver load or hardware action; after correcting it and passing explicit read-only preflight, exactly one actual bind was performed. No unload/rebind recovery was needed.

This supplies the matched 6a runtime evidence; leaving draft for your review. These were attended headless stages with storage guards, a PID-1-owned 20-second watchdog, host logging and fresh SSH postchecks. They do not qualify the revised desktop/GPU path, native panel modesetting, suspend, endurance or a release installer. The historical graphical desktop has been restored. No kernel commit or DCO metadata changed; AUTO_WRITE=no and masked automatic boot-success remain in force.

@derekross

Copy link
Copy Markdown
Owner

Thank you, Chris. Reading the size limit once at probe, counting the drops, finalising dropped frames properly, and removing chip_only all landed as asked. Our gate passes on today's omamobile (2db2bc3), and CI is green (one alignment nit from checkpatch in brcmf_msgbuf_txflow(), if you respin). For the Pixel 7 Pro: none of the three new properties is in any board on omamobile. So cheetah keeps bus mastering before the DMA mask, the 64-bit mask, and no size checks. A function-by-function compare of msgbuf.o, pcie.o and of.o before and after shows changes only where the new checks are. The one thing the 7 Pro will notice is a new tx_oversize_dropped: 0 line in msgbuf_stats, which is fine.

The same request as on #227: please push 720a4952… to your fork so I can tie the 6a station run to this head. Then this is ready.

@latentoperator

Copy link
Copy Markdown
Contributor Author

Closing the source-publication request: the exact tested signed integration is available on bringup/bluejay-reviewed-tested-20261111 at 720a495233734e4328a09c33c095d72a8291e1c4. The commit, source tree and existing human sign-offs are unchanged. The PR description carries the same link; this is a pointer to the previously reported matched station run, not a new per-PR boot claim.

@derekross

Copy link
Copy Markdown
Owner

Thank you, Chris. With 720a4952 public I could check it. bus.h, msgbuf.c, of.c and pcie.c have the same blobs there as at this head, and your two commits there are patch-identical to these. The binding differs only by the pci14e4,4441 entry, which is #230's commit in the same tree. So the 6a station run (restricted DMA verified, DHCP and HTTPS, no oversize drops) is evidence for exactly this code. Our gate passes on today's omamobile (d49d68c), and nothing under brcmfmac/ or the binding has moved on omamobile since CI ran, so the Pixel 7 Pro compare from my last review still holds.

I'll merge it. If you ever respin, the binding's subject could follow the file's history (dt-bindings: net: wireless: brcm,bcm4329-fmac:), and checkpatch's alignment nit in brcmf_msgbuf_txflow() could go, but neither holds this up.

@derekross
derekross merged commit 8487865 into derekross:omamobile Nov 15, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants