Repository navigation
arm: apple: let the J713 import take a 192 KiB m1n1 tree - #15
Conversation
|
Reviewed 733d8f2. The 192 KiB source/used-tree bound is confined to the opt-in J713 importer; both trees must identify J713 and T8132 before allocation or copying. The fixed 1 MiB importer capacity ceiling, 256 KiB SYS_FDT_PAD, Apple load addresses and relocation code are unchanged. The new minimum is 192 + 16 = 208 KiB, leaving 48 KiB within that existing pad. At the largest accepted used OS tree, the normal padded buffer is 448 KiB; scratch is malloc(capacity), checked for failure and freed, with no new static, stack or fixed-address buffer. EFI checks the caller's allocated size before setting totalsize. I found no new overlap or relocation risk from this change. The source relocation reservation uses the actual DT size already. Please also update the APPLE_J713_FDT Kconfig help's stale 144 KiB minimum to 208 KiB. The contributor's current #14/#15 evidence includes the over-limit refusal without this change and a J713 boot with #15, #14 and #457 DTBs carrying both manifests and matching an existing enrolment. Keep #15 before #14 in the merge order, with #457's control DTB and the separately reviewed SEP activation/calibration requirements. #13's AOP import must remain present when rebasing the loader stack. The exact-head Apple build and public host tests, plus composition with #13/#14, are queued in an ordinary buildslot. I will update this same comment with their results. For Neo, M1 Pro and M2 the normal importer path returns before this bound is used when the opt-in property is absent; an opt-in non-J713 tree is still refused. This changes the shared Apple binary, so byte-for-byte binary identity is not claimed. The requested check is unchanged execution and unchanged tree contents on those boards. No hardware test was performed here. |
The per-kernel import refuses a source tree larger than 128 KiB. m1n1's J713 tree is the OS DTB plus its handoff additions: 126,328 bytes with a 7.3 J713 DTB, so 4.7 KiB under the bound. A tree that also carries the SEP node and its two boot manifests (about 10 KiB more) was refused with -EINVAL, and the boot stopped with no console. Raise the bound to 192 KiB. The required SYS_FDT_PAD becomes 208 KiB, which apple_m1_defconfig's 256 KiB already provides. Add a regression for a source of about 160 KiB. Signed-off-by: Erik Bourget <[email protected]>
733d8f2 to
f5cd324
Compare
|
Fixed in f5cd324. The |
Keep the AOP handoff and SEP manifest tests from aurora-wip next to the large source regression from this branch. Assisted-by: LLM Co-Authored-By: Claude Opus 5.5 <[email protected]>
The J713 per-kernel import refuses a source tree (m1n1's handoff tree) larger than
J713_FDT_MAX_SOURCE, which is 128 KiB. On a 7.3 J713 that tree is already close to the bound.With the second tree, the import returns
-EINVALand the boot stops after m1n1's logo with no console. That happened on hardware with a boot.bin carrying linux#457's DTBs. Ordinary device-tree growth would reach the same cliff.Change
J713_FDT_MAX_SOURCEto 192 KiB. The derivedSYS_FDT_PADminimum becomes 208 KiB, whichapple_m1_defconfig's 256 KiB already covers, so no config change is needed. The#errortext, the doc sentence and the padding-guard test follow.test_j713_large_source, which imports a ~160 KiB source. It fails with the old bound.Testing
Host: all J713 importer tests pass (
private_capturesskipped). checkpatch is clean, andapple_m1_defconfigbuilds.Real trees: the production importer, built on the host, was run against the bundled capture of m1n1's tree, with the SEP node and the two real manifests added, into a real J713 per-kernel DTB.
-22.1, with both manifests in the OS tree byte-identical.Hardware: a J713
boot.binwith this, arm: apple: carry the J713 SEP boot manifests into the OS tree #14 and linux#457's DTBs boots, and the import carries the manifests. The sameboot.binwithout this change stopped after the m1n1 logo.u-boot#14 depends on this for J713 trees that carry the SEP.