2017-10-14 07:30:55 +08:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2017 Intel Corporation
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
|
|
|
|
2019-06-26 03:53:49 +08:00
|
|
|
#include <drivers/entropy.h>
|
2017-10-14 07:30:55 +08:00
|
|
|
#include <syscall_handler.h>
|
|
|
|
|
2019-08-14 02:34:34 +08:00
|
|
|
static inline int z_vrfy_entropy_get_entropy(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
|
|
|
{
|
2018-05-05 06:57:57 +08:00
|
|
|
Z_OOPS(Z_SYSCALL_DRIVER_ENTROPY(dev, get_entropy));
|
|
|
|
Z_OOPS(Z_SYSCALL_MEMORY_WRITE(buffer, len));
|
2020-05-28 00:26:57 +08:00
|
|
|
return z_impl_entropy_get_entropy((struct device *)dev, (uint8_t *)buffer,
|
2017-10-14 07:30:55 +08:00
|
|
|
len);
|
|
|
|
}
|
2019-08-14 02:34:34 +08:00
|
|
|
#include <syscalls/entropy_get_entropy_mrsh.c>
|