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 c204d7a..dde536d 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 @@ -164,6 +164,13 @@ impl Camkes { RequestCapCleanup {} } + // Clears any capability attached to a CAmkES RPC request msg. + pub fn clear_request_cap() { + unsafe { + seL4_SetCap(0, 0); + } + } + // Returns the capability attached to an seL4 IPC. pub fn get_request_cap() -> seL4_CPtr { unsafe { seL4_GetCap(0) } } @@ -221,6 +228,17 @@ impl Camkes { ); } + // debug_assert wrappers for the current recv_path. + pub fn debug_assert_recv_path_empty(&self, tag: &str) { + Self::debug_assert_slot_empty(tag, &self.get_current_recv_path()); + } + pub fn debug_assert_recv_path_cnode(&self, tag: &str) { + Self::debug_assert_slot_cnode(tag, &self.get_current_recv_path()); + } + pub fn debug_assert_recv_path_frame(&self, tag: &str) { + Self::debug_assert_slot_frame(tag, &self.get_current_recv_path()); + } + // Dumps the contents of the toplevel CNode to the serial console. pub fn capscan() -> seL4_Result { // TODO(sleffler): requires CONFIG_PRINTING in the kernel