用于某个阶段(Stage 1/2或全部)不进行转换,即输出等于输入。
重要API
API描述arm_iommu_create_mappingconfigure a VA rangearm_iommu_attach_deviceassociate a VA range with a device and enable SMMU translationsdma_alloc_coherentallocate buffer and map into SMMU for devicedma_map_sgmap existing buffer (by struct scatterlist) into SMMU for deviceion_share_dma_bufConvert an Ion handle to a dma bufdma_buf_attachPrepare a dma buf for dma on the given devicedma_buf_map_attachmentGet the scatterlist for the given attachmentmsm_iommu_get_busGet proper bus for your domain 针对上述的疑问,目前的理解如下:
1)SMMU并不是MMU,而是按照相同原理工作在QSEE环境中的一个硬件。
2)加入安全访问控制的关键设备,通过增加SMMU额外实现了一层安全防护措施。而Context Bank就是与要访问的设备有关的上下文标志,因为在MMU阶段就可以通过地址来过滤出设备相关的信息,并应用这些新增的策略。
3)第一阶段的HLOS是在MMU完成地址转换的基础上对地址的又一次修正,可以假定的认为MMU转换出的地址增加上Context Bank相关的信息生成了一个全新的地址,而SMMU就是完成这个全新地址到最终地址的转换。至于增加SMMU之后是否对MMU转换出的地址进行修正,还不得而知。
参考文档:80-p2055-1_b