Closed ratmice closed 2 years ago
While today there may only be a couple examples of complex conditional expressions, if the IDL were to be expanded in the future to define constants, enums, structs, and bitfields/typed unions, there would be many more examples of complex expressions, referencing not only configuration values but also constant and enum values.
So, I agree there should be a good way to encode expressions in the IDL.
As to how to encode them, I think there is a tension here between the cost of maintaining the XML file and the cost of generating a language binding from it.
Some additional questions I have along these lines:
Would maintaining the IDL become too cumbersome if expressions were encoded as proposed?
Is there an existing expression language that would be sufficient for current and future purposes that is both maintainable by a human as a simple expression string in the XML file and easily parsed and evaluated in many programming languages with widely available libraries?
As an aside, I think the root cause of this complexity is that the interface between the seL4 kernel and userland is so highly configuration dependent. This snowballs and deeply affects everything in libsel4, including which constants or enums are defined and what their values are, the layout and fields in structs/bitfields/unions, and which interfaces exist and what their methods are.
Because of all this complexity, the seL4 IDL XML file is really more of an IDL blueprint that must be evaluated against an seL4 configuration to generate the actual IDL.
I question whether this complexity is necessary and am curious how feasible or expensive simplifying it would be, but I'll leave that for a different discussion.
Does this need an RFC even though it isn't really changing any visible aspects or behavior, but just refining existing behavior?
Currently the generated libsel4
is the real interface, so I don't think this needs an RFC, but it does need broad support from the people who maintain the definitions.
It's not too hard to encode a boolean expression language into xml, but @canarysnort01 is right, it doesn't really stop there. If we want to include more, we'd still need to include some arithmetic expressions generated from cmake
. We could maybe try to keep those simple enough, but it would need reviewing of what definitions currently end up in libsel4 for all the different configurations.
I guess one of the main questions is if we want the XML to be human readable or not, but I think we do. Personally I'm not too fussed either way, although putting an expression AST into XML doesn't fill me with joy (but neither does embedding an expression language in strings in XML -- I guess I just don't like XML :-)).
As an aside, I think the root cause of this complexity is that the interface between the seL4 kernel and userland is so highly configuration dependent.
That is true, but unlikely to disappear. Managing user-level config is a non-design goal for the kernel. libsel4 is the layer that provides some abstraction by defining names etc, and we still think that this is the right place to do it, not the kernel ABI.
I guess I just don't like XML :-)
Would a different file format entirely be more appropriate for the IDL? Is there an existing one that would handle conditional compilation and expressions more naturally, and have wide support for generating language bindings in many different programming languages?
Would a different file format entirely be more appropriate for the IDL? Is there an existing one ...
Although, I'm not sure any existing IDL file format would be suitable for seL4, if we want to describe everything. For example, are the way bitfields and tagged unions represented unique to seL4? Also, it might be nice in the future to specify the object types that correspond to the interfaces and give properties for them such as their object size, all together as a unit, instead of as just different facts spread out in constants and enums and such.
An interesting prospect for sure, I mainly was working with the existing XML primarily because it is what is there, not any particular fondness for it.
One language that comes to mind for specifying e.g. bitfields and lowlevel architeture details is actually sail architecture definition language. I'm not sure its appropriate for this, but I would certainly find it interesting to explore taking the architecture independent seL4 model, and integrating it directly with the architecture specific cpu models of sail. It has some C/Ocaml export (But in the form of CPU emulators, I don't know how useful it'd be for what seL4 is currently generating)
That is quite the opposite end of the spectrum from this minor incremental change I proposed, but I definitely wouldn't mind experimenting in this regard, but certainly your teams have a lot more experience with machine models than I do to know whether it is a plausible idea.
To be clear I'm not advocating for moving away from XML at this point, just asking the question if there might be a better fit.
To be clear I'm not advocating for moving away from XML at this point, just asking the question if there might be a better fit.
Me neither, that was just a personal side comment, sorry to spark a long discussion.
Thanks for attempting to make progress on multi-lang support @ratmice! I think that translating the C-Preprocessor conditionals into XML is a valid step forward.
Should we include the CONFIG_ contents of the var attribute?
My opinion on this is yes, if the kernel/gen_config.h
file is still being used to supply the config. However, if a different file is generated that's also in XML, then the names could also be switched to the CMake naming conventions (KernelRootCNodeSizeBits
) at the same time which would align with what is used on the build configuration command line.
Is there any opposition to this or the approach taken here, or a better approach, or scheduling concerns if it could impact ongoing projects?
I think this proposed change is small enough that it can be done atomically without much impact to other projects.
there would be many more examples of complex expressions,
What are some examples of the different types of expressions needed? Are there any existing expressions in the XML that require arithmetic or is it still all boolean algebra?
there would be many more examples of complex expressions,
What are some examples of the different types of expressions needed? Are there any existing expressions in the XML that require arithmetic or is it still all boolean algebra?
I probably should have gone through the complete list before filing the report, I thought they were all boolean, But it turns out there is currently one greater-than expression so I'll need to expand upon it.
Here is a list of all existing non-simple expressions I believe.
!(defined(CONFIG_ARM_HYPERVISOR_SUPPORT) && defined(CONFIG_ARM_PA_SIZE_BITS_40))
!defined(CONFIG_KERNEL_MCS) && CONFIG_MAX_NUM_NODES > 1
defined(CONFIG_DEBUG_BUILD) && defined(CONFIG_BENCHMARK_TRACK_UTILISATION)
defined(CONFIG_DEBUG_BUILD) && defined(CONFIG_ENABLE_SMP_SUPPORT)
CONFIG_MAX_NUM_NODES > 1
Also I think that <config>
is already taken and will conflict with existing xml elements, so I'll need to come up with a different name for that.
Edit: missed 1.
CONFIG_ENABLE_SMP_SUPPORT
can be used instead of CONFIG_MAX_NUM_NODES > 1
at least.
What are some examples of the different types of expressions needed? Are there any existing expressions in the XML that require arithmetic or is it still all boolean algebra?
I did an analysis on seL4 12.0.0 (not the current version - sorry). In the tables below I list all of the expressions I could find in libsel4, either as part of conditional compilation or an expression in the C code.
The conditions on the syscalls, interfaces, bitfield structs, and tagged unions listed below currently exist in some form in an XML or BF file, although the given condition string I show is not the exact literal string used in the source material.
The constants, enums, and structs I list below are either guarded by a conditional compilation or use a non-literal expression as their value or array size.
I pruned out the non-interesting items by hand so I may have accidentally missed something.
Not included in this analysis: constants for caprights, DebugNameThread syscall, struct kernel_entry_t, struct benchmark_track_kernel_entry_t
Platform | Name | Condition |
---|---|---|
all | X86DangerousWRMSR | defined(CONFIG_KERNEL_X86_DANGEROUS_MSR) |
all | X86DangerousRDMSR | defined(CONFIG_KERNEL_X86_DANGEROUS_MSR) |
all | VMEnter | defined(CONFIG_VTX) |
all | SetTLSBase | defined(CONFIG_SET_TLS_BASE_SELF) |
all | DebugSnapshot | defined(CONFIG_DEBUG_BUILD) |
all | DebugSendIPI | (defined(CONFIG_DEBUG_BUILD))&&((CONFIG_MAX_NUM_NODES)>(1)) |
all | DebugRun | defined(CONFIG_DANGEROUS_CODE_INJECTION) |
all | DebugPutChar | defined(CONFIG_PRINTING) |
all | DebugHalt | defined(CONFIG_DEBUG_BUILD) |
all | DebugDumpScheduler | defined(CONFIG_PRINTING) |
all | DebugCapIdentify | defined(CONFIG_DEBUG_BUILD) |
all | BenchmarkSetLogBuffer | defined(CONFIG_ENABLE_BENCHMARKS) |
all | BenchmarkResetThreadUtilisation | defined(CONFIG_BENCHMARK_TRACK_UTILISATION) |
all | BenchmarkResetLog | defined(CONFIG_ENABLE_BENCHMARKS) |
all | BenchmarkResetAllThreadsUtilisation | (defined(CONFIG_DEBUG_BUILD))&&(defined(CONFIG_BENCHMARK_TRACK_UTILISATION)) |
all | BenchmarkNullSyscall | defined(CONFIG_ENABLE_BENCHMARKS) |
all | BenchmarkGetThreadUtilisation | defined(CONFIG_BENCHMARK_TRACK_UTILISATION) |
all | BenchmarkFlushCaches | defined(CONFIG_ENABLE_BENCHMARKS) |
all | BenchmarkFinalizeLog | defined(CONFIG_ENABLE_BENCHMARKS) |
all | BenchmarkDumpAllThreadsUtilisation | (defined(CONFIG_DEBUG_BUILD))&&(defined(CONFIG_BENCHMARK_TRACK_UTILISATION)) |
Platform | Interface | Method | Condition |
---|---|---|---|
all | seL4_TCB | Configure | !(defined(CONFIG_KERNEL_MCS)) |
all | seL4_TCB | Configure | defined(CONFIG_KERNEL_MCS) |
all | seL4_TCB | SetSchedParams | !(defined(CONFIG_KERNEL_MCS)) |
all | seL4_TCB | SetSchedParams | defined(CONFIG_KERNEL_MCS) |
all | seL4_TCB | SetTimeoutEndpoint | defined(CONFIG_KERNEL_MCS) |
all | seL4_TCB | SetSpace | !(defined(CONFIG_KERNEL_MCS)) |
all | seL4_TCB | SetSpace | defined(CONFIG_KERNEL_MCS) |
all | seL4_TCB | SetAffinity | (!(defined(CONFIG_KERNEL_MCS)))&&((CONFIG_MAX_NUM_NODES)>(1)) |
all | seL4_TCB | SetBreakpoint | defined(CONFIG_HARDWARE_DEBUG_API) |
all | seL4_TCB | GetBreakpoint | defined(CONFIG_HARDWARE_DEBUG_API) |
all | seL4_TCB | UnsetBreakpoint | defined(CONFIG_HARDWARE_DEBUG_API) |
all | seL4_TCB | ConfigureSingleStepping | defined(CONFIG_HARDWARE_DEBUG_API) |
all | seL4_CNode | SaveCaller | !(defined(CONFIG_KERNEL_MCS)) |
all | seL4_SchedControl | Configure | defined(CONFIG_KERNEL_MCS) |
all | seL4_SchedContext | Bind | defined(CONFIG_KERNEL_MCS) |
all | seL4_SchedContext | Unbind | defined(CONFIG_KERNEL_MCS) |
all | seL4_SchedContext | UnbindObject | defined(CONFIG_KERNEL_MCS) |
all | seL4_SchedContext | Consumed | defined(CONFIG_KERNEL_MCS) |
all | seL4_SchedContext | YieldTo | defined(CONFIG_KERNEL_MCS) |
aarch64 | seL4_ARM_PageUpperDirectory | Map | !((defined(CONFIG_ARM_HYPERVISOR_SUPPORT))&&(defined(CONFIG_ARM_PA_SIZE_BITS_40))) |
aarch64 | seL4_ARM_PageUpperDirectory | Unmap | !((defined(CONFIG_ARM_HYPERVISOR_SUPPORT))&&(defined(CONFIG_ARM_PA_SIZE_BITS_40))) |
arm | seL4_ARM_IOPageTable | Map | defined(CONFIG_TK1_SMMU) |
arm | seL4_ARM_IOPageTable | Unmap | defined(CONFIG_TK1_SMMU) |
arm | seL4_ARM_Page | MapIO | defined(CONFIG_TK1_SMMU) |
arm | seL4_ARM_VCPU | SetTCB | defined(CONFIG_ARM_HYPERVISOR_SUPPORT) |
arm | seL4_ARM_VCPU | InjectIRQ | defined(CONFIG_ARM_HYPERVISOR_SUPPORT) |
arm | seL4_ARM_VCPU | ReadRegs | defined(CONFIG_ARM_HYPERVISOR_SUPPORT) |
arm | seL4_ARM_VCPU | WriteRegs | defined(CONFIG_ARM_HYPERVISOR_SUPPORT) |
arm | seL4_ARM_VCPU | AckVPPI | defined(CONFIG_ARM_HYPERVISOR_SUPPORT) |
arm | seL4_IRQControl | GetTriggerCore | (CONFIG_MAX_NUM_NODES)>(1) |
arm | seL4_ARM_SIDControl | GetSID | defined(CONFIG_ARM_SMMU) |
arm | seL4_ARM_SIDControl | GetFault | defined(CONFIG_ARM_SMMU) |
arm | seL4_ARM_SIDControl | ClearFault | defined(CONFIG_ARM_SMMU) |
arm | seL4_ARM_SID | BindCB | defined(CONFIG_ARM_SMMU) |
arm | seL4_ARM_SID | UnbindCB | defined(CONFIG_ARM_SMMU) |
arm | seL4_ARM_CBControl | GetCB | defined(CONFIG_ARM_SMMU) |
arm | seL4_ARM_CBControl | TLBInvalidateAll | defined(CONFIG_ARM_SMMU) |
arm | seL4_ARM_CB | AssignVspace | defined(CONFIG_ARM_SMMU) |
arm | seL4_ARM_CB | UnassignVspace | defined(CONFIG_ARM_SMMU) |
arm | seL4_ARM_CB | TLBInvalidate | defined(CONFIG_ARM_SMMU) |
arm | seL4_ARM_CB | CBGetFault | defined(CONFIG_ARM_SMMU) |
arm | seL4_ARM_CB | CBClearFault | defined(CONFIG_ARM_SMMU) |
x86 | seL4_X86_PageDirectory | GetStatusBits | defined(CONFIG_ARCH_IA32) |
x86 | seL4_X86_IOPageTable | Map | defined(CONFIG_IOMMU) |
x86 | seL4_X86_IOPageTable | Unmap | defined(CONFIG_IOMMU) |
x86 | seL4_X86_Page | MapIO | defined(CONFIG_IOMMU) |
x86 | seL4_X86_Page | MapEPT | defined(CONFIG_VTX) |
x86 | seL4_TCB | SetEPTRoot | defined(CONFIG_VTX) |
x86 | seL4_X86_VCPU | SetTCB | defined(CONFIG_VTX) |
x86 | seL4_X86_VCPU | ReadVMCS | defined(CONFIG_VTX) |
x86 | seL4_X86_VCPU | WriteVMCS | defined(CONFIG_VTX) |
x86 | seL4_X86_VCPU | EnableIOPort | defined(CONFIG_VTX) |
x86 | seL4_X86_VCPU | DisableIOPort | defined(CONFIG_VTX) |
x86 | seL4_X86_VCPU | WriteRegisters | defined(CONFIG_VTX) |
x86 | seL4_X86_EPTPDPT | Map | defined(CONFIG_VTX) |
x86 | seL4_X86_EPTPDPT | Unmap | defined(CONFIG_VTX) |
x86 | seL4_X86_EPTPD | Map | defined(CONFIG_VTX) |
x86 | seL4_X86_EPTPD | Unmap | defined(CONFIG_VTX) |
x86 | seL4_X86_EPTPT | Map | defined(CONFIG_VTX) |
x86 | seL4_X86_EPTPT | Unmap | defined(CONFIG_VTX) |
Platform | Struct | Field | Bits | Condition |
---|---|---|---|---|
aarch32 | VPPIEvent | defined(CONFIG_ARM_HYPERVISOR_SUPPORT) | ||
aarch64 | VPPIEvent | defined(CONFIG_ARM_HYPERVISOR_SUPPORT) | ||
aarch32 | VGICMaintenance | defined(CONFIG_ARM_HYPERVISOR_SUPPORT) | ||
aarch64 | VGICMaintenance | defined(CONFIG_ARM_HYPERVISOR_SUPPORT) | ||
aarch32 | VCPUFault | defined(CONFIG_ARM_HYPERVISOR_SUPPORT) | ||
aarch64 | VCPUFault | defined(CONFIG_ARM_HYPERVISOR_SUPPORT) | ||
aarch32 | Timeout | defined(CONFIG_KERNEL_MCS) | ||
aarch64 | Timeout | defined(CONFIG_KERNEL_MCS) | ||
ia32 | Timeout | defined(CONFIG_KERNEL_MCS) | ||
riscv32 | Timeout | defined(CONFIG_KERNEL_MCS) | ||
riscv64 | Timeout | defined(CONFIG_KERNEL_MCS) | ||
x86_64 | Timeout | defined(CONFIG_KERNEL_MCS) | ||
aarch32 | DebugException | defined(CONFIG_HARDWARE_DEBUG_API) | ||
aarch64 | DebugException | defined(CONFIG_HARDWARE_DEBUG_API) | ||
ia32 | DebugException | defined(CONFIG_HARDWARE_DEBUG_API) | ||
x86_64 | DebugException | defined(CONFIG_HARDWARE_DEBUG_API) |
Platform | Union | Type | Constant | Condition |
---|---|---|---|---|
arm | seL4_Fault | DebugException | 4 | defined(CONFIG_HARDWARE_DEBUG_API) |
arm | seL4_Fault | Timeout | 5 | defined(CONFIG_KERNEL_MCS) |
arm | seL4_Fault | VMFault | 6 | defined(CONFIG_KERNEL_MCS) |
arm | seL4_Fault | VGICMaintenance | 7 | (defined(CONFIG_KERNEL_MCS))&&(defined(CONFIG_ARM_HYPERVISOR_SUPPORT)) |
arm | seL4_Fault | VCPUFault | 8 | (defined(CONFIG_KERNEL_MCS))&&(defined(CONFIG_ARM_HYPERVISOR_SUPPORT)) |
arm | seL4_Fault | VPPIEvent | 9 | (defined(CONFIG_KERNEL_MCS))&&(defined(CONFIG_ARM_HYPERVISOR_SUPPORT)) |
arm | seL4_Fault | VMFault | 5 | !(defined(CONFIG_KERNEL_MCS)) |
arm | seL4_Fault | VGICMaintenance | 6 | (!(defined(CONFIG_KERNEL_MCS)))&&(defined(CONFIG_ARM_HYPERVISOR_SUPPORT)) |
arm | seL4_Fault | VCPUFault | 7 | (!(defined(CONFIG_KERNEL_MCS)))&&(defined(CONFIG_ARM_HYPERVISOR_SUPPORT)) |
arm | seL4_Fault | VPPIEvent | 8 | (!(defined(CONFIG_KERNEL_MCS)))&&(defined(CONFIG_ARM_HYPERVISOR_SUPPORT)) |
riscv | seL4_Fault | Timeout | 5 | defined(CONFIG_KERNEL_MCS) |
riscv | seL4_Fault | VMFault | 6 | defined(CONFIG_KERNEL_MCS) |
riscv | seL4_Fault | VMFault | 5 | !(defined(CONFIG_KERNEL_MCS)) |
x86 | seL4_Fault | DebugException | 4 | defined(CONFIG_HARDWARE_DEBUG_API) |
x86 | seL4_Fault | Timeout | 5 | defined(CONFIG_KERNEL_MCS) |
x86 | seL4_Fault | VMFault | 6 | defined(CONFIG_KERNEL_MCS) |
x86 | seL4_Fault | VMFault | 5 | !(defined(CONFIG_KERNEL_MCS)) |
Platform | Name | Value | Condition | |||
---|---|---|---|---|---|---|
x86 | seL4_X86_VCPUObject | 16777214 | !(defined(CONFIG_VTX)) | |||
x86 | seL4_X86_IOPageTableObject | 16777215 | !(defined(CONFIG_IOMMU)) | |||
x86 | seL4_X86_EPTPTObject | 16777210 | !(defined(CONFIG_VTX)) | |||
x86 | seL4_X86_EPTPTBits | (seL4_X86_EPTPTEntryBits)+(seL4_X86_EPTPTIndexBits) | ||||
x86 | seL4_X86_EPTPML4Object | 16777213 | !(defined(CONFIG_VTX)) | |||
x86 | seL4_X86_EPTPML4Bits | (seL4_X86_EPTPML4EntryBits)+(seL4_X86_EPTPML4IndexBits) | ||||
x86 | seL4_X86_EPTPDPTObject | 16777212 | !(defined(CONFIG_VTX)) | |||
x86 | seL4_X86_EPTPDPTBits | (seL4_X86_EPTPDPTEntryBits)+(seL4_X86_EPTPDPTIndexBits) | ||||
x86 | seL4_X86_EPTPDObject | 16777211 | !(defined(CONFIG_VTX)) | |||
x86 | seL4_X86_EPTPDBits | (seL4_X86_EPTPDEntryBits)+(seL4_X86_EPTPDIndexBits) | ||||
x86_64 | seL4_X64_HugePageObject | 4294967294 | !(defined(CONFIG_HUGE_PAGE)) | |||
aarch64 | seL4_VSpaceReservedSlots | 1 | (defined(CONFIG_ARM_HYPERVISOR_SUPPORT))&&(!(defined(CONFIG_ARM_SMMU))) | |||
aarch64 | seL4_VSpaceReservedSlots | 2 | (defined(CONFIG_ARM_HYPERVISOR_SUPPORT))&&(!(!(defined(CONFIG_ARM_SMMU)))) | |||
aarch32 | seL4_VCPUBits | 12 | defined(CONFIG_ARM_HYPERVISOR_SUPPORT) | |||
x86 | seL4_X86_VCPUBits | seL4_VCPUBits | ||||
aarch64 | seL4_UserTop | 17592186044415 | (defined(CONFIG_ARM_HYPERVISOR_SUPPORT))&&(defined(CONFIG_ARM_PA_SIZE_BITS_44)) | |||
aarch64 | seL4_UserTop | (1099511627775)-((seL4_VSpaceReservedSlots)*(1073741824)) | (defined(CONFIG_ARM_HYPERVISOR_SUPPORT))&&((!(defined(CONFIG_ARM_PA_SIZE_BITS_44)))&&(defined(CONFIG_ARM_PA_SIZE_BITS_40))) | |||
aarch64 | seL4_UserTop | 140737488355327 | !(defined(CONFIG_ARM_HYPERVISOR_SUPPORT)) | |||
bcm2837 | seL4_UserTop | 3758096384 | (CONFIG_WORD_SIZE)==(32) | |||
hikey | seL4_UserTop | 3758096384 | (CONFIG_WORD_SIZE)==(32) | |||
imx8mq-evk | seL4_UserTop | 3758096384 | (CONFIG_WORD_SIZE)==(32) | |||
qemu-arm-virt | seL4_UserTop | 2684354560 | (CONFIG_WORD_SIZE)==(32) | |||
zynqmp | seL4_UserTop | 3758096384 | (CONFIG_WORD_SIZE)==(32) | |||
all | seL4_UntypedRetypeMaxObjects | CONFIG_RETYPE_FAN_OUT_LIMIT | defined(CONFIG_RETYPE_FAN_OUT_LIMIT) | |||
all | seL4_UntypedRetypeMaxObjects | 256 | !(defined(CONFIG_RETYPE_FAN_OUT_LIMIT)) | |||
aarch32 | seL4_WordBits | (sizeof(seL4_Word))*(8) | ||||
aarch64 | seL4_WordBits | (sizeof(seL4_Word))*(8) | ||||
ia32 | seL4_WordBits | (sizeof(seL4_Word))*(8) | ||||
aarch32 | seL4_TCBBits | 11 | (defined(CONFIG_HAVE_FPU))&&(((defined(CONFIG_ARM_HYPERVISOR_SUPPORT))&&(defined(CONFIG_ARM_HYP_ENABLE_VCPU_CP14_SAVE_AND_RESTORE))) | (defined(CONFIG_HARDWARE_DEBUG_API))) | ||
aarch32 | seL4_TCBBits | 10 | (!((defined(CONFIG_HAVE_FPU))&&(((defined(CONFIG_ARM_HYPERVISOR_SUPPORT))&&(defined(CONFIG_ARM_HYP_ENABLE_VCPU_CP14_SAVE_AND_RESTORE))) | (defined(CONFIG_HARDWARE_DEBUG_API)))))&&(((defined(CONFIG_HAVE_FPU)) | ((defined(CONFIG_ARM_HYPERVISOR_SUPPORT))&&(defined(CONFIG_ARM_HYP_ENABLE_VCPU_CP14_SAVE_AND_RESTORE)))) | (defined(CONFIG_HARDWARE_DEBUG_API))) |
aarch32 | seL4_TCBBits | 9 | (!((defined(CONFIG_HAVE_FPU))&&(((defined(CONFIG_ARM_HYPERVISOR_SUPPORT))&&(defined(CONFIG_ARM_HYP_ENABLE_VCPU_CP14_SAVE_AND_RESTORE))) | (defined(CONFIG_HARDWARE_DEBUG_API)))))&&(!(((defined(CONFIG_HAVE_FPU)) | ((defined(CONFIG_ARM_HYPERVISOR_SUPPORT))&&(defined(CONFIG_ARM_HYP_ENABLE_VCPU_CP14_SAVE_AND_RESTORE)))) | (defined(CONFIG_HARDWARE_DEBUG_API)))) |
riscv64 | seL4_TCBBits | 11 | defined(CONFIG_HAVE_FPU) | |||
riscv64 | seL4_TCBBits | 10 | !(defined(CONFIG_HAVE_FPU)) | |||
x86_64 | seL4_TCBBits | 12 | (CONFIG_XSAVE_SIZE)>=(832) | |||
x86_64 | seL4_TCBBits | 11 | !((CONFIG_XSAVE_SIZE)>=(832)) | |||
aarch32 | seL4_SuperSectionBits | 25 | defined(CONFIG_ARM_HYPERVISOR_SUPPORT) | |||
aarch32 | seL4_SuperSectionBits | 24 | !(defined(CONFIG_ARM_HYPERVISOR_SUPPORT)) | |||
aarch32 | seL4_SectionBits | 21 | defined(CONFIG_ARM_HYPERVISOR_SUPPORT) | |||
aarch32 | seL4_SectionBits | 20 | !(defined(CONFIG_ARM_HYPERVISOR_SUPPORT)) | |||
aarch32 | seL4_ReplyBits | 4 | defined(CONFIG_KERNEL_MCS) | |||
aarch64 | seL4_ReplyBits | 5 | defined(CONFIG_KERNEL_MCS) | |||
ia32 | seL4_ReplyBits | 4 | defined(CONFIG_KERNEL_MCS) | |||
riscv32 | seL4_ReplyBits | 4 | defined(CONFIG_KERNEL_MCS) | |||
riscv64 | seL4_ReplyBits | 5 | defined(CONFIG_KERNEL_MCS) | |||
x86_64 | seL4_ReplyBits | 5 | defined(CONFIG_KERNEL_MCS) | |||
all | seL4_RefillSizeBytes | (2)*(8) | defined(CONFIG_KERNEL_MCS) | |||
riscv64 | seL4_RISCV_Tera_Page | 4294967295 | (CONFIG_PT_LEVELS)<=(3) | |||
aarch32 | seL4_PageTableIndexBits | 9 | defined(CONFIG_ARM_HYPERVISOR_SUPPORT) | |||
aarch32 | seL4_PageTableIndexBits | 8 | !(defined(CONFIG_ARM_HYPERVISOR_SUPPORT)) | |||
aarch32 | seL4_PageTableEntryBits | 3 | defined(CONFIG_ARM_HYPERVISOR_SUPPORT) | |||
aarch32 | seL4_PageTableEntryBits | 2 | !(defined(CONFIG_ARM_HYPERVISOR_SUPPORT)) | |||
aarch32 | seL4_PageTableBits | 12 | defined(CONFIG_ARM_HYPERVISOR_SUPPORT) | |||
aarch32 | seL4_PageTableBits | 10 | !(defined(CONFIG_ARM_HYPERVISOR_SUPPORT)) | |||
aarch32 | seL4_PageDirIndexBits | 11 | defined(CONFIG_ARM_HYPERVISOR_SUPPORT) | |||
aarch32 | seL4_PageDirIndexBits | 12 | !(defined(CONFIG_ARM_HYPERVISOR_SUPPORT)) | |||
aarch32 | seL4_PageDirEntryBits | 3 | defined(CONFIG_ARM_HYPERVISOR_SUPPORT) | |||
aarch32 | seL4_PageDirEntryBits | 2 | !(defined(CONFIG_ARM_HYPERVISOR_SUPPORT)) | |||
aarch64 | seL4_PUDIndexBits | 10 | (defined(CONFIG_ARM_HYPERVISOR_SUPPORT))&&(defined(CONFIG_ARM_PA_SIZE_BITS_40)) | |||
aarch64 | seL4_PUDIndexBits | 9 | !((defined(CONFIG_ARM_HYPERVISOR_SUPPORT))&&(defined(CONFIG_ARM_PA_SIZE_BITS_40))) | |||
aarch64 | seL4_PUDEntryBits | 3 | ||||
aarch64 | seL4_PUDBits | 13 | (defined(CONFIG_ARM_HYPERVISOR_SUPPORT))&&(defined(CONFIG_ARM_PA_SIZE_BITS_40)) | |||
aarch64 | seL4_PUDBits | 12 | !((defined(CONFIG_ARM_HYPERVISOR_SUPPORT))&&(defined(CONFIG_ARM_PA_SIZE_BITS_40))) | |||
aarch64 | seL4_PGDIndexBits | 0 | (defined(CONFIG_ARM_HYPERVISOR_SUPPORT))&&(defined(CONFIG_ARM_PA_SIZE_BITS_40)) | |||
aarch64 | seL4_PGDIndexBits | 9 | !((defined(CONFIG_ARM_HYPERVISOR_SUPPORT))&&(defined(CONFIG_ARM_PA_SIZE_BITS_40))) | |||
aarch64 | seL4_VSpaceIndexBits | seL4_PUDIndexBits | (defined(CONFIG_ARM_HYPERVISOR_SUPPORT))&&(defined(CONFIG_ARM_PA_SIZE_BITS_40)) | |||
aarch64 | seL4_VSpaceIndexBits | seL4_PGDIndexBits | !((defined(CONFIG_ARM_HYPERVISOR_SUPPORT))&&(defined(CONFIG_ARM_PA_SIZE_BITS_40))) | |||
aarch64 | seL4_PGDEntryBits | 0 | (defined(CONFIG_ARM_HYPERVISOR_SUPPORT))&&(defined(CONFIG_ARM_PA_SIZE_BITS_40)) | |||
aarch64 | seL4_PGDEntryBits | 3 | !((defined(CONFIG_ARM_HYPERVISOR_SUPPORT))&&(defined(CONFIG_ARM_PA_SIZE_BITS_40))) | |||
aarch64 | seL4_PGDBits | 0 | (defined(CONFIG_ARM_HYPERVISOR_SUPPORT))&&(defined(CONFIG_ARM_PA_SIZE_BITS_40)) | |||
aarch64 | seL4_PGDBits | 12 | !((defined(CONFIG_ARM_HYPERVISOR_SUPPORT))&&(defined(CONFIG_ARM_PA_SIZE_BITS_40))) | |||
aarch32 | seL4_VSpaceBits | seL4_PageDirBits | ||||
aarch64 | seL4_VSpaceBits | seL4_PUDBits | (defined(CONFIG_ARM_HYPERVISOR_SUPPORT))&&(defined(CONFIG_ARM_PA_SIZE_BITS_40)) | |||
aarch64 | seL4_VSpaceBits | seL4_PGDBits | !((defined(CONFIG_ARM_HYPERVISOR_SUPPORT))&&(defined(CONFIG_ARM_PA_SIZE_BITS_40))) | |||
ia32 | seL4_VSpaceBits | seL4_PageDirBits | ||||
riscv32 | seL4_VSpaceBits | seL4_PageTableBits | ||||
riscv64 | seL4_VSpaceBits | seL4_PageTableBits | ||||
x86_64 | seL4_VSpaceBits | seL4_PML4Bits | ||||
pc99 | seL4_NumHWBreakpoints | 4 | defined(CONFIG_HARDWARE_DEBUG_API) | |||
pc99 | seL4_NumExclusiveWatchpoints | 0 | defined(CONFIG_HARDWARE_DEBUG_API) | |||
pc99 | seL4_NumExclusiveBreakpoints | 0 | defined(CONFIG_HARDWARE_DEBUG_API) | |||
aarch32 | seL4_NumDualFunctionMonitors | 0 | defined(CONFIG_HARDWARE_DEBUG_API) | |||
aarch64 | seL4_NumDualFunctionMonitors | 0 | defined(CONFIG_HARDWARE_DEBUG_API) | |||
allwinnerA20 | seL4_NumDualFunctionMonitors | 0 | defined(CONFIG_HARDWARE_DEBUG_API) | |||
am335x | seL4_NumDualFunctionMonitors | 0 | defined(CONFIG_HARDWARE_DEBUG_API) | |||
apq8064 | seL4_NumDualFunctionMonitors | 0 | defined(CONFIG_HARDWARE_DEBUG_API) | |||
bcm2837 | seL4_NumDualFunctionMonitors | 0 | defined(CONFIG_HARDWARE_DEBUG_API) | |||
exynos4 | seL4_NumDualFunctionMonitors | 0 | defined(CONFIG_HARDWARE_DEBUG_API) | |||
exynos5 | seL4_NumDualFunctionMonitors | 0 | defined(CONFIG_HARDWARE_DEBUG_API) | |||
fvp | seL4_NumDualFunctionMonitors | 0 | defined(CONFIG_HARDWARE_DEBUG_API) | |||
hikey | seL4_NumDualFunctionMonitors | 0 | defined(CONFIG_HARDWARE_DEBUG_API) | |||
imx31 | seL4_NumDualFunctionMonitors | 0 | defined(CONFIG_HARDWARE_DEBUG_API) | |||
imx6 | seL4_NumDualFunctionMonitors | 0 | defined(CONFIG_HARDWARE_DEBUG_API) | |||
imx7 | seL4_NumDualFunctionMonitors | 0 | defined(CONFIG_HARDWARE_DEBUG_API) | |||
imx8mq-evk | seL4_NumDualFunctionMonitors | 0 | defined(CONFIG_HARDWARE_DEBUG_API) | |||
odroidc2 | seL4_NumDualFunctionMonitors | 0 | defined(CONFIG_HARDWARE_DEBUG_API) | |||
omap3 | seL4_NumDualFunctionMonitors | 0 | defined(CONFIG_HARDWARE_DEBUG_API) | |||
pc99 | seL4_NumDualFunctionMonitors | 4 | defined(CONFIG_HARDWARE_DEBUG_API) | |||
qemu-arm-virt | seL4_NumDualFunctionMonitors | 0 | defined(CONFIG_HARDWARE_DEBUG_API) | |||
tk1 | seL4_NumDualFunctionMonitors | 0 | defined(CONFIG_HARDWARE_DEBUG_API) | |||
zynq7000 | seL4_NumDualFunctionMonitors | 0 | defined(CONFIG_HARDWARE_DEBUG_API) | |||
zynqmp | seL4_NumDualFunctionMonitors | 0 | defined(CONFIG_HARDWARE_DEBUG_API) | |||
aarch32 | seL4_NumASIDPoolsBits | 6 | defined(CONFIG_TK1_SMMU) | |||
aarch32 | seL4_NumASIDPoolsBits | 7 | !(defined(CONFIG_TK1_SMMU)) | |||
aarch32 | seL4_NotificationBits | 5 | defined(CONFIG_KERNEL_MCS) | |||
aarch32 | seL4_NotificationBits | 4 | !(defined(CONFIG_KERNEL_MCS)) | |||
aarch64 | seL4_NotificationBits | 6 | defined(CONFIG_KERNEL_MCS) | |||
aarch64 | seL4_NotificationBits | 5 | !(defined(CONFIG_KERNEL_MCS)) | |||
ia32 | seL4_NotificationBits | 5 | defined(CONFIG_KERNEL_MCS) | |||
ia32 | seL4_NotificationBits | 4 | !(defined(CONFIG_KERNEL_MCS)) | |||
riscv32 | seL4_NotificationBits | 5 | defined(CONFIG_KERNEL_MCS) | |||
riscv32 | seL4_NotificationBits | 4 | !(defined(CONFIG_KERNEL_MCS)) | |||
riscv64 | seL4_NotificationBits | 6 | defined(CONFIG_KERNEL_MCS) | |||
riscv64 | seL4_NotificationBits | 5 | !(defined(CONFIG_KERNEL_MCS)) | |||
x86_64 | seL4_NotificationBits | 6 | defined(CONFIG_KERNEL_MCS) | |||
x86_64 | seL4_NotificationBits | 5 | !(defined(CONFIG_KERNEL_MCS)) | |||
all | seL4_MsgMaxExtraCaps | ((1)<<(seL4_MsgExtraCapBits))-(1) | ||||
all | seL4_MinSchedContextBits | 8 | defined(CONFIG_KERNEL_MCS) | |||
aarch32 | seL4_LogBufferSize | (1)<<(20) | defined(CONFIG_ENABLE_BENCHMARKS) | |||
aarch64 | seL4_LogBufferSize | (1)<<(20) | defined(CONFIG_ENABLE_BENCHMARKS) | |||
ia32 | seL4_LogBufferSize | (1)<<(20) | defined(CONFIG_ENABLE_BENCHMARKS) | |||
x86_64 | seL4_IA32_PDPTObject | seL4_X86_PDPTObject | ||||
allwinnerA20 | seL4_FirstWatchpoint | 6 | defined(CONFIG_HARDWARE_DEBUG_API) | |||
am335x | seL4_FirstWatchpoint | 6 | defined(CONFIG_HARDWARE_DEBUG_API) | |||
apq8064 | seL4_FirstWatchpoint | 6 | defined(CONFIG_HARDWARE_DEBUG_API) | |||
bcm2837 | seL4_FirstWatchpoint | 6 | defined(CONFIG_HARDWARE_DEBUG_API) | |||
exynos4 | seL4_FirstWatchpoint | 6 | defined(CONFIG_HARDWARE_DEBUG_API) | |||
exynos5 | seL4_FirstWatchpoint | 6 | defined(CONFIG_HARDWARE_DEBUG_API) | |||
fvp | seL4_FirstWatchpoint | 6 | defined(CONFIG_HARDWARE_DEBUG_API) | |||
hikey | seL4_FirstWatchpoint | 6 | defined(CONFIG_HARDWARE_DEBUG_API) | |||
imx31 | seL4_FirstWatchpoint | 6 | defined(CONFIG_HARDWARE_DEBUG_API) | |||
imx6 | seL4_FirstWatchpoint | 6 | defined(CONFIG_HARDWARE_DEBUG_API) | |||
imx7 | seL4_FirstWatchpoint | 6 | defined(CONFIG_HARDWARE_DEBUG_API) | |||
imx8mq-evk | seL4_FirstWatchpoint | 6 | defined(CONFIG_HARDWARE_DEBUG_API) | |||
odroidc2 | seL4_FirstWatchpoint | 6 | defined(CONFIG_HARDWARE_DEBUG_API) | |||
omap3 | seL4_FirstWatchpoint | 6 | defined(CONFIG_HARDWARE_DEBUG_API) | |||
pc99 | seL4_FirstWatchpoint | -(1) | defined(CONFIG_HARDWARE_DEBUG_API) | |||
qemu-arm-virt | seL4_FirstWatchpoint | 6 | defined(CONFIG_HARDWARE_DEBUG_API) | |||
tk1 | seL4_FirstWatchpoint | 6 | defined(CONFIG_HARDWARE_DEBUG_API) | |||
zynq7000 | seL4_FirstWatchpoint | 6 | defined(CONFIG_HARDWARE_DEBUG_API) | |||
zynqmp | seL4_FirstWatchpoint | 6 | defined(CONFIG_HARDWARE_DEBUG_API) | |||
aarch32 | seL4_FirstDualFunctionMonitor | -(1) | defined(CONFIG_HARDWARE_DEBUG_API) | |||
aarch64 | seL4_FirstDualFunctionMonitor | -(1) | defined(CONFIG_HARDWARE_DEBUG_API) | |||
pc99 | seL4_FirstDualFunctionMonitor | 0 | defined(CONFIG_HARDWARE_DEBUG_API) | |||
aarch32 | seL4_FirstBreakpoint | 0 | defined(CONFIG_HARDWARE_DEBUG_API) | |||
aarch64 | seL4_FirstBreakpoint | 0 | defined(CONFIG_HARDWARE_DEBUG_API) | |||
pc99 | seL4_FirstBreakpoint | -(1) | defined(CONFIG_HARDWARE_DEBUG_API) | |||
ia32 | seL4_FastMessageRegisters | 1 | defined(CONFIG_KERNEL_MCS) | |||
ia32 | seL4_FastMessageRegisters | 2 | !(defined(CONFIG_KERNEL_MCS)) | |||
all | seL4_CoreSchedContextBytes | ((10)(sizeof(seL4_Word)))+((6)(8)) | defined(CONFIG_KERNEL_MCS) | |||
all | seL4_CapInitThreadPD | seL4_CapInitThreadVSpace | ||||
arm | seL4_ARM_VCPUObject | 65534 | !(defined(CONFIG_ARM_HYPERVISOR_SUPPORT)) | |||
aarch64 | seL4_ARM_VSpaceObject | seL4_ARM_PageUpperDirectoryObject | (defined(CONFIG_ARM_HYPERVISOR_SUPPORT))&&(defined(CONFIG_ARM_PA_SIZE_BITS_40)) | |||
aarch64 | seL4_ARM_VSpaceObject | seL4_ARM_PageGlobalDirectoryObject | !((defined(CONFIG_ARM_HYPERVISOR_SUPPORT))&&(defined(CONFIG_ARM_PA_SIZE_BITS_40))) | |||
arm | seL4_ARM_IOPageTableObject | 65535 | !(defined(CONFIG_TK1_SMMU)) | |||
ia32 | seL4_4MBits | seL4_LargePageBits | ||||
ia32 | TLS_GDT_SELECTOR | ((TLS_GDT_ENTRY)<<(3)) | (3) | |||
x86_64 | TLS_GDT_SELECTOR | ((TLS_GDT_ENTRY)<<(3)) | (3) | |||
aarch32 | SEL4_MAPPING_LOOKUP_NO_PT | 21 | defined(CONFIG_ARM_HYPERVISOR_SUPPORT) | |||
aarch32 | SEL4_MAPPING_LOOKUP_NO_PT | 20 | !(defined(CONFIG_ARM_HYPERVISOR_SUPPORT)) | |||
riscv32 | SEL4_MAPPING_LOOKUP_NO_PT | 22 | (CONFIG_PT_LEVELS)==(2) | |||
all | SEL4_BOOTINFO_HEADER_NUM | (SEL4_BOOTINFO_HEADER_FDT)+(1) | ||||
x86 | MSI_MIN | VECTOR_MIN | ||||
x86 | MSI_MAX | VECTOR_MAX | ||||
x86 | IRQ_OFFSET | (32)+(16) | ||||
ia32 | IPCBUF_GDT_SELECTOR | ((IPCBUF_GDT_ENTRY)<<(3)) | (3) | |||
x86_64 | IPCBUF_GDT_SELECTOR | ((IPCBUF_GDT_ENTRY)<<(3)) | (3) | |||
all | DEBUG_MESSAGE_START | 6 | defined(CONFIG_KERNEL_INVOCATION_REPORT_ERROR_IPC) | |||
all | DEBUG_MESSAGE_MAXLEN | 50 | defined(CONFIG_KERNEL_INVOCATION_REPORT_ERROR_IPC) |
Platform | Enum | Constant | Value | Condition | |
---|---|---|---|---|---|
aarch32 | seL4_VPPIEvent_Msg | defined(CONFIG_ARM_HYPERVISOR_SUPPORT) | |||
aarch64 | seL4_VPPIEvent_Msg | defined(CONFIG_ARM_HYPERVISOR_SUPPORT) | |||
aarch32 | seL4_VGICMaintenance_Msg | defined(CONFIG_ARM_HYPERVISOR_SUPPORT) | |||
aarch64 | seL4_VGICMaintenance_Msg | defined(CONFIG_ARM_HYPERVISOR_SUPPORT) | |||
aarch32 | seL4_VCPUReg | defined(CONFIG_ARM_HYPERVISOR_SUPPORT) | |||
aarch32 | seL4_VCPUReg | seL4_VCPUReg_VMPIDR | (CONFIG_MAX_NUM_NODES)>(1) | ||
aarch64 | seL4_VCPUReg | defined(CONFIG_ARM_HYPERVISOR_SUPPORT) | |||
aarch64 | seL4_VCPUReg | seL4_VCPUReg_VMPIDR_EL2 | (CONFIG_MAX_NUM_NODES)>(1) | ||
aarch32 | seL4_VCPUFault_Msg | defined(CONFIG_ARM_HYPERVISOR_SUPPORT) | |||
aarch64 | seL4_VCPUFault_Msg | defined(CONFIG_ARM_HYPERVISOR_SUPPORT) | |||
ia32 | seL4_Timeout_Msg | defined(CONFIG_KERNEL_MCS) | |||
aarch32 | seL4_TimeoutReply_Msg | defined(CONFIG_KERNEL_MCS) | |||
aarch64 | seL4_TimeoutReply_Msg | defined(CONFIG_KERNEL_MCS) | |||
ia32 | seL4_TimeoutReply_Msg | defined(CONFIG_KERNEL_MCS) | |||
riscv32 | seL4_TimeoutReply_Msg | defined(CONFIG_KERNEL_MCS) | |||
riscv64 | seL4_TimeoutReply_Msg | defined(CONFIG_KERNEL_MCS) | |||
x86_64 | seL4_TimeoutReply_Msg | defined(CONFIG_KERNEL_MCS) | |||
aarch32 | seL4_TimeoutMsg | defined(CONFIG_KERNEL_MCS) | |||
aarch64 | seL4_TimeoutMsg | defined(CONFIG_KERNEL_MCS) | |||
riscv32 | seL4_TimeoutMsg | defined(CONFIG_KERNEL_MCS) | |||
riscv64 | seL4_TimeoutMsg | defined(CONFIG_KERNEL_MCS) | |||
x86_64 | seL4_TimeoutMsg | defined(CONFIG_KERNEL_MCS) | |||
all | seL4_ObjectType | seL4_SchedContextObject | defined(CONFIG_KERNEL_MCS) | ||
all | seL4_ObjectType | seL4_ReplyObject | defined(CONFIG_KERNEL_MCS) | ||
x86_64 | seL4_seL4ArchObjectType | seL4_X86_PDPTObject | seL4_NonArchObjectTypeCount | ||
x86_64 | seL4_seL4ArchObjectType | seL4_X64_HugePageObject | defined(CONFIG_HUGE_PAGE) | ||
aarch32 | seL4_ModeObjectType | seL4_ModeObjectTypeCount | seL4_NonArchObjectTypeCount | ||
aarch64 | seL4_ModeObjectType | seL4_ARM_HugePageObject | seL4_NonArchObjectTypeCount | ||
ia32 | seL4_ModeObjectType | seL4_ModeObjectTypeCount | seL4_NonArchObjectTypeCount | ||
riscv32 | seL4_ModeObjectType | seL4_ModeObjectTypeCount | seL4_NonArchObjectTypeCount | ||
riscv64 | seL4_ModeObjectType | seL4_RISCV_Giga_Page | seL4_NonArchObjectTypeCount | ||
riscv64 | seL4_ModeObjectType | seL4_RISCV_Tera_Page | (CONFIG_PT_LEVELS)>(3) | ||
aarch32 | unnamed | defined(CONFIG_KERNEL_GLOBALS_FRAME) | |||
all | unnamed | seL4_CapInitThreadSC | 14 | defined(CONFIG_KERNEL_MCS) | |
all | unnamed | seL4_NumInitialCaps | 15 | defined(CONFIG_KERNEL_MCS) | |
all | unnamed | seL4_NumInitialCaps | 14 | !(defined(CONFIG_KERNEL_MCS)) | |
all | seL4_DebugException_Msg | defined(CONFIG_HARDWARE_DEBUG_API) | |||
all | seL4_CapFault_Msg | seL4_CapFault_GuardMismatch_GuardFound | seL4_CapFault_DepthMismatch_BitsFound | ||
all | seL4_BreakpointType | defined(CONFIG_HARDWARE_DEBUG_API) | |||
all | seL4_BreakpointAccess | defined(CONFIG_HARDWARE_DEBUG_API) | |||
arm | seL4_ArchObjectType | seL4_ARM_SmallPageObject | seL4_ModeObjectTypeCount | ||
arm | seL4_ArchObjectType | seL4_ARM_SectionObject | defined(CONFIG_ARCH_AARCH32) | ||
arm | seL4_ArchObjectType | seL4_ARM_SuperSectionObject | defined(CONFIG_ARCH_AARCH32) | ||
arm | seL4_ArchObjectType | seL4_ARM_VCPUObject | defined(CONFIG_ARM_HYPERVISOR_SUPPORT) | ||
arm | seL4_ArchObjectType | seL4_ARM_IOPageTableObject | defined(CONFIG_TK1_SMMU) | ||
riscv | seL4_ArchObjectType | seL4_RISCV_4K_Page | seL4_ModeObjectTypeCount | ||
x86 | seL4_ArchObjectType | seL4_X86_4K | seL4_ModeObjectTypeCount | ||
x86 | seL4_ArchObjectType | seL4_X86_IOPageTableObject | defined(CONFIG_IOMMU) | ||
x86 | seL4_ArchObjectType | seL4_X86_VCPUObject | defined(CONFIG_VTX) | ||
x86 | seL4_ArchObjectType | seL4_X86_EPTPML4Object | defined(CONFIG_VTX) | ||
x86 | seL4_ArchObjectType | seL4_X86_EPTPDPTObject | defined(CONFIG_VTX) | ||
x86 | seL4_ArchObjectType | seL4_X86_EPTPDObject | defined(CONFIG_VTX) | ||
riscv64 | seL4_ModeObjectType | seL4_RISCV_Tera_Page | (CONFIG_PT_LEVELS)>(3) | ||
aarch32 | unnamed | defined(CONFIG_KERNEL_GLOBALS_FRAME) | |||
all | unnamed | seL4_CapInitThreadSC | 14 | defined(CONFIG_KERNEL_MCS) | |
all | unnamed | seL4_NumInitialCaps | 15 | defined(CONFIG_KERNEL_MCS) | |
all | unnamed | seL4_NumInitialCaps | 14 | !(defined(CONFIG_KERNEL_MCS)) | |
all | seL4_DebugException_Msg | defined(CONFIG_HARDWARE_DEBUG_API) | |||
all | seL4_CapFault_Msg | seL4_CapFault_GuardMismatch_GuardFound | seL4_CapFault_DepthMismatch_BitsFound | ||
all | seL4_BreakpointType | defined(CONFIG_HARDWARE_DEBUG_API) | |||
all | seL4_BreakpointAccess | defined(CONFIG_HARDWARE_DEBUG_API) | |||
arm | seL4_ArchObjectType | seL4_ARM_SmallPageObject | seL4_ModeObjectTypeCount | ||
arm | seL4_ArchObjectType | seL4_ARM_SectionObject | defined(CONFIG_ARCH_AARCH32) | ||
arm | seL4_ArchObjectType | seL4_ARM_SuperSectionObject | defined(CONFIG_ARCH_AARCH32) | ||
arm | seL4_ArchObjectType | seL4_ARM_VCPUObject | defined(CONFIG_ARM_HYPERVISOR_SUPPORT) | ||
arm | seL4_ArchObjectType | seL4_ARM_IOPageTableObject | defined(CONFIG_TK1_SMMU) | ||
riscv | seL4_ArchObjectType | seL4_RISCV_4K_Page | seL4_ModeObjectTypeCount | ||
x86 | seL4_ArchObjectType | seL4_X86_4K | seL4_ModeObjectTypeCount | ||
x86 | seL4_ArchObjectType | seL4_X86_IOPageTableObject | defined(CONFIG_IOMMU) | ||
x86 | seL4_ArchObjectType | seL4_X86_VCPUObject | defined(CONFIG_VTX) | ||
x86 | seL4_ArchObjectType | seL4_X86_EPTPML4Object | defined(CONFIG_VTX) | ||
x86 | seL4_ArchObjectType | seL4_X86_EPTPDPTObject | defined(CONFIG_VTX) | ||
x86 | seL4_ArchObjectType | seL4_X86_EPTPDObject | defined(CONFIG_VTX) | ||
x86 | seL4_ArchObjectType | seL4_X86_EPTPTObject | defined(CONFIG_VTX) | ||
all | priorityConstants | seL4_MaxPrio | (CONFIG_NUM_PRIORITIES)-(1) | ||
all | entry_type_t | (defined(CONFIG_BENCHMARK_TRACK_KERNEL_ENTRIES)) | (defined(CONFIG_DEBUG_BUILD)) | ||
all | entry_type_t | Entry_VCPUFault | defined(CONFIG_ARCH_ARM) | ||
all | entry_type_t | Entry_VMExit | defined(CONFIG_ARCH_X86) | ||
all | benchmark_track_util_ipc_index | defined(CONFIG_BENCHMARK_TRACK_UTILISATION) | |||
all | benchmark_track_util_ipc_index | BENCHMARK_TCB_UTILISATION | |||
all | benchmark_track_util_ipc_index | BENCHMARK_TCB_NUMBER_SCHEDULES | |||
all | benchmark_track_util_ipc_index | BENCHMARK_TCB_KERNEL_UTILISATION | |||
all | benchmark_track_util_ipc_index | BENCHMARK_TCB_NUMBER_KERNEL_ENTRIES | |||
all | benchmark_track_util_ipc_index | BENCHMARK_IDLE_LOCALCPU_UTILISATION | |||
all | benchmark_track_util_ipc_index | BENCHMARK_IDLE_TCBCPU_UTILISATION | |||
all | benchmark_track_util_ipc_index | BENCHMARK_IDLE_NUMBER_SCHEDULES | |||
all | benchmark_track_util_ipc_index | BENCHMARK_IDLE_KERNEL_UTILISATION | |||
all | benchmark_track_util_ipc_index | BENCHMARK_IDLE_NUMBER_KERNEL_ENTRIES | |||
all | benchmark_track_util_ipc_index | BENCHMARK_TOTAL_UTILISATION | |||
all | benchmark_track_util_ipc_index | BENCHMARK_TOTAL_NUMBER_SCHEDULES | |||
all | benchmark_track_util_ipc_index | BENCHMARK_TOTAL_KERNEL_UTILISATION | |||
all | benchmark_track_util_ipc_index | BENCHMARK_TOTAL_NUMBER_KERNEL_ENTRIES |
Platform | Struct | Field | Type | Condition |
---|---|---|---|---|
all | seL4_UntypedDesc | padding | seL4_Uint8[(sizeof(seL4_Word))-((2)*(sizeof(seL4_Uint8)))] | |
all | seL4_IPCBuffer | msg | seL4_Word[seL4_MsgMaxLength] | |
all | seL4_IPCBuffer | caps_or_badges | seL4_Word[seL4_MsgMaxExtraCaps] | |
all | seL4_BootInfo | schedcontrol | seL4_SlotRegion | defined(CONFIG_KERNEL_MCS) |
all | seL4_BootInfo | untypedList | seL4_UntypedDesc[CONFIG_MAX_NUM_BOOTINFO_UNTYPED_CAPS] | |
all | benchmark_tracepoint_log_entry_t | defined(CONFIG_BENCHMARK_TRACEPOINTS) | ||
x86 | seL4_X86_BootInfo_mmap_t | mmap | seL4_X86_mb_mmap_t[SEL4_MULTIBOOT_MAX_MMAP_ENTRIES] |
One thing which has just occurred to me, is that I don't believe rust actually has support for conditional compilation using arithmetic expressions, while it recently gained constant evaluation I don't believe that has been extended to conditional compilation.
The closest thing that I know if is conditional compilation based upon string equality via environment variables. However I will need to check this out further.
Edit: I can confirm that rust does not have conditional compilation with numeric expressions. So it seems like for multi-lang support sticking to just boolean expressions (like in my original report) seems like a limitation we don't have a lot of control over for rust support at least.
I can confirm that rust does not have conditional compilation with numeric expressions. So it seems like for multi-lang support sticking to just boolean expressions (like in my original report) seems like a limitation we don't have a lot of control over for rust support at least.
I agree only supporting boolean expressions would be fine for now since that's all that is currently needed, especially now that CONFIG_ENABLE_SMP_SUPPORT
is a thing. I mentioned the other expressions in libsel4 to motivate a discussion on how best to encode them.
I'm fine with expressing them in XML as you've proposed, that makes them very easy to evaluate when generating language bindings, but if I were maintaining the IDL I wouldn't want to write those out by hand.
On the topic of supporting conditional compilation in rust, I believe this is a broader issue.
In addition to rust feature flags only supporting boolean logic (which is not a problem for the current issue but is a problem today for creating a complete rust libsel4), the behavior of rust feature flags are not equivalent to C conditional compilation.
The rust package manager assumes that packages compiled with different feature flags are compatible with each other.
This does not work with seL4. Since the feature flags effect the kernel ABI, every package must be compiled with the same set of feature flags, and must be recompiled if they change. I don't think there's a way to express this in rust's package manager.
I don't think there's a way to express this in rust's package manager.
This is correct & a good point, and I think it must be considered a downstream issue. The way i've planned to deal with it is to run cargo from cmake, with cmake driving feature selection for in-tree libraries. This relies on the tree being self-consistent at least, and I can generate a build.rs which only compiles with a specific set of features to ensure it.
Other projects driving their builds from cargo are going to need different solutions, like only generating code for a single configuration at a time, or putting all features into a private crate, and building from that different crates for each mutually exclusive feature. build.rs
does get you some of the way recompiling on change via the following though only on a project/workspace granularity.
cargo:rerun-if-changed=PATH
cargo:rerun-if-env-changed
Hopefully this change will allow people to build out whatever solution to that problem they're going with, without having to parse cpp definitions though.
I don't think there's a way to express this in rust's package manager.
This is correct & a good point, and I think it must be considered a downstream issue.
I agree that it must necessarily be a downstream issue since it is a consequence of the seL4 design that is unlikely to be changed.
Other projects driving their builds from cargo are going to need different solutions ...
Yes, we've experimented with some of these solutions as well, and are still working to find a better way to do it.
Hopefully this change will allow people to build out whatever solution to that problem they're going with, without having to parse cpp definitions though.
Yes, this is a great step in the right direction!
Doesn't rust assume that everything within the same platform target is going to be ABI compatible? Different seL4 kernel configurations that change the kernel ABI imply a different Rust platform target definition which would then require libraries to be recompiled was my assumption.
Different seL4 kernel configurations that change the kernel ABI imply a different Rust platform target definition which would then require libraries to be recompiled was my assumption.
Hmm, interesting idea.
I suspect the number of combinations of ABI-affecting seL4 configuration options is prohibitive for defining each one as a separate rust target. This might be feasible if they could be machine generated. That's something a more complete IDL might be useful for.
Before I jump too far down the rabbit hole on this, I wanted to sync with the community, It was mentioned during one of the developer meetings that the xml currently contains some c-isms in the form of c-preprocessor declarations,
Most of these are fairly simple, an example of the most complex being:
in sel4_arch_include/aarch64/interfaces/sel4arch.xml
If it weren't for these couple of complex conditions we could use something simple like:
condition_var="CONFIG_..." condition_defined=true|false
I tried to come up with a schema to cope with these definitions in a language neutral fashion:
Examples
Schema
The schema for the above xml uses an xsd (below), while the current encoding is using a dtd
As far as I can tell trying to do this with just a dtd leads to a much more verbose xml encoding.
Questions
CONFIG_
contents of thevar
attribute?checklist
condition=
attributes tocondition
elements in the sel4 xml.#if
conditions.