Add PRESTEP0 DDR pre-init step to boot protocol#44
Merged
Conversation
HiTool sends PRESTEP0 (a 64-byte DDR controller pre-init) before DDRSTEP0 for all SoCs. Without it, chips like hi3516av200/av300 fail during SPL transfer because DDR init doesn't complete properly. - Add optional PRESTEP0 field to SoCProfile schema - Send PRESTEP0 HEAD+DATA+TAIL before DDRSTEP0 when present - Add PRESTEP0 data to 66 chip profiles (extracted from HiTool 5.0.61) - Add hi3516av300 profile - Fix power-cycle timing: start handshake before power-on to catch fast-boot devices with <100ms bootrom windows - Add packet-level debug tracing to protocol (logger.debug) Tested on hi3516av300 hardware: full DDR→SPL→U-Boot transfer succeeds. Co-Authored-By: Claude Opus 4.6 (1M context) <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.
Summary
logger.debug()calls throughout the protocol for diagnosing boot issues with-dflag.Changes
src/defib/profiles/schema.py— Add optionalPRESTEP0field toSoCProfilesrc/defib/protocol/hisilicon_standard.py— Send PRESTEP0 before DDRSTEP0 when present; add debug tracingsrc/defib/recovery/session.py— Split power cycle: off → start handshake → on (catches fast bootrom)src/defib/profiles/data/hi3516av300.json— New profiletests/test_protocol_robustness.py— Update ACK counts for PRESTEP0Test plan
uv run pytest tests/ -x -v --ignore=tests/fuzz— 326 passed🤖 Generated with Claude Code