syscall: rename Z_SYSCALL_DRIVER_ -> K_SYSCALL_DRIVER_

Rename internal API to not use z_/Z_.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Anas Nashif 2023-09-27 11:18:12 +00:00 committed by Carles Cufí
commit 1a9de05767
36 changed files with 179 additions and 179 deletions

View file

@ -320,7 +320,7 @@ Several macros exist to validate arguments:
macro can be used by itself, it's mostly a building block for macros
that are automatically generated for every driver subsystem. For
instance, to validate the GPIO driver, one could use the
:c:macro:`Z_SYSCALL_DRIVER_GPIO()` macro.
:c:macro:`K_SYSCALL_DRIVER_GPIO()` macro.
* :c:macro:`K_SYSCALL_SPECIFIC_DRIVER()` is a runtime check to verify that
a provided pointer is a valid instance of a specific device driver, that
@ -572,7 +572,7 @@ conventions are as follows:
overflowed.
#. Most system calls take kernel object pointers as an argument, checked either
with one of the ``K_SYSCALL_OBJ`` functions, ``Z_SYSCALL_DRIVER_nnnnn``, or
with one of the ``K_SYSCALL_OBJ`` functions, ``K_SYSCALL_DRIVER_nnnnn``, or
manually using :c:func:`k_object_validate()`. These can fail for a variety
of reasons: missing driver API, bad kernel object pointer, wrong kernel
object type, or improper initialization state. These issues should always

View file

