Note: This discussion is continued from this thread.
Currently, the seL4 kernel ABI – the enumerations, structures, types, system calls, and object invocations needed to communicate between the kernel and user space – changes depending on the selected kernel build configuration and is not documented.
This has the following disadvantages:
-
seL4 software and the seL4 library (libsel4) must be aware of, and are tightly coupled to, the kernel build configuration. This complicates the build process and prevents the creation of software that is binary compatible with multiple configurations of a seL4 kernel.
-
It is difficult to create and maintain a new seL4 library (for example, to target seL4 in another programming language)
-
It is difficult to create dynamic systems on seL4
This RFC would propose specifying a fixed kernel ABI for each seL4 architecture in order to address those issues.
If implemented this would:
-
Remove the dependency on kernel configuration from libsel4. All enumerations, structures, types, system calls, and object invocations used to communicate with the kernel would have the same definition and binary representation for all kernel configurations on a specific architecture.
-
Increase the amount of information the kernel shares about its configuration with the root task at boot so the root tasks knows what functionality is available.
-
Make it easier to improve and expand the scripts and IDL used to generate libsel4 in the future
Questions on what to include in the RFC:
-
Should the ABI be defined in the RFC itself?
-
I think it would be a good excersize to do when writing the RFC to understand the issues involved; Would it be useful for reviewers of the RFC as well to see and review a concrete ABI and not just a description of how it will be created?
-
Since the ABI will be updated in the future without going through the RFC process maybe defining it in the RFC would set a bad expectation?
-
-
What level of backwards and forwards compatibility should the ABI provide?
-
How to introduce this without worsening the experience for developers of static systems who want to keep a tight coupling with their kernel configuration?
- Keep constants in libsel4 that depend on the kernel configuration, while also providing them in the bootinfo to the root task? Would this be too confusing?
-
Should the ABI be provided in a machine-readable format?
-
What should the procedure be for updating the ABI?