From 24975a813e3dafed62f0d197e18e22b4b03bbd2d Mon Sep 17 00:00:00 2001 From: Sam Leffler Date: Fri, 16 Sep 2022 18:01:52 +0000 Subject: [PATCH] kata-os-cmakes: add get_request_cap Change-Id: I53ef53d4b75150b67dd06062ac6c0f2d34a339c2 GitOrigin-RevId: f3ad14def755ad21b40a03f9020aa8cf3af39652 --- apps/system/components/kata-os-common/src/camkes/src/lib.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/system/components/kata-os-common/src/camkes/src/lib.rs b/apps/system/components/kata-os-common/src/camkes/src/lib.rs index 1ce01b9..c204d7a 100644 --- a/apps/system/components/kata-os-common/src/camkes/src/lib.rs +++ b/apps/system/components/kata-os-common/src/camkes/src/lib.rs @@ -25,6 +25,7 @@ use slot_allocator::KATA_CSPACE_SLOTS; use sel4_sys::seL4_CNode_Delete; use sel4_sys::seL4_CPtr; +use sel4_sys::seL4_GetCap; use sel4_sys::seL4_GetCapReceivePath; use sel4_sys::seL4_Result; use sel4_sys::seL4_SetCap; @@ -163,6 +164,9 @@ impl Camkes { RequestCapCleanup {} } + // Returns the capability attached to an seL4 IPC. + pub fn get_request_cap() -> seL4_CPtr { unsafe { seL4_GetCap(0) } } + // Attaches a capability to a CAmkES RPC reply msg. seL4 will copy // the capabiltiy. pub fn set_reply_cap(cptr: seL4_CPtr) {