1 /*
2 * Copyright (c) 2020 Intel Corporation
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7 #include <zephyr/drivers/peci.h>
8 #include <zephyr/syscall_handler.h>
9
10
z_vrfy_peci_config(const struct device * dev,uint32_t bitrate)11 static inline int z_vrfy_peci_config(const struct device *dev,
12 uint32_t bitrate)
13 {
14 Z_OOPS(Z_SYSCALL_DRIVER_PECI(dev, config));
15
16 return z_impl_peci_config(dev, bitrate);
17 }
18 #include <syscalls/peci_config_mrsh.c>
19
z_vrfy_peci_enable(const struct device * dev)20 static inline int z_vrfy_peci_enable(const struct device *dev)
21 {
22 Z_OOPS(Z_SYSCALL_DRIVER_PECI(dev, enable));
23
24 return z_impl_peci_enable(dev);
25 }
26 #include <syscalls/peci_enable_mrsh.c>
27
z_vrfy_peci_disable(const struct device * dev)28 static inline int z_vrfy_peci_disable(const struct device *dev)
29 {
30 Z_OOPS(Z_SYSCALL_DRIVER_PECI(dev, disable));
31
32 return z_impl_peci_disable(dev);
33 }
34 #include <syscalls/peci_disable_mrsh.c>
35
z_vrfy_peci_transfer(const struct device * dev,struct peci_msg * msg)36 static inline int z_vrfy_peci_transfer(const struct device *dev,
37 struct peci_msg *msg)
38 {
39 struct peci_msg msg_copy;
40
41 Z_OOPS(Z_SYSCALL_DRIVER_PECI(dev, transfer));
42 Z_OOPS(z_user_from_copy(&msg_copy, msg, sizeof(*msg)));
43
44 return z_impl_peci_transfer(dev, &msg_copy);
45 }
46 #include <syscalls/peci_transfer_mrsh.c>
47