summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin
diff options
context:
space:
mode:
authorJordan Crouse <jcrouse@codeaurora.org>2017-05-10 15:22:09 -0600
committerSushmita Susheelendra <ssusheel@codeaurora.org>2017-05-31 11:56:25 -0600
commitb39c609072d556dc39117e162cd396f7f4aea660 (patch)
tree56c22faef42f2fef6a29f4e87220ccb4f0106604 /tools/perf/scripts/python/bin
parenta5706c4fdac1a427fac7b30a49912a1d9d148cb9 (diff)
iommu/arm-smmu: Correctly calculate and use the TTBR1 pagetable
Due to an egregious misunderstanding of the specification it was thought that to do the TTBR1 matching correctly the sign extension bit needed to match the input address space. This is incorrect - the TTBR1 range is determined by the size of the TTBR1 space (in our case, the same as the input address space). For example if the input address size is 36, the effective range of the pagetables are: TTBR0: 0x00000000_00000000 - 0x0000000f_ffffffff TTBR1: 0xfffffff0_00000000 - 0xffffffff_ffffffff For its part the sign extension bit needs should be set based on the upstream bus size. If the device has a UBS of 49 then the sign extension bit is assumed by design to be 48 otherwise the driver needs to pick the highest available bit and reduce the input address space by 1. Because the client driver shouldn't need to know the upstream bus size, convention is to use a fully sign extended unsigned long address for TTBR1 mappings. If the sign extension bit is set lower than the upstream bus size some implementations assume that bits above the sign extension bit need to be zero and breaks the convention. Setting the sign extension bit correctly for the upstream bus size ensures that sign extension always works. The hardware will match an address to the TTBR1 if all the bits between the sign extension bit and the input address size are set to 1. We emulate this behavior in software when looking up a pagetable for a software operation. Change-Id: Ic0dedbad80c72f11bc8a7e6792f0e3c2f58bc674 Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions