Skip to content

Commit aed4f3e

Browse files
committed
tool: add support for DomainSet_Set invocations
This commit adds the necessary definitions to push a DomainSet_Set invocation ot the loader. Signed-off-by: James Archer <j.archer@unsw.edu.au>
1 parent 442b41e commit aed4f3e

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

tool/microkit/src/sel4.rs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -730,6 +730,15 @@ impl Invocation {
730730
arg_strs.push(Invocation::fmt_field_cap("tcb", tcb, cap_lookup));
731731
(vcpu, cap_lookup.get(&vcpu).unwrap().as_str())
732732
}
733+
InvocationArgs::DomainSetSet {
734+
domain_set,
735+
domain,
736+
tcb,
737+
} => {
738+
arg_strs.push(Invocation::fmt_field("domain", domain as u64));
739+
arg_strs.push(Invocation::fmt_field_cap("tcb", tcb, cap_lookup));
740+
(domain_set, cap_lookup.get(&domain_set).unwrap().as_str())
741+
}
733742
};
734743
_ = writeln!(
735744
f,
@@ -762,6 +771,7 @@ impl Invocation {
762771
InvocationLabel::CnodeMint => "CNode",
763772
InvocationLabel::SchedControlConfigureFlags => "SchedControl",
764773
InvocationLabel::ArmVcpuSetTcb => "VCPU",
774+
InvocationLabel::DomainSetSet => "DomainSet",
765775
_ => panic!(
766776
"Internal error: unexpected label when getting object type '{:?}'",
767777
self.label
@@ -785,6 +795,7 @@ impl Invocation {
785795
InvocationLabel::CnodeMint => "Mint",
786796
InvocationLabel::SchedControlConfigureFlags => "ConfigureFlags",
787797
InvocationLabel::ArmVcpuSetTcb => "VCPUSetTcb",
798+
InvocationLabel::DomainSetSet => "Set",
788799
_ => panic!(
789800
"Internal error: unexpected label when getting method name '{:?}'",
790801
self.label
@@ -815,6 +826,7 @@ impl InvocationArgs {
815826
InvocationLabel::SchedControlConfigureFlags
816827
}
817828
InvocationArgs::ArmVcpuSetTcb { .. } => InvocationLabel::ArmVcpuSetTcb,
829+
InvocationArgs::DomainSetSet { .. } => InvocationLabel::DomainSetSet,
818830
}
819831
}
820832

@@ -952,6 +964,11 @@ impl InvocationArgs {
952964
vec![sched_context],
953965
),
954966
InvocationArgs::ArmVcpuSetTcb { vcpu, tcb } => (vcpu, vec![], vec![tcb]),
967+
InvocationArgs::DomainSetSet {
968+
domain_set,
969+
domain,
970+
tcb,
971+
} => (domain_set, vec![domain as u64], vec![tcb]),
955972
}
956973
}
957974
}
@@ -1056,4 +1073,9 @@ pub enum InvocationArgs {
10561073
vcpu: u64,
10571074
tcb: u64,
10581075
},
1076+
DomainSetSet {
1077+
domain_set: u64,
1078+
domain: u8,
1079+
tcb: u64,
1080+
},
10591081
}

0 commit comments

Comments
 (0)