Draft
Conversation
a7d0ac2 to
40e2963
Compare
svenpeter42
requested changes
Feb 6, 2026
proxyclient/tools/chainload.py
Outdated
| continue | ||
| if val & 1: | ||
| print(f"{hex(val & 0xfffffffff000)} != {hex(rvbar)}") | ||
| print("The cpu_impl_reg is already locked, this might fail...") |
Member
There was a problem hiding this comment.
I'd just throw an exception here or even check for this earlier and refuse to even start.
|
|
||
| write64(impl, (u64)_vectors_start); | ||
| if ((read64(impl) & 0xfffffffff000) != (u64)_vectors_start) { | ||
| write64(impl, (u64)_vectors_start); |
Member
There was a problem hiding this comment.
Same here, if the register is locked and doesn't contain the right address just fail earlier
Signed-off-by: Yureka <yureka@cyberchaos.dev>
svenpeter42
reviewed
Feb 6, 2026
proxyclient/tools/chainload.py
Outdated
| if locked and do_write: | ||
| raise Exception("RVBAR is locked and does not already contain start address") | ||
|
|
||
| if write_rvbar: |
Member
There was a problem hiding this comment.
How can this even work? write_rvbar isn't defined anywhere before. Please fix and test this before pushing.
Contributor
Author
There was a problem hiding this comment.
Now compile-tested. I'll be a while before I can test on my M4 again.
Signed-off-by: Yureka <yureka@cyberchaos.dev>
Signed-off-by: Yureka <yureka@cyberchaos.dev>
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.
According to the discussion here, the RVBAR at cpu_impl_reg+0x00 is already set to the m1n1 entrypoint and locked by iBoot for all cores on M4.
Indeed, I can see the following values:
m1n1 base:
0x100034f4000E-Cores cpu_impl_reg at
0x210X50000:0x100100034f4001P-Cores cpu_impl_reg at
0x211X50000:0x1100100034f4001And voila, when skipping the writes when the value is already correct (which previously produced SErrors when writing to the P-Core cpu_impl_reg),
smp_start_secondaries()now works as expected.