Skip to content

mtd: recover native Apple VFL and SwissPPNFTL reads - #89

Merged
henrikklee merged 2 commits into
OrchardLinux:mainfrom
shaynelegault:p105/06-ftl-read
Nov 7, 2026
Merged

henrikklee merged 2 commits into
OrchardLinux:mainfrom
shaynelegault:p105/06-ftl-read

Conversation

@shaynelegault

@shaynelegault shaynelegault commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

H2FMI exposes physical PPN pages, while filesystems need Apple's logical storage map. This draft adds a read-only kernel VFL/SwissPPNFTL reader for the measured 64 GB profile and exposes the 64,000,000,000-byte logical medium as applesftlN.

Recovery selects agreeing VFL contexts and lane tables, validates saved SFTL ranges and replays later data/trim records. It scans open blocks fully, preserving data after erased-lane holes. H2FMI serializes canonical normal/SLC page transactions. The provider has no program or erase callback, and LwVM partition mapping belongs above its logical disk.

The latest source tip is e7d118292d828b9796d85d19872653f7d4a8cb67. It bounds recovery and subsequent reads to 32,768 physical requests and ten minutes from probe by default. Provider errors and exhausted limits permanently stop that reader instance. The module parameters are positive read-only policy inputs for bounded qualification sessions.

Depends logically on the geometry/read topic02. The proposed Orchard review stack places this after03 so the MTD patch directory has one application order before the append writer. Public evidence lives in docs/bring-up/p105-sftl-reader.md, the P105 capability comments and the A5 chip descriptor. Both logical storage capabilities remain missing pending exact-revision hardware qualification.

Validation:

  • The actual mapping core matched all 28,830 checked map-union endpoints from a saved private capture through sequence 187831212. LwVM headers and the System prefix agreed with prior native iOS reads. This used saved pages and performed zero device operations.
  • At reader commit e5960c537, all eight tests passed in an ARM64 QEMU KUnit kernel built from pristine pinned Linux 6.12 plus the exact reader/test sources and Kbuild entries. This ran without Cascadia or an H2FMI hardware backend.
  • The latest lifetime revision adds five boundary tests. Its core/test fixture passed ASan/UBSan, and its changed frontend/test objects passed the current ARMv7 generated-header build with warnings-as-errors except the existing vmstat enum warning. Earlier core/frontend/test/provider object builds also passed. The latest lifetime tests have no separate kernel KUnit run recorded here.
  • All 34 catalog tests and explicit device/chip schema checks pass. Regenerating the support matrix leaves capability rows unchanged.

This remains a draft. A complete exact-revision image, approved P105 boot with USB recovery, controller timing and bounded logical reads remain to be qualified. Sustained writes and interruption recovery belong to the dependent writer work. Encrypted iOS contents remain ciphertext.

Depends on NAND reads #86, controller programming #87, ARMv7 producers #82 and patch selection #85. Programming stays disabled; the controller topic is a series-order dependency. The branch integrates current Orchard main 221c8223 and preserves its new install tools and platform publishing. Its MTD patch delta follows the programming topic, while producer commits are included to keep later installed-root drafts buildable.

The resolved current-base branch ran 663 Orchard tests successfully, with one platform-dependent skip. All 450 ARM64 patches remain selected, and the import stays unchanged. Exact current-kernel image qualification remains pending.

Proposed changelog text awaits owner approval: P105: recover the measured native VFL/SwissPPNFTL map through a bounded read-only kernel block provider.

shaynelegault and others added 2 commits November 7, 2026 20:35
Document native VFL/SwissPPNFTL recovery, saved-capture crosschecks,
KUnit results and the latest finite provider lifetime. Keep both logical
storage capabilities missing until exact-revision device qualification.
Record the host and ARM64 test limits separately from hardware evidence.

All 34 catalog tests pass. Matrix regeneration leaves capability rows
unchanged; the P105 device and A5 chip schemas validate.

Assisted-by: LLM
Add the PPN page provider and the Apple VFL/SwissPPNFTL translation layer
of OrchardLinux#89 to kernel/patches/armv7/mtd, built into the apple-armv7 kernel. The
64 GB iPad mini 1's iOS disk appears as a read-only applesftlN, and its
LwVM partitions with it.

The read budget and lifetime module parameters are gone, so a mounted
root reads for as long as the system runs; a provider error still stops
the reader. Each patch keeps Shayne Legault as author and notes the
changes and his original commit IDs. The bring-up notes and the board
README follow the driver as carried.

Assisted-by: LLM
@henrikklee
henrikklee merged commit 6592eec into OrchardLinux:main Nov 7, 2026
11 checks passed
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