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