zephyr/scripts
Andy Ross 6564974bae userspace: Support for split 64 bit arguments
System call arguments, at the arch layer, are single words.  So
passing wider values requires splitting them into two registers at
call time.  This gets even more complicated for values (e.g
k_timeout_t) that may have different sizes depending on configuration.
This patch adds a feature to gen_syscalls.py to detect functions with
wide arguments and automatically generates code to split/unsplit them.

Unfortunately the current scheme of Z_SYSCALL_DECLARE_* macros won't
work with functions like this, because for N arguments (our current
maximum N is 10) there are 2^N possible configurations of argument
widths.  So this generates the complete functions for each handler and
wrapper, effectively doing in python what was originally done in the
preprocessor.

Another complexity is that traditional the z_hdlr_*() function for a
system call has taken the raw list of word arguments, which does not
work when some of those arguments must be 64 bit types.  So instead of
using a single Z_SYSCALL_HANDLER macro, this splits the job of
z_hdlr_*() into two steps: An automatically-generated unmarshalling
function, z_mrsh_*(), which then calls a user-supplied verification
function z_vrfy_*().  The verification function is typesafe, and is a
simple C function with exactly the same argument and return signature
as the syscall impl function.  It is also not responsible for
validating the pointers to the extra parameter array or a wide return
value, that code gets automatically generated.

This commit includes new vrfy/msrh handling for all syscalls invoked
during CI runs.  Future commits will port the less testable code.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2019-09-12 11:31:50 +08:00
..
checkpatch kernel: rename NANO_ESF 2019-07-25 15:06:58 -07:00
ci ci: scripts: Suppress pylint warnings for the sh library 2019-09-08 22:22:35 -04:00
coccinelle
dts scripts: edtlib: Make order irrelevant when including multiple files 2019-09-11 07:50:30 -05:00
footprint
gitlint zephyr_commit_rules.py: Fix pylint warning by simplifying conditional 2019-09-08 22:19:37 -04:00
kconfig kconfiglib: Expose parsing location to Python preprocessor functions 2019-09-09 19:48:44 +02:00
sanity_chk scripts: Simplify code with sys.exit(<string>) 2019-09-08 12:34:16 +02:00
support scripts: Simplify code with sys.exit(<string>) 2019-09-08 12:34:16 +02:00
west_commands west: flash: Fix exception on build folder guessing 2019-09-07 10:24:17 -04:00
.gitignore
checkpatch.pl
checkstack.pl
coccicheck
dir_is_writeable.py
elf_helper.py scripts: elf_helper.py: Simplify tests with chained comparisons 2019-09-10 16:22:48 +02:00
file2hex.py
filter-known-issues.py filter-known-issues.py: Remove '== True' test 2019-09-08 22:20:20 -04:00
gen_app_partitions.py scripts: Fix random typo'd whitespace 2019-09-07 07:54:17 -04:00
gen_cfb_font_header.py scripts: Fix random typo'd whitespace 2019-09-07 07:54:17 -04:00
gen_gcov_files.py gen_gcov_files.py: Replace bare 'except' with 'except Exception' 2019-09-07 07:58:16 -04:00
gen_kobject_list.py scripts: Simplify code with sys.exit(<string>) 2019-09-08 12:34:16 +02:00
gen_offset_header.py
gen_priv_stacks.py scripts: Simplify code with sys.exit(<string>) 2019-09-08 12:34:16 +02:00
gen_relocate_app.py scripts: Simplify code with sys.exit(<string>) 2019-09-08 12:34:16 +02:00
gen_syscall_header.py userspace: Support for split 64 bit arguments 2019-09-12 11:31:50 +08:00
gen_syscalls.py userspace: Support for split 64 bit arguments 2019-09-12 11:31:50 +08:00
mergehex.py
parse_syscalls.py
process_gperf.py scripts: Simplify code with sys.exit(<string>) 2019-09-08 12:34:16 +02:00
requirements.txt scripts: west_commands: verify minimum cmake version 2019-09-07 10:08:23 -04:00
sanitycheck scripts/sanitycheck: optimize disk usage for --save-tests 2019-07-31 18:46:32 -04:00
series-push-hook.sh
spelling.txt
subfolder_list.py
tags.sh
valgrind.supp
waitpid
west-commands.yml
zephyr_module.py scripts: Simplify code with sys.exit(<string>) 2019-09-08 12:34:16 +02:00