sel4-sys: root thread slot assignments are const, not static

Change-Id: I7ac579a313f94fa4c194f1a608ca3098f792aab0
GitOrigin-RevId: 9bdb59a84dd54aff0a4ce074cf5b127c0fd8b658
This commit is contained in:
Sam Leffler 2021-11-10 16:52:55 +00:00
parent 77f71b6de7
commit f31340b0bc

View File

@ -82,6 +82,7 @@ macro_rules! error_types {
}; };
} }
// NB: potentially arch-dependent
pub type seL4_Word = usize; pub type seL4_Word = usize;
pub type seL4_CPtr = usize; pub type seL4_CPtr = usize;
@ -184,20 +185,21 @@ impl ::core::clone::Clone for seL4_IPCBuffer {
} }
} }
/* bootinfo */ // Bootinfo
pub static seL4_CapNull: seL4_Word = 0; /* null cap */ // Fixed cap slots for root thread.
pub static seL4_CapInitThreadTCB: seL4_Word = 1; /* initial thread's TCB cap */ pub const seL4_CapNull: seL4_Word = 0; // null cap
pub static seL4_CapInitThreadCNode: seL4_Word = 2; /* initial thread's root CNode cap */ pub const seL4_CapInitThreadTCB: seL4_Word = 1; // initial thread's TCB
pub static seL4_CapInitThreadVSpace: seL4_Word = 3; /* initial thread's VSpace cap */ pub const seL4_CapInitThreadCNode: seL4_Word = 2; // initial thread's root CNode
pub static seL4_CapIRQControl: seL4_Word = 4; /* global IRQ controller cap */ pub const seL4_CapInitThreadVSpace: seL4_Word = 3; // initial thread's VSpace
pub static seL4_CapASIDControl: seL4_Word = 5; /* global ASID controller cap */ pub const seL4_CapIRQControl: seL4_Word = 4; // global IRQ controller
pub static seL4_CapInitThreadASIDPool: seL4_Word = 6; /* initial thread's ASID pool cap */ pub const seL4_CapASIDControl: seL4_Word = 5; // global ASID controller
pub static seL4_CapIOPort: seL4_Word = 7; /* global IO port cap (null cap if not supported) */ pub const seL4_CapInitThreadASIDPool: seL4_Word = 6; // initial thread's ASID pool
pub static seL4_CapIOSpace: seL4_Word = 8; /* global IO space cap (null cap if no IOMMU support) */ pub const seL4_CapIOPort: seL4_Word = 7; // global IO port (null if not supported)
pub static seL4_CapBootInfoFrame: seL4_Word = 9; /* bootinfo frame cap */ pub const seL4_CapIOSpace: seL4_Word = 8; // global IO space (null if no IOMMU support)
pub static seL4_CapInitThreadIPCBuffer: seL4_Word = 10; /* initial thread's IPC buffer frame cap */ pub const seL4_CapBootInfoFrame: seL4_Word = 9; // bootinfo frame
pub static seL4_CapDomain: seL4_Word = 11; /* global domain controller cap */ pub const seL4_CapInitThreadIPCBuffer: seL4_Word = 10; // initial thread's IPC buffer frame
pub const seL4_CapDomain: seL4_Word = 11; // global domain controller
#[repr(C, packed)] #[repr(C, packed)]
#[derive(Debug, Clone, Copy, PartialEq, Eq)] #[derive(Debug, Clone, Copy, PartialEq, Eq)]