2017-10-14 07:30:55 +08:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2017 Intel Corporation
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
|
|
|
|
2022-05-06 16:25:46 +08:00
|
|
|
#include <zephyr/drivers/entropy.h>
|
2023-09-27 06:46:01 +08:00
|
|
|
#include <zephyr/internal/syscall_handler.h>
|
2017-10-14 07:30:55 +08:00
|
|
|
|
2020-05-01 02:33:38 +08:00
|
|
|
static inline int z_vrfy_entropy_get_entropy(const struct device *dev,
|
2020-05-28 00:26:57 +08:00
|
|
|
uint8_t *buffer,
|
|
|
|
uint16_t len)
|
2017-10-14 07:30:55 +08:00
|
|
|
{
|
2023-09-27 19:20:28 +08:00
|
|
|
K_OOPS(K_SYSCALL_DRIVER_ENTROPY(dev, get_entropy));
|
|
|
|
K_OOPS(K_SYSCALL_MEMORY_WRITE(buffer, len));
|
2020-05-01 02:33:38 +08:00
|
|
|
return z_impl_entropy_get_entropy((const struct device *)dev,
|
|
|
|
(uint8_t *)buffer,
|
|
|
|
len);
|
2017-10-14 07:30:55 +08:00
|
|
|
}
|
2019-08-14 02:34:34 +08:00
|
|
|
#include <syscalls/entropy_get_entropy_mrsh.c>
|