mirror of
https://github.com/AmbiML/sparrow-kata-full.git
synced 2025-09-13 13:39:14 +00:00
Merge "capdl: add CDL_ObjID_Invalid"
GitOrigin-RevId: 57f22db2fddaa9c3d8fd8024cf3ea6411b81daef
This commit is contained in:
@@ -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;
|
||||
|
@@ -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
|
||||
|
@@ -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,
|
||||
) {
|
||||
|
Reference in New Issue
Block a user