2017-10-26 04:14:49 +08:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2017 Intel Corporation
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <syscall_handler.h>
|
2019-06-26 03:53:55 +08:00
|
|
|
#include <drivers/ipm.h>
|
2017-10-26 04:14:49 +08:00
|
|
|
|
2019-08-14 02:34:34 +08:00
|
|
|
static inline int z_vrfy_ipm_send(struct device *dev, int wait, u32_t id,
|
|
|
|
const void *data, int size)
|
2017-10-26 04:14:49 +08:00
|
|
|
{
|
2018-05-05 06:57:57 +08:00
|
|
|
Z_OOPS(Z_SYSCALL_DRIVER_IPM(dev, send));
|
|
|
|
Z_OOPS(Z_SYSCALL_MEMORY_READ(data, size));
|
2019-03-09 05:19:05 +08:00
|
|
|
return z_impl_ipm_send((struct device *)dev, wait, id,
|
2017-10-26 04:14:49 +08:00
|
|
|
(const void *)data, size);
|
|
|
|
}
|
2019-08-14 02:34:34 +08:00
|
|
|
#include <syscalls/ipm_send_mrsh.c>
|
2017-10-26 04:14:49 +08:00
|
|
|
|
2019-08-14 02:34:34 +08:00
|
|
|
static inline int z_vrfy_ipm_max_data_size_get(struct device *dev)
|
2018-04-05 04:50:32 +08:00
|
|
|
{
|
2018-05-05 06:57:57 +08:00
|
|
|
Z_OOPS(Z_SYSCALL_DRIVER_IPM(dev, max_data_size_get));
|
2019-03-09 05:19:05 +08:00
|
|
|
return z_impl_max_data_size_get((struct device *)dev);
|
2018-04-05 04:50:32 +08:00
|
|
|
}
|
2019-08-14 02:34:34 +08:00
|
|
|
#include <syscalls/ipm_max_data_size_get_mrsh.c>
|
2017-10-26 04:14:49 +08:00
|
|
|
|
2019-08-14 02:34:34 +08:00
|
|
|
static inline u32_t z_vrfy_ipm_max_id_val_get(struct device *dev)
|
2018-04-05 04:50:32 +08:00
|
|
|
{
|
2018-05-05 06:57:57 +08:00
|
|
|
Z_OOPS(Z_SYSCALL_DRIVER_IPM(dev, max_id_val_get));
|
2019-08-14 02:34:34 +08:00
|
|
|
return z_impl_ipm_max_id_val_get((struct device *)dev);
|
2018-04-05 04:50:32 +08:00
|
|
|
}
|
2019-08-14 02:34:34 +08:00
|
|
|
#include <syscalls/ipm_max_id_val_get_mrsh.c>
|
2017-10-26 04:14:49 +08:00
|
|
|
|
2019-08-14 02:34:34 +08:00
|
|
|
static inline int z_vrfy_ipm_set_enabled(struct device *dev, int enable)
|
2017-10-26 04:14:49 +08:00
|
|
|
{
|
2018-05-05 06:57:57 +08:00
|
|
|
Z_OOPS(Z_SYSCALL_DRIVER_IPM(dev, set_enabled));
|
2019-03-09 05:19:05 +08:00
|
|
|
return z_impl_ipm_set_enabled((struct device *)dev, enable);
|
2017-10-26 04:14:49 +08:00
|
|
|
}
|
2019-08-14 02:34:34 +08:00
|
|
|
#include <syscalls/ipm_set_enabled_mrsh.c>
|