Skip to content

Commit

Permalink
tool: add support for DomainSet_Set invocations
Browse files Browse the repository at this point in the history
This commit adds the necessary definitions to push a DomainSet_Set
invocation ot the loader.

Signed-off-by: James Archer <[email protected]>
  • Loading branch information
JE-Archer committed Jul 17, 2024
1 parent 442b41e commit aed4f3e
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions tool/microkit/src/sel4.rs
Original file line number Diff line number Diff line change
Expand Up @@ -730,6 +730,15 @@ impl Invocation {
arg_strs.push(Invocation::fmt_field_cap("tcb", tcb, cap_lookup));
(vcpu, cap_lookup.get(&vcpu).unwrap().as_str())
}
InvocationArgs::DomainSetSet {
domain_set,
domain,
tcb,
} => {
arg_strs.push(Invocation::fmt_field("domain", domain as u64));
arg_strs.push(Invocation::fmt_field_cap("tcb", tcb, cap_lookup));
(domain_set, cap_lookup.get(&domain_set).unwrap().as_str())
}
};
_ = writeln!(
f,
Expand Down Expand Up @@ -762,6 +771,7 @@ impl Invocation {
InvocationLabel::CnodeMint => "CNode",
InvocationLabel::SchedControlConfigureFlags => "SchedControl",
InvocationLabel::ArmVcpuSetTcb => "VCPU",
InvocationLabel::DomainSetSet => "DomainSet",
_ => panic!(
"Internal error: unexpected label when getting object type '{:?}'",
self.label
Expand All @@ -785,6 +795,7 @@ impl Invocation {
InvocationLabel::CnodeMint => "Mint",
InvocationLabel::SchedControlConfigureFlags => "ConfigureFlags",
InvocationLabel::ArmVcpuSetTcb => "VCPUSetTcb",
InvocationLabel::DomainSetSet => "Set",
_ => panic!(
"Internal error: unexpected label when getting method name '{:?}'",
self.label
Expand Down Expand Up @@ -815,6 +826,7 @@ impl InvocationArgs {
InvocationLabel::SchedControlConfigureFlags
}
InvocationArgs::ArmVcpuSetTcb { .. } => InvocationLabel::ArmVcpuSetTcb,
InvocationArgs::DomainSetSet { .. } => InvocationLabel::DomainSetSet,
}
}

Expand Down Expand Up @@ -952,6 +964,11 @@ impl InvocationArgs {
vec![sched_context],
),
InvocationArgs::ArmVcpuSetTcb { vcpu, tcb } => (vcpu, vec![], vec![tcb]),
InvocationArgs::DomainSetSet {
domain_set,
domain,
tcb,
} => (domain_set, vec![domain as u64], vec![tcb]),
}
}
}
Expand Down Expand Up @@ -1056,4 +1073,9 @@ pub enum InvocationArgs {
vcpu: u64,
tcb: u64,
},
DomainSetSet {
domain_set: u64,
domain: u8,
tcb: u64,
},
}

0 comments on commit aed4f3e

Please sign in to comment.