sel4-sys: fix invocation label numbering

Cannot assigned field numbers to the enum members; must let the
compiler do this based on the kernel configuration. Fixes numbering of
architecture-specific labels (e.g. RISCVUnmap).

Change-Id: Ie38fad38fe66c8cc8ddb460ff7c851140b6b9d25
GitOrigin-RevId: 5f7fc5be679aa9bfed39293cd08dfaead0d3d07a
This commit is contained in:
Sam Leffler
2021-11-13 19:41:00 +00:00
parent c36bae9f1f
commit 1048e6f765
2 changed files with 11 additions and 6 deletions

View File

@@ -20,12 +20,17 @@ build = "build.rs"
# Name of python3 interpreter executable, defaults to "python3"
PYTHON = "python3"
# Beware CONFIG_KERNEL_MCS must match the kernel config for syscall numbering
# to line up. Likewise other syscalls are defined only when the associated
# config knobs are set (e.g. CONFIG_PRINTING).
# Beware CONFIG_KERNEL_MCS & CONFIG_SMP_SUPPORT must match the kernel
# config for syscall numbering (aka invocation labeling) to line up.
# Other syscalls api's are generated only when the associated config
# knobs are set but do not affect the syscall ABI (e.g. CONFIG_PRINTING).
[features]
default = ["CONFIG_PRINTING", "CONFIG_DEBUG_BUILD", "CONFIG_SET_TLS_BASE_SELF"]
#default = ["CONFIG_KERNEL_MCS", "CONFIG_PRINTING", "CONFIG_DEBUG_BUILD", "CONFIG_SET_TLS_BASE_SELF"]
default = [
# "CONFIG_KERNEL_MCS",
"CONFIG_PRINTING",
"CONFIG_DEBUG_BUILD",
"CONFIG_SET_TLS_BASE_SELF",
]
# Changes api, blech
CONFIG_KERNEL_MCS = []
CONFIG_PRINTING = []

View File

@@ -38,7 +38,7 @@ pub enum InvocationLabel {
{{if condition}}
#[cfg({{condition}})]
{{endif}}
{{label}} = {{loop.index+1}},
{{label}},
{{endfor}}
}
"""