On Mon, Mar 28, 2022 at 6:29 AM Sam Leffler via Devel
The rootserver gets various caps setup for it by the kernel (see Table 9.1 in the manual). This includes the gobal ASID, IRQ, Domain, and Sched controllers. I need these caps in a process created by the rootserver. This is within a CAmkES environment. So far I've created CAmkES component attributes that signal the rootserver should hand-off a cap by moving the rootserver's cap to the designated CNode just before it terminates. This involves modifications to CAmkES, capDL, and the rootserver. Is there a better way? Is there an existing example of doing this? Are any of these global objects accessible some other way than hand-off from the rootserver?
CapDL and the capdl-loader-app should already be able to move these caps without extra modifications. They exist in the spec: https://github.com/seL4/capdl/blob/master/capDL-tool/CapDL/Model.hs#L376-L38... The "interrupts" tutorial (https://docs.sel4.systems/Tutorials/interrupts.html) works by having the irq_control cap moved into one of the component CNodes. The capdl spec fragment that does this is: ``` cnode_timer { // ... 0x8: irq_control } ``` Note that this tutorial isn't CAmkES but uses a CapDL spec and the rootserver to set up the tutorial apps. Within camkes, I'm not immediately aware of any public examples that use any of these caps. There's one template that does appear to support moving a sched_control cap to a component: https://github.com/seL4/camkes-tool/blob/271d6a2405d571272b252fcf308e7581cdd... A custom CAmkES template could be added which would work for any of the special caps you mentioned as they are all defined in the library camkes uses to generate specs: https://github.com/seL4/capdl/blob/master/python-capdl-tool/capdl/Object.py#... The loader moves these special caps in a final move phase after all other caps have been created so that they are moved after any caps have already been derived from them. These global objects can't be copied or created and so the only way for them to get given to a new CSpace is for them or a CNode that they're stored in to be moved to the target CSpace.
-Sam _______________________________________________ Devel mailing list -- devel@sel4.systems To unsubscribe send an email to devel-leave@sel4.systems