-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Address mapping formulas #169
Comments
The address-map transformation works similarly to ranges. Let's say that the address range of an "amba" indirect-bus is 0xf000000-0xff000000 after ranges transformations.
The source of the mapping, which is the address of the amba bus the range 0xf0110000-0xf0120000. It is a subset of the original amba bus range (0xf000000-0xff000000) but it is still valid. The range 0xf0110000-0xf0120000 becomes 0x110000-0x120000 for the cpu cluster.
|
@sstabellini thanks. In the meantime I went and tried to understand ranges better, especially the behavior of the The precise details are missing from the devicetree specification and it took me a while to figure things out, but I think I get the basic "ranges" behavior now (and found at least one bug in Zephyr's handling of reg/ranges warnings along the way). I'm still not clear on this issue, though, sorry:
What do you mean by the address range after ranges transformations? DT spec requires that "simple-bus" have a ranges property, so a /soc node with compatible simple-bus will have the obvious address translations to the root node's address space. But "indirect-bus" has no such requirement, so it's not clear what this means to me in a case like this one:
I don't see a meaningful address range for What am I missing here? |
Hi Marti,
which means that all addresses are 1:1 mapped to the parent address space. By "Let's say that the address range of an "amba" indirect-bus is 0xf000000-0xff000000 after ranges transformations" I meant that the address range of amba is 0xf000000-0xff000000 after ranges transformation, in case there is a meaningful ranges property, or as-is (1:1) if there is an empty ranges property. |
It is still a ranges transformation in my mental model, even if the transformation is 1:1 (no changes). |
So does that mean that we should require |
Yes |
OK, then I would like to revisit #167. Given the context here, it seems that an |
Or, if not that, then at least there's a requirement that there be "ranges all the way down" to an indirect-bus that is not a direct child of the root. |
Yes there should be "ranges all the way down", well spotted |
As of 4fc81d4, the specification
semantics for
address-map
properties is still not 100% clear to mewhen I try to implement it.
I think it would be really good for the specification to include some
formulas or pseudo-code that says the exact way to translate a node's
register blocks to the CPU cluster address space, including a formula
for deciding whether a node is visible to the address map based on
register range overlaps.
This relates to the issue about whether we need a rule requiring
explicit address map translation via
ranges
properties for any nodeswe want to map in that aren't a child of the root.
The text was updated successfully, but these errors were encountered: