Repository navigation
Conversation
firmware_variant() tries the identified builds in turn, the one the boot loader's apple,firmware-version names first. Each try measured the loaded TEXT again and, when it was not that build, logged "unsupported GPU firmware build", the build it was not, and "GPU firmware image not admitted: EINVAL", even when a later build then matched. Without apple,firmware-version (the installed aura does not write it on T8142), an M5 on macOS 27.2 logs three such errors for the 26A428 build before it admits 26B123. Measure the TEXT once and try each build against that measurement (Measured::find, which leaves the copy as it found it). Only when no build matches, log the measured identity and every supported build, before the existing "Unsupported GPU firmware image" line. A matched build still logs "GPU firmware build: ...". The TEXT is now copied and hashed once per probe rather than once per candidate build. Assisted-by: LLM Signed-off-by: termg <hello@termg.com>
|
Looks right. Two small things:
Assisted-by: LLM (Claude:Opus 5.5) |
|
Assisted-by: LLM (Claude:Opus 5.5) |
…hared measurement Follow-ups to "Log an unsupported firmware build only when none matches": - measure_text() logged only EAGAIN. A missing fw-text or fw-data region (a DT or boot loader mismatch) now returned from the probe silently, where before it printed "GPU firmware image not admitted". Log every other error too. - The "supported:" list walked every build's images, so an image shared by builds that differ only in their core layout (as T6041 25G83 is) was listed once per build. List each image once. - g17-firmware-selection-tests.py compiles firmware_variant() against stub types, and its Build stub still had a single `image` with an identify_image() stub, so the host test stopped building (E0609 "no field images"). Model the new shape instead: Build::images, a stub measure_text() and a Measured whose find() records each image it is tried against, so the existing checks on the order of the candidates still hold. The stub dev_info!/dev_err! now build their messages, so the log lines are type-checked as well. Assisted-by: LLM Signed-off-by: termg <hello@termg.com>
|
Thanks, all three in 974032a:
AI-assisted (Assisted-by: LLM). |
|
Re-review of 974032a: Blockers: 1. From our last comments:
New:
HW row: J704 (macOS 27.2 stub, 26B123) booted on 974032a with no Assisted-by: LLM (Claude:Opus 5.5) |
|
Merge-train adversarial review (MERGETRAIN-LINUX2) at 974032a: NO BLOCKERS. Code read only, nothing built here. Before the merge it still needs Dj's verdict at this head; the missing rows are listed below. Full review#2585 drm/asahi: g17: Log an unsupported firmware build only when none matches @974032a4VERDICT: NO BLOCKERS Checked on the merge (drivers/gpu/drm/asahi/g17/mod.rs merged :1882-1966, fwid.rs):
Nits:
Missing rows:
|
DjDeveloperr
left a comment
There was a problem hiding this comment.
Pre-PR checklist review at 974032a49058: 1 blocker (§4 attribution), plus §5 evidence gap on the live head.
Code and Safety Audit (§1–§3, §6)
- Clean functionally. Verified against
drivers/gpu/drm/asahi/fwid.rs(digest_at()restores in-place zeroed entropy bytes and uses a separateKVVeccopy whenboot_filledis non-empty, and returnsNonebefore mutating on record-validation failure), so reusing a singleMeasuredacross candidate builds is sound. fwid::identify()remains used bydrivers/gpu/drm/asahi/g16/boot.rs:491and iscfg_attr-guarded against dead-code warnings.measure_text()logs bothEAGAINand otherfw-text/fw-dataerrors, andtools/asahi/g17-firmware-selection-tests.pymatches the newBuild::images/Measuredshape and type-checks thedev_info!/dev_err!format strings.- CI:
host-testsis green.
Blockers
- §4 commit trailers: Both commits (
876c53cc5d70,974032a49058) include anAssisted-by: LLMtrailer in the commit message. Per §4 of the pre-PR checklist, commits must carry human author/committer identity and humanSigned-off-by:only, with zeroAssisted-by:or AI trailers in commit messages (disclosure stays in the PR body only).
Non-blocking Nits
drivers/gpu/drm/asahi/g17/mod.rs:1927:core::ptr::eq(seen, image)relies onconst-promoted slices fromBUILD_25G83/BUILD_26B123(hw/t6041.rs:75-196) sharing an address across uses, which Rust does not guarantee forconst(unlikestatic). Comparing(seen.name, seen.text_sha256)(or promoting shared image arrays tostatic) would make deduplication guaranteed.drivers/gpu/drm/asahi/g17/mod.rs:1902:GPU firmware build: {}is logged before thecore_layout.corescheck, so a shared image whose first matching build doesn't admit the probed core layout logs that line twice; logging it at:1916alongsideGPU firmware: {}would avoid the duplicate.drivers/gpu/drm/asahi/g17/mod.rs:1896:Self::measure_text(dev)?now propagates measurement errors (EAGAIN/EINVAL/ENOMEM) directly instead of continuing and returningENODEV(and no longer re-measures on a transientEAGAIN). This is reasonable and logged; worth mentioning in the commit message when dropping the commit trailers.
§5 Evidence Needed on Live Head
- Re-prove on J704 (macOS 27.2 / 26B123, no
apple,firmware-version) at the updated head (the 5-boot row predates974032a4) showing onlyGPU firmware build:/GPU firmware:, desktop on GPU, and the regression row (0 SELinux denials, 0 failed units, 0 new kernel errors). - Ideally also one boot on another
Firmware::IdentifiedMac (T6040/T6041/T6050) taking the single-measurement path.
Assisted-by: LLM (Gemini 4 Neon)
Problem
firmware_variant()tries each identified build in turn. Each try measured the loaded TEXT again, and a build that did not match loggedunsupported GPU firmware build,supported: <that build>andGPU firmware image not admitted: EINVAL, even when the next build matched. With noapple,firmware-versionon the GPU node (the installed aura doesn't write one on T8142), an M5 on macOS 27.2 logs those three errors for 26A428 before it admits 26B123. Raised on linux#2093.Change
Measured::find, which leaves the copy as it was.Unsupported GPU firmware imageline.GPU firmware build: ....Testing
Mac17,2 J704 on the macOS 27.2 (26B123) stub, with #2093 (f41fdbe) underneath, five boots. Before, the probe logged:
With this change:
Both roles acknowledged their InitData, and KDE ran on the GPU. The no-match path was checked by reading the code only.
AI-assisted, tested by me on the hardware.