Skip to content

iPad 3: Add 64 GB PPN 1.3 read-only NAND and SFTL support - #155

Merged
henrikklee merged 2 commits into
OrchardLinux:armv7from
alistairreay:ipad3-nand-64gb
Dec 4, 2026
Merged

henrikklee merged 2 commits into
OrchardLinux:armv7from
alistairreay:ipad3-nand-64gb

Conversation

@alistairreay

Copy link
Copy Markdown

Summary

Adds strictly read-only support for 64 GB PPN 1.3 iPad 3 (iPad3,3) flash alongside the existing 32 GB PPN 1.6 geometry, in two commits:

  1. misc: apple-h2fmi-ro: Add 64 GB PPN 1.3 read-only geometry (drivers/misc/apple-h2fmi-ro.c):
    • Generalizes parameter-page matching (PPN Device Info) to a two-entry geometry table:
      • 32 GB PPN 1.6 (unchanged): 2 CAUs/CE (cau_bits = 3), 2048 blocks (11 bits), 8 lanes, 4-byte row / 8-byte full read address (PPN >= 1.5).
      • 64 GB PPN 1.3 (measured): 4 CAUs/CE (cau_bits = 2), 2064 blocks (12 bits), 16 lanes, 3-byte row / 7-byte full read address (PPN <= 1.4, verified against 13G37 iBEC.j2a at 0xbff08b44..0xbff08b92 and 0xbff0a83e).
    • Registers 32 strictly read-only MTDs (j2a-lane0..15 normal and SLC, 8 KiB data + 32 B OOB, 256 MLC / 128 SLC pages) and passes .buses = 2, .caus = 8, .blocks = 2064 to apple-sftl.
    • Remains strictly read-only by construction: zero program, erase, or data-in opcodes.
  2. mtd: apple-sftl: Add read-only 64 GB PPN 1.3 (8 KiB) geometry (drivers/mtd/apple-sftl-core.c):
    • Adds sftl_64gb_8k (buses = 2, caus = 8, lanes = 16, blocks = 2064, pages = 256, subblocks = 2057, vfl_pages = 128, vfl_first = 2057, bootstrap = { 2061 }, disk_pages = 15625000, lpages = 15625016, lpp = 2, writer = false).

Testing

  • Built apple-h2fmi-ro.o, apple-sftl-core.o (W=1, zero new warnings), and full zImage on orchard_applearmv7_defconfig.
  • Verified live on a 64 GB iPad 3 (iPad3,3 / J2A, untethered iOS 8.4.1 12H321):
    • apple-h2fmi-ro: all 4 packages (bus 0/1, ce 0/1) matched PPN 1.3 and registered 32 read-only MTDs (lanes 0-15 normal + SLC, 2064 blocks).
    • apple-sftl: replayed 15625000 logical pages (sequence 1558635350), registered read-only /dev/applesftl0 (ro = 1, 62500000 1K-blocks), /dev/applesftl0p1 (System, 2881488 1K-blocks), and /dev/applesftl0lwvm2 (Data, scattered LwVM, ro = 1, 59050032 1K-blocks).
    • Mounted /dev/applesftl0p1 read-only (hfsplus), read /System/Library/CoreServices/SystemVersion.plist (8.4.1 / 12H321), and verified bit-for-bit SHA-256 of /usr/share/firmware/multitouch/J2a.mtprops (2d3c60af96fe72f30b8be5ebe0400a9379fb9825eb2bfca4beaee1536aec2e1f) matching the signed Apple IPSW.
  • Note: 32 GB PPN 1.6 hardware was not physically re-tested; its geometry, row/full address byte widths (4/8), and sftl_32gb parameters remain byte-for-byte identical.

Generalize the strictly read-only S5L8945X H2FMI/PPN driver to match
both measured iPad3,3 geometries from the PPN Device Info parameter page:
- 32 GB PPN 1.6: 2 CAUs/CE (cau_bits 3), 2048 blocks (11 bits), 8 lanes,
  4-byte row / 8-byte full read address (PPN >= 1.5)
- 64 GB PPN 1.3: 4 CAUs/CE (cau_bits 2), 2064 blocks (12 bits), 16 lanes,
  3-byte row / 7-byte full read address (PPN <= 1.4, verified in iBEC)

Both capacities share 8 KiB data + 32 B OOB pages (8224 raw bytes, 256
MLC / 128 SLC pages per block) and remain strictly read-only with no
write or erase opcodes.

Signed-off-by: Alistair Reay <alistair.reay@gmail.com>
Add the measured read-only SFTL geometry for 64 GB PPN 1.3 iPad 3 units
(4 packages x 4 CAUs = 16 lanes, 2064 blocks/CAU, 256 MLC / 128 SLC pages,
8 KiB pages / lpp=2, 2057 superblocks, VFL in block 2061 of lanes 0-7,
15625000 exported + 16 hidden logical pages). Strictly read-only
(writer = false).

Signed-off-by: Alistair Reay <alistair.reay@gmail.com>
@henrikklee
henrikklee merged commit 7c934ee into OrchardLinux:armv7 Dec 4, 2026
3 checks passed
@henrikklee

Copy link
Copy Markdown

Thanks, @alistairreay! Merged as is.

This gives the 64 GB iPad 3 (PPN 1.3, 8 KiB pages) read-only access to its NAND through the shared SFTL driver. The layout is chosen per NAND layout from match data, not per board, which is exactly how we want it.

One note for later: the layout entry sets older_epoch_subtype1. That's fine for reading. On a writer it must stay off until it is confirmed that accepting older-epoch pages can't make the driver write over newer data. That's relevant to #167.

Open follow-up: #60 touches the same table and will need a small rebase onto this.

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