zephyr/include
Andrew Boie a23c245a9a userspace: flesh out internal syscall interface
* Instead of a common system call entry function, we instead create a
table mapping system call ids to handler skeleton functions which are
invoked directly by the architecture code which receives the system
call.

* system call handler prototype specified. All but the most trivial
system calls will implement one of these. They validate all the
arguments, including verifying kernel/device object pointers, ensuring
that the calling thread has appropriate access to any memory buffers
passed in, and performing other parameter checks that the base system
call implementation does not check, or only checks with __ASSERT().

It's only possible to install a system call implementation directly
inside this table if the implementation has a return value and requires
no validation of any of its arguments.

A sample handler implementation for k_mutex_unlock() might look like:

u32_t _syscall_k_mutex_unlock(u32_t mutex_arg, u32_t arg2, u32_t arg3,
                              u32_t arg4, u32_t arg5, void *ssf)
{
        struct k_mutex *mutex = (struct k_mutex *)mutex_arg;
        _SYSCALL_ARG1;

        _SYSCALL_IS_OBJ(mutex, K_OBJ_MUTEX, 0,  ssf);
        _SYSCALL_VERIFY(mutex->lock_count > 0, ssf);
        _SYSCALL_VERIFY(mutex->owner == _current, ssf);

        k_mutex_unlock(mutex);

        return 0;
}

* the x86 port modified to work with the system call table instead of
calling a common handler function. fixed an issue where registers being
changed could confuse the compiler has been fixed; all registers, even
ones used for parameters, must be preserved across the system call.

* a new arch API for producing a kernel oops when validating system call
arguments added. The debug information reported will be from the system
call site and not inside the handler function.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-09-15 13:44:45 -07:00
..
arch userspace: flesh out internal syscall interface 2017-09-15 13:44:45 -07:00
bluetooth Bluetooth: controller: Issue Data Buffer Overflow event 2017-09-13 14:17:32 +02:00
crypto crypto: Remove useless attribute 2017-04-27 13:06:31 +00:00
debug object_tracing: fix definition 2017-08-16 10:59:10 -07:00
dfu DFU: add module for store the image 2017-09-11 11:37:43 -04:00
display doc: spelling check doxygen comments include/ 2017-05-02 22:21:37 -04:00
drivers pwm: Remove k64-specific driver and k20_sim.h 2017-08-09 18:13:29 -04:00
dt-bindings i2c: Cleanup dts clock-frequency property usage 2017-08-16 10:03:34 -05:00
fs license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
linker kernel: introduce object validation mechanism 2017-09-07 16:33:33 -07:00
logging doc: spelling check doxygen comments include/ 2017-05-02 22:21:37 -04:00
misc cleanup: remove obsolete nano_work.h 2017-09-11 19:24:12 -04:00
net net: Introduce multicast group join/leave monitor 2017-09-13 14:15:02 +03:00
shell shell: Add define to _SHELL_H_ 2017-06-09 18:54:27 -04:00
toolchain xcc: fix __in_section_unique() and __COUNTER__ 2017-08-16 10:59:10 -07:00
usb doc: spelling check doxygen comments include/ 2017-05-02 22:21:37 -04:00
zephyr Introduce new sized integer typedefs 2017-04-20 16:07:08 +00:00
adc.h Convert remaining code to using newly introduced integer sized types 2017-04-21 11:38:23 -05:00
aio_comparator.h Convert remaining code to using newly introduced integer sized types 2017-04-21 11:38:23 -05:00
atomic.h license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
cache.h license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
clock_control.h Convert remaining code to using newly introduced integer sized types 2017-04-21 11:38:23 -05:00
console.h doc: fix misspellings in include (API docs) 2017-08-10 12:22:19 -04:00
counter.h api: counter: Improve documentation of counter_set_alarm(). 2017-09-15 14:29:15 -04:00
crc16.h drivers: crc: Add 'pad' parameter to crc16() 2017-08-17 22:19:19 -04:00
device.h Convert remaining code to using newly introduced integer sized types 2017-04-21 11:38:23 -05:00
disk_access.h Convert remaining code to using newly introduced integer sized types 2017-04-21 11:38:23 -05:00
dma.h Convert remaining code to using newly introduced integer sized types 2017-04-21 11:38:23 -05:00
eth.h Convert remaining code to using newly introduced integer sized types 2017-04-21 11:38:23 -05:00
flash.h Drivers: flash: New API to obtain the flash layout 2017-09-11 11:41:57 -04:00
fs.h license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
gpio.h Convert remaining code to using newly introduced integer sized types 2017-04-21 11:38:23 -05:00
i2c.h i2c: Add define for bit position/shift of I2C SPEED settings in config 2017-08-16 10:03:34 -05:00
i2s.h drivers: Add I2S (Inter-IC Sound) driver API 2017-08-14 11:14:34 -04:00
init.h kernel: remove deprecated init levels 2017-04-07 17:45:34 +00:00
ipm.h Convert remaining code to using newly introduced integer sized types 2017-04-21 11:38:23 -05:00
irq_offload.h license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
irq.h irq.h: include generic toolchain header 2017-08-16 10:59:10 -07:00
kernel_version.h Convert remaining code to using newly introduced integer sized types 2017-04-21 11:38:23 -05:00
kernel.h kernel: add common functions for user mode 2017-09-12 12:46:36 -07:00
pinmux.h pinmux: Allow up to 6 functions 2017-08-09 12:26:14 -07:00
power.h Convert remaining code to using newly introduced integer sized types 2017-04-21 11:38:23 -05:00
pthread.h kernel: POSIX thread IPC support 2017-08-15 19:42:07 -04:00
pwm.h drivers: pwm: Remove all deprecated APIs. 2017-08-09 12:31:03 -07:00
random.h Convert remaining code to using newly introduced integer sized types 2017-04-21 11:38:23 -05:00
rtc.h Convert remaining code to using newly introduced integer sized types 2017-04-21 11:38:23 -05:00
sensor.h include: Add new sensor channel blue 2017-08-03 15:29:35 -05:00
shared_irq.h Convert remaining code to using newly introduced integer sized types 2017-04-21 11:38:23 -05:00
spi_legacy.h api: New SPI API 2017-05-19 18:52:25 -04:00
spi.h doc: improve spi.h doxygen comments layout 2017-09-11 19:37:51 -04:00
sw_isr_table.h Convert remaining code to using newly introduced integer sized types 2017-04-21 11:38:23 -05:00
sys_clock.h kernel: tickless: Add tickless kernel support 2017-04-27 13:46:28 +00:00
sys_io.h Convert remaining code to using newly introduced integer sized types 2017-04-21 11:38:23 -05:00
syscall.h userspace: flesh out internal syscall interface 2017-09-15 13:44:45 -07:00
toolchain.h xtensa: move byte-order macros out of arch.h 2017-05-11 12:47:23 -04:00
uart.h drivers: serial: Clarification for uart_fifo_fill()/read() calls 2017-05-30 20:53:13 -04:00
watchdog.h Convert remaining code to using newly introduced integer sized types 2017-04-21 11:38:23 -05:00
zephyr.h kernel: remove legacy.h and MDEF support 2017-04-19 10:59:35 -05:00