2020-05-14 05:18:48 +08:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2020 Intel Corporation
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
|
|
|
|
2022-05-06 16:25:46 +08:00
|
|
|
#include <zephyr/drivers/peci.h>
|
2023-09-27 06:46:01 +08:00
|
|
|
#include <zephyr/internal/syscall_handler.h>
|
2020-05-14 05:18:48 +08:00
|
|
|
|
|
|
|
|
2020-05-01 02:33:38 +08:00
|
|
|
static inline int z_vrfy_peci_config(const struct device *dev,
|
|
|
|
uint32_t bitrate)
|
2020-05-14 05:18:48 +08:00
|
|
|
{
|
2023-09-27 19:20:28 +08:00
|
|
|
K_OOPS(K_SYSCALL_DRIVER_PECI(dev, config));
|
2020-05-14 05:18:48 +08:00
|
|
|
|
|
|
|
return z_impl_peci_config(dev, bitrate);
|
|
|
|
}
|
2024-01-24 17:35:04 +08:00
|
|
|
#include <zephyr/syscalls/peci_config_mrsh.c>
|
2020-05-14 05:18:48 +08:00
|
|
|
|
2020-05-01 02:33:38 +08:00
|
|
|
static inline int z_vrfy_peci_enable(const struct device *dev)
|
2020-05-14 05:18:48 +08:00
|
|
|
{
|
2023-09-27 19:20:28 +08:00
|
|
|
K_OOPS(K_SYSCALL_DRIVER_PECI(dev, enable));
|
2020-05-14 05:18:48 +08:00
|
|
|
|
|
|
|
return z_impl_peci_enable(dev);
|
|
|
|
}
|
2024-01-24 17:35:04 +08:00
|
|
|
#include <zephyr/syscalls/peci_enable_mrsh.c>
|
2020-05-14 05:18:48 +08:00
|
|
|
|
2020-05-01 02:33:38 +08:00
|
|
|
static inline int z_vrfy_peci_disable(const struct device *dev)
|
2020-05-14 05:18:48 +08:00
|
|
|
{
|
2023-09-27 19:20:28 +08:00
|
|
|
K_OOPS(K_SYSCALL_DRIVER_PECI(dev, disable));
|
2020-05-14 05:18:48 +08:00
|
|
|
|
|
|
|
return z_impl_peci_disable(dev);
|
|
|
|
}
|
2024-01-24 17:35:04 +08:00
|
|
|
#include <zephyr/syscalls/peci_disable_mrsh.c>
|
2020-05-14 05:18:48 +08:00
|
|
|
|
2020-05-01 02:33:38 +08:00
|
|
|
static inline int z_vrfy_peci_transfer(const struct device *dev,
|
2020-05-14 05:18:48 +08:00
|
|
|
struct peci_msg *msg)
|
|
|
|
{
|
|
|
|
struct peci_msg msg_copy;
|
|
|
|
|
2023-09-27 19:20:28 +08:00
|
|
|
K_OOPS(K_SYSCALL_DRIVER_PECI(dev, transfer));
|
|
|
|
K_OOPS(k_usermode_from_copy(&msg_copy, msg, sizeof(*msg)));
|
2020-05-14 05:18:48 +08:00
|
|
|
|
|
|
|
return z_impl_peci_transfer(dev, &msg_copy);
|
|
|
|
}
|
2024-01-24 17:35:04 +08:00
|
|
|
#include <zephyr/syscalls/peci_transfer_mrsh.c>
|