Pass init EP to spawn child
This commit is contained in:
parent
22401e4cb0
commit
24c9fa55a9
3
.vscode/c_cpp_properties.json
vendored
3
.vscode/c_cpp_properties.json
vendored
@ -15,7 +15,8 @@
|
||||
"compilerPath": "",
|
||||
"intelliSenseMode": "gcc-arm64",
|
||||
"defines": [
|
||||
"CONFIG_TIMESLICE=80"
|
||||
"CONFIG_TIMESLICE=80",
|
||||
"CONFIG_INTERCONNECT_DRIVER_LMP"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
@ -48,6 +48,7 @@ struct spawninfo {
|
||||
|
||||
// these capabilites are all stored in the taskcn cnode
|
||||
struct capref cspace_cap_selfep; // < Endpoint to itself. You can get this capability by retyping the dispatcher capability to ObjType_EndPointLMP.
|
||||
struct capref cspace_cap_initep; // < Endpoint to init
|
||||
struct capref cspace_cap_dispatcher; // < Contains the dispatcher capability.The dispatcher is the equivalent of a “Process Control Block” in other operating systems. You can create one using dispatcher_create(...);
|
||||
struct capref cspace_cap_rootcn; // < Contains a capability for the root (L1) CNode.
|
||||
struct capref cspace_cap_dispframe; // < A capability to the dispatcher frame, used to communicate between a process and the CPU driver.
|
||||
|
||||
@ -362,6 +362,9 @@ errval_t spawn_load_argv(int argc, char *argv[], struct spawninfo *si,
|
||||
si->cspace_cap_selfep.cnode = si->cspace_l2_cnode_taskcn;
|
||||
si->cspace_cap_selfep.slot = TASKCN_SLOT_SELFEP;
|
||||
|
||||
si->cspace_cap_initep.cnode = si->cspace_l2_cnode_taskcn;
|
||||
si->cspace_cap_initep.slot = TASKCN_SLOT_INITEP;
|
||||
|
||||
si->cspace_cap_dispatcher.cnode = si->cspace_l2_cnode_taskcn;
|
||||
si->cspace_cap_dispatcher.slot = TASKCN_SLOT_DISPATCHER;
|
||||
|
||||
@ -403,6 +406,8 @@ errval_t spawn_load_argv(int argc, char *argv[], struct spawninfo *si,
|
||||
|
||||
err = cap_retype(si->cspace_cap_selfep, si->cspace_cap_dispatcher, 0, ObjType_EndPointLMP, 0, 1);
|
||||
if (err_is_fail(err)) return err;
|
||||
err = cap_copy(si->cspace_cap_initep, cap_selfep);
|
||||
if (err_is_fail(err)) return err_push(err, LIB_ERR_CAP_COPY_FAIL);
|
||||
|
||||
// - Setup the child's vspace
|
||||
// afeer: create level 0 page table
|
||||
|
||||
Loading…
Reference in New Issue
Block a user