Repository navigation
D890UV: carry the rest of every 128 KB flash half a write lands in (#143) - #160
Merged
Merged
Conversation
) The D890UV rebuilds a whole 128 KB flash half from only the data a session sends, like the D578. Proven on hardware 2026-11-22: an identical-bytes write of the erased window 0x02004000 wiped the zone lists at 0x02000000 and the radio booted to "Program error, please initialize the radio". Every D890 write path now also rewrites, unchanged, each other populated window of a touched half: Program, the settings write, Restore backup, run_patch_writes and the dev helpers (write_carrying / carry_halves / carry_blocks). The same write through the fixed path left the zone-list half byte-identical and the radio booted clean. Contacts are capped at 655 (the contact bank's first half): past it the records run into a half holding only the radio's 22334455/5555AAAA markers, and reads at +0x40000 alias the bank's first records. The restore guard accepts a carried window only in a half an owned window shares. FakeAnytone gains `rebuilds_halves`, which reproduces the wipe. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #143.
What was found
The AT-D890UV rebuilds a whole 128 KB flash half from only the data a write session sends, the same as the AT-D578UV. This was proven on hardware on 2026-11-22: an identical-bytes write of the erased window
0x02004000wiped the zone lists at0x02000000(same half), and the radio booted to "Program error, please initialize the radio". The radio was recovered from a whole-half read-only sweep taken minutes before the test.A read-only sweep of 28 halves measured the layout. Each codeplug 256 KB block is a data half followed by a half holding only
22334455@+0x1FBF4 and5555AAAA@+0x1FFFC. Data halves carry no marker, and reads at +0x40000 alias (0x03A40000returns the contacts at0x03A00000).The fix
run_patch_writes, and the dev helpers (write_carrying/carry_halves/carry_blocks).MAX_CONTACTS_WRITE, the contact bank's first half). Program no longer reads or clears records past it.FakeAnytone.rebuilds_halvesmodels the radio's commit and reproduces the wipe in a test.Verification
0x02004000write through the fixed path. The radio booted clean, and the zone-list half read back byte-identical to the snapshot.carry_halves, which is unit-tested against the rebuilding fake.npm run cigreen locally.🤖 Generated with Claude Code