kata-os-model: CONFIG_NOISY_INIT_CNODE cleanup

Using cap_identify only works on Debug builds; instead print the CDL
cap type.

Change-Id: Ie338877ca12e404f412a7c9b170e1897bfd5d0df
GitOrigin-RevId: fe8a143353b43f18a1b6606b88ef0ba1799adcb8
This commit is contained in:
Sam Leffler 2022-06-27 16:27:18 +00:00
parent 70b86c9c84
commit f28da794b2

View File

@ -1019,14 +1019,12 @@ impl<'a> KataOsModel<'a> {
_ => (false, self.get_orig_cap(target_cap_obj)), _ => (false, self.get_orig_cap(target_cap_obj)),
}; };
let src_depth = seL4_WordBits as u8; let src_depth = seL4_WordBits as u8;
#[cfg(feature = "CONFIG_NOISY_INIT_CNODE")]
debug!("cap@{} has type {}", src_index, sel4_sys::cap_identify(src_index));
if mode == InitCnodeCmode::MOVE && move_cap { if mode == InitCnodeCmode::MOVE && move_cap {
if is_ep_cap || is_irq_handler_cap { if is_ep_cap || is_irq_handler_cap {
#[cfg(feature = "CONFIG_NOISY_INIT_CNODE")] #[cfg(feature = "CONFIG_NOISY_INIT_CNODE")]
debug!(" Populate slot {} by moving {}:{}:{} -> {}:{}:{}", debug!(" Populate {:?} slot {} by moving {}:{}:{} -> {}:{}:{}",
cnode_slot.slot, target_cap_type, cnode_slot.slot,
src_root, src_index, src_depth, src_root, src_index, src_depth,
dest_root, dest_index, dest_depth, dest_root, dest_index, dest_depth,
); );
@ -1037,8 +1035,8 @@ impl<'a> KataOsModel<'a> {
}? }?
} else { } else {
#[cfg(feature = "CONFIG_NOISY_INIT_CNODE")] #[cfg(feature = "CONFIG_NOISY_INIT_CNODE")]
debug!(" Populate slot {} by mutating {}:{}:{} -> {}:{}:{}", debug!(" Populate {:?} slot {} by mutating {}:{}:{} -> {}:{}:{}",
cnode_slot.slot, target_cap_type, cnode_slot.slot,
src_root, src_index, src_depth, src_root, src_index, src_depth,
dest_root, dest_index, dest_depth, dest_root, dest_index, dest_depth,
); );
@ -1073,8 +1071,8 @@ impl<'a> KataOsModel<'a> {
// NB: the mapped frame cap is stored in the dup table. // NB: the mapped frame cap is stored in the dup table.
let mapped_frame_cap = self.get_dup_cap(frame_cap.obj_id); let mapped_frame_cap = self.get_dup_cap(frame_cap.obj_id);
#[cfg(feature = "CONFIG_NOISY_INIT_CNODE")] #[cfg(feature = "CONFIG_NOISY_INIT_CNODE")]
debug!(" Map slot {} by moving {}:{}:{} -> {}:{}:{}", debug!(" Map {:?} slot {} by moving {}:{}:{} -> {}:{}:{}",
cnode_slot.slot, target_cap_type, cnode_slot.slot,
src_root, mapped_frame_cap, src_depth, src_root, mapped_frame_cap, src_depth,
dest_root, dest_index, dest_depth, dest_root, dest_index, dest_depth,
); );
@ -1092,8 +1090,8 @@ impl<'a> KataOsModel<'a> {
}?; }?;
} else { } else {
#[cfg(feature = "CONFIG_NOISY_INIT_CNODE")] #[cfg(feature = "CONFIG_NOISY_INIT_CNODE")]
debug!(" Populate slot {} by minting {}:{}:{} -> {}:{}:{} {:?} data {:#x}", debug!(" Populate {:?} slot {} by minting {}:{}:{} -> {}:{}:{} {:?} data {:#x}",
cnode_slot.slot, target_cap_type, cnode_slot.slot,
src_root, src_index, src_depth, src_root, src_index, src_depth,
dest_root, dest_index, dest_depth, dest_root, dest_index, dest_depth,
target_cap_rights, target_cap_data, target_cap_rights, target_cap_data,