Changed mmio_address in RzAnalysisOp to mmios[4] - #6453
SSharshunov wants to merge 1 commit into
Conversation
b2e1267 to
a1b5050
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files
... and 15 files with indirect coverage changes Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
Rot127
left a comment
There was a problem hiding this comment.
Have you used AI by any chance for that one?
If yes, please check more carefully the changes before marking the PR as ready for review.
I use Gemini only to find information about obscure architectural details. Sometimes I use to understand the Rizin internals, but I don't use copy-paste. |
a1b5050 to
19a0b5b
Compare
|
In general, situations that seem to suggest AI use occur when I leave myself marks for future development, which reviewers then ask me to remove. As a result, some changes are lost in the future, resulting in illogical code. |
|
sure, no problem. |
|
i do not understand the issue. how can there be multiple MMIO at the same address? |
I have mnemonics that represent several register names. While reverse engineering the RIZIN code, I noticed that values like 0xfe06 are replaced with DPP3 if a value is set in mmio_address. A code search revealed that this is the only place where this field is used. So, I simply adapted the code for this architecture. There's also a place in AVR that uses this field. |
19a0b5b to
7d00db3
Compare
|
for me that means that the map loaded for that rom image is wrong, and should load the correct one. i do not think you can just swap MMIO devices easily in AVR. Is not an arch like the gameboy one where you have the concept of ram slots thus you have at the same address different data depending how a register is configured |
7d00db3 to
a6874eb
Compare
|
oh this kinda works like a page table. let me double check the changes |
|
ok, so i think you should check if it matches with a DPPx register, then extract the upper 2 bits and print as this is because you dont know what are the contents of DPP0-3 when disassembling |
|
you can also do this directly when resolving the mmio. just map the address as |
a6f89bc to
15c1816
Compare
7974bda to
898e6fd
Compare
d842004 to
157b5dc
Compare
|
Please rebase. |
157b5dc to
140870c
Compare
Done |
0d87da3 to
2df611d
Compare
|
I split the changes into two PRs; this one contains only the MMIO-related changes. |
2df611d to
89825c8
Compare
89825c8 to
ca7efa4
Compare


Your checklist for this pull request
RZ_APIfunction and struct this PR changes.RZ_API).Detailed description
Replacing the single mmio_address with an mmios array
The single mmio_address field has been replaced with a 4-element array, mmios[4], and an mmios_count counter has been added. This change is necessary for devices or structures with multiple MMIO regions, allowing for the flexible handling of up to four addresses without altering the base type.
This field was previously used in only two places within a single architecture (AVR) and nowhere else.
Changed mmio_address in RzAnalysisOp to mmios[4] to fully replace register names from the SDBC database if multiple registers are used simultaneously.
For example:
add DPP3:0x025c, DPP0add DPP3:0x025c, SORICArchitecture changes from C166 have been moved to #6819
Test plan
CI is green