Repository navigation
spi: apple-qspi: admit the GD25UF64E, so the J775D's nvram partition can be written - #3099
Merged
Merged
Conversation
…can be written The J775D (Mac Studio, M5 Ultra) boot NOR reads JEDEC ID c8 83 17, a GigaDevice GD25UF64E (64 Mbit, 8 MiB), with no block protection left set (SR1 0x00, SR2 0x02: QE only, SR3 0x20). Its nvram partition is the ADT's anvram, 0xc0000 at 0x700000 (12 banks of 64 KiB), which ends within the part. Add the part with its size and no tolerated BP bits. The part-table checks in KUnit and in tools/asahi/qspi-nvram-tests.py list it, and a host-test case runs the GigaDevice status checks with the J775D's SR1/SR2/SR3 in its partition and refuses BP0. Signed-off-by: Jeff Queisser <[email protected]>
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
satchlj
approved these changes
Nov 25, 2026
satchlj
left a comment
Member
There was a problem hiding this comment.
Gemini 4 Neon on @satchlj's behalf
Verdict at 0cb67690b3f5
Approve. Admitting the GigaDevice GD25UF64E ({ 0xc8, 0x83, 0x17 }, 8 MiB, bp_ok = 0) into the apple-qspi policy table with matching KUnit and host mutation-test coverage is clean and conservative.
Blockers
None.
Checked
- Diff audit (3 files, +47/-16):
drivers/spi/spi-apple-qspi-policy.h: verifiedAPPLE_QSPI_JEDEC_GD25UF64E({ 0xc8, 0x83, 0x17 },size = 0x800000within 3-byte addressing,bp_ok = 0) routes viaAPPLE_QSPI_MFR_GIGADEVICE(0xc8) toapple_qspi_gd_status_allows_write(sr1, sr2, bp_ok), which rejects WIP/WEL (sr1 & 0x03), all BP[4:0] (sr1 & 0x7c & ~0), and CMP/SUS1/SUS2 (sr2 & 0xc4) while tolerating J775D's observedSR1=0x00 SR2=0x02 SR3=0x20.drivers/spi/spi-apple-qspi-policy-test.c&tools/asahi/qspi-nvram-tests.py: verified KUnit coverage and the newj775d-gd-idmutation control.
- CI at
0cb67690b3f5:host-tests=SUCCESS,readiness=SUCCESS,pr-text=SUCCESS. - Posted hardware evidence: J775D (M5 Ultra) exact-head
0cb67690b3f5PASS (aurora-bless --nextwrite/readback/clear withread_only=N, baseline refusal controlreason=part, KUnit 17/17, host suite + 26 mutation controls). - Untested scope: Static source + CI + posted-evidence review only (no kernel install/boot or NOR flash write run by this reviewer).
Evidence
- Verified files:
drivers/spi/spi-apple-qspi-policy.h,drivers/spi/spi-apple-qspi-policy-test.c,tools/asahi/qspi-nvram-tests.py. - CI:
host-testsSUCCESS,readiness / readinessSUCCESS,pr-text / pr-textSUCCESS at0cb67690b3f5.
DjDeveloperr
approved these changes
Nov 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What: Add the GigaDevice GD25UF64E (
c8 83 17, 8 MiB,bp_ok = 0) toapple_qspi_parts[], so the Mac Studio (M5 Ultra, J775D) boot NOR is admitted for NVRAM writes instead of refusing every write withreason=part.Tested: J775D (Mac Studio, M5 Ultra) at
0cb67690b3f5on baremain(bf03d7419ea8) under published Aurac0aaf3162edeon 27.2 firmware: probesnvram window [0x700000, 0x7c0000): 12 stores, writes in [0x700000, 0x7c0000), part c88317,aurora-bless --nextwrites, reads back, and clears cleanly withread_only=N(baseline refuses withreason=partand leaves NVRAM unchanged), 0 new kernel errors, 0 new failed units; KUnitspi_apple_qspi_policy_test17/17 pass (85 suites, 438/442 pass, 0 fail, 4 skip);tools/asahi/qspi-nvram-tests.pypasses all functional tests and all 26 mutation controls.Risk: Two-way door · affects only machines carrying a
c8 83 17(GD25UF64E) boot NOR with a writable DTnvrampartition (J775D; K114c keepsread-onlyon itsnvrampartition, so it gains no write path); writes remain gated behindread_only=N, SFDP density verification, NVRAM v3 bank-header qualification, andbp_ok = 0status checks.Not yet: J773g row on the same part once its board DTS lands; Linux VM
host_tests_vm.shsummary pending final run at0cb67690b3f5.Details
Why this shape
apple_qspi_parts[]indrivers/spi/spi-apple-qspi-policy.his the single table that lists which boot NOR parts may be written, along with each part's size and the block-protect status the part is expected to carry at boot.apple_qspi_parts[]row keyed strictly by JEDEC ID{ 0xc8, 0x83, 0x17 }(8 MiB,bp_ok = 0), matching the GD25UF64E's SFDP density (0x03ffffff) and status-register state on the J775D (SR1 = 0x00,SR2 = 0x02,SR3 = 0x20). The writable window[0x700000, 0x7c0000)(12 × 64 KiB banks) comes solely from the DTnvrampartition Aura populates from ADTanvram, andapple_qspi_window_valid+apple_qspi_gd_status_allows_writeenforce the same bounds and status checks used by every other admitted part.read-onlynvrampartition (such as K114c) are unchanged. Any future board carrying the samec8 83 17part (such as J773g) gets write support automatically without adding a board rule.Change
Single commit on
main(0cb67690b3f5):drivers/spi/spi-apple-qspi-policy.h: addAPPLE_QSPI_JEDEC_GD25UF64E{ 0xc8, 0x83, 0x17 }(size = 0x800000,bp_ok = 0) toapple_qspi_parts[]and update the GigaDevice status comment to name both GD25UF16E and GD25UF64E.drivers/spi/spi-apple-qspi-policy-test.c: add{ 0xc8, 0x83, 0x17 }toqspi_policy_parts(plus near-neighbour unknown IDs{ 0xc8, 0x83, 0x16 }and{ 0xc8, 0x83, 0x18 }) and add J775D GD25UF64E status assertions (SR1=0x00, SR2=0x02, SR3=0x20, bp_ok=0accepted;SR1=0x04refused) inqspi_policy_gd_statusandqspi_policy_part_status.tools/asahi/qspi-nvram-tests.py: add GD25UF64E to the host test part table, add J775D 12-bank read/write, BP0 refusal, and first-writeq.qualified = 0SFDP + bank-header qualification cases, and add thej775d-gd-idmutation control.Evidence
Testing
Own-base A/B row on J775D (Mac Studio, M5 Ultra): kit
qspi-gd64-r3(windowqspi2501m3@20261124-1504) is baremainbf03d7419ea8plus this commit (0cb67690b3f5, no other PRs carried), compared against baseline kitqspi-gd64-r3b(windowqspi2501m3@20261124-1504), baremainbf03d7419ea8alone. Both arms ran one-shot with a read-only root on the default J775D command line through the 27.2 stub under published Aurac0aaf3162ede.qspi-gd64-r3bqspi-gd64-r3NVRAM denied: reason=parton writenvram window [0x700000, 0x7c0000): 12 stores, writes in [0x700000, 0x7c0000), part c88317read_only=N,aurora-bless --next --set-boot "Aura 27.0"rc=1,ENODEV); next boot stayedAura, partition sha256 unchanged (e38e6655878c0dc4)rc=0), read backAura 27.0,--clear-nextrestoredAura, default boot volume stayedAura,read_onlyrestored toYiwd,systemd-networkd-persistent-storage)err-level kernel linesqspi-gd64-r3(windowqspi2866r3@20261124-1455) on the 27.0 stub under the same published Aurac0aaf3162edepassed the same probe andaurora-bless --nextwrite/readback/clear sequence with 0 new kernel errors.qspi-gd64-r3-kunit,CONFIG_KUNIT=y,CONFIG_SPI_APPLE_QSPI_KUNIT_TEST=y,CONFIG_DRM_ASAHI=y,kunit-vzwith upstreamaop_motion.rsdisabled): 85 suites; 438/442 pass, 0 fail, 4 skip;spi_apple_qspi_policy_test17/17 pass.tools/asahi/qspi-nvram-tests.py, ASan + UBSan): all functional cases pass (includingGD25UF64E J775D partqualify + BP0 refusal) and all 26 mutation controls pass (includingj775d-gd-id).