Repository navigation
arm64: dts: apple: t6050: share the K boards' NVRAM, writable - #3383
Conversation
asahi-bless and aurora-bless cannot set the next boot on the K114s: the DT marks its NVRAM partition read-only, so MTD never sets MTD_WRITEABLE and every write fails with EACCES, even as root. The K114c's partition is read-only too, and the K116s and K116c describe no boot NOR at all. Every other Mac with a boot NOR leaves the partition writable. The live K114s, K116s and J716c ADTs and the K114c and K116c 27.2 DeviceTrees give the same NVRAM: /arm-io/qspi/spinor/anvram at 0x700000, 0xc0000 bytes. Describe it once in t6050-k114-k116.dtsi, single-wire as on the K114s and J775D, without read-only, with the nvram alias. spi-apple-qspi still starts read-only; once root opts in, it admits only bounded, verified programs and 4 KiB erases of a known part inside this partition. The K114s and K114c DTBs lose read-only (the K114c's flash also states the single-wire default), the K116s and K116c gain the NOR and its partition, and the other seven T6050 DTBs are byte-identical. dtschema reports nothing new. Signed-off-by: Ryan Murray <[email protected]>
|
@joshuaswarren this lifts the |
The shared NVRAM comment said every other Mac with a boot NOR leaves the partition writable; the J615 keeps its own read-only. Name the Macs whose writable partitions these follow (J616s, J713, J700) instead, and point the K114s header at the partition's new place. Signed-off-by: Ryan Murray <[email protected]>
|
Independent adversarial review at 715ef4b (author side, not the merge review): no blockers.
Nits addressed in a6e5536: the comment no longer claims every other Mac is writable (the J615 keeps its own read-only), and the K114s header now points at the partition's new place. Open: the K boards' NOR part ID isn't recorded anywhere yet. If it isn't one of the driver's known parts, bless fails with "part" (ENODEV) instead of EACCES: still safe, but not fixed. The K114s row will show which one it is. |
|
K114s (14-inch M5 Pro, 27.2 firmware), part 1 of the row: the K114s DTB from Aura Stage 2 with this PR's effect (the nvram partition no longer read-only, nothing else changed). Kernel 7.3.0-42, plain reboot.
Part 2, the |
|
K114s row, part 2: on the same boot, |
There was a problem hiding this comment.
Verdict: MERGE at a6e55368ddb3, once dt-checks and host-tests finish green and the K114s aurora-bless --next round trip (part 2) is posted.
Blockers: none.
Checked: read the whole diff and spi-apple-qspi's write gate; built all 11 T6050 DTBs at main and with this PR and compared them; checked the NVRAM geometry and the flash clock against the live K114s, K116s and J716c ADTs; confirmed aurora-bless opens the driver's write window itself, so nothing manual is needed on the default command line; ran the CI device-tree checks locally; no gates, no attribution.
Evidence
- Semantic DTS diff, main
2d96d922vs main plus this PR: K114s losesread-onlyonly. K114c losesread-onlyand gains explicit single-wire (spi-rx/tx-bus-width = <1>, the same as its default). K116s and K116c gain qspiokay,flash@0(jedec,spi-nor, 25 MHz, single-wire), the 0x700000/0xc0000nvrampartition and thenvramalias. The other seven T6050 DTBs are unchanged. - ADT:
/arm-io/qspi/spinor/anvramreg = 0x000c0000_00700000 (offset 0x700000, size 0xc0000) in the live K114s, K116s (Axboe) and J716c ADTs. The spinor reg's second word is 0x19 = 25, matchingspi-max-frequency = <25000000>. - Write path: dropping
read-onlyonly lets MTD setMTD_WRITEABLE. spi-apple-qspi still starts withread_only=Y; apple-nvram'sWriteWindow(aurora-bless) clears it for the write and restores it, and the driver admits only page programs and 4 KiB erases inside the nvram partition of a known part, latching read-only on a fault. The J616s, J713 and J700 work the same way. - K114s part 1 (00:07, this DTB effect only): mtd nvram flags 0x800 -> 0xc00, GD25UF64E (jedec c88317, a known part), SR1 00, Enforcing, 0 failed.
- Not blocking: the K116s and K116c gain a NOR probe that nobody has booted yet (Axboe / Joshua rows, already under Still to run). The probe is a JEDEC read, and writes still need the known-part gate.
- Local CI device-tree checks (scripts/dtc/apple-dt-check.sh, dtschema 2026.9, main
2d96d922vs main plus this PR): 139 DTBs both sides, 1188 = 1188 warning lines, 0 new, 0 removed. apple-dart-pd-check: 0 new. CI's own dt-checks run is still queued. - Merge order: this conflicts with #3376 (
t6050-k114s.dts) and #3363 (t6050-k114c.dts). Merge this first; its CI is already queued, and those two take main afterwards.
|
K114s row, round trip complete: the other lane booted its macOS guest five times tonight (00:07-00:33), each time with |
|
Non-author merge-train review at Checked
|
Problem
aurora-bless --nextand--set-bootfail on the K114s with EACCES, even as root./dev/mtd3"nvram" has noMTD_WRITEABLE, becauset6050-k114s.dtsmarks the partitionread-only. The K114c's partition is read-only too ("until a later change lifts it"), and the K116s and K116c describe no boot NOR at all. The J616s, J713 and J700 leave the partition writable, and blessing works there (the J615 keeps its own read-only, as it has no NVRAM write entry yet). Lanes need one-shot blesses on the K boards.Change
One device-tree commit. The boot NOR and its NVRAM partition move into
t6050-k114-k116.dtsi, withoutread-only, together with thenvramalias. The live K114s, K116s and J716c ADTs and the K114c and K116c 27.2 DeviceTrees all give/arm-io/qspi/spinor/anvramat 0x700000, 0xc0000 bytes. The flash is single-wire, as on the K114s and J775D. spi-apple-qspi is unchanged: it still starts read-only, and after root opts in it only admits bounded, verified programs and 4 KiB erases inside this partition, on a flash part it knows.Tested: DTB checks only so far. All 11 T6050 DTBs were built and compared with main. K114s and K114c lose
read-only(the K114c also states the single-wire default), K116s and K116c gain the NOR and its partition, and the other seven are byte-identical. dtschema shows the same messages as main (0 new).Risk: two-way · K114s, K114c, K116s, K116c: the NVRAM partition becomes writable through spi-apple-qspi's verified write path (root opt-in, known part, NVRAM banks only). K116s/K116c also start probing the boot NOR.
Still to run
/dev/mtd*"nvram" writeable, the qspi part accepted,aurora-bless --next --set-boot "Macintosh HD"then a reboot lands in macOS once, and the next boot is back on Aurora.