kernel: add _k_syscall_entry stub

This is the kernel-side landing site for system calls. It's currently
just a stub.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
Andrew Boie 2017-09-08 12:10:12 -07:00 committed by Andrew Boie
commit f564986d2f
2 changed files with 16 additions and 0 deletions

View file

@ -110,6 +110,9 @@ extern int _arch_buffer_validate(void *addr, size_t size, int write);
extern FUNC_NORETURN
void _arch_user_mode_enter(k_thread_entry_t user_entry, void *p1, void *p2,
void *p3);
extern u32_t _k_syscall_entry(u32_t arg1, u32_t arg2, u32_t arg3, u32_t arg4,
u32_t arg5, u32_t call_id);
#endif /* CONFIG_USERSPACE */
/* set and clear essential fiber/task flag */

View file

@ -186,3 +186,16 @@ void _k_object_init(void *object)
ko->flags |= K_OBJ_FLAG_INITIALIZED;
}
u32_t _k_syscall_entry(u32_t arg1, u32_t arg2, u32_t arg3, u32_t arg4,
u32_t arg5, u32_t call_id)
{
/* A real implementation will figure out what function to call
* based on call_id, validate arguments, perform any other runtime
* checks needed, and call into the appropriate kernel function.
*/
__ASSERT(0, "system calls are unimplemented");
return 0;
}