Skip to content

p105: enable qualified SFTL reclamation - #224

Merged
henrikklee merged 1 commit into
OrchardLinux:mainfrom
shaynelegault:p105/reclamation-enable
Nov 23, 2026
Merged

henrikklee merged 1 commit into
OrchardLinux:mainfrom
shaynelegault:p105/reclamation-enable

Conversation

@shaynelegault

@shaynelegault shaynelegault commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Change

This enables SFTL normal-block reclamation on the qualified 64 GB P105. A new
apple,p105ap-fmi compatible selects H2FMI match data whose erase callback is
also gated by the measured 8-CAU, 2,088-block, 128-page geometry. The binding,
shared driver change and P105 device-tree selection live in their current
kernel patch layers.

The shared apple,s5l8940x-fmi fallback keeps normal-block erase disabled.
The 16 GB package remains read-only until it has separate accounting, erase
extent and recovery evidence.

The device descriptor now marks storage writes and reclamation working for
the qualified package. Its installer warning about permanent blank-block
consumption is gone, and the evidence docs, compatibility table, matrix and
changelog record the result.

Hardware qualification

The device was a 64 GB iPad mini 1 (iPad2,5) running iOS 9.3.5. Linux wrote
and reread a 64 MiB file through SFTL, then passed e2fsck. A fresh Linux load
recovered the mapping. The following iOS boot reported clean System and Data
filesystems while the file retained SHA-256
d41b5b52b5a8b4f5329a413c2edcd6de1f575bac32e70fd76fafcf1dfa6c6421.

Block 122 began with role 9, wear 7 and no live mapping. The trial erased all
16 lanes. Every one of its 2,048 normal pages and 1,024 SLC aliases read
blank, while neighboring controls stayed unchanged. Linux saved native
accounting at checkpoint 190469389, reused one page, and recovered its data
with wear 8 on an independent load.

iOS later moved that page, reclaimed block 122 and saved wear 9. A cold
read-only Linux audit recovered the iOS mapping and found the block blank in
both views. The final iOS boot passed both filesystem checks and reread the
complete witness unchanged. The full sequence is in
p105-sftl-device-qualification.md.

Exact submitted revision

Orchard commit 4f9e061056667ccf2931cb0c07edc9db3bb206e9 reconstructs kernel tree
224176f8f6fbb029edd0982b6f81dbb8cdf0b588, byte for byte with the tree used
for the final build and device boot. The boot receipt was captured on its
predecessor, 14f8205ab5c4da4f929d16d92f1209eb055d1546. The submitted revision
changes the two ARM64 series selectors and their CI regression test. Its
ARMv7 series and source key are unchanged.

The private prepared image was started once with
python3 lab-boot/one-boot.py --go-once. Its RAM payload SHA-256 was
db36a68341c75b4076422b0ab9252a1be32d6fc322618b934d8e975c4b361531.
On P105, apple-h2fmi bound 31200000.flash-controller through
apple,p105ap-fmi followed by the shared fallback. It reported 16 CAUs and
2,088 blocks, then SFTL recovered the 125,000,000-sector disk. The integration
check fenced the disk and its three partitions read-only. Its kernel log had
zero program or erase messages. The iPad returned to the paired iOS device
afterward.

Validation

The pinned ARMv7 config survived olddefconfig unchanged. A complete
zImage, modules and DTB build exited successfully. The compiled P105 DTB has
the specific compatible first; the H2FMI object contains the local erase
callback and no machine-compatibility lookup.

dt_binding_check passed for apple,h2fmi.yaml. Strict checkpatch reported
0 errors, 0 warnings and 0 checks for each exported kernel patch under the
repository's kernel trailer policy. The committed Orchard series reproduced
the tested kernel tree byte for byte. The ARM64 series preserve the previous
order for all 838 applicable patches and leave H2FMI to apple-armv7.

The focused Python 3.14 suite passed 104 catalog, ARMv7 install, P105 evidence
and kernel-export tests. The generated matrix check and the new platform-
scoping regression passed. GitHub's Linux matrix covers the complete unit
suite and each changed kernel platform.

@shaynelegault
shaynelegault force-pushed the p105/reclamation-enable branch 2 times, most recently from 14f8205 to cfe0e96 Compare November 23, 2026 23:05
Select a P105-specific H2FMI compatible and match data for the measured 64 GB geometry. Keep the shared fallback and unqualified package profiles read-only.

Record the physical erase, native reuse, cold recovery, paired iOS filesystem checks, and exact-revision read-only boot.

Assisted-by: LLM
Signed-off-by: Shayne Legault <8741557+shaynelegault@users.noreply.github.com>
@shaynelegault
shaynelegault force-pushed the p105/reclamation-enable branch from cfe0e96 to 4f9e061 Compare November 23, 2026 23:10
@shaynelegault
shaynelegault marked this pull request as ready for review November 23, 2026 23:17
@shaynelegault

Copy link
Copy Markdown
Contributor Author

@henrikklee, please review this for merge. The documented 64 GB P105 qualification covers physical erase and native reclamation across Linux and iOS. Required CI is green on a submitted ARMv7 source key that matches the device-tested tree.

@henrikklee
henrikklee merged commit 4f9e061 into OrchardLinux:main Nov 23, 2026
13 checks passed
@henrikklee

Copy link
Copy Markdown
Contributor

Thank you, Shayne, this is on main now (45aea35, with your commit 4f9e061 kept as is). The 64 GB qualification is excellent work.

Two changes on our side:

  • Location: your three kernel patches now live in kernel/patches/armv7/mtd as 0025 (binding), 0026 (erase) and 0027 (P105 DT note), next to the H2FMI and SFTL code they change. The apple-16k and apple-4k series keep their whole patches/drivers and patches/devices layers, so new folders can't silently drop out.
  • Rule: erase no longer depends on a P105 compatible or the 64 GB constants. H2FMI offers the verified erase to SFTL for every package whose discovered geometry validates, and works out the erase row and the pages it reads back from that geometry. The bootstrap window stays protected, and every SFTL check (both views blank, accounting before reuse, reload before granting) is unchanged. The binding keeps only apple,s5l8940x-fmi. The 16 GB package gets the erase too, but its disk stays read-only until SFTL models the 12H321 writer. If you have a 16 GB unit, a read-only boot showing the driver comes up cleanly would help. If you only have the 64 GB, nothing more is needed.

One request: could you reply with your Signed-off-by: (real name and email) for 0025–0027, so we can add it to the patches?

@shaynelegault

shaynelegault commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor Author

Thanks, @henrikklee. I've added sign-off for the patches 0025–0027.

https://github.com/OrchardLinux/orchard/pull/226/changes

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