Merge "capdl: add CDL_ObjID_Invalid"

GitOrigin-RevId: 57f22db2fddaa9c3d8fd8024cf3ea6411b81daef
This commit is contained in:
Sam Leffler
2022-07-28 14:29:48 +00:00
parent 846993767c
commit 1b0f694aaf
3 changed files with 6 additions and 5 deletions

View File

@@ -132,9 +132,10 @@ pub const CDL_TCB_TemporalFaultEP_Slot: seL4_Word = CDL_TCB_SC_Slot + 1;
pub const CDL_TCB_VCPU_Slot: seL4_Word = CDL_TCB_TemporalFaultEP_Slot + 1;
pub type CDL_ObjID = seL4_Word;
pub const CDL_ObjID_Invalid: CDL_ObjID = CDL_ObjID::MAX;
// NB: some object id's are written in the spec as -1
pub fn is_objid_valid(val: CDL_ObjID) -> bool {
val != CDL_ObjID::MAX
val != CDL_ObjID_Invalid
}
pub type CDL_IRQ = seL4_Word;
pub type CDL_Core = seL4_Word;

View File

@@ -59,8 +59,8 @@ impl<'a> KataOsModel<'a> {
let mut roots = SmallVec::new();
// Record objects that receive special treatment later on.
let mut bootinfo_frame: CDL_ObjID = CDL_ObjID::MAX;
let mut untyped_cnode: CDL_ObjID = CDL_ObjID::MAX;
let mut bootinfo_frame: CDL_ObjID = CDL_ObjID_Invalid;
let mut untyped_cnode: CDL_ObjID = CDL_ObjID_Invalid;
// First, allocate most objects and record the cslot locations.
// The exception is ASIDPools, where create_object only allocates

View File

@@ -187,7 +187,7 @@ impl<'a> KataOsModel<'a> {
#[cfg(feature = "CONFIG_ARM_SMMU")]
sid_number: 0,
untyped_cnode: CDL_ObjID::MAX,
untyped_cnode: CDL_ObjID_Invalid,
untyped_index: 0,
untyped_max: 0,
@@ -291,7 +291,7 @@ impl<'a> KataOsModel<'a> {
let mut ut_index = self.untyped_index;
while let Err(e) = self.create_object(
&cnode,
CDL_ObjID::MAX, // NB: use something invalid in case it's used
CDL_ObjID_Invalid,
self.state.get_untyped_cptr(ut_index),
cnode_slot,
) {