iommu: msm: Fix incorrect address list preparation
During secure map, the scatterlist is converted into a simple array of 1MB chunk addresses. This array is then passed to TZ. The code which does this incorrectly increments physical base address each time, besides adding chunk size. Fix this. Change-Id: I82b3b4eb3b008af14450873b8d34867df81e6ca8 Signed-off-by: Shiraz Hashim <shashim@codeaurora.org>
This commit is contained in:
parent
e90f7c418e
commit
0a1dafa258
|
@ -636,8 +636,7 @@ static int msm_iommu_sec_ptbl_map_range(struct msm_iommu_drvdata *iommu_drvdata,
|
|||
return -EINVAL;
|
||||
}
|
||||
while (offset < len) {
|
||||
pa += chunk_offset;
|
||||
pa_list[cnt] = pa;
|
||||
pa_list[cnt] = pa + chunk_offset;
|
||||
chunk_offset += SZ_1M;
|
||||
offset += SZ_1M;
|
||||
cnt++;
|
||||
|
|
Loading…
Reference in New Issue