sel4 smmuv2.0 on tx2 related questions
Hi sel4-devs, I have been trying to make some understandings of smmuv2.0 features provided by sel4. According to the vmm project for the tx2 platform, such as the vm_minimal apps, after all the compiling, there will be two caps,vm0_sid and vm0_cb,which is supposed to be used for stage2 address translation. My questions are as followed: 1. Which smmu device was the sid cap assigned to ? 2. How were these two caps created in the cdl file? There seems no special configuration for Cmakes that is related to the caps. 3. According to the tx2.dts, there are many sid numbers assigned to the smmu device. Why was there just one sid cap created by sel4? 邮件免责申明 Email Disclaimer 本邮件仅供本邮件指定收件人使用,其所载内容可能因含有保密信息或其它原因而不得披露。除本公司及本邮件指定收件人外,任何人不得公开、传播、分发、复制、印刷或使用本邮件之任何部分或其所载之任何内容。如您误收到本邮件,请立即通知本公司,并将原始邮件、附件及其所有复本从系统中删除,切勿使用。 This email is for the use of the designated receivers only,and the content is not allowed to be disclosed due to the confidential information or other reasons. Except for the Company and the designated receivers of this email, no one shall disclose, disseminate, distribute, copy, print or use any part of this email or any content contained therein. If you receive this email by mistake, please notify the Company immediately, and delete the original email, attachments and all copies from the system. Do not use it. 网络通信可能含有计算机病毒或其它缺陷,可能无法准确和/或及时送达其它系统,亦可能受阻而不为本公司或本邮件指定收件人所知。本公司对此类错误或遗漏以及任何因使用本邮件而引致之任何损失概不承担责任。 Network communication may contain computer viruses or other defects, which may not be delivered to other systems accurately and / or in time, or may be blocked by the Company or the designated receivers of this email. The Company shall not be liable for such errors or omissions and for any loss arising from this email. 本邮件所载任何内容仅作为业务层面交流与参考,除非明确说明,本公司不对邮件所载内容之准确性、完整性或公平性等承担任何法律责任。 Any contents contained in this email are only for the purpose of business communication and reference only. Unless explicitly stated otherwise, the Company shall not assume any legal responsibility for the accuracy, completeness or fairness of the content contained in the email. 本邮件指定收件人应特别注意:本邮件所载任何内容不构成本公司对本邮件指定收件人和/或其所属商业实体的任何要约、要约邀请或承诺,任何权利义务皆以双方签字盖章的书面文件为准。除经本公司以签字盖章的书面文件确认外,收件人和/或其所属商业实体不得以本邮件所载任何内容作为其向本公司主张任何权利或利益的正式依据。 The designated receivers should pay special attention to the fact that nothing contained in this email shall constitute an offer, invitation or acceptance by the Company to the designated receivers of this email and/or its affiliated business entities, and any rights and obligations are subject to the written documents signed and sealed by both parties. Except from the written document signed ,sealed and confirmed by the Company, the receivers and / or its affiliated business entity shall not rely on anything contained in this email as the formal basis for claiming any rights or interests to the Company.
On Mon, Jul 11, 2022 at 9:40 PM Tao Heng 陶恒-SW
Hi sel4-devs,
I have been trying to make some understandings of smmuv2.0 features provided by sel4. According to the vmm project for the tx2 platform, such as the vm_minimal apps, after all the compiling, there will be two caps,vm0_sid and vm0_cb,which is supposed to be used for stage2 address translation. My questions are as followed:
1. Which smmu device was the sid cap assigned to ?
2. How were these two caps created in the cdl file? There seems no special configuration for Cmakes that is related to the caps.
3. According to the tx2.dts, there are many sid numbers assigned to the smmu device. Why was there just one sid cap created by sel4?
There are 4 cap types for SMMUv2 that the kernel provides: seL4_ARM_SIDControl (https://docs.sel4.systems/projects/sel4/api-doc.html#sel4_arm_sidcontrol): This cap is used to create caps for particular StreamIDs. seL4_ARM_SID (https://docs.sel4.systems/projects/sel4/api-doc.html#sel4_arm_sid): This cap type authorises directing a StreamID to a particular ContextBank. seL4_ARM_CBControl (https://docs.sel4.systems/projects/sel4/api-doc.html#sel4_arm_cbcontrol): This cap is used to create ContextBank caps that give access to specific context banks seL4_ARM_CB (https://docs.sel4.systems/projects/sel4/api-doc.html#sel4_arm_cb): This cap authorizes access to a specific context bank. It is used to associate a Context bank with a VSpace object and with a StreamID using the seL4_ARM_SID cap. I'm not sure that a working example for SMMUv2 for the camkes-vm was merged. You're right that it looks like there's no way in Camkes to provide the SID and CB to actually give to the VM instance. The TX2 itself has a static assignment of SIDs to devices and I don't think this can be changed. In addition there's some registers in the platform memory controller that need to be configured to actually turn on SMMU for each device, otherwise the memory transactions will bypass. Kent.
_______________________________________________ Devel mailing list -- devel@sel4.systems To unsubscribe send an email to devel-leave@sel4.systems
Hi Kent and qian ,
According to the seL4 Reference Manual Version 12.1.0-dev , these APIs you mentioned below have been included. Please can you confirm that if you have made your formal validation of the SMMUv2 based on TX2 platform, which means the device driver of vm can apply dma request and the vmm can make the stage2 translation.
If so, I would be grateful if you could give more detailed information about the working example for SMMuv2.
-----邮件原件-----
发件人: Kent Mcleod [mailto:kent.mcleod72@gmail.com]
发送时间: 2022年7月12日 17:02
收件人: Tao Heng 陶恒-SW
Hi sel4-devs,
I have been trying to make some understandings of smmuv2.0 features provided by sel4. According to the vmm project for the tx2 platform, such as the vm_minimal apps, after all the compiling, there will be two caps,vm0_sid and vm0_cb,which is supposed to be used for stage2 address translation. My questions are as followed:
1. Which smmu device was the sid cap assigned to ?
2. How were these two caps created in the cdl file? There seems no special configuration for Cmakes that is related to the caps.
3. According to the tx2.dts, there are many sid numbers assigned to the smmu device. Why was there just one sid cap created by sel4?
There are 4 cap types for SMMUv2 that the kernel provides: seL4_ARM_SIDControl (https://docs.sel4.systems/projects/sel4/api-doc.html#sel4_arm_sidcontrol): This cap is used to create caps for particular StreamIDs. seL4_ARM_SID (https://docs.sel4.systems/projects/sel4/api-doc.html#sel4_arm_sid): This cap type authorises directing a StreamID to a particular ContextBank. seL4_ARM_CBControl (https://docs.sel4.systems/projects/sel4/api-doc.html#sel4_arm_cbcontrol): This cap is used to create ContextBank caps that give access to specific context banks seL4_ARM_CB (https://docs.sel4.systems/projects/sel4/api-doc.html#sel4_arm_cb): This cap authorizes access to a specific context bank. It is used to associate a Context bank with a VSpace object and with a StreamID using the seL4_ARM_SID cap. I'm not sure that a working example for SMMUv2 for the camkes-vm was merged. You're right that it looks like there's no way in Camkes to provide the SID and CB to actually give to the VM instance. The TX2 itself has a static assignment of SIDs to devices and I don't think this can be changed. In addition there's some registers in the platform memory controller that need to be configured to actually turn on SMMU for each device, otherwise the memory transactions will bypass. Kent.
_______________________________________________ Devel mailing list -- devel@sel4.systems To unsubscribe send an email to devel-leave@sel4.systems
邮件免责申明 Email Disclaimer 本邮件仅供本邮件指定收件人使用,其所载内容可能因含有保密信息或其它原因而不得披露。除本公司及本邮件指定收件人外,任何人不得公开、传播、分发、复制、印刷或使用本邮件之任何部分或其所载之任何内容。如您误收到本邮件,请立即通知本公司,并将原始邮件、附件及其所有复本从系统中删除,切勿使用。 This email is for the use of the designated receivers only,and the content is not allowed to be disclosed due to the confidential information or other reasons. Except for the Company and the designated receivers of this email, no one shall disclose, disseminate, distribute, copy, print or use any part of this email or any content contained therein. If you receive this email by mistake, please notify the Company immediately, and delete the original email, attachments and all copies from the system. Do not use it. 网络通信可能含有计算机病毒或其它缺陷,可能无法准确和/或及时送达其它系统,亦可能受阻而不为本公司或本邮件指定收件人所知。本公司对此类错误或遗漏以及任何因使用本邮件而引致之任何损失概不承担责任。 Network communication may contain computer viruses or other defects, which may not be delivered to other systems accurately and / or in time, or may be blocked by the Company or the designated receivers of this email. The Company shall not be liable for such errors or omissions and for any loss arising from this email. 本邮件所载任何内容仅作为业务层面交流与参考,除非明确说明,本公司不对邮件所载内容之准确性、完整性或公平性等承担任何法律责任。 Any contents contained in this email are only for the purpose of business communication and reference only. Unless explicitly stated otherwise, the Company shall not assume any legal responsibility for the accuracy, completeness or fairness of the content contained in the email. 本邮件指定收件人应特别注意:本邮件所载任何内容不构成本公司对本邮件指定收件人和/或其所属商业实体的任何要约、要约邀请或承诺,任何权利义务皆以双方签字盖章的书面文件为准。除经本公司以签字盖章的书面文件确认外,收件人和/或其所属商业实体不得以本邮件所载任何内容作为其向本公司主张任何权利或利益的正式依据。 The designated receivers should pay special attention to the fact that nothing contained in this email shall constitute an offer, invitation or acceptance by the Company to the designated receivers of this email and/or its affiliated business entities, and any rights and obligations are subject to the written documents signed and sealed by both parties. Except from the written document signed ,sealed and confirmed by the Company, the receivers and / or its affiliated business entity shall not rely on anything contained in this email as the formal basis for claiming any rights or interests to the Company.
participants (2)
-
Kent Mcleod
-
Tao Heng 陶恒-SW