On Mon, Jul 11, 2022 at 9:40 PM Tao Heng 陶恒-SW <taoh...@saicmotor.com> wrote:
>
> 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
_______________________________________________
Devel mailing list -- devel@sel4.systems
To unsubscribe send an email to devel-leave@sel4.systems

Reply via email to