Repository navigation
nvme: apple: find the linear SQ doorbells from the nvme window - #1060
Merged
RyanTheTide merged 1 commit intoNov 8, 2026
Merged
RyanTheTide merged 1 commit into
RyanTheTide merged 1 commit into
Conversation
Newer ANS firmware moves the linear submission queue doorbells (+0x24908/+0x24910) into the NVMMU block and ends the "nvme" register block at 0x10000, before them. T6040 selects that layout by compatible. T8142 can run either layout, depending on the ANS firmware of the macOS stub it boots. The J813 device tree describes a 0x30000 "nvme" block with the doorbells in it. A J704 booting the macOS 27.0 stub has them in the NVMMU instead, and its ADT gives the "nvme" block as 0x10000 (ans reg[9]). With the compatible alone the driver would write the doorbells past the end of that mapping. Take the layout from the device tree as well: when the "nvme" window does not reach the doorbells, they are in the NVMMU block, and the firmware has already enabled them, as on T6040. Device trees whose "nvme" window covers the doorbells, including the current J813 one, keep the existing behaviour. Tested on a MacBook Pro (14-inch, M5) J704 booting the macOS 27.0 stub: the root filesystem on the internal SSD is used daily. Signed-off-by: Dmitriy <noc@pimk.in> Assisted-by: LLM
This was referenced Nov 7, 2026
This was referenced Nov 8, 2026
Contributor
|
Tested before merging, silent: one-shot test kernel 7.3.0-aurora-f4mtr3x/y = integration/aurora 36d9198 plus this PR, #1082, #1083, #1084, #1060 and the Touch ID series, all merged onto the current tip. It was booted once on each of the four fleet Macs (M2 J413, M1 Pro J316s, J616s M4 Pro, MacBook Neo J700), and our regression suite was compared with the fleet30 rows on the same Macs:
For this PR in particular: built with 0 warnings. On all four Macs the nvme window reaches the linear doorbells, so lsq_in_nvmmu keeps its per-SoC value, and NVMe boot, suspend/resume and I/O behaved as on fleet30. Thank you, Dmitriy! |
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.
Newer ANS firmware moves the linear SQ doorbells (
+0x24908/+0x24910) into the NVMMU block and ends thenvmeregister block at0x10000. T6040 selects that layout by compatible (lsq_in_nvmmu).T8142 can run either layout, depending on the ANS firmware of the macOS stub it boots. The J813 device tree describes a
0x30000nvmeblock with the doorbells in it. A J704 booting the macOS 27.0 stub has them in the NVMMU, and its ADT gives thenvmeblock as0x10000. With the compatible alone the driver writes the doorbells past the end of that mapping.This takes the layout from the DT as well: if the
nvmewindow doesn't reach the doorbells, they're in the NVMMU block and the firmware has already enabled them, as on T6040. DTs whose window covers the doorbells — including the current J813 one — behave as before.Testing
-Wthread-safety-analysisones ondisable_lock, outside this change).nvmewindow is0x30000).Prepares for the J704 device tree, which describes the
nvmeblock as the ADT does.Prepared with Claude Opus 5.5; tested by me on the hardware.