Protection Domain Declarations
ProtectionDomainDecl ::= 'ProtectionDomain' ident '(' priority (',' irq?)? (',' budget?)? (',' period?)? ')' ';'
priority ::= integer_literal // 0 ≤ p ≤ 254, enforced
irq ::= integer_literal // fits u16; range not enforced
budget ::= integer_literal // microseconds, default 1000
period ::= integer_literal // microseconds, default = budget
A protection-domain declaration introduces one named seL4 Microkit
protection domain (PD): an isolated thread of execution with its own
address space, scheduling parameters, and (optionally) one IRQ binding.
Each ProtectionDomain listed in a .fis system file pairs with one
.fi program file, <name>.fi beside the .fis.
Fields
- Name —
snake_caseidentifier. The matching<name>.fifile holds the PD’s mappings, events, and processes. - Priority — required, range
0..=254(it is read as au8below 255). Out-of-range values are rejected with a parse-time error. Higher numbers run first under the Microkit fixed-priority scheduler. - IRQ — optional; any value fitting a
u16parses (no range check is enforced by the compiler — pick a number the target board’s IRQ controller actually has), but one IRQ may be claimed by only one PD. When present, the PD is wired to receive that hardware interrupt on the reservedirqchannel and can observe it viairq?N/irq!Nevents. - Budget — optional, microseconds; defaults to
1000. Microkit schedules the PD for at mostbudgetmicroseconds out of everyperiod. - Period — optional, microseconds; defaults to whatever
budgetwas set to. Settingperiod > budgetproduces a sub-rate scheduling policy.
The trailing fields are positional, and any of them may be left empty to
set a later one: ProtectionDomain pd(100, , 500); sets the budget with no
IRQ, and ProtectionDomain pd(100, , , 2000); the period alone.
Validation
prioritymust be in0..=254.- A PD name is unique within the system file; a second declaration is an error at the later one.
- An IRQ number belongs to one PD.
- A PD that is referenced from a
Channelor from theSystem =composition must be declared. - A PD without a
<name>.fibeside the.fisis an error when the project is loaded, not when the.fisis parsed. A.fithat no PD names is only a warning, and the file is never opened.
Examples
// Three PDs with distinct priorities; IRQ on the outer driver only.
ProtectionDomain eth_outer(99, 159);
ProtectionDomain dd(150);
ProtectionDomain eth_inner(199, 155);
// A simulator with a low priority and no IRQ binding.
ProtectionDomain simulate(50);
// Explicit budget / period pair (sub-rate scheduling).
ProtectionDomain monitor(120, 0, 200, 1000); // priority 120, IRQ 0, 200 µs / 1 ms
System composition
A .fis file may hold a System = ... clause that names its PDs, joined
by the interleave operator |||, the only composition. The clause is
optional, and every PD it names must be declared:
System = eth_outer ||| dd ||| eth_inner ||| simulate;
The clause is checked for undeclared names only: every declared PD is built,
whether or not System lists it.