1 /* 2 * Copyright (c) 2018 Alexander Wachter 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 #include <syscall_handler.h> 8 #include <drivers/hwinfo.h> 9 z_vrfy_hwinfo_get_device_id(uint8_t * buffer,size_t length)10ssize_t z_vrfy_hwinfo_get_device_id(uint8_t *buffer, size_t length) 11 { 12 Z_OOPS(Z_SYSCALL_MEMORY_WRITE(buffer, length)); 13 14 return z_impl_hwinfo_get_device_id((uint8_t *)buffer, (size_t)length); 15 } 16 #include <syscalls/hwinfo_get_device_id_mrsh.c> 17 z_vrfy_hwinfo_get_reset_cause(uint32_t * cause)18int z_vrfy_hwinfo_get_reset_cause(uint32_t *cause) 19 { 20 int ret; 21 uint32_t cause_copy; 22 23 ret = z_impl_hwinfo_get_reset_cause(&cause_copy); 24 Z_OOPS(z_user_to_copy(cause, &cause_copy, sizeof(uint32_t))); 25 26 return ret; 27 } 28 #include <syscalls/hwinfo_get_reset_cause_mrsh.c> 29 30 z_vrfy_hwinfo_clear_reset_cause(void)31int z_vrfy_hwinfo_clear_reset_cause(void) 32 { 33 return z_impl_hwinfo_clear_reset_cause(); 34 } 35 #include <syscalls/hwinfo_clear_reset_cause_mrsh.c> 36 z_vrfy_hwinfo_get_supported_reset_cause(uint32_t * supported)37int z_vrfy_hwinfo_get_supported_reset_cause(uint32_t *supported) 38 { 39 int ret; 40 uint32_t supported_copy; 41 42 ret = z_impl_hwinfo_get_supported_reset_cause(&supported_copy); 43 Z_OOPS(z_user_to_copy(supported, &supported_copy, sizeof(uint32_t))); 44 45 return ret; 46 } 47 #include <syscalls/hwinfo_get_supported_reset_cause_mrsh.c> 48