1 /*
2  * Copyright 2022-2023 NXP
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #include <soc.h>
8 #include <OsIf.h>
9 #include <OsIf_Cfg_TypesDef.h>
10 
11 #if defined(CONFIG_SOC_SERIES_S32K1)
12 /* Aliases needed to build with different SoC-specific HAL versions */
13 #define CPXNUM                  CPxNUM
14 #define MSCM_CPXNUM_CPN_MASK    MSCM_CPxNUM_CPN_MASK
15 #endif
16 
17 /* Required by OsIf timer initialization but not used with Zephyr, so no values configured */
18 static const OsIf_ConfigType osif_config;
19 const OsIf_ConfigType *const OsIf_apxPredefinedConfig[OSIF_MAX_COREIDX_SUPPORTED] = {
20 	&osif_config
21 };
22 
23 /*
24  * OsIf call to get the processor number of the core making the access.
25  */
Sys_GetCoreID(void)26 uint8_t Sys_GetCoreID(void)
27 {
28 	return ((uint8_t)(IP_MSCM->CPXNUM & MSCM_CPXNUM_CPN_MASK));
29 }
30