1 /* 2 * Copyright (c) 2022-2024, Arm Limited. All rights reserved. 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 * 6 */ 7 8 #include "tfm_hal_device_header.h" 9 #include "dma350_checker_layer.h" 10 #include "platform_svc_numbers.h" 11 #include "tfm_hal_platform.h" 12 #include "tfm_platform_system.h" 13 #ifdef RSE_USE_SDS_LIB 14 #include "sds.h" 15 #endif /* RSE_USE_SDS_LIB */ 16 platform_svc_handlers(uint8_t svc_num,uint32_t * svc_args,uint32_t lr)17int32_t platform_svc_handlers(uint8_t svc_num, uint32_t *svc_args, 18 uint32_t lr) 19 { 20 (void) lr; 21 22 int32_t retval; 23 24 switch (svc_num) { 25 case TFM_SVC_PLATFORM_DMA350_CONFIG: 26 retval = (int32_t)config_dma350_for_unprivileged_actor( 27 (enum dma350_config_type_t)svc_args[0], (uint8_t)svc_args[1], 28 (void *)svc_args[2]); 29 break; 30 31 #ifdef RSE_USE_SDS_LIB 32 case TFM_SVC_PLATFORM_SDS_STRUCT_ADD: 33 retval = (int32_t)sds_struct_add((void *)svc_args[0]); 34 break; 35 #endif /* RSE_USE_SDS_LIB */ 36 37 default: 38 retval = PSA_ERROR_GENERIC_ERROR; 39 break; 40 } 41 42 return retval; 43 } 44