1 /* 2 * Copyright (c) 2020-2022, Arm Limited. All rights reserved. 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 * 6 */ 7 8 #include "tfm_hal_sp_logdev.h" 9 #include "uart_stdout.h" 10 #include "svc_num.h" 11 #include "tfm_hal_device_header.h" 12 13 __attribute__((naked)) tfm_output_unpriv_string(const unsigned char * str,size_t len)14static int tfm_output_unpriv_string(const unsigned char *str, size_t len) 15 { 16 __ASM volatile("SVC %0 \n" 17 "BX LR \n" 18 : : "I" (TFM_SVC_OUTPUT_UNPRIV_STRING)); 19 } 20 tfm_hal_output_sp_log(const unsigned char * str,size_t len)21int32_t tfm_hal_output_sp_log(const unsigned char *str, size_t len) 22 { 23 /* 24 * Peripheral based log function call the tfm_output_unpriv_string 25 * directly. 26 */ 27 return tfm_output_unpriv_string(str, len); 28 } 29