profiles: cap hi3516cv200's SPL upload at its 16 KB SRAM ceiling - #127
Merged
Conversation
hi3516cv200 is the hi3518ev200's sibling in every way that matters here: identical ADDRESS and FILELEN (only PRESTEP0 differs), so the same spl_address 0x04010500 and the same 0x04014000 SRAM ceiling. Both come out of OpenIPC/u-boot-hi3516cv200's build.sh, and both shipped images carry their LZMA payload at 0x4BB0 — so detection returns 0x4800 on cv200 too and overruns the window by the same 3328 bytes. The ev200 side of this was confirmed on real hardware in OpenIPC/firmware#2299: chunks 1-14 ACK first try, chunk 15 crosses 0x04014000, the bootrom stops answering and 32 retries time out. cv200 runs the identical numbers through the identical code path. This does not make cv200 recoverable — the prelude these builds produce is 19376 bytes against a 15104-byte window, so the capped SPL is still missing 4272 bytes of live code and won't execute (OpenIPC/u-boot-hi3516cv200#5 tracks that). It does stop defib writing over the bootrom's stack on the way to finding out, which is the difference between a clean failure and a chip that has to be power-cycled out of a wedged state. No cv200 on the bench; ev200's hardware trace plus the byte-identical profile parameters are the evidence.
PR Summary by QodoCap hi3516cv200 SPL uploads at SRAM ceiling
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTip of the day💡 Did you know, you can switch off images and animations for a plain-text comment |
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.
Follow-up to #126, which fixed the same defect on hi3518ev200.
Why cv200 has it too
The two profiles are the same silicon window — only
PRESTEP0differs:ADDRESS0x04013000/0x04010500/0x81000000FILELEN0x0040/0x3b000x04010500 + 0x3B00 = 0x040140000x4BB0→ detects0x48000x4BB0→ detects0x4800Both are built by the same
build.shin OpenIPC/u-boot-hi3516cv200 (SOCS="hi3518ev200 hi3516cv200").Evidence
The ev200 half was confirmed on real hardware in OpenIPC/firmware#2299 — chunks 1-14 ACK on
attempt 1/32, chunk 15 targets
0x04013D00..0x04014100, the bootrom stops answering and all 32retries time out. With #126's cap the same board completes both stages with no retries at all.
cv200 puts identical numbers through the identical code path. I have no cv200 to burn, so that
inference plus the profile diff is the evidence here.
What this does and doesn't fix
Does: stops defib writing past the bootrom's stack mid-upload.
Doesn't: make cv200 recoverable. The prelude these builds produce is 19376 B against a 15104 B
window, so even a correctly-capped SPL is missing 4272 bytes of live code and won't execute —
tracked upstream as OpenIPC/u-boot-hi3516cv200#5. This is the difference between a clean failure
and a wedged chip.
Test plan
pytest— 734 passed, 2 skippedspl_sram_limit == 0x3B00andspl_address + limit == 0x04014000