Skip to content

arm: apple: publish MTP handoff transactionally - #6

Closed
RyanTheTide wants to merge 1 commit into
aurora-wipfrom
fix/mtp-handoff-transaction-20261013
Closed

RyanTheTide wants to merge 1 commit into
aurora-wipfrom
fix/mtp-handoff-transaction-20261013

Conversation

@RyanTheTide

Copy link
Copy Markdown
Contributor

Repeated device-tree fixup could retain an advertised MTP handoff after clearing its live-session flag, causing the helper to shut down. Build and validate the complete handoff in a scratch FDT, publish it transactionally, and preserve the original blob and session on failure. Matching reservations and references are reused; conflicting or malformed metadata is rejected.

Based on current aurora-wip (0cb6fed6a105), preserving DJ's default-on MTP configuration and keyboard adoption help. Exact source: 08d604cdbfa3d32f2387e41a3eb3bdd022d86d83.

Validation: strict full build with CONFIG_WERROR; 23 real-libfdt host cases, including repeat fixup, publication/allocation failure injection, malformed references, reservation conflicts and buffer bounds. Independent cross-bootloader source review completed. Hardware Stage 1/2 and keyboard handoff qualification are still pending; keep draft until those pass.

Public-source implementation with author, LLM assistance and Signed-off-by provenance retained in the commit.

Repeated OS device-tree fixup encounters existing MTP reservations and
clears the live-session flag while leaving the old handoff contract in
the blob. The helper is then shut down despite the advertised session.

Build the complete contract in a scratch FDT and retain bypass only after
all writes succeed. Reuse matching reservations and deduplicate references
while preserving unrelated regions and streams. Reject conflicting or
malformed metadata, invalid buffer ranges, overlap and incomplete writes.
On failure preserve the original blob and session state and propagate the
error through board setup so no partial contract reaches the OS.

Add real-libfdt host tests of the production publisher and board admission:
repeat fixup, every publication-write failure, allocation and bypass
failures, malformed references, conflicting reservations and bounded
buffers. The repeated-fixup and write-failure regressions fail on c523219.
Retain the latest public default-on MTP configuration and DJ's kernel
adoption help unchanged; this rebased change only updates the transaction
code, board admission and host fixture.

(cherry picked from commit 444ef2a655def03c46b333282051b59a4869a305)

Signed-off-by: Ryan Murray <[email protected]>
Assisted-by: LLM
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Closing as a stale draft (13/10). The loader is frozen except for bug fixes, and this change has not had a Neo boot test. Reopen with a boot test if it is still wanted.

@RyanTheTide
RyanTheTide deleted the fix/mtp-handoff-transaction-20261013 branch October 23, 2026 09:20
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.

1 participant