1 /* 2 * Copyright (c) 2024, STMicroelectronics - All Rights Reserved 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 */ 6 7 #ifndef STM32MP_SVC_SETUP_H 8 #define STM32MP_SVC_SETUP_H 9 10 #include <stdbool.h> 11 #include <stdint.h> 12 13 /* Common SMC function IDs for STM32 Service queries across STM32MP paltforms */ 14 #define STM32_SIP_SVC_CALL_COUNT 0x8200ff00 15 #define STM32_SIP_SVC_UID 0x8200ff01 16 /* 0x8200ff02 is reserved */ 17 #define STM32_SIP_SVC_VERSION 0x8200ff03 18 19 /* STM32 SiP Service Calls version numbers */ 20 #define STM32_SIP_SVC_VERSION_MAJOR 0x0 21 #define STM32_SIP_SVC_VERSION_MINOR 0x1 22 23 /* SMC error codes */ 24 #define STM32_SMC_OK 0x00000000U 25 #define STM32_SMC_NOT_SUPPORTED 0xFFFFFFFFU 26 #define STM32_SMC_FAILED 0xFFFFFFFEU 27 #define STM32_SMC_INVALID_PARAMS 0xFFFFFFFDU 28 29 void plat_svc_smc_handler(uint32_t smc_fid, u_register_t x1, 30 u_register_t x2, u_register_t x3, 31 u_register_t x4, uint32_t *ret1, 32 uint32_t *ret2, bool *ret2_enabled, 33 u_register_t flags); 34 35 #endif /* STM32MP_SVC_SETUP_H */ 36