On Mon, 11 May 2020 at 05:36, Pankaj Bansal <email@example.com> wrote:
example I mention in LX2160A
But won't it?
There can be only two scenarios :
1. PCI address space coincides with CPU address space.
In this case host address = device address and translation = 0
2. PCI address space lies at some offset in CPU address space. Like the
In this case host address = device address + translation, where translation >0
I don't see how this matters.
Can there be a scenario where translation < 0 ? I don't think so
Translation uses unsigned 64-bit integer arithmetic, so if you need
the translation to go the other way, just subtract from
That is what confuses me. Why is this convoluted logic needed altogether ?
Why can't we use direct translation values (instead of MAX_UINT64 + 1 - translation) ?