@ -13,7 +13,7 @@ static inline int z_vrfy_adc_channel_setup(const struct device *dev,
{
struct adc_channel_cfg channel_cfg;
Z_OOPS(Z_SYSCALL_DRIVER_ADC(dev, channel_setup));
Z_OOPS(K_SYSCALL_DRIVER_ADC(dev, channel_setup));
Z_OOPS(k_usermode_from_copy(&channel_cfg,
(struct adc_channel_cfg *)user_channel_cfg,
sizeof(struct adc_channel_cfg)));
@ -55,7 +55,7 @@ static inline int z_vrfy_adc_read(const struct device *dev,
struct adc_sequence sequence;
struct adc_sequence_options options;
Z_OOPS(Z_SYSCALL_DRIVER_ADC(dev, read));
Z_OOPS(K_SYSCALL_DRIVER_ADC(dev, read));
Z_OOPS(K_SYSCALL_VERIFY_MSG(copy_sequence(&sequence, &options,
(struct adc_sequence *)user_sequence),
"invalid ADC sequence"));
@ -76,7 +76,7 @@ static inline int z_vrfy_adc_read_async(const struct device *dev,
struct adc_sequence sequence;
struct adc_sequence_options options;
Z_OOPS(Z_SYSCALL_DRIVER_ADC(dev, read_async));
Z_OOPS(K_SYSCALL_DRIVER_ADC(dev, read_async));
Z_OOPS(K_SYSCALL_VERIFY_MSG(copy_sequence(&sequence, &options,
(struct adc_sequence *)user_sequence),
"invalid ADC sequence"));

View file

@ -13,7 +13,7 @@ static int z_vrfy_can_calc_timing(const struct device *dev, struct can_timing *r
struct can_timing res_copy;
int err;
Z_OOPS(Z_SYSCALL_DRIVER_CAN(dev, get_core_clock));
Z_OOPS(K_SYSCALL_DRIVER_CAN(dev, get_core_clock));
Z_OOPS(k_usermode_from_copy(&res_copy, res, sizeof(res_copy)));
err = z_impl_can_calc_timing(dev, &res_copy, bitrate, sample_pnt);
@ -28,7 +28,7 @@ static inline int z_vrfy_can_set_timing(const struct device *dev,
{
struct can_timing timing_copy;
Z_OOPS(Z_SYSCALL_DRIVER_CAN(dev, set_timing));
Z_OOPS(K_SYSCALL_DRIVER_CAN(dev, set_timing));
Z_OOPS(k_usermode_from_copy(&timing_copy, timing, sizeof(timing_copy)));
return z_impl_can_set_timing(dev, &timing_copy);
@ -38,7 +38,7 @@ static inline int z_vrfy_can_set_timing(const struct device *dev,
static inline int z_vrfy_can_get_core_clock(const struct device *dev,
uint32_t *rate)
{
Z_OOPS(Z_SYSCALL_DRIVER_CAN(dev, get_core_clock));
Z_OOPS(K_SYSCALL_DRIVER_CAN(dev, get_core_clock));
Z_OOPS(K_SYSCALL_MEMORY_WRITE(rate, sizeof(*rate)));
return z_impl_can_get_core_clock(dev, rate);
@ -80,7 +80,7 @@ static int z_vrfy_can_calc_timing_data(const struct device *dev, struct can_timi
struct can_timing res_copy;
int err;
Z_OOPS(Z_SYSCALL_DRIVER_CAN(dev, get_core_clock));
Z_OOPS(K_SYSCALL_DRIVER_CAN(dev, get_core_clock));
Z_OOPS(k_usermode_from_copy(&res_copy, res, sizeof(res_copy)));
err = z_impl_can_calc_timing_data(dev, &res_copy, bitrate, sample_pnt);
@ -111,7 +111,7 @@ static inline int z_vrfy_can_set_timing_data(const struct device *dev,
{
struct can_timing timing_data_copy;
Z_OOPS(Z_SYSCALL_DRIVER_CAN(dev, set_timing_data));
Z_OOPS(K_SYSCALL_DRIVER_CAN(dev, set_timing_data));
Z_OOPS(k_usermode_from_copy(&timing_data_copy, timing_data, sizeof(timing_data_copy)));
return z_impl_can_set_timing_data(dev, &timing_data_copy);
@ -121,7 +121,7 @@ static inline int z_vrfy_can_set_timing_data(const struct device *dev,
static inline int z_vrfy_can_set_bitrate_data(const struct device *dev,
uint32_t bitrate_data)
{
Z_OOPS(Z_SYSCALL_DRIVER_CAN(dev, set_timing_data));
Z_OOPS(K_SYSCALL_DRIVER_CAN(dev, set_timing_data));
return z_impl_can_set_bitrate_data(dev, bitrate_data);
}
@ -140,7 +140,7 @@ static inline int z_vrfy_can_get_max_filters(const struct device *dev, bool ide)
static inline int z_vrfy_can_get_capabilities(const struct device *dev, can_mode_t *cap)
{
Z_OOPS(Z_SYSCALL_DRIVER_CAN(dev, get_capabilities));
Z_OOPS(K_SYSCALL_DRIVER_CAN(dev, get_capabilities));
Z_OOPS(K_SYSCALL_MEMORY_WRITE(cap, sizeof(*cap)));
return z_impl_can_get_capabilities(dev, cap);
@ -149,7 +149,7 @@ static inline int z_vrfy_can_get_capabilities(const struct device *dev, can_mode
static inline int z_vrfy_can_start(const struct device *dev)
{
Z_OOPS(Z_SYSCALL_DRIVER_CAN(dev, start));
Z_OOPS(K_SYSCALL_DRIVER_CAN(dev, start));
return z_impl_can_start(dev);
}
@ -157,7 +157,7 @@ static inline int z_vrfy_can_start(const struct device *dev)
static inline int z_vrfy_can_stop(const struct device *dev)
{
Z_OOPS(Z_SYSCALL_DRIVER_CAN(dev, stop));
Z_OOPS(K_SYSCALL_DRIVER_CAN(dev, stop));
return z_impl_can_stop(dev);
}
@ -165,7 +165,7 @@ static inline int z_vrfy_can_stop(const struct device *dev)
static inline int z_vrfy_can_set_mode(const struct device *dev, can_mode_t mode)
{
Z_OOPS(Z_SYSCALL_DRIVER_CAN(dev, set_mode));
Z_OOPS(K_SYSCALL_DRIVER_CAN(dev, set_mode));
return z_impl_can_set_mode(dev, mode);
}
@ -173,7 +173,7 @@ static inline int z_vrfy_can_set_mode(const struct device *dev, can_mode_t mode)
static inline int z_vrfy_can_set_bitrate(const struct device *dev, uint32_t bitrate)
{
Z_OOPS(Z_SYSCALL_DRIVER_CAN(dev, set_timing));
Z_OOPS(K_SYSCALL_DRIVER_CAN(dev, set_timing));
return z_impl_can_set_bitrate(dev, bitrate);
}
@ -187,7 +187,7 @@ static inline int z_vrfy_can_send(const struct device *dev,
{
struct can_frame frame_copy;
Z_OOPS(Z_SYSCALL_DRIVER_CAN(dev, send));
Z_OOPS(K_SYSCALL_DRIVER_CAN(dev, send));
Z_OOPS(k_usermode_from_copy(&frame_copy, frame, sizeof(frame_copy)));
Z_OOPS(K_SYSCALL_VERIFY_MSG(callback == NULL, "callbacks may not be set from user mode"));
@ -201,7 +201,7 @@ static inline int z_vrfy_can_add_rx_filter_msgq(const struct device *dev,
{
struct can_filter filter_copy;
Z_OOPS(Z_SYSCALL_DRIVER_CAN(dev, add_rx_filter));
Z_OOPS(K_SYSCALL_DRIVER_CAN(dev, add_rx_filter));
Z_OOPS(K_SYSCALL_OBJ(msgq, K_OBJ_MSGQ));
Z_OOPS(k_usermode_from_copy(&filter_copy, filter, sizeof(filter_copy)));
@ -211,7 +211,7 @@ static inline int z_vrfy_can_add_rx_filter_msgq(const struct device *dev,
static inline void z_vrfy_can_remove_rx_filter(const struct device *dev, int filter_id)
{
Z_OOPS(Z_SYSCALL_DRIVER_CAN(dev, remove_rx_filter));
Z_OOPS(K_SYSCALL_DRIVER_CAN(dev, remove_rx_filter));
z_impl_can_remove_rx_filter(dev, filter_id);
}
@ -220,7 +220,7 @@ static inline void z_vrfy_can_remove_rx_filter(const struct device *dev, int fil
static inline int z_vrfy_can_get_state(const struct device *dev, enum can_state *state,
struct can_bus_err_cnt *err_cnt)
{
Z_OOPS(Z_SYSCALL_DRIVER_CAN(dev, get_state));
Z_OOPS(K_SYSCALL_DRIVER_CAN(dev, get_state));
if (state != NULL) {
Z_OOPS(K_SYSCALL_MEMORY_WRITE(state, sizeof(*state)));
@ -237,7 +237,7 @@ static inline int z_vrfy_can_get_state(const struct device *dev, enum can_state
#ifndef CONFIG_CAN_AUTO_BUS_OFF_RECOVERY
static inline int z_vrfy_can_recover(const struct device *dev, k_timeout_t timeout)
{
Z_OOPS(Z_SYSCALL_DRIVER_CAN(dev, recover));
Z_OOPS(K_SYSCALL_DRIVER_CAN(dev, recover));
return z_impl_can_recover(dev, timeout);
}

View file

@ -12,7 +12,7 @@ static inline int z_vrfy_charger_get_prop(const struct device *dev, const charge
{
union charger_propval k_val;
Z_OOPS(Z_SYSCALL_DRIVER_CHARGER(dev, get_property));
Z_OOPS(K_SYSCALL_DRIVER_CHARGER(dev, get_property));
int ret = z_impl_charger_get_prop(dev, prop, &k_val);
@ -28,7 +28,7 @@ static inline int z_vrfy_charger_set_prop(const struct device *dev, const charge
{
union charger_propval k_val;
Z_OOPS(Z_SYSCALL_DRIVER_CHARGER(dev, set_property));
Z_OOPS(K_SYSCALL_DRIVER_CHARGER(dev, set_property));
Z_OOPS(k_usermode_from_copy(&k_val, val, sizeof(union charger_propval)));

View file

@ -13,7 +13,7 @@
#define COUNTER_HANDLER(name) \
static inline int z_vrfy_counter_##name(const struct device *dev) \
{ \
Z_OOPS(Z_SYSCALL_DRIVER_COUNTER(dev, name)); \
Z_OOPS(K_SYSCALL_DRIVER_COUNTER(dev, name)); \
return z_impl_counter_ ## name((const struct device *)dev); \
}
@ -67,7 +67,7 @@ static inline uint64_t z_vrfy_counter_ticks_to_us(const struct device *dev,
static inline int z_vrfy_counter_get_value(const struct device *dev,
uint32_t *ticks)
{
Z_OOPS(Z_SYSCALL_DRIVER_COUNTER(dev, get_value));
Z_OOPS(K_SYSCALL_DRIVER_COUNTER(dev, get_value));
Z_OOPS(K_SYSCALL_MEMORY_WRITE(ticks, sizeof(*ticks)));
return z_impl_counter_get_value((const struct device *)dev, ticks);
}
@ -75,7 +75,7 @@ static inline int z_vrfy_counter_get_value(const struct device *dev,
static inline int z_vrfy_counter_get_value_64(const struct device *dev,
uint64_t *ticks)
{
Z_OOPS(Z_SYSCALL_DRIVER_COUNTER(dev, get_value_64));
Z_OOPS(K_SYSCALL_DRIVER_COUNTER(dev, get_value_64));
Z_OOPS(K_SYSCALL_MEMORY_WRITE(ticks, sizeof(*ticks)));
return z_impl_counter_get_value_64((const struct device *)dev, ticks);
}
@ -88,7 +88,7 @@ static inline int z_vrfy_counter_set_channel_alarm(const struct device *dev,
{
struct counter_alarm_cfg cfg_copy;
Z_OOPS(Z_SYSCALL_DRIVER_COUNTER(dev, set_alarm));
Z_OOPS(K_SYSCALL_DRIVER_COUNTER(dev, set_alarm));
Z_OOPS(k_usermode_from_copy(&cfg_copy, alarm_cfg, sizeof(cfg_copy)));
Z_OOPS(K_SYSCALL_VERIFY_MSG(cfg_copy.callback == NULL,
"callbacks may not be set from user mode"));
@ -102,7 +102,7 @@ static inline int z_vrfy_counter_set_channel_alarm(const struct device *dev,
static inline int z_vrfy_counter_cancel_channel_alarm(const struct device *dev,
uint8_t chan_id)
{
Z_OOPS(Z_SYSCALL_DRIVER_COUNTER(dev, cancel_alarm));
Z_OOPS(K_SYSCALL_DRIVER_COUNTER(dev, cancel_alarm));
return z_impl_counter_cancel_channel_alarm((const struct device *)dev,
(uint8_t)chan_id);
}
@ -114,7 +114,7 @@ static inline int z_vrfy_counter_set_top_value(const struct device *dev,
{
struct counter_top_cfg cfg_copy;
Z_OOPS(Z_SYSCALL_DRIVER_COUNTER(dev, set_top_value));
Z_OOPS(K_SYSCALL_DRIVER_COUNTER(dev, set_top_value));
Z_OOPS(k_usermode_from_copy(&cfg_copy, cfg, sizeof(cfg_copy)));
Z_OOPS(K_SYSCALL_VERIFY_MSG(cfg_copy.callback == NULL,
"callbacks may not be set from user mode"));
@ -126,7 +126,7 @@ static inline int z_vrfy_counter_set_top_value(const struct device *dev,
static inline uint32_t z_vrfy_counter_get_top_value(const struct device *dev)
{
Z_OOPS(Z_SYSCALL_DRIVER_COUNTER(dev, get_top_value));
Z_OOPS(K_SYSCALL_DRIVER_COUNTER(dev, get_top_value));
return z_impl_counter_get_top_value((const struct device *)dev);
}
#include <syscalls/counter_get_top_value_mrsh.c>

View file

@ -13,7 +13,7 @@ static inline int z_vrfy_dac_channel_setup(const struct device *dev,
{
struct dac_channel_cfg channel_cfg;
Z_OOPS(Z_SYSCALL_DRIVER_DAC(dev, channel_setup));
Z_OOPS(K_SYSCALL_DRIVER_DAC(dev, channel_setup));
Z_OOPS(k_usermode_from_copy(&channel_cfg,
(struct dac_channel_cfg *)user_channel_cfg,
sizeof(struct dac_channel_cfg)));
@ -26,7 +26,7 @@ static inline int z_vrfy_dac_channel_setup(const struct device *dev,
static inline int z_vrfy_dac_write_value(const struct device *dev,
uint8_t channel, uint32_t value)
{
Z_OOPS(Z_SYSCALL_DRIVER_DAC(dev, write_value));
Z_OOPS(K_SYSCALL_DRIVER_DAC(dev, write_value));
return z_impl_dac_write_value((const struct device *)dev, channel,
value);

View file

@ -13,14 +13,14 @@
static inline int z_vrfy_dma_start(const struct device *dev, uint32_t channel)
{
Z_OOPS(Z_SYSCALL_DRIVER_DMA(dev, start));
Z_OOPS(K_SYSCALL_DRIVER_DMA(dev, start));
return z_impl_dma_start((const struct device *)dev, channel);
}
#include <syscalls/dma_start_mrsh.c>
static inline int z_vrfy_dma_stop(const struct device *dev, uint32_t channel)
{
Z_OOPS(Z_SYSCALL_DRIVER_DMA(dev, stop));
Z_OOPS(K_SYSCALL_DRIVER_DMA(dev, stop));
return z_impl_dma_stop((const struct device *)dev, channel);
}
#include <syscalls/dma_stop_mrsh.c>

View file

@ -10,7 +10,7 @@
static inline int z_vrfy_eeprom_read(const struct device *dev, off_t offset,
void *data, size_t len)
{
Z_OOPS(Z_SYSCALL_DRIVER_EEPROM(dev, read));
Z_OOPS(K_SYSCALL_DRIVER_EEPROM(dev, read));
Z_OOPS(K_SYSCALL_MEMORY_WRITE(data, len));
return z_impl_eeprom_read((const struct device *)dev, offset,
(void *)data,
@ -21,7 +21,7 @@ static inline int z_vrfy_eeprom_read(const struct device *dev, off_t offset,
static inline int z_vrfy_eeprom_write(const struct device *dev, off_t offset,
const void *data, size_t len)
{
Z_OOPS(Z_SYSCALL_DRIVER_EEPROM(dev, write));
Z_OOPS(K_SYSCALL_DRIVER_EEPROM(dev, write));
Z_OOPS(K_SYSCALL_MEMORY_READ(data, len));
return z_impl_eeprom_write((const struct device *)dev, offset,
(const void *)data, len);
@ -30,7 +30,7 @@ static inline int z_vrfy_eeprom_write(const struct device *dev, off_t offset,
static inline size_t z_vrfy_eeprom_get_size(const struct device *dev)
{
Z_OOPS(Z_SYSCALL_DRIVER_EEPROM(dev, size));
Z_OOPS(K_SYSCALL_DRIVER_EEPROM(dev, size));
return z_impl_eeprom_get_size((const struct device *)dev);
}
#include <syscalls/eeprom_get_size_mrsh.c>

View file

@ -11,7 +11,7 @@ static inline int z_vrfy_entropy_get_entropy(const struct device *dev,
uint8_t *buffer,
uint16_t len)
{
Z_OOPS(Z_SYSCALL_DRIVER_ENTROPY(dev, get_entropy));
Z_OOPS(K_SYSCALL_DRIVER_ENTROPY(dev, get_entropy));
Z_OOPS(K_SYSCALL_MEMORY_WRITE(buffer, len));
return z_impl_entropy_get_entropy((const struct device *)dev,
(uint8_t *)buffer,

View file

@ -13,7 +13,7 @@ static inline int z_vrfy_espi_config(const struct device *dev,
{
struct espi_cfg cfg_copy;
Z_OOPS(Z_SYSCALL_DRIVER_ESPI(dev, config));
Z_OOPS(K_SYSCALL_DRIVER_ESPI(dev, config));
Z_OOPS(k_usermode_from_copy(&cfg_copy, cfg,
sizeof(struct espi_cfg)));
@ -24,7 +24,7 @@ static inline int z_vrfy_espi_config(const struct device *dev,
static inline bool z_vrfy_espi_get_channel_status(const struct device *dev,
enum espi_channel ch)
{
Z_OOPS(Z_SYSCALL_DRIVER_ESPI(dev, get_channel_status));
Z_OOPS(K_SYSCALL_DRIVER_ESPI(dev, get_channel_status));
return z_impl_espi_get_channel_status(dev, ch);
}
@ -37,7 +37,7 @@ static inline int z_vrfy_espi_read_lpc_request(const struct device *dev,
int ret;
uint32_t data_copy;
Z_OOPS(Z_SYSCALL_DRIVER_ESPI(dev, read_lpc_request));
Z_OOPS(K_SYSCALL_DRIVER_ESPI(dev, read_lpc_request));
ret = z_impl_espi_read_lpc_request(dev, op, &data_copy);
Z_OOPS(k_usermode_to_copy(data, &data_copy, sizeof(uint8_t)));
@ -52,7 +52,7 @@ static inline int z_vrfy_espi_write_lpc_request(const struct device *dev,
{
uint32_t data_copy;
Z_OOPS(Z_SYSCALL_DRIVER_ESPI(dev, write_lpc_request));
Z_OOPS(K_SYSCALL_DRIVER_ESPI(dev, write_lpc_request));
Z_OOPS(k_usermode_from_copy(&data_copy, data, sizeof(*data)));
return z_impl_espi_write_lpc_request(dev, op, &data_copy);
@ -63,7 +63,7 @@ static inline int z_vrfy_espi_send_vwire(const struct device *dev,
enum espi_vwire_signal signal,
uint8_t level)
{
Z_OOPS(Z_SYSCALL_DRIVER_ESPI(dev, send_vwire));
Z_OOPS(K_SYSCALL_DRIVER_ESPI(dev, send_vwire));
return z_impl_espi_send_vwire(dev, signal, level);
}
@ -76,7 +76,7 @@ static inline int z_vrfy_espi_receive_vwire(const struct device *dev,
int ret;
uint8_t level_copy;
Z_OOPS(Z_SYSCALL_DRIVER_ESPI(dev, receive_vwire));
Z_OOPS(K_SYSCALL_DRIVER_ESPI(dev, receive_vwire));
ret = z_impl_espi_receive_vwire(dev, signal, &level_copy);
Z_OOPS(k_usermode_to_copy(level, &level_copy, sizeof(uint8_t)));
@ -91,7 +91,7 @@ static inline int z_vrfy_espi_read_request(const struct device *dev,
int ret;
struct espi_request_packet req_copy;
Z_OOPS(Z_SYSCALL_DRIVER_ESPI(dev, read_request));
Z_OOPS(K_SYSCALL_DRIVER_ESPI(dev, read_request));
Z_OOPS(k_usermode_from_copy(&req_copy, req,
sizeof(struct espi_request_packet)));
Z_OOPS(K_SYSCALL_MEMORY_WRITE(req_copy.data, req_copy.len));
@ -111,7 +111,7 @@ static inline int z_vrfy_espi_write_request(const struct device *dev,
int ret;
struct espi_request_packet req_copy;
Z_OOPS(Z_SYSCALL_DRIVER_ESPI(dev, write_request));
Z_OOPS(K_SYSCALL_DRIVER_ESPI(dev, write_request));
Z_OOPS(K_SYSCALL_MEMORY_READ(req->data, req->len));
Z_OOPS(k_usermode_from_copy(&req_copy, req,
sizeof(struct espi_request_packet)));
@ -128,7 +128,7 @@ static inline int z_vrfy_espi_send_oob(const struct device *dev,
int ret;
struct espi_oob_packet pckt_copy;
Z_OOPS(Z_SYSCALL_DRIVER_ESPI(dev, send_oob));
Z_OOPS(K_SYSCALL_DRIVER_ESPI(dev, send_oob));
Z_OOPS(K_SYSCALL_MEMORY_READ(pckt->buf, pckt->len));
Z_OOPS(k_usermode_from_copy(&pckt_copy, pckt,
sizeof(struct espi_oob_packet)));
@ -145,7 +145,7 @@ static inline int z_vrfy_espi_receive_oob(const struct device *dev,
int ret;
struct espi_oob_packet pckt_copy;
Z_OOPS(Z_SYSCALL_DRIVER_ESPI(dev, receive_oob));
Z_OOPS(K_SYSCALL_DRIVER_ESPI(dev, receive_oob));
Z_OOPS(k_usermode_from_copy(&pckt_copy, pckt,
sizeof(struct espi_oob_packet)));
Z_OOPS(K_SYSCALL_MEMORY_WRITE(pckt->buf, pckt->len));
@ -164,7 +164,7 @@ static inline int z_vrfy_espi_read_flash(const struct device *dev,
int ret;
struct espi_flash_packet pckt_copy;
Z_OOPS(Z_SYSCALL_DRIVER_ESPI(dev, flash_read));
Z_OOPS(K_SYSCALL_DRIVER_ESPI(dev, flash_read));
Z_OOPS(k_usermode_from_copy(&pckt_copy, pckt,
sizeof(struct espi_flash_packet)));
Z_OOPS(K_SYSCALL_MEMORY_WRITE(pckt->buf, pckt->len));
@ -183,7 +183,7 @@ static inline int z_vrfy_espi_write_flash(const struct device *dev,
int ret;
struct espi_flash_packet pckt_copy;
Z_OOPS(Z_SYSCALL_DRIVER_ESPI(dev, flash_write));
Z_OOPS(K_SYSCALL_DRIVER_ESPI(dev, flash_write));
Z_OOPS(k_usermode_from_copy(&pckt_copy, pckt,
sizeof(struct espi_flash_packet)));
Z_OOPS(K_SYSCALL_MEMORY_READ(pckt->buf, pckt->len));
@ -200,7 +200,7 @@ static inline int z_vrfy_espi_flash_erase(const struct device *dev,
int ret;
struct espi_flash_packet pckt_copy;
Z_OOPS(Z_SYSCALL_DRIVER_ESPI(dev, flash_write));
Z_OOPS(K_SYSCALL_DRIVER_ESPI(dev, flash_write));
Z_OOPS(k_usermode_from_copy(&pckt_copy, pckt,
sizeof(struct espi_flash_packet)));
Z_OOPS(K_SYSCALL_MEMORY_READ(pckt->buf, pckt->len));

View file

@ -10,7 +10,7 @@
static inline int z_vrfy_flash_read(const struct device *dev, off_t offset,
void *data, size_t len)
{
Z_OOPS(Z_SYSCALL_DRIVER_FLASH(dev, read));
Z_OOPS(K_SYSCALL_DRIVER_FLASH(dev, read));
Z_OOPS(K_SYSCALL_MEMORY_WRITE(data, len));
return z_impl_flash_read((const struct device *)dev, offset,
(void *)data,
@ -21,7 +21,7 @@ static inline int z_vrfy_flash_read(const struct device *dev, off_t offset,
static inline int z_vrfy_flash_write(const struct device *dev, off_t offset,
const void *data, size_t len)
{
Z_OOPS(Z_SYSCALL_DRIVER_FLASH(dev, write));
Z_OOPS(K_SYSCALL_DRIVER_FLASH(dev, write));
Z_OOPS(K_SYSCALL_MEMORY_READ(data, len));
return z_impl_flash_write((const struct device *)dev, offset,
(const void *)data, len);
@ -31,7 +31,7 @@ static inline int z_vrfy_flash_write(const struct device *dev, off_t offset,
static inline int z_vrfy_flash_erase(const struct device *dev, off_t offset,
size_t size)
{
Z_OOPS(Z_SYSCALL_DRIVER_FLASH(dev, erase));
Z_OOPS(K_SYSCALL_DRIVER_FLASH(dev, erase));
return z_impl_flash_erase((const struct device *)dev, offset, size);
}
#include <syscalls/flash_erase_mrsh.c>
@ -45,7 +45,7 @@ static inline size_t z_vrfy_flash_get_write_block_size(const struct device *dev)
static inline const struct flash_parameters *z_vrfy_flash_get_parameters(const struct device *dev)
{
Z_OOPS(Z_SYSCALL_DRIVER_FLASH(dev, get_parameters));
Z_OOPS(K_SYSCALL_DRIVER_FLASH(dev, get_parameters));
return z_impl_flash_get_parameters(dev);
}
#include <syscalls/flash_get_parameters_mrsh.c>
@ -55,7 +55,7 @@ static inline int z_vrfy_flash_get_page_info_by_offs(const struct device *dev,
off_t offs,
struct flash_pages_info *info)
{
Z_OOPS(Z_SYSCALL_DRIVER_FLASH(dev, page_layout));
Z_OOPS(K_SYSCALL_DRIVER_FLASH(dev, page_layout));
Z_OOPS(K_SYSCALL_MEMORY_WRITE(info, sizeof(struct flash_pages_info)));
return z_impl_flash_get_page_info_by_offs((const struct device *)dev,
offs,
@ -67,7 +67,7 @@ static inline int z_vrfy_flash_get_page_info_by_idx(const struct device *dev,
uint32_t idx,
struct flash_pages_info *info)
{
Z_OOPS(Z_SYSCALL_DRIVER_FLASH(dev, page_layout));
Z_OOPS(K_SYSCALL_DRIVER_FLASH(dev, page_layout));
Z_OOPS(K_SYSCALL_MEMORY_WRITE(info, sizeof(struct flash_pages_info)));
return z_impl_flash_get_page_info_by_idx((const struct device *)dev,
idx,
@ -77,7 +77,7 @@ static inline int z_vrfy_flash_get_page_info_by_idx(const struct device *dev,
static inline size_t z_vrfy_flash_get_page_count(const struct device *dev)
{
Z_OOPS(Z_SYSCALL_DRIVER_FLASH(dev, page_layout));
Z_OOPS(K_SYSCALL_DRIVER_FLASH(dev, page_layout));
return z_impl_flash_get_page_count((const struct device *)dev);
}
#include <syscalls/flash_get_page_count_mrsh.c>
@ -90,7 +90,7 @@ static inline int z_vrfy_flash_sfdp_read(const struct device *dev,
off_t offset,
void *data, size_t len)
{
Z_OOPS(Z_SYSCALL_DRIVER_FLASH(dev, sfdp_read));
Z_OOPS(K_SYSCALL_DRIVER_FLASH(dev, sfdp_read));
Z_OOPS(K_SYSCALL_MEMORY_WRITE(data, len));
return z_impl_flash_sfdp_read(dev, offset, data, len);
}
@ -99,7 +99,7 @@ static inline int z_vrfy_flash_sfdp_read(const struct device *dev,
static inline int z_vrfy_flash_read_jedec_id(const struct device *dev,
uint8_t *id)
{
Z_OOPS(Z_SYSCALL_DRIVER_FLASH(dev, read_jedec_id));
Z_OOPS(K_SYSCALL_DRIVER_FLASH(dev, read_jedec_id));
Z_OOPS(K_SYSCALL_MEMORY_WRITE(id, 3));
return z_impl_flash_read_jedec_id(dev, id);
}
@ -112,7 +112,7 @@ static inline int z_vrfy_flash_read_jedec_id(const struct device *dev,
static inline int z_vrfy_flash_ex_op(const struct device *dev, uint16_t code,
const uintptr_t in, void *out)
{
Z_OOPS(Z_SYSCALL_DRIVER_FLASH(dev, ex_op));
Z_OOPS(K_SYSCALL_DRIVER_FLASH(dev, ex_op));
/*
* If the code is a vendor code, then ex_op function have to perform

View file

@ -13,7 +13,7 @@ static inline int z_vrfy_fuel_gauge_get_prop(const struct device *dev, fuel_gaug
{
union fuel_gauge_prop_val k_val;
Z_OOPS(Z_SYSCALL_DRIVER_FUEL_GAUGE(dev, get_property));
Z_OOPS(K_SYSCALL_DRIVER_FUEL_GAUGE(dev, get_property));
Z_OOPS(k_usermode_from_copy(&k_val, val, sizeof(union fuel_gauge_prop_val)));
@ -32,7 +32,7 @@ static inline int z_vrfy_fuel_gauge_get_props(const struct device *dev, fuel_gau
union fuel_gauge_prop_val k_vals[len];
fuel_gauge_prop_t k_props[len];
Z_OOPS(Z_SYSCALL_DRIVER_FUEL_GAUGE(dev, get_property));
Z_OOPS(K_SYSCALL_DRIVER_FUEL_GAUGE(dev, get_property));
Z_OOPS(k_usermode_from_copy(k_vals, vals, len * sizeof(union fuel_gauge_prop_val)));
Z_OOPS(k_usermode_from_copy(k_props, props, len * sizeof(fuel_gauge_prop_t)));
@ -49,7 +49,7 @@ static inline int z_vrfy_fuel_gauge_get_props(const struct device *dev, fuel_gau
static inline int z_vrfy_fuel_gauge_set_prop(const struct device *dev, fuel_gauge_prop_t prop,
union fuel_gauge_prop_val val)
{
Z_OOPS(Z_SYSCALL_DRIVER_FUEL_GAUGE(dev, set_property));
Z_OOPS(K_SYSCALL_DRIVER_FUEL_GAUGE(dev, set_property));
int ret = z_impl_fuel_gauge_set_prop(dev, prop, val);
@ -64,7 +64,7 @@ static inline int z_vrfy_fuel_gauge_set_props(const struct device *dev, fuel_gau
union fuel_gauge_prop_val k_vals[len];
fuel_gauge_prop_t k_props[len];
Z_OOPS(Z_SYSCALL_DRIVER_FUEL_GAUGE(dev, set_property));
Z_OOPS(K_SYSCALL_DRIVER_FUEL_GAUGE(dev, set_property));
Z_OOPS(k_usermode_from_copy(k_vals, vals, len * sizeof(union fuel_gauge_prop_val)));
Z_OOPS(k_usermode_from_copy(k_props, props, len * sizeof(fuel_gauge_prop_t)));
@ -83,7 +83,7 @@ static inline int z_vrfy_fuel_gauge_get_buffer_prop(const struct device *dev,
fuel_gauge_prop_t prop, void *dst,
size_t dst_len)
{
Z_OOPS(Z_SYSCALL_DRIVER_FUEL_GAUGE(dev, get_buffer_property));
Z_OOPS(K_SYSCALL_DRIVER_FUEL_GAUGE(dev, get_buffer_property));
Z_OOPS(K_SYSCALL_MEMORY_WRITE(dst, dst_len));
@ -96,7 +96,7 @@ static inline int z_vrfy_fuel_gauge_get_buffer_prop(const struct device *dev,
static inline int z_vrfy_fuel_gauge_battery_cutoff(const struct device *dev)
{
Z_OOPS(Z_SYSCALL_DRIVER_FUEL_GAUGE(dev, battery_cutoff));
Z_OOPS(K_SYSCALL_DRIVER_FUEL_GAUGE(dev, battery_cutoff));
return z_impl_fuel_gauge_battery_cutoff(dev);
}

View file

@ -11,7 +11,7 @@ static inline int z_vrfy_gpio_pin_configure(const struct device *port,
gpio_pin_t pin,
gpio_flags_t flags)
{
Z_OOPS(Z_SYSCALL_DRIVER_GPIO(port, pin_configure));
Z_OOPS(K_SYSCALL_DRIVER_GPIO(port, pin_configure));
return z_impl_gpio_pin_configure((const struct device *)port,
pin,
flags);
@ -23,7 +23,7 @@ static inline int z_vrfy_gpio_pin_get_config(const struct device *port,
gpio_pin_t pin,
gpio_flags_t *flags)
{
Z_OOPS(Z_SYSCALL_DRIVER_GPIO(port, pin_get_config));
Z_OOPS(K_SYSCALL_DRIVER_GPIO(port, pin_get_config));
Z_OOPS(K_SYSCALL_MEMORY_WRITE(flags, sizeof(gpio_flags_t)));
return z_impl_gpio_pin_get_config(port, pin, flags);
@ -34,7 +34,7 @@ static inline int z_vrfy_gpio_pin_get_config(const struct device *port,
static inline int z_vrfy_gpio_port_get_raw(const struct device *port,
gpio_port_value_t *value)
{
Z_OOPS(Z_SYSCALL_DRIVER_GPIO(port, port_get_raw));
Z_OOPS(K_SYSCALL_DRIVER_GPIO(port, port_get_raw));
Z_OOPS(K_SYSCALL_MEMORY_WRITE(value, sizeof(gpio_port_value_t)));
return z_impl_gpio_port_get_raw((const struct device *)port,
(gpio_port_value_t *)value);
@ -45,7 +45,7 @@ static inline int z_vrfy_gpio_port_set_masked_raw(const struct device *port,
gpio_port_pins_t mask,
gpio_port_value_t value)
{
Z_OOPS(Z_SYSCALL_DRIVER_GPIO(port, port_set_masked_raw));
Z_OOPS(K_SYSCALL_DRIVER_GPIO(port, port_set_masked_raw));
return z_impl_gpio_port_set_masked_raw((const struct device *)port,
mask,
value);
@ -55,7 +55,7 @@ static inline int z_vrfy_gpio_port_set_masked_raw(const struct device *port,
static inline int z_vrfy_gpio_port_set_bits_raw(const struct device *port,
gpio_port_pins_t pins)
{
Z_OOPS(Z_SYSCALL_DRIVER_GPIO(port, port_set_bits_raw));
Z_OOPS(K_SYSCALL_DRIVER_GPIO(port, port_set_bits_raw));
return z_impl_gpio_port_set_bits_raw((const struct device *)port,
pins);
}
@ -64,7 +64,7 @@ static inline int z_vrfy_gpio_port_set_bits_raw(const struct device *port,
static inline int z_vrfy_gpio_port_clear_bits_raw(const struct device *port,
gpio_port_pins_t pins)
{
Z_OOPS(Z_SYSCALL_DRIVER_GPIO(port, port_clear_bits_raw));
Z_OOPS(K_SYSCALL_DRIVER_GPIO(port, port_clear_bits_raw));
return z_impl_gpio_port_clear_bits_raw((const struct device *)port,
pins);
}
@ -73,7 +73,7 @@ static inline int z_vrfy_gpio_port_clear_bits_raw(const struct device *port,
static inline int z_vrfy_gpio_port_toggle_bits(const struct device *port,
gpio_port_pins_t pins)
{
Z_OOPS(Z_SYSCALL_DRIVER_GPIO(port, port_toggle_bits));
Z_OOPS(K_SYSCALL_DRIVER_GPIO(port, port_toggle_bits));
return z_impl_gpio_port_toggle_bits((const struct device *)port, pins);
}
#include <syscalls/gpio_port_toggle_bits_mrsh.c>
@ -82,7 +82,7 @@ static inline int z_vrfy_gpio_pin_interrupt_configure(const struct device *port,
gpio_pin_t pin,
gpio_flags_t flags)
{
Z_OOPS(Z_SYSCALL_DRIVER_GPIO(port, pin_interrupt_configure));
Z_OOPS(K_SYSCALL_DRIVER_GPIO(port, pin_interrupt_configure));
return z_impl_gpio_pin_interrupt_configure((const struct device *)port,
pin,
flags);
@ -91,7 +91,7 @@ static inline int z_vrfy_gpio_pin_interrupt_configure(const struct device *port,
static inline int z_vrfy_gpio_get_pending_int(const struct device *dev)
{
Z_OOPS(Z_SYSCALL_DRIVER_GPIO(dev, get_pending_int));
Z_OOPS(K_SYSCALL_DRIVER_GPIO(dev, get_pending_int));
return z_impl_gpio_get_pending_int((const struct device *)dev);
}
@ -102,7 +102,7 @@ static inline int z_vrfy_gpio_port_get_direction(const struct device *dev, gpio_
gpio_port_pins_t *inputs,
gpio_port_pins_t *outputs)
{
Z_OOPS(Z_SYSCALL_DRIVER_GPIO(dev, port_get_direction));
Z_OOPS(K_SYSCALL_DRIVER_GPIO(dev, port_get_direction));
if (inputs != NULL) {
Z_OOPS(K_SYSCALL_MEMORY_WRITE(inputs, sizeof(gpio_port_pins_t)));

View file

@ -9,7 +9,7 @@
static inline int z_vrfy_hwspinlock_trylock(const struct device *dev, uint32_t id)
{
Z_OOPS(Z_SYSCALL_DRIVER_HWSPINLOCK(dev, trylock));
Z_OOPS(K_SYSCALL_DRIVER_HWSPINLOCK(dev, trylock));
return z_impl_hwspinlock_trylock(dev, id);
}
@ -17,7 +17,7 @@ static inline int z_vrfy_hwspinlock_trylock(const struct device *dev, uint32_t i
static inline void z_vrfy_hwspinlock_lock(const struct device *dev, uint32_t id)
{
Z_OOPS(Z_SYSCALL_DRIVER_HWSPINLOCK(dev, lock));
Z_OOPS(K_SYSCALL_DRIVER_HWSPINLOCK(dev, lock));
z_impl_hwspinlock_lock(dev, id);
}
@ -25,7 +25,7 @@ static inline void z_vrfy_hwspinlock_lock(const struct device *dev, uint32_t id)
static inline void z_vrfy_hwspinlock_unlock(const struct device *dev, uint32_t id)
{
Z_OOPS(Z_SYSCALL_DRIVER_HWSPINLOCK(dev, unlock));
Z_OOPS(K_SYSCALL_DRIVER_HWSPINLOCK(dev, unlock));
z_impl_hwspinlock_unlock(dev, id);
}
@ -33,7 +33,7 @@ static inline void z_vrfy_hwspinlock_unlock(const struct device *dev, uint32_t i
static inline uint32_t z_vrfy_hwspinlock_get_max_id(const struct device *dev)
{
Z_OOPS(Z_SYSCALL_DRIVER_HWSPINLOCK(dev, get_max_id));
Z_OOPS(K_SYSCALL_DRIVER_HWSPINLOCK(dev, get_max_id));
return z_impl_hwspinlock_get_max_id(dev);
}

View file

@ -11,7 +11,7 @@
static inline int z_vrfy_i2c_configure(const struct device *dev,
uint32_t dev_config)
{
Z_OOPS(Z_SYSCALL_DRIVER_I2C(dev, configure));
Z_OOPS(K_SYSCALL_DRIVER_I2C(dev, configure));
return z_impl_i2c_configure((const struct device *)dev, dev_config);
}
#include <syscalls/i2c_configure_mrsh.c>
@ -19,7 +19,7 @@ static inline int z_vrfy_i2c_configure(const struct device *dev,
static inline int z_vrfy_i2c_get_config(const struct device *dev,
uint32_t *dev_config)
{
Z_OOPS(Z_SYSCALL_DRIVER_I2C(dev, get_config));
Z_OOPS(K_SYSCALL_DRIVER_I2C(dev, get_config));
Z_OOPS(K_SYSCALL_MEMORY_WRITE(dev_config, sizeof(uint32_t)));
return z_impl_i2c_get_config(dev, dev_config);

View file

@ -16,7 +16,7 @@ static inline int z_vrfy_i2s_configure(const struct device *dev,
struct i2s_config config;
int ret = -EINVAL;
if (Z_SYSCALL_DRIVER_I2S(dev, configure)) {
if (K_SYSCALL_DRIVER_I2S(dev, configure)) {
goto out;
}
@ -50,7 +50,7 @@ static inline int z_vrfy_i2s_buf_read(const struct device *dev,
size_t data_size;
int ret;
Z_OOPS(Z_SYSCALL_DRIVER_I2S(dev, read));
Z_OOPS(K_SYSCALL_DRIVER_I2S(dev, read));
ret = i2s_read((const struct device *)dev, &mem_block, &data_size);
@ -83,7 +83,7 @@ static inline int z_vrfy_i2s_buf_write(const struct device *dev,
const struct i2s_config *tx_cfg;
void *mem_block;
Z_OOPS(Z_SYSCALL_DRIVER_I2S(dev, write));
Z_OOPS(K_SYSCALL_DRIVER_I2S(dev, write));
tx_cfg = i2s_config_get((const struct device *)dev, I2S_DIR_TX);
if (!tx_cfg) {
return -EIO;
@ -117,7 +117,7 @@ static inline int z_vrfy_i2s_trigger(const struct device *dev,
enum i2s_dir dir,
enum i2s_trigger_cmd cmd)
{
Z_OOPS(Z_SYSCALL_DRIVER_I2S(dev, trigger));
Z_OOPS(K_SYSCALL_DRIVER_I2S(dev, trigger));
return z_impl_i2s_trigger((const struct device *)dev, dir, cmd);
}

View file

@ -11,7 +11,7 @@
static inline int z_vrfy_i3c_do_ccc(const struct device *dev,
struct i3c_ccc_payload *payload)
{
Z_OOPS(Z_SYSCALL_DRIVER_I3C(dev, do_ccc));
Z_OOPS(K_SYSCALL_DRIVER_I3C(dev, do_ccc));
Z_OOPS(K_SYSCALL_MEMORY_READ(payload, sizeof(*payload)));
Z_OOPS(K_SYSCALL_MEMORY_WRITE(payload, sizeof(*payload)));

View file

@ -11,7 +11,7 @@ static inline int z_vrfy_ipm_send(const struct device *dev, int wait,
uint32_t id,
const void *data, int size)
{
Z_OOPS(Z_SYSCALL_DRIVER_IPM(dev, send));
Z_OOPS(K_SYSCALL_DRIVER_IPM(dev, send));
Z_OOPS(K_SYSCALL_MEMORY_READ(data, size));
return z_impl_ipm_send((const struct device *)dev, wait, id,
(const void *)data, size);
@ -20,21 +20,21 @@ static inline int z_vrfy_ipm_send(const struct device *dev, int wait,
static inline int z_vrfy_ipm_max_data_size_get(const struct device *dev)
{
Z_OOPS(Z_SYSCALL_DRIVER_IPM(dev, max_data_size_get));
Z_OOPS(K_SYSCALL_DRIVER_IPM(dev, max_data_size_get));
return z_impl_ipm_max_data_size_get((const struct device *)dev);
}
#include <syscalls/ipm_max_data_size_get_mrsh.c>
static inline uint32_t z_vrfy_ipm_max_id_val_get(const struct device *dev)
{
Z_OOPS(Z_SYSCALL_DRIVER_IPM(dev, max_id_val_get));
Z_OOPS(K_SYSCALL_DRIVER_IPM(dev, max_id_val_get));
return z_impl_ipm_max_id_val_get((const struct device *)dev);
}
#include <syscalls/ipm_max_id_val_get_mrsh.c>
static inline int z_vrfy_ipm_set_enabled(const struct device *dev, int enable)
{
Z_OOPS(Z_SYSCALL_DRIVER_IPM(dev, set_enabled));
Z_OOPS(K_SYSCALL_DRIVER_IPM(dev, set_enabled));
return z_impl_ipm_set_enabled((const struct device *)dev, enable);
}
#include <syscalls/ipm_set_enabled_mrsh.c>

View file

@ -10,7 +10,7 @@
static inline int z_vrfy_kscan_config(const struct device *dev,
kscan_callback_t callback_isr)
{
Z_OOPS(Z_SYSCALL_DRIVER_KSCAN(dev, config));
Z_OOPS(K_SYSCALL_DRIVER_KSCAN(dev, config));
Z_OOPS(K_SYSCALL_VERIFY_MSG(callback_isr == 0,
"callback cannot be set from user mode"));
return z_impl_kscan_config((const struct device *)dev, callback_isr);
@ -19,7 +19,7 @@ static inline int z_vrfy_kscan_config(const struct device *dev,
static inline int z_vrfy_kscan_disable_callback(const struct device *dev)
{
Z_OOPS(Z_SYSCALL_DRIVER_KSCAN(dev, disable_callback));
Z_OOPS(K_SYSCALL_DRIVER_KSCAN(dev, disable_callback));
return z_impl_kscan_disable_callback((const struct device *)dev);
}
@ -27,7 +27,7 @@ static inline int z_vrfy_kscan_disable_callback(const struct device *dev)
static int z_vrfy_kscan_enable_callback(const struct device *dev)
{
Z_OOPS(Z_SYSCALL_DRIVER_KSCAN(dev, enable_callback));
Z_OOPS(K_SYSCALL_DRIVER_KSCAN(dev, enable_callback));
return z_impl_kscan_enable_callback((const struct device *)dev);
}

View file

@ -10,7 +10,7 @@
static inline int z_vrfy_led_blink(const struct device *dev, uint32_t led,
uint32_t delay_on, uint32_t delay_off)
{
Z_OOPS(Z_SYSCALL_DRIVER_LED(dev, blink));
Z_OOPS(K_SYSCALL_DRIVER_LED(dev, blink));
return z_impl_led_blink((const struct device *)dev, led, delay_on,
delay_off);
}
@ -29,7 +29,7 @@ static inline int z_vrfy_led_set_brightness(const struct device *dev,
uint32_t led,
uint8_t value)
{
Z_OOPS(Z_SYSCALL_DRIVER_LED(dev, set_brightness));
Z_OOPS(K_SYSCALL_DRIVER_LED(dev, set_brightness));
return z_impl_led_set_brightness((const struct device *)dev, led,
value);
}
@ -64,14 +64,14 @@ static inline int z_vrfy_led_set_color(const struct device *dev, uint32_t led,
static inline int z_vrfy_led_on(const struct device *dev, uint32_t led)
{
Z_OOPS(Z_SYSCALL_DRIVER_LED(dev, on));
Z_OOPS(K_SYSCALL_DRIVER_LED(dev, on));
return z_impl_led_on((const struct device *)dev, led);
}
#include <syscalls/led_on_mrsh.c>
static inline int z_vrfy_led_off(const struct device *dev, uint32_t led)
{
Z_OOPS(Z_SYSCALL_DRIVER_LED(dev, off));
Z_OOPS(K_SYSCALL_DRIVER_LED(dev, off));
return z_impl_led_off((const struct device *)dev, led);
}
#include <syscalls/led_off_mrsh.c>

View file

@ -11,7 +11,7 @@ static inline int z_vrfy_mbox_send(const struct mbox_channel *channel,
const struct mbox_msg *msg)
{
Z_OOPS(K_SYSCALL_MEMORY_READ(channel, sizeof(struct mbox_channel)));
Z_OOPS(Z_SYSCALL_DRIVER_MBOX(channel->dev, send));
Z_OOPS(K_SYSCALL_DRIVER_MBOX(channel->dev, send));
Z_OOPS(K_SYSCALL_MEMORY_READ(msg, sizeof(struct mbox_msg)));
Z_OOPS(K_SYSCALL_MEMORY_READ(msg->data, msg->size));
@ -21,7 +21,7 @@ static inline int z_vrfy_mbox_send(const struct mbox_channel *channel,
static inline int z_vrfy_mbox_mtu_get(const struct device *dev)
{
Z_OOPS(Z_SYSCALL_DRIVER_MBOX(dev, mtu_get));
Z_OOPS(K_SYSCALL_DRIVER_MBOX(dev, mtu_get));
return z_impl_mbox_mtu_get(dev);
}
@ -29,7 +29,7 @@ static inline int z_vrfy_mbox_mtu_get(const struct device *dev)
static inline uint32_t z_vrfy_mbox_max_channels_get(const struct device *dev)
{
Z_OOPS(Z_SYSCALL_DRIVER_MBOX(dev, max_channels_get));
Z_OOPS(K_SYSCALL_DRIVER_MBOX(dev, max_channels_get));
return z_impl_mbox_max_channels_get(dev);
}
@ -38,7 +38,7 @@ static inline uint32_t z_vrfy_mbox_max_channels_get(const struct device *dev)
static inline int z_vrfy_mbox_set_enabled(const struct mbox_channel *channel, bool enable)
{
Z_OOPS(K_SYSCALL_MEMORY_READ(channel, sizeof(struct mbox_channel)));
Z_OOPS(Z_SYSCALL_DRIVER_MBOX(channel->dev, set_enabled));
Z_OOPS(K_SYSCALL_DRIVER_MBOX(channel->dev, set_enabled));
return z_impl_mbox_set_enabled(channel, enable);
}

View file

@ -11,7 +11,7 @@
static inline int z_vrfy_peci_config(const struct device *dev,
uint32_t bitrate)
{
Z_OOPS(Z_SYSCALL_DRIVER_PECI(dev, config));
Z_OOPS(K_SYSCALL_DRIVER_PECI(dev, config));
return z_impl_peci_config(dev, bitrate);
}
@ -19,7 +19,7 @@ static inline int z_vrfy_peci_config(const struct device *dev,
static inline int z_vrfy_peci_enable(const struct device *dev)
{
Z_OOPS(Z_SYSCALL_DRIVER_PECI(dev, enable));
Z_OOPS(K_SYSCALL_DRIVER_PECI(dev, enable));
return z_impl_peci_enable(dev);
}
@ -27,7 +27,7 @@ static inline int z_vrfy_peci_enable(const struct device *dev)
static inline int z_vrfy_peci_disable(const struct device *dev)
{
Z_OOPS(Z_SYSCALL_DRIVER_PECI(dev, disable));
Z_OOPS(K_SYSCALL_DRIVER_PECI(dev, disable));
return z_impl_peci_disable(dev);
}
@ -38,7 +38,7 @@ static inline int z_vrfy_peci_transfer(const struct device *dev,
{
struct peci_msg msg_copy;
Z_OOPS(Z_SYSCALL_DRIVER_PECI(dev, transfer));
Z_OOPS(K_SYSCALL_DRIVER_PECI(dev, transfer));
Z_OOPS(k_usermode_from_copy(&msg_copy, msg, sizeof(*msg)));
return z_impl_peci_transfer(dev, &msg_copy);

View file

@ -10,7 +10,7 @@
static inline int z_vrfy_ps2_config(const struct device *dev,
ps2_callback_t callback_isr)
{
Z_OOPS(Z_SYSCALL_DRIVER_PS2(dev, config));
Z_OOPS(K_SYSCALL_DRIVER_PS2(dev, config));
Z_OOPS(K_SYSCALL_VERIFY_MSG(callback_isr == NULL,
"callback not be set from user mode"));
return z_impl_ps2_config(dev, callback_isr);
@ -19,14 +19,14 @@ static inline int z_vrfy_ps2_config(const struct device *dev,
static inline int z_vrfy_ps2_write(const struct device *dev, uint8_t value)
{
Z_OOPS(Z_SYSCALL_DRIVER_PS2(dev, write));
Z_OOPS(K_SYSCALL_DRIVER_PS2(dev, write));
return z_impl_ps2_write(dev, value);
}
#include <syscalls/ps2_write_mrsh.c>
static inline int z_vrfy_ps2_read(const struct device *dev, uint8_t *value)
{
Z_OOPS(Z_SYSCALL_DRIVER_PS2(dev, read));
Z_OOPS(K_SYSCALL_DRIVER_PS2(dev, read));
Z_OOPS(K_SYSCALL_MEMORY_WRITE(value, sizeof(uint8_t)));
return z_impl_ps2_read(dev, value);
}
@ -34,14 +34,14 @@ static inline int z_vrfy_ps2_read(const struct device *dev, uint8_t *value)
static inline int z_vrfy_ps2_enable_callback(const struct device *dev)
{
Z_OOPS(Z_SYSCALL_DRIVER_PS2(dev, enable_callback));
Z_OOPS(K_SYSCALL_DRIVER_PS2(dev, enable_callback));
return z_impl_ps2_enable_callback(dev);
}
#include <syscalls/ps2_enable_callback_mrsh.c>
static inline int z_vrfy_ps2_disable_callback(const struct device *dev)
{
Z_OOPS(Z_SYSCALL_DRIVER_PS2(dev, disable_callback));
Z_OOPS(K_SYSCALL_DRIVER_PS2(dev, disable_callback));
return z_impl_ps2_disable_callback(dev);
}
#include <syscalls/ps2_disable_callback_mrsh.c>

View file

@ -14,7 +14,7 @@ int z_vrfy_ptp_clock_get(const struct device *dev,
struct net_ptp_time ptp_time;
int ret;
Z_OOPS(Z_SYSCALL_DRIVER_PTP_CLOCK(dev, get));
Z_OOPS(K_SYSCALL_DRIVER_PTP_CLOCK(dev, get));
Z_OOPS(K_SYSCALL_MEMORY_WRITE(tm, sizeof(struct net_ptp_time)));
ret = z_impl_ptp_clock_get((const struct device *)dev, &ptp_time);

View file

@ -12,7 +12,7 @@ static inline int z_vrfy_pwm_set_cycles(const struct device *dev,
uint32_t channel, uint32_t period,
uint32_t pulse, pwm_flags_t flags)
{
Z_OOPS(Z_SYSCALL_DRIVER_PWM(dev, set_cycles));
Z_OOPS(K_SYSCALL_DRIVER_PWM(dev, set_cycles));
return z_impl_pwm_set_cycles((const struct device *)dev, channel,
period, pulse, flags);
}
@ -22,7 +22,7 @@ static inline int z_vrfy_pwm_get_cycles_per_sec(const struct device *dev,
uint32_t channel,
uint64_t *cycles)
{
Z_OOPS(Z_SYSCALL_DRIVER_PWM(dev, get_cycles_per_sec));
Z_OOPS(K_SYSCALL_DRIVER_PWM(dev, get_cycles_per_sec));
Z_OOPS(K_SYSCALL_MEMORY_WRITE(cycles, sizeof(uint64_t)));
return z_impl_pwm_get_cycles_per_sec((const struct device *)dev,
channel, (uint64_t *)cycles);
@ -34,7 +34,7 @@ static inline int z_vrfy_pwm_get_cycles_per_sec(const struct device *dev,
static inline int z_vrfy_pwm_enable_capture(const struct device *dev,
uint32_t channel)
{
Z_OOPS(Z_SYSCALL_DRIVER_PWM(dev, enable_capture));
Z_OOPS(K_SYSCALL_DRIVER_PWM(dev, enable_capture));
return z_impl_pwm_enable_capture((const struct device *)dev, channel);
}
#include <syscalls/pwm_enable_capture_mrsh.c>
@ -42,7 +42,7 @@ static inline int z_vrfy_pwm_enable_capture(const struct device *dev,
static inline int z_vrfy_pwm_disable_capture(const struct device *dev,
uint32_t channel)
{
Z_OOPS(Z_SYSCALL_DRIVER_PWM(dev, disable_capture));
Z_OOPS(K_SYSCALL_DRIVER_PWM(dev, disable_capture));
return z_impl_pwm_disable_capture((const struct device *)dev, channel);
}
#include <syscalls/pwm_disable_capture_mrsh.c>
@ -57,9 +57,9 @@ static inline int z_vrfy_pwm_capture_cycles(const struct device *dev,
uint32_t pulse;
int err;
Z_OOPS(Z_SYSCALL_DRIVER_PWM(dev, configure_capture));
Z_OOPS(Z_SYSCALL_DRIVER_PWM(dev, enable_capture));
Z_OOPS(Z_SYSCALL_DRIVER_PWM(dev, disable_capture));
Z_OOPS(K_SYSCALL_DRIVER_PWM(dev, configure_capture));
Z_OOPS(K_SYSCALL_DRIVER_PWM(dev, enable_capture));
Z_OOPS(K_SYSCALL_DRIVER_PWM(dev, disable_capture));
err = z_impl_pwm_capture_cycles((const struct device *)dev, channel,
flags, &period, &pulse, timeout);

View file

@ -9,7 +9,7 @@
static inline int z_vrfy_rtc_set_time(const struct device *dev, const struct rtc_time *timeptr)
{
Z_OOPS(Z_SYSCALL_DRIVER_RTC(dev, set_time));
Z_OOPS(K_SYSCALL_DRIVER_RTC(dev, set_time));
Z_OOPS(K_SYSCALL_MEMORY_READ(timeptr, sizeof(struct rtc_time)));
return z_impl_rtc_set_time(dev, timeptr);
}
@ -17,7 +17,7 @@ static inline int z_vrfy_rtc_set_time(const struct device *dev, const struct rtc
static inline int z_vrfy_rtc_get_time(const struct device *dev, struct rtc_time *timeptr)
{
Z_OOPS(Z_SYSCALL_DRIVER_RTC(dev, get_time));
Z_OOPS(K_SYSCALL_DRIVER_RTC(dev, get_time));
Z_OOPS(K_SYSCALL_MEMORY_WRITE(timeptr, sizeof(struct rtc_time)));
return z_impl_rtc_get_time(dev, timeptr);
}
@ -27,7 +27,7 @@ static inline int z_vrfy_rtc_get_time(const struct device *dev, struct rtc_time
static inline int z_vrfy_rtc_alarm_get_supported_fields(const struct device *dev, uint16_t id,
uint16_t *mask)
{
Z_OOPS(Z_SYSCALL_DRIVER_RTC(dev, alarm_get_supported_fields));
Z_OOPS(K_SYSCALL_DRIVER_RTC(dev, alarm_get_supported_fields));
Z_OOPS(K_SYSCALL_MEMORY_WRITE(mask, sizeof(uint16_t)));
return z_impl_rtc_alarm_get_supported_fields(dev, id, mask);
}
@ -36,7 +36,7 @@ static inline int z_vrfy_rtc_alarm_get_supported_fields(const struct device *dev
static inline int z_vrfy_rtc_alarm_set_time(const struct device *dev, uint16_t id, uint16_t mask,
const struct rtc_time *timeptr)
{
Z_OOPS(Z_SYSCALL_DRIVER_RTC(dev, alarm_set_time));
Z_OOPS(K_SYSCALL_DRIVER_RTC(dev, alarm_set_time));
Z_OOPS(K_SYSCALL_MEMORY_READ(timeptr, sizeof(struct rtc_time)));
return z_impl_rtc_alarm_set_time(dev, id, mask, timeptr);
}
@ -45,7 +45,7 @@ static inline int z_vrfy_rtc_alarm_set_time(const struct device *dev, uint16_t i
static inline int z_vrfy_rtc_alarm_get_time(const struct device *dev, uint16_t id, uint16_t *mask,
struct rtc_time *timeptr)
{
Z_OOPS(Z_SYSCALL_DRIVER_RTC(dev, alarm_get_time));
Z_OOPS(K_SYSCALL_DRIVER_RTC(dev, alarm_get_time));
Z_OOPS(K_SYSCALL_MEMORY_WRITE(mask, sizeof(uint16_t)));
Z_OOPS(K_SYSCALL_MEMORY_WRITE(timeptr, sizeof(struct rtc_time)));
return z_impl_rtc_alarm_get_time(dev, id, mask, timeptr);
@ -54,7 +54,7 @@ static inline int z_vrfy_rtc_alarm_get_time(const struct device *dev, uint16_t i
static inline int z_vrfy_rtc_alarm_is_pending(const struct device *dev, uint16_t id)
{
Z_OOPS(Z_SYSCALL_DRIVER_RTC(dev, alarm_is_pending));
Z_OOPS(K_SYSCALL_DRIVER_RTC(dev, alarm_is_pending));
return z_impl_rtc_alarm_is_pending(dev, id);
}
#include <syscalls/rtc_alarm_is_pending_mrsh.c>
@ -63,7 +63,7 @@ static inline int z_vrfy_rtc_alarm_is_pending(const struct device *dev, uint16_t
#ifdef CONFIG_RTC_CALIBRATION
static inline int z_vrfy_rtc_set_calibration(const struct device *dev, int32_t calibration)
{
Z_OOPS(Z_SYSCALL_DRIVER_RTC(dev, set_calibration));
Z_OOPS(K_SYSCALL_DRIVER_RTC(dev, set_calibration));
return z_impl_rtc_set_calibration(dev, calibration);
}
@ -71,7 +71,7 @@ static inline int z_vrfy_rtc_set_calibration(const struct device *dev, int32_t c
static inline int z_vrfy_rtc_get_calibration(const struct device *dev, int32_t *calibration)
{
Z_OOPS(Z_SYSCALL_DRIVER_RTC(dev, get_calibration));
Z_OOPS(K_SYSCALL_DRIVER_RTC(dev, get_calibration));
Z_OOPS(K_SYSCALL_MEMORY_WRITE(calibration, sizeof(int32_t)));
return z_impl_rtc_get_calibration(dev, calibration);
}

View file

@ -12,7 +12,7 @@ static inline int z_vrfy_sensor_attr_set(const struct device *dev,
enum sensor_attribute attr,
const struct sensor_value *val)
{
Z_OOPS(Z_SYSCALL_DRIVER_SENSOR(dev, attr_set));
Z_OOPS(K_SYSCALL_DRIVER_SENSOR(dev, attr_set));
Z_OOPS(K_SYSCALL_MEMORY_READ(val, sizeof(struct sensor_value)));
return z_impl_sensor_attr_set((const struct device *)dev, chan, attr,
(const struct sensor_value *)val);
@ -24,7 +24,7 @@ static inline int z_vrfy_sensor_attr_get(const struct device *dev,
enum sensor_attribute attr,
struct sensor_value *val)
{
Z_OOPS(Z_SYSCALL_DRIVER_SENSOR(dev, attr_get));
Z_OOPS(K_SYSCALL_DRIVER_SENSOR(dev, attr_get));
Z_OOPS(K_SYSCALL_MEMORY_WRITE(val, sizeof(struct sensor_value)));
return z_impl_sensor_attr_get((const struct device *)dev, chan, attr,
(struct sensor_value *)val);
@ -33,7 +33,7 @@ static inline int z_vrfy_sensor_attr_get(const struct device *dev,
static inline int z_vrfy_sensor_sample_fetch(const struct device *dev)
{
Z_OOPS(Z_SYSCALL_DRIVER_SENSOR(dev, sample_fetch));
Z_OOPS(K_SYSCALL_DRIVER_SENSOR(dev, sample_fetch));
return z_impl_sensor_sample_fetch((const struct device *)dev);
}
#include <syscalls/sensor_sample_fetch_mrsh.c>
@ -41,7 +41,7 @@ static inline int z_vrfy_sensor_sample_fetch(const struct device *dev)
static inline int z_vrfy_sensor_sample_fetch_chan(const struct device *dev,
enum sensor_channel type)
{
Z_OOPS(Z_SYSCALL_DRIVER_SENSOR(dev, sample_fetch));
Z_OOPS(K_SYSCALL_DRIVER_SENSOR(dev, sample_fetch));
return z_impl_sensor_sample_fetch_chan((const struct device *)dev,
type);
}
@ -51,7 +51,7 @@ static inline int z_vrfy_sensor_channel_get(const struct device *dev,
enum sensor_channel chan,
struct sensor_value *val)
{
Z_OOPS(Z_SYSCALL_DRIVER_SENSOR(dev, channel_get));
Z_OOPS(K_SYSCALL_DRIVER_SENSOR(dev, channel_get));
Z_OOPS(K_SYSCALL_MEMORY_WRITE(val, sizeof(struct sensor_value)));
return z_impl_sensor_channel_get((const struct device *)dev, chan,
(struct sensor_value *)val);

View file

@ -10,14 +10,14 @@
#define UART_SIMPLE(op_) \
static inline int z_vrfy_uart_##op_(const struct device *dev) \
{ \
Z_OOPS(Z_SYSCALL_DRIVER_UART(dev, op_)); \
Z_OOPS(K_SYSCALL_DRIVER_UART(dev, op_)); \
return z_impl_uart_ ## op_(dev); \
}
#define UART_SIMPLE_VOID(op_) \
static inline void z_vrfy_uart_##op_(const struct device *dev) \
{ \
Z_OOPS(Z_SYSCALL_DRIVER_UART(dev, op_)); \
Z_OOPS(K_SYSCALL_DRIVER_UART(dev, op_)); \
z_impl_uart_ ## op_(dev); \
}
@ -27,7 +27,7 @@ UART_SIMPLE(err_check)
static inline int z_vrfy_uart_poll_in(const struct device *dev,
unsigned char *p_char)
{
Z_OOPS(Z_SYSCALL_DRIVER_UART(dev, poll_in));
Z_OOPS(K_SYSCALL_DRIVER_UART(dev, poll_in));
Z_OOPS(K_SYSCALL_MEMORY_WRITE(p_char, sizeof(unsigned char)));
return z_impl_uart_poll_in(dev, p_char);
}
@ -36,7 +36,7 @@ static inline int z_vrfy_uart_poll_in(const struct device *dev,
static inline int z_vrfy_uart_poll_in_u16(const struct device *dev,
uint16_t *p_u16)
{
Z_OOPS(Z_SYSCALL_DRIVER_UART(dev, poll_in));
Z_OOPS(K_SYSCALL_DRIVER_UART(dev, poll_in));
Z_OOPS(K_SYSCALL_MEMORY_WRITE(p_u16, sizeof(uint16_t)));
return z_impl_uart_poll_in_u16(dev, p_u16);
}
@ -45,7 +45,7 @@ static inline int z_vrfy_uart_poll_in_u16(const struct device *dev,
static inline void z_vrfy_uart_poll_out(const struct device *dev,
unsigned char out_char)
{
Z_OOPS(Z_SYSCALL_DRIVER_UART(dev, poll_out));
Z_OOPS(K_SYSCALL_DRIVER_UART(dev, poll_out));
z_impl_uart_poll_out((const struct device *)dev, out_char);
}
#include <syscalls/uart_poll_out_mrsh.c>
@ -53,7 +53,7 @@ static inline void z_vrfy_uart_poll_out(const struct device *dev,
static inline void z_vrfy_uart_poll_out_u16(const struct device *dev,
uint16_t out_u16)
{
Z_OOPS(Z_SYSCALL_DRIVER_UART(dev, poll_out));
Z_OOPS(K_SYSCALL_DRIVER_UART(dev, poll_out));
z_impl_uart_poll_out_u16((const struct device *)dev, out_u16);
}
#include <syscalls/uart_poll_out_u16_mrsh.c>
@ -62,7 +62,7 @@ static inline void z_vrfy_uart_poll_out_u16(const struct device *dev,
static inline int z_vrfy_uart_config_get(const struct device *dev,
struct uart_config *cfg)
{
Z_OOPS(Z_SYSCALL_DRIVER_UART(dev, config_get));
Z_OOPS(K_SYSCALL_DRIVER_UART(dev, config_get));
Z_OOPS(K_SYSCALL_MEMORY_WRITE(cfg, sizeof(struct uart_config)));
return z_impl_uart_config_get(dev, cfg);
@ -72,7 +72,7 @@ static inline int z_vrfy_uart_config_get(const struct device *dev,
static inline int z_vrfy_uart_configure(const struct device *dev,
const struct uart_config *cfg)
{
Z_OOPS(Z_SYSCALL_DRIVER_UART(dev, config_get));
Z_OOPS(K_SYSCALL_DRIVER_UART(dev, config_get));
Z_OOPS(K_SYSCALL_MEMORY_READ(cfg, sizeof(struct uart_config)));
return z_impl_uart_configure(dev, cfg);
@ -90,7 +90,7 @@ static inline int z_vrfy_uart_configure(const struct device *dev,
static inline int z_vrfy_uart_tx(const struct device *dev, const uint8_t *buf,
size_t len, int32_t timeout)
{
Z_OOPS(Z_SYSCALL_DRIVER_UART(dev, tx));
Z_OOPS(K_SYSCALL_DRIVER_UART(dev, tx));
Z_OOPS(K_SYSCALL_MEMORY_READ(buf, len));
return z_impl_uart_tx(dev, buf, len, timeout);
}
@ -101,7 +101,7 @@ static inline int z_vrfy_uart_tx_u16(const struct device *dev,
const uint16_t *buf,
size_t len, int32_t timeout)
{
Z_OOPS(Z_SYSCALL_DRIVER_UART(dev, tx));
Z_OOPS(K_SYSCALL_DRIVER_UART(dev, tx));
Z_OOPS(K_SYSCALL_MEMORY_ARRAY_READ(buf, len, sizeof(uint16_t)));
return z_impl_uart_tx_u16(dev, buf, len, timeout);
}
@ -115,7 +115,7 @@ static inline int z_vrfy_uart_rx_enable(const struct device *dev,
uint8_t *buf,
size_t len, int32_t timeout)
{
Z_OOPS(Z_SYSCALL_DRIVER_UART(dev, rx_enable));
Z_OOPS(K_SYSCALL_DRIVER_UART(dev, rx_enable));
Z_OOPS(K_SYSCALL_MEMORY_WRITE(buf, len));
return z_impl_uart_rx_enable(dev, buf, len, timeout);
}
@ -126,7 +126,7 @@ static inline int z_vrfy_uart_rx_enable_u16(const struct device *dev,
uint16_t *buf,
size_t len, int32_t timeout)
{
Z_OOPS(Z_SYSCALL_DRIVER_UART(dev, rx_enable));
Z_OOPS(K_SYSCALL_DRIVER_UART(dev, rx_enable));
Z_OOPS(K_SYSCALL_MEMORY_ARRAY_WRITE(buf, len, sizeof(uint16_t)));
return z_impl_uart_rx_enable_u16(dev, buf, len, timeout);
}
@ -160,7 +160,7 @@ UART_SIMPLE(irq_update)
static inline int z_vrfy_uart_line_ctrl_set(const struct device *dev,
uint32_t ctrl, uint32_t val)
{
Z_OOPS(Z_SYSCALL_DRIVER_UART(dev, line_ctrl_set));
Z_OOPS(K_SYSCALL_DRIVER_UART(dev, line_ctrl_set));
return z_impl_uart_line_ctrl_set((const struct device *)dev, ctrl,
val);
}
@ -169,7 +169,7 @@ static inline int z_vrfy_uart_line_ctrl_set(const struct device *dev,
static inline int z_vrfy_uart_line_ctrl_get(const struct device *dev,
uint32_t ctrl, uint32_t *val)
{
Z_OOPS(Z_SYSCALL_DRIVER_UART(dev, line_ctrl_get));
Z_OOPS(K_SYSCALL_DRIVER_UART(dev, line_ctrl_get));
Z_OOPS(K_SYSCALL_MEMORY_WRITE(val, sizeof(uint32_t)));
return z_impl_uart_line_ctrl_get((const struct device *)dev, ctrl,
(uint32_t *)val);
@ -181,7 +181,7 @@ static inline int z_vrfy_uart_line_ctrl_get(const struct device *dev,
static inline int z_vrfy_uart_drv_cmd(const struct device *dev, uint32_t cmd,
uint32_t p)
{
Z_OOPS(Z_SYSCALL_DRIVER_UART(dev, drv_cmd));
Z_OOPS(K_SYSCALL_DRIVER_UART(dev, drv_cmd));
return z_impl_uart_drv_cmd((const struct device *)dev, cmd, p);
}
#include <syscalls/uart_drv_cmd_mrsh.c>

View file

@ -11,7 +11,7 @@
static inline int z_vrfy_smbus_configure(const struct device *dev,
uint32_t dev_config)
{
Z_OOPS(Z_SYSCALL_DRIVER_SMBUS(dev, configure));
Z_OOPS(K_SYSCALL_DRIVER_SMBUS(dev, configure));
return z_impl_smbus_configure(dev, dev_config);
}
@ -20,7 +20,7 @@ static inline int z_vrfy_smbus_configure(const struct device *dev,
static inline int z_vrfy_smbus_get_config(const struct device *dev,
uint32_t *dev_config)
{
Z_OOPS(Z_SYSCALL_DRIVER_SMBUS(dev, get_config));
Z_OOPS(K_SYSCALL_DRIVER_SMBUS(dev, get_config));
Z_OOPS(K_SYSCALL_MEMORY_WRITE(dev_config, sizeof(uint32_t)));
return z_impl_smbus_get_config(dev, dev_config);

View file

@ -77,7 +77,7 @@ static inline int z_vrfy_spi_transceive(const struct device *dev,
struct spi_config config_copy;
Z_OOPS(K_SYSCALL_MEMORY_READ(config, sizeof(*config)));
Z_OOPS(Z_SYSCALL_DRIVER_SPI(dev, transceive));
Z_OOPS(K_SYSCALL_DRIVER_SPI(dev, transceive));
if (tx_bufs) {
const struct spi_buf_set *tx =
@ -120,7 +120,7 @@ static inline int z_vrfy_spi_release(const struct device *dev,
const struct spi_config *config)
{
Z_OOPS(K_SYSCALL_MEMORY_READ(config, sizeof(*config)));
Z_OOPS(Z_SYSCALL_DRIVER_SPI(dev, release));
Z_OOPS(K_SYSCALL_DRIVER_SPI(dev, release));
return z_impl_spi_release((const struct device *)dev, config);
}
#include <syscalls/spi_release_mrsh.c>

View file

@ -9,7 +9,7 @@
static inline int z_vrfy_bc12_set_role(const struct device *dev, enum bc12_role role)
{
Z_OOPS(Z_SYSCALL_DRIVER_BC12(dev, set_role));
Z_OOPS(K_SYSCALL_DRIVER_BC12(dev, set_role));
return z_impl_bc12_set_role(dev, role);
}
@ -17,7 +17,7 @@ static inline int z_vrfy_bc12_set_role(const struct device *dev, enum bc12_role
static inline int z_vrfy_bc12_set_result_cb(const struct device *dev, bc12_callback_t cb,
void *user_data)
{
Z_OOPS(Z_SYSCALL_DRIVER_BC12(dev, set_result_cb));
Z_OOPS(K_SYSCALL_DRIVER_BC12(dev, set_result_cb));
Z_OOPS(K_SYSCALL_VERIFY_MSG(cb == NULL, "callbacks may not be set from user mode"));
return z_impl_bc12_set_result_cb(dev, cb, user_data);

View file

@ -11,7 +11,7 @@
static inline size_t z_vrfy_ivshmem_get_mem(const struct device *dev,
uintptr_t *memmap)
{
Z_OOPS(Z_SYSCALL_DRIVER_IVSHMEM(dev, get_mem));
Z_OOPS(K_SYSCALL_DRIVER_IVSHMEM(dev, get_mem));
Z_OOPS(K_SYSCALL_MEMORY_WRITE(memmap, sizeof(uintptr_t)));
return z_impl_ivshmem_get_mem(dev, memmap);
@ -20,7 +20,7 @@ static inline size_t z_vrfy_ivshmem_get_mem(const struct device *dev,
static inline uint32_t z_vrfy_ivshmem_get_id(const struct device *dev)
{
Z_OOPS(Z_SYSCALL_DRIVER_IVSHMEM(dev, get_id));
Z_OOPS(K_SYSCALL_DRIVER_IVSHMEM(dev, get_id));
return z_impl_ivshmem_get_id(dev);
}
@ -28,7 +28,7 @@ static inline uint32_t z_vrfy_ivshmem_get_id(const struct device *dev)
static inline uint16_t z_vrfy_ivshmem_get_vectors(const struct device *dev)
{
Z_OOPS(Z_SYSCALL_DRIVER_IVSHMEM(dev, get_vectors));
Z_OOPS(K_SYSCALL_DRIVER_IVSHMEM(dev, get_vectors));
return z_impl_ivshmem_get_vectors(dev);
}
@ -37,7 +37,7 @@ static inline uint16_t z_vrfy_ivshmem_get_vectors(const struct device *dev)
static inline int z_vrfy_ivshmem_int_peer(const struct device *dev,
uint32_t peer_id, uint16_t vector)
{
Z_OOPS(Z_SYSCALL_DRIVER_IVSHMEM(dev, int_peer));
Z_OOPS(K_SYSCALL_DRIVER_IVSHMEM(dev, int_peer));
return z_impl_ivshmem_int_peer(dev, peer_id, vector);
}
@ -47,7 +47,7 @@ static inline int z_vrfy_ivshmem_register_handler(const struct device *dev,
struct k_poll_signal *signal,
uint16_t vector)
{
Z_OOPS(Z_SYSCALL_DRIVER_IVSHMEM(dev, register_handler));
Z_OOPS(K_SYSCALL_DRIVER_IVSHMEM(dev, register_handler));
Z_OOPS(K_SYSCALL_OBJ(signal, K_OBJ_POLL_SIGNAL));
return z_impl_ivshmem_register_handler(dev, signal, vector);
@ -59,7 +59,7 @@ static inline int z_vrfy_ivshmem_register_handler(const struct device *dev,
static inline size_t z_vrfy_ivshmem_get_rw_mem_section(const struct device *dev,
uintptr_t *memmap)
{
Z_OOPS(Z_SYSCALL_DRIVER_IVSHMEM(dev, get_rw_mem_section));
Z_OOPS(K_SYSCALL_DRIVER_IVSHMEM(dev, get_rw_mem_section));
Z_OOPS(K_SYSCALL_MEMORY_WRITE(memmap, sizeof(uintptr_t)));
return z_impl_ivshmem_get_rw_mem_section(dev, memmap);
@ -70,7 +70,7 @@ static inline size_t z_vrfy_ivshmem_get_output_mem_section(const struct device *
uint32_t peer_id,
uintptr_t *memmap)
{
Z_OOPS(Z_SYSCALL_DRIVER_IVSHMEM(dev, get_output_mem_section));
Z_OOPS(K_SYSCALL_DRIVER_IVSHMEM(dev, get_output_mem_section));
Z_OOPS(K_SYSCALL_MEMORY_WRITE(memmap, sizeof(uintptr_t)));
return z_impl_ivshmem_get_output_mem_section(dev, peer_id, memmap);
@ -80,7 +80,7 @@ static inline size_t z_vrfy_ivshmem_get_output_mem_section(const struct device *
static inline uint32_t z_vrfy_ivshmem_get_state(const struct device *dev,
uint32_t peer_id)
{
Z_OOPS(Z_SYSCALL_DRIVER_IVSHMEM(dev, get_state));
Z_OOPS(K_SYSCALL_DRIVER_IVSHMEM(dev, get_state));
return z_impl_ivshmem_get_state(dev, peer_id);
}
@ -89,7 +89,7 @@ static inline uint32_t z_vrfy_ivshmem_get_state(const struct device *dev,
static inline int z_vrfy_ivshmem_set_state(const struct device *dev,
uint32_t state)
{
Z_OOPS(Z_SYSCALL_DRIVER_IVSHMEM(dev, set_state));
Z_OOPS(K_SYSCALL_DRIVER_IVSHMEM(dev, set_state));
return z_impl_ivshmem_set_state(dev, state);
}
@ -97,7 +97,7 @@ static inline int z_vrfy_ivshmem_set_state(const struct device *dev,
static inline uint32_t z_vrfy_ivshmem_get_max_peers(const struct device *dev)
{
Z_OOPS(Z_SYSCALL_DRIVER_IVSHMEM(dev, get_max_peers));
Z_OOPS(K_SYSCALL_DRIVER_IVSHMEM(dev, get_max_peers));
return z_impl_ivshmem_get_max_peers(dev);
}
@ -105,7 +105,7 @@ static inline uint32_t z_vrfy_ivshmem_get_max_peers(const struct device *dev)
static inline uint16_t z_vrfy_ivshmem_get_protocol(const struct device *dev)
{
Z_OOPS(Z_SYSCALL_DRIVER_IVSHMEM(dev, get_protocol));
Z_OOPS(K_SYSCALL_DRIVER_IVSHMEM(dev, get_protocol));
return z_impl_ivshmem_get_protocol(dev);
}
@ -114,7 +114,7 @@ static inline uint16_t z_vrfy_ivshmem_get_protocol(const struct device *dev)
static inline int z_vrfy_ivshmem_enable_interrupts(const struct device *dev,
bool enable)
{
Z_OOPS(Z_SYSCALL_DRIVER_IVSHMEM(dev, enable_interrupts));
Z_OOPS(K_SYSCALL_DRIVER_IVSHMEM(dev, enable_interrupts));
return z_impl_ivshmem_enable_interrupts(dev, enable);
}

View file

@ -9,7 +9,7 @@
static inline int z_vrfy_w1_reset_bus(const struct device *dev)
{
Z_OOPS(Z_SYSCALL_DRIVER_W1(dev, reset_bus));
Z_OOPS(K_SYSCALL_DRIVER_W1(dev, reset_bus));
return z_impl_w1_reset_bus((const struct device *)dev);
}
@ -17,7 +17,7 @@ static inline int z_vrfy_w1_reset_bus(const struct device *dev)
static inline int z_vrfy_w1_read_bit(const struct device *dev)
{
Z_OOPS(Z_SYSCALL_DRIVER_W1(dev, read_bit));
Z_OOPS(K_SYSCALL_DRIVER_W1(dev, read_bit));
return z_impl_w1_read_bit((const struct device *)dev);
}
@ -25,7 +25,7 @@ static inline int z_vrfy_w1_read_bit(const struct device *dev)
static inline int z_vrfy_w1_write_bit(const struct device *dev, bool bit)
{
Z_OOPS(Z_SYSCALL_DRIVER_W1(dev, write_bit));
Z_OOPS(K_SYSCALL_DRIVER_W1(dev, write_bit));
return z_impl_w1_write_bit((const struct device *)dev, bit);
}
@ -33,7 +33,7 @@ static inline int z_vrfy_w1_write_bit(const struct device *dev, bool bit)
static inline int z_vrfy_w1_read_byte(const struct device *dev)
{
Z_OOPS(Z_SYSCALL_DRIVER_W1(dev, read_byte));
Z_OOPS(K_SYSCALL_DRIVER_W1(dev, read_byte));
return z_impl_w1_read_byte((const struct device *)dev);
}
@ -41,7 +41,7 @@ static inline int z_vrfy_w1_read_byte(const struct device *dev)
static inline int z_vrfy_w1_write_byte(const struct device *dev, uint8_t byte)
{
Z_OOPS(Z_SYSCALL_DRIVER_W1(dev, write_byte));
Z_OOPS(K_SYSCALL_DRIVER_W1(dev, write_byte));
return z_impl_w1_write_byte((const struct device *)dev, (uint8_t)byte);
}
@ -80,7 +80,7 @@ static inline int z_vrfy_w1_change_bus_lock(const struct device *dev, bool lock)
static inline int z_vrfy_w1_configure(const struct device *dev,
enum w1_settings_type type, uint32_t value)
{
Z_OOPS(Z_SYSCALL_DRIVER_W1(dev, configure));
Z_OOPS(K_SYSCALL_DRIVER_W1(dev, configure));
return z_impl_w1_configure(dev, type, value);
}

View file

@ -9,7 +9,7 @@
static inline int z_vrfy_wdt_setup(const struct device *dev, uint8_t options)
{
Z_OOPS(Z_SYSCALL_DRIVER_WDT(dev, setup));
Z_OOPS(K_SYSCALL_DRIVER_WDT(dev, setup));
return z_impl_wdt_setup(dev, options);
}
@ -17,7 +17,7 @@ static inline int z_vrfy_wdt_setup(const struct device *dev, uint8_t options)
static inline int z_vrfy_wdt_disable(const struct device *dev)
{
Z_OOPS(Z_SYSCALL_DRIVER_WDT(dev, disable));
Z_OOPS(K_SYSCALL_DRIVER_WDT(dev, disable));
return z_impl_wdt_disable(dev);
}
@ -25,7 +25,7 @@ static inline int z_vrfy_wdt_disable(const struct device *dev)
static inline int z_vrfy_wdt_feed(const struct device *dev, int channel_id)
{
Z_OOPS(Z_SYSCALL_DRIVER_WDT(dev, feed));
Z_OOPS(K_SYSCALL_DRIVER_WDT(dev, feed));
return z_impl_wdt_feed(dev, channel_id);
}

View file

@ -10,7 +10,7 @@
int z_vrfy_sample_driver_state_set(const struct device *dev, bool active)
{
if (Z_SYSCALL_DRIVER_SAMPLE(dev, state_set)) {
if (K_SYSCALL_DRIVER_SAMPLE(dev, state_set)) {
return -EINVAL;
}
@ -21,7 +21,7 @@ int z_vrfy_sample_driver_state_set(const struct device *dev, bool active)
int z_vrfy_sample_driver_write(const struct device *dev, void *buf)
{
if (Z_SYSCALL_DRIVER_SAMPLE(dev, write)) {
if (K_SYSCALL_DRIVER_SAMPLE(dev, write)) {
return -EINVAL;
}

View file

@ -885,7 +885,7 @@ def write_gperf_table(fp, syms, objs, little_endian, static_begin, static_end):
driver_macro_tpl = """
#define Z_SYSCALL_DRIVER_%(driver_upper)s(ptr, op) Z_SYSCALL_DRIVER_GEN(ptr, op, %(driver_lower)s, %(driver_upper)s)
#define K_SYSCALL_DRIVER_%(driver_upper)s(ptr, op) K_SYSCALL_DRIVER_GEN(ptr, op, %(driver_lower)s, %(driver_upper)s)
"""
@ -893,7 +893,7 @@ def write_validation_output(fp):
fp.write("#ifndef DRIVER_VALIDATION_GEN_H\n")
fp.write("#define DRIVER_VALIDATION_GEN_H\n")
fp.write("""#define Z_SYSCALL_DRIVER_GEN(ptr, op, driver_lower_case, driver_upper_case) \\
fp.write("""#define K_SYSCALL_DRIVER_GEN(ptr, op, driver_lower_case, driver_upper_case) \\
(K_SYSCALL_OBJ(ptr, K_OBJ_DRIVER_##driver_upper_case) || \\
K_SYSCALL_DRIVER_OP(ptr, driver_lower_case##_driver_api, op))
""")