SchM_Lin.c 63 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557
  1. /*==================================================================================================
  2. * Project : RTD AUTOSAR 4.4
  3. * Platform : CORTEXM
  4. * Peripheral :
  5. * Dependencies : none
  6. *
  7. * Autosar Version : 4.4.0
  8. * Autosar Revision : ASR_REL_4_4_REV_0000
  9. * Autosar Conf.Variant :
  10. * SW Version : 1.0.0
  11. * Build Version : S32K1_RTD_1_0_0_HF01_D2109_ASR_REL_4_4_REV_0000_20210907
  12. *
  13. * (c) Copyright 2020-2021 NXP Semiconductors
  14. * All Rights Reserved.
  15. *
  16. * NXP Confidential. This software is owned or controlled by NXP and may only be
  17. * used strictly in accordance with the applicable license terms. By expressly
  18. * accepting such terms or by downloading, installing, activating and/or otherwise
  19. * using the software, you are agreeing that you have read, and that you agree to
  20. * comply with and are bound by, such license terms. If you do not agree to be
  21. * bound by the applicable license terms, then you may not retain, install,
  22. * activate or otherwise use the software.
  23. ==================================================================================================*/
  24. /**
  25. * @file
  26. *
  27. * @addtogroup RTE_MODULE
  28. * @{
  29. */
  30. #ifdef __cplusplus
  31. extern "C"{
  32. #endif
  33. /*==================================================================================================
  34. * INCLUDE FILES
  35. * 1) system and project includes
  36. * 2) needed interfaces from external units
  37. * 3) internal and external interfaces from this unit
  38. ==================================================================================================*/
  39. #include "Std_Types.h"
  40. #include "Mcal.h"
  41. #include "OsIf.h"
  42. #include "SchM_Lin.h"
  43. #ifdef MCAL_TESTING_ENVIRONMENT
  44. #include "EUnit.h" /* EUnit Test Suite */
  45. #endif
  46. /*==================================================================================================
  47. * SOURCE FILE VERSION INFORMATION
  48. ==================================================================================================*/
  49. #define SCHM_LIN_AR_RELEASE_MAJOR_VERSION_C 4
  50. #define SCHM_LIN_AR_RELEASE_MINOR_VERSION_C 4
  51. #define SCHM_LIN_AR_RELEASE_REVISION_VERSION_C 0
  52. #define SCHM_LIN_SW_MAJOR_VERSION_C 1
  53. #define SCHM_LIN_SW_MINOR_VERSION_C 0
  54. #define SCHM_LIN_SW_PATCH_VERSION_C 0
  55. /*==================================================================================================
  56. * LOCAL CONSTANTS
  57. ==================================================================================================*/
  58. #ifdef MCAL_PLATFORM_ARM
  59. #if (MCAL_PLATFORM_ARM == MCAL_ARM_AARCH64)
  60. #define ISR_STATE_MASK ((uint32)0x00000002UL) /**< @brief DAIF bit I and F */
  61. #elif (MCAL_PLATFORM_ARM == MCAL_ARM_RARCH)
  62. #define ISR_STATE_MASK ((uint32)0x00000080UL) /**< @brief CPSR bit I */
  63. #else
  64. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT) && (!defined MCAL_PLATFORM_ARM_M0PLUS))
  65. #define ISR_STATE_MASK ((uint32)0x000000FFUL) /**< @brief BASEPRI[7:0] mask */
  66. #else
  67. #define ISR_STATE_MASK ((uint32)0x00000001UL) /**< @brief PRIMASK bit 0 */
  68. #endif
  69. #endif
  70. #else
  71. #ifdef MCAL_PLATFORM_S12
  72. #define ISR_STATE_MASK ((uint32)0x00000010UL) /**< @brief I bit of CCR */
  73. #else
  74. #define ISR_STATE_MASK ((uint32)0x00008000UL) /**< @brief EE bit of MSR */
  75. #endif
  76. #endif
  77. /*==================================================================================================
  78. * LOCAL MACROS
  79. ==================================================================================================*/
  80. #ifdef MCAL_PLATFORM_ARM
  81. #if (MCAL_PLATFORM_ARM == MCAL_ARM_AARCH64)
  82. #define ISR_ON(msr) (uint32)(((uint32)(msr) & (uint32)(ISR_STATE_MASK)) != (uint32)3)
  83. #elif (MCAL_PLATFORM_ARM == MCAL_ARM_RARCH)
  84. #define ISR_ON(msr) (uint32)(((uint32)(msr) & (uint32)(ISR_STATE_MASK)) != (uint32)(ISR_STATE_MASK))
  85. #else
  86. #define ISR_ON(msr) (uint32)(((uint32)(msr) & (uint32)(ISR_STATE_MASK)) == (uint32)0)
  87. #endif
  88. #else
  89. #ifdef MCAL_PLATFORM_S12
  90. #define ISR_ON(msr) (uint32)(((uint32)(msr) & (uint32)(ISR_STATE_MASK)) == (uint32)0)
  91. #else
  92. #define ISR_ON(msr) (uint32)((uint32)(msr) & (uint32)(ISR_STATE_MASK))
  93. #endif
  94. #endif
  95. /*==================================================================================================
  96. * FILE VERSION CHECKS
  97. ==================================================================================================*/
  98. /*==================================================================================================
  99. * LOCAL TYPEDEFS (STRUCTURES, UNIONS, ENUMS)
  100. ==================================================================================================*/
  101. /*==================================================================================================
  102. * LOCAL VARIABLES
  103. ==================================================================================================*/
  104. #define RTE_START_SEC_VAR_CLEARED_32_NO_CACHEABLE
  105. #include "Rte_MemMap.h"
  106. static volatile uint32 msr_LIN_EXCLUSIVE_AREA_00[NUMBER_OF_CORES];
  107. static volatile uint32 reentry_guard_LIN_EXCLUSIVE_AREA_00[NUMBER_OF_CORES];
  108. static volatile uint32 msr_LIN_EXCLUSIVE_AREA_01[NUMBER_OF_CORES];
  109. static volatile uint32 reentry_guard_LIN_EXCLUSIVE_AREA_01[NUMBER_OF_CORES];
  110. static volatile uint32 msr_LIN_EXCLUSIVE_AREA_02[NUMBER_OF_CORES];
  111. static volatile uint32 reentry_guard_LIN_EXCLUSIVE_AREA_02[NUMBER_OF_CORES];
  112. static volatile uint32 msr_LIN_EXCLUSIVE_AREA_03[NUMBER_OF_CORES];
  113. static volatile uint32 reentry_guard_LIN_EXCLUSIVE_AREA_03[NUMBER_OF_CORES];
  114. static volatile uint32 msr_LIN_EXCLUSIVE_AREA_04[NUMBER_OF_CORES];
  115. static volatile uint32 reentry_guard_LIN_EXCLUSIVE_AREA_04[NUMBER_OF_CORES];
  116. static volatile uint32 msr_LIN_EXCLUSIVE_AREA_05[NUMBER_OF_CORES];
  117. static volatile uint32 reentry_guard_LIN_EXCLUSIVE_AREA_05[NUMBER_OF_CORES];
  118. static volatile uint32 msr_LIN_EXCLUSIVE_AREA_06[NUMBER_OF_CORES];
  119. static volatile uint32 reentry_guard_LIN_EXCLUSIVE_AREA_06[NUMBER_OF_CORES];
  120. static volatile uint32 msr_LIN_EXCLUSIVE_AREA_07[NUMBER_OF_CORES];
  121. static volatile uint32 reentry_guard_LIN_EXCLUSIVE_AREA_07[NUMBER_OF_CORES];
  122. static volatile uint32 msr_LIN_EXCLUSIVE_AREA_08[NUMBER_OF_CORES];
  123. static volatile uint32 reentry_guard_LIN_EXCLUSIVE_AREA_08[NUMBER_OF_CORES];
  124. static volatile uint32 msr_LIN_EXCLUSIVE_AREA_09[NUMBER_OF_CORES];
  125. static volatile uint32 reentry_guard_LIN_EXCLUSIVE_AREA_09[NUMBER_OF_CORES];
  126. static volatile uint32 msr_LIN_EXCLUSIVE_AREA_10[NUMBER_OF_CORES];
  127. static volatile uint32 reentry_guard_LIN_EXCLUSIVE_AREA_10[NUMBER_OF_CORES];
  128. static volatile uint32 msr_LIN_EXCLUSIVE_AREA_11[NUMBER_OF_CORES];
  129. static volatile uint32 reentry_guard_LIN_EXCLUSIVE_AREA_11[NUMBER_OF_CORES];
  130. static volatile uint32 msr_LIN_EXCLUSIVE_AREA_12[NUMBER_OF_CORES];
  131. static volatile uint32 reentry_guard_LIN_EXCLUSIVE_AREA_12[NUMBER_OF_CORES];
  132. static volatile uint32 msr_LIN_EXCLUSIVE_AREA_13[NUMBER_OF_CORES];
  133. static volatile uint32 reentry_guard_LIN_EXCLUSIVE_AREA_13[NUMBER_OF_CORES];
  134. static volatile uint32 msr_LIN_EXCLUSIVE_AREA_14[NUMBER_OF_CORES];
  135. static volatile uint32 reentry_guard_LIN_EXCLUSIVE_AREA_14[NUMBER_OF_CORES];
  136. static volatile uint32 msr_LIN_EXCLUSIVE_AREA_15[NUMBER_OF_CORES];
  137. static volatile uint32 reentry_guard_LIN_EXCLUSIVE_AREA_15[NUMBER_OF_CORES];
  138. static volatile uint32 msr_LIN_EXCLUSIVE_AREA_16[NUMBER_OF_CORES];
  139. static volatile uint32 reentry_guard_LIN_EXCLUSIVE_AREA_16[NUMBER_OF_CORES];
  140. static volatile uint32 msr_LIN_EXCLUSIVE_AREA_17[NUMBER_OF_CORES];
  141. static volatile uint32 reentry_guard_LIN_EXCLUSIVE_AREA_17[NUMBER_OF_CORES];
  142. static volatile uint32 msr_LIN_EXCLUSIVE_AREA_18[NUMBER_OF_CORES];
  143. static volatile uint32 reentry_guard_LIN_EXCLUSIVE_AREA_18[NUMBER_OF_CORES];
  144. static volatile uint32 msr_LIN_EXCLUSIVE_AREA_19[NUMBER_OF_CORES];
  145. static volatile uint32 reentry_guard_LIN_EXCLUSIVE_AREA_19[NUMBER_OF_CORES];
  146. static volatile uint32 msr_LIN_EXCLUSIVE_AREA_20[NUMBER_OF_CORES];
  147. static volatile uint32 reentry_guard_LIN_EXCLUSIVE_AREA_20[NUMBER_OF_CORES];
  148. static volatile uint32 msr_LIN_EXCLUSIVE_AREA_21[NUMBER_OF_CORES];
  149. static volatile uint32 reentry_guard_LIN_EXCLUSIVE_AREA_21[NUMBER_OF_CORES];
  150. static volatile uint32 msr_LIN_EXCLUSIVE_AREA_22[NUMBER_OF_CORES];
  151. static volatile uint32 reentry_guard_LIN_EXCLUSIVE_AREA_22[NUMBER_OF_CORES];
  152. static volatile uint32 msr_LIN_EXCLUSIVE_AREA_23[NUMBER_OF_CORES];
  153. static volatile uint32 reentry_guard_LIN_EXCLUSIVE_AREA_23[NUMBER_OF_CORES];
  154. static volatile uint32 msr_LIN_EXCLUSIVE_AREA_24[NUMBER_OF_CORES];
  155. static volatile uint32 reentry_guard_LIN_EXCLUSIVE_AREA_24[NUMBER_OF_CORES];
  156. static volatile uint32 msr_LIN_EXCLUSIVE_AREA_25[NUMBER_OF_CORES];
  157. static volatile uint32 reentry_guard_LIN_EXCLUSIVE_AREA_25[NUMBER_OF_CORES];
  158. static volatile uint32 msr_LIN_EXCLUSIVE_AREA_26[NUMBER_OF_CORES];
  159. static volatile uint32 reentry_guard_LIN_EXCLUSIVE_AREA_26[NUMBER_OF_CORES];
  160. static volatile uint32 msr_LIN_EXCLUSIVE_AREA_27[NUMBER_OF_CORES];
  161. static volatile uint32 reentry_guard_LIN_EXCLUSIVE_AREA_27[NUMBER_OF_CORES];
  162. #define RTE_STOP_SEC_VAR_CLEARED_32_NO_CACHEABLE
  163. #include "Rte_MemMap.h"
  164. /*==================================================================================================
  165. * GLOBAL CONSTANTS
  166. ==================================================================================================*/
  167. /*==================================================================================================
  168. * GLOBAL VARIABLES
  169. ==================================================================================================*/
  170. /*==================================================================================================
  171. * LOCAL FUNCTION PROTOTYPES
  172. ==================================================================================================*/
  173. #ifndef _COSMIC_C_S32K1XX_
  174. /*================================================================================================*/
  175. /**
  176. * @brief This function returns the MSR register value (32 bits).
  177. * @details This function returns the MSR register value (32 bits).
  178. *
  179. * @param[in] void No input parameters
  180. * @return uint32 msr This function returns the MSR register value (32 bits).
  181. *
  182. * @pre None
  183. * @post None
  184. *
  185. */
  186. uint32 Lin_schm_read_msr(void);
  187. #endif /*ifndef _COSMIC_C_S32K1XX_*/
  188. /*==================================================================================================
  189. * LOCAL FUNCTIONS
  190. ==================================================================================================*/
  191. #define RTE_START_SEC_CODE
  192. #include "Rte_MemMap.h"
  193. #if (defined(_GREENHILLS_C_S32K1XX_) || defined(_CODEWARRIOR_C_S32K1XX_))
  194. /*================================================================================================*/
  195. /**
  196. * @brief This macro returns the MSR register value (32 bits).
  197. * @details This macro function implementation returns the MSR register value in r3 (32 bits).
  198. *
  199. * @pre None
  200. * @post None
  201. *
  202. */
  203. #ifdef MCAL_PLATFORM_ARM
  204. #if (MCAL_PLATFORM_ARM == MCAL_ARM_AARCH64)
  205. ASM_KEYWORD uint32 Lin_schm_read_msr(void)
  206. {
  207. mrs x0, S3_3_c4_c2_1
  208. }
  209. #elif (MCAL_PLATFORM_ARM == MCAL_ARM_RARCH)
  210. ASM_KEYWORD uint32 Lin_schm_read_msr(void)
  211. {
  212. mrs r0, CPSR
  213. }
  214. #else
  215. ASM_KEYWORD uint32 Lin_schm_read_msr(void)
  216. {
  217. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT) && (!defined MCAL_PLATFORM_ARM_M0PLUS))
  218. mrs r0, BASEPRI
  219. #else
  220. mrs r0, PRIMASK
  221. #endif
  222. }
  223. #endif
  224. #else
  225. #ifdef MCAL_PLATFORM_S12
  226. ASM_KEYWORD uint32 Lin_schm_read_msr(void)
  227. {
  228. tfr ccr, d6
  229. }
  230. #else
  231. ASM_KEYWORD uint32 Lin_schm_read_msr(void)
  232. {
  233. mfmsr r3
  234. }
  235. #endif
  236. #endif
  237. #endif /*#ifdef GHS||CW*/
  238. #ifdef _DIABDATA_C_S32K1XX_
  239. /**
  240. * @brief This function returns the MSR register value (32 bits).
  241. * @details This function returns the MSR register value (32 bits).
  242. *
  243. * @param[in] void No input parameters
  244. * @return uint32 msr This function returns the MSR register value (32 bits).
  245. *
  246. * @pre None
  247. * @post None
  248. *
  249. */
  250. #ifdef MCAL_PLATFORM_ARM
  251. uint32 Lin_schm_read_msr(void)
  252. {
  253. register uint32 reg_tmp;
  254. #if (MCAL_PLATFORM_ARM == MCAL_ARM_AARCH64)
  255. __asm volatile( " mrs %x0, DAIF " : "=r" (reg_tmp) );
  256. #elif (MCAL_PLATFORM_ARM == MCAL_ARM_RARCH)
  257. __asm volatile( " mrs %0, CPSR " : "=r" (reg_tmp) );
  258. #else
  259. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT) && (!defined MCAL_PLATFORM_ARM_M0PLUS))
  260. __asm volatile( " mrs %0, basepri " : "=r" (reg_tmp) );
  261. #else
  262. __asm volatile( " mrs %0, primask " : "=r" (reg_tmp) );
  263. #endif
  264. #endif
  265. return (uint32)reg_tmp;
  266. }
  267. #else
  268. ASM_KEYWORD uint32 Lin_schm_read_msr(void)
  269. {
  270. mfmsr r3
  271. }
  272. #endif /* MCAL_PLATFORM_ARM */
  273. #endif /* _DIABDATA_C_S32K1XX_*/
  274. #ifdef _COSMIC_C_S32K1XX_
  275. /*================================================================================================*/
  276. /**
  277. * @brief This function returns the MSR register value (32 bits).
  278. * @details This function returns the MSR register value (32 bits).
  279. *
  280. * @param[in] void No input parameters
  281. * @return uint32 msr This function returns the MSR register value (32 bits).
  282. *
  283. * @pre None
  284. * @post None
  285. *
  286. */
  287. #ifdef MCAL_PLATFORM_S12
  288. #define Lin_schm_read_msr() ASM_KEYWORD("tfr ccr, d6")
  289. #else
  290. #define Lin_schm_read_msr() ASM_KEYWORD("mfmsr r3")
  291. #endif
  292. #endif /*Cosmic compiler only*/
  293. #ifdef _HITECH_C_S32K1XX_
  294. /*================================================================================================*/
  295. /**
  296. * @brief This function returns the MSR register value (32 bits).
  297. * @details This function returns the MSR register value (32 bits).
  298. *
  299. * @param[in] void No input parameters
  300. * @return uint32 msr This function returns the MSR register value (32 bits).
  301. *
  302. * @pre None
  303. * @post None
  304. *
  305. */
  306. uint32 Lin_schm_read_msr(void)
  307. {
  308. uint32 result;
  309. __asm volatile("mfmsr %0" : "=r" (result) :);
  310. return result;
  311. }
  312. #endif /*HighTec compiler only*/
  313. /*================================================================================================*/
  314. #ifdef _LINARO_C_S32K1XX_
  315. /**
  316. * @brief This function returns the MSR register value (32 bits).
  317. * @details This function returns the MSR register value (32 bits).
  318. *
  319. * @param[in] void No input parameters
  320. * @return uint32 msr This function returns the MSR register value (32 bits).
  321. *
  322. * @pre None
  323. * @post None
  324. *
  325. */
  326. uint32 Lin_schm_read_msr(void)
  327. {
  328. register uint32 reg_tmp;
  329. #if (MCAL_PLATFORM_ARM == MCAL_ARM_AARCH64)
  330. __asm volatile( " mrs %x0, DAIF " : "=r" (reg_tmp) );
  331. #elif (MCAL_PLATFORM_ARM == MCAL_ARM_RARCH)
  332. __asm volatile( " mrs %0, CPSR " : "=r" (reg_tmp) );
  333. #else
  334. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT) && (!defined MCAL_PLATFORM_ARM_M0PLUS))
  335. __asm volatile( " mrs %0, basepri " : "=r" (reg_tmp) );
  336. #else
  337. __asm volatile( " mrs %0, primask " : "=r" (reg_tmp) );
  338. #endif
  339. #endif
  340. return (uint32)reg_tmp;
  341. }
  342. #endif /* _LINARO_C_S32K1XX_*/
  343. /*================================================================================================*/
  344. #ifdef _ARM_DS5_C_S32K1XX_
  345. /**
  346. * @brief This function returns the MSR register value (32 bits).
  347. * @details This function returns the MSR register value (32 bits).
  348. *
  349. * @param[in] void No input parameters
  350. * @return uint32 msr This function returns the MSR register value (32 bits).
  351. *
  352. * @pre None
  353. * @post None
  354. *
  355. */
  356. uint32 Lin_schm_read_msr(void)
  357. {
  358. register uint32 reg_tmp;
  359. #if (MCAL_PLATFORM_ARM == MCAL_ARM_AARCH64)
  360. __asm volatile( " mrs %x0, DAIF " : "=r" (reg_tmp) );
  361. #elif (MCAL_PLATFORM_ARM == MCAL_ARM_RARCH)
  362. __asm volatile( " mrs %0, CPSR " : "=r" (reg_tmp) );
  363. #else
  364. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT) && (!defined MCAL_PLATFORM_ARM_M0PLUS))
  365. __asm volatile( " mrs %0, basepri " : "=r" (reg_tmp) );
  366. #else
  367. __asm volatile( " mrs %0, primask " : "=r" (reg_tmp) );
  368. #endif
  369. #endif
  370. return (uint32)reg_tmp;
  371. }
  372. #endif /* _ARM_DS5_C_S32K1XX_ */
  373. #ifdef _IAR_C_S32K1XX_
  374. /**
  375. * @brief This function returns the MSR register value (32 bits).
  376. * @details This function returns the MSR register value (32 bits).
  377. *
  378. * @param[in] void No input parameters
  379. * @return uint32 msr This function returns the MSR register value (32 bits).
  380. *
  381. * @pre None
  382. * @post None
  383. *
  384. */
  385. uint32 Lin_schm_read_msr(void)
  386. {
  387. register uint32 reg_tmp;
  388. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT) && (!defined MCAL_PLATFORM_ARM_M0PLUS))
  389. __asm volatile( " mrs %0, basepri " : "=r" (reg_tmp) );
  390. #else
  391. __asm volatile( " mrs %0, primask " : "=r" (reg_tmp) );
  392. #endif
  393. return (uint32)reg_tmp;
  394. }
  395. #endif /* _IAR_C_S32K1XX_ */
  396. #define RTE_STOP_SEC_CODE
  397. #include "Rte_MemMap.h"
  398. /*==================================================================================================
  399. * GLOBAL FUNCTIONS
  400. ==================================================================================================*/
  401. #define RTE_START_SEC_CODE
  402. #include "Rte_MemMap.h"
  403. void SchM_Enter_Lin_LIN_EXCLUSIVE_AREA_00(void)
  404. {
  405. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  406. if(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_00[u32CoreId])
  407. {
  408. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT) && (!defined MCAL_PLATFORM_ARM_M0PLUS))
  409. msr_LIN_EXCLUSIVE_AREA_00[u32CoreId] = OsIf_Trusted_Call_Return(Lin_schm_read_msr);
  410. #else
  411. msr_LIN_EXCLUSIVE_AREA_00[u32CoreId] = Lin_schm_read_msr(); /*read MSR (to store interrupts state)*/
  412. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  413. if (ISR_ON(msr_LIN_EXCLUSIVE_AREA_00[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  414. {
  415. OsIf_SuspendAllInterrupts();
  416. #ifdef _ARM_DS5_C_S32K1XX_
  417. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  418. #endif
  419. }
  420. }
  421. reentry_guard_LIN_EXCLUSIVE_AREA_00[u32CoreId]++;
  422. }
  423. void SchM_Exit_Lin_LIN_EXCLUSIVE_AREA_00(void)
  424. {
  425. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  426. reentry_guard_LIN_EXCLUSIVE_AREA_00[u32CoreId]--;
  427. if ((ISR_ON(msr_LIN_EXCLUSIVE_AREA_00[u32CoreId]))&&(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_00[u32CoreId])) /*if interrupts were enabled*/
  428. {
  429. OsIf_ResumeAllInterrupts();
  430. #ifdef _ARM_DS5_C_S32K1XX_
  431. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  432. #endif
  433. }
  434. }
  435. void SchM_Enter_Lin_LIN_EXCLUSIVE_AREA_01(void)
  436. {
  437. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  438. if(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_01[u32CoreId])
  439. {
  440. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT) && (!defined MCAL_PLATFORM_ARM_M0PLUS))
  441. msr_LIN_EXCLUSIVE_AREA_01[u32CoreId] = OsIf_Trusted_Call_Return(Lin_schm_read_msr);
  442. #else
  443. msr_LIN_EXCLUSIVE_AREA_01[u32CoreId] = Lin_schm_read_msr(); /*read MSR (to store interrupts state)*/
  444. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  445. if (ISR_ON(msr_LIN_EXCLUSIVE_AREA_01[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  446. {
  447. OsIf_SuspendAllInterrupts();
  448. #ifdef _ARM_DS5_C_S32K1XX_
  449. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  450. #endif
  451. }
  452. }
  453. reentry_guard_LIN_EXCLUSIVE_AREA_01[u32CoreId]++;
  454. }
  455. void SchM_Exit_Lin_LIN_EXCLUSIVE_AREA_01(void)
  456. {
  457. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  458. reentry_guard_LIN_EXCLUSIVE_AREA_01[u32CoreId]--;
  459. if ((ISR_ON(msr_LIN_EXCLUSIVE_AREA_01[u32CoreId]))&&(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_01[u32CoreId])) /*if interrupts were enabled*/
  460. {
  461. OsIf_ResumeAllInterrupts();
  462. #ifdef _ARM_DS5_C_S32K1XX_
  463. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  464. #endif
  465. }
  466. }
  467. void SchM_Enter_Lin_LIN_EXCLUSIVE_AREA_02(void)
  468. {
  469. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  470. if(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_02[u32CoreId])
  471. {
  472. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT) && (!defined MCAL_PLATFORM_ARM_M0PLUS))
  473. msr_LIN_EXCLUSIVE_AREA_02[u32CoreId] = OsIf_Trusted_Call_Return(Lin_schm_read_msr);
  474. #else
  475. msr_LIN_EXCLUSIVE_AREA_02[u32CoreId] = Lin_schm_read_msr(); /*read MSR (to store interrupts state)*/
  476. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  477. if (ISR_ON(msr_LIN_EXCLUSIVE_AREA_02[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  478. {
  479. OsIf_SuspendAllInterrupts();
  480. #ifdef _ARM_DS5_C_S32K1XX_
  481. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  482. #endif
  483. }
  484. }
  485. reentry_guard_LIN_EXCLUSIVE_AREA_02[u32CoreId]++;
  486. }
  487. void SchM_Exit_Lin_LIN_EXCLUSIVE_AREA_02(void)
  488. {
  489. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  490. reentry_guard_LIN_EXCLUSIVE_AREA_02[u32CoreId]--;
  491. if ((ISR_ON(msr_LIN_EXCLUSIVE_AREA_02[u32CoreId]))&&(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_02[u32CoreId])) /*if interrupts were enabled*/
  492. {
  493. OsIf_ResumeAllInterrupts();
  494. #ifdef _ARM_DS5_C_S32K1XX_
  495. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  496. #endif
  497. }
  498. }
  499. void SchM_Enter_Lin_LIN_EXCLUSIVE_AREA_03(void)
  500. {
  501. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  502. if(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_03[u32CoreId])
  503. {
  504. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT) && (!defined MCAL_PLATFORM_ARM_M0PLUS))
  505. msr_LIN_EXCLUSIVE_AREA_03[u32CoreId] = OsIf_Trusted_Call_Return(Lin_schm_read_msr);
  506. #else
  507. msr_LIN_EXCLUSIVE_AREA_03[u32CoreId] = Lin_schm_read_msr(); /*read MSR (to store interrupts state)*/
  508. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  509. if (ISR_ON(msr_LIN_EXCLUSIVE_AREA_03[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  510. {
  511. OsIf_SuspendAllInterrupts();
  512. #ifdef _ARM_DS5_C_S32K1XX_
  513. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  514. #endif
  515. }
  516. }
  517. reentry_guard_LIN_EXCLUSIVE_AREA_03[u32CoreId]++;
  518. }
  519. void SchM_Exit_Lin_LIN_EXCLUSIVE_AREA_03(void)
  520. {
  521. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  522. reentry_guard_LIN_EXCLUSIVE_AREA_03[u32CoreId]--;
  523. if ((ISR_ON(msr_LIN_EXCLUSIVE_AREA_03[u32CoreId]))&&(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_03[u32CoreId])) /*if interrupts were enabled*/
  524. {
  525. OsIf_ResumeAllInterrupts();
  526. #ifdef _ARM_DS5_C_S32K1XX_
  527. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  528. #endif
  529. }
  530. }
  531. void SchM_Enter_Lin_LIN_EXCLUSIVE_AREA_04(void)
  532. {
  533. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  534. if(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_04[u32CoreId])
  535. {
  536. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT) && (!defined MCAL_PLATFORM_ARM_M0PLUS))
  537. msr_LIN_EXCLUSIVE_AREA_04[u32CoreId] = OsIf_Trusted_Call_Return(Lin_schm_read_msr);
  538. #else
  539. msr_LIN_EXCLUSIVE_AREA_04[u32CoreId] = Lin_schm_read_msr(); /*read MSR (to store interrupts state)*/
  540. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  541. if (ISR_ON(msr_LIN_EXCLUSIVE_AREA_04[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  542. {
  543. OsIf_SuspendAllInterrupts();
  544. #ifdef _ARM_DS5_C_S32K1XX_
  545. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  546. #endif
  547. }
  548. }
  549. reentry_guard_LIN_EXCLUSIVE_AREA_04[u32CoreId]++;
  550. }
  551. void SchM_Exit_Lin_LIN_EXCLUSIVE_AREA_04(void)
  552. {
  553. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  554. reentry_guard_LIN_EXCLUSIVE_AREA_04[u32CoreId]--;
  555. if ((ISR_ON(msr_LIN_EXCLUSIVE_AREA_04[u32CoreId]))&&(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_04[u32CoreId])) /*if interrupts were enabled*/
  556. {
  557. OsIf_ResumeAllInterrupts();
  558. #ifdef _ARM_DS5_C_S32K1XX_
  559. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  560. #endif
  561. }
  562. }
  563. void SchM_Enter_Lin_LIN_EXCLUSIVE_AREA_05(void)
  564. {
  565. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  566. if(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_05[u32CoreId])
  567. {
  568. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT) && (!defined MCAL_PLATFORM_ARM_M0PLUS))
  569. msr_LIN_EXCLUSIVE_AREA_05[u32CoreId] = OsIf_Trusted_Call_Return(Lin_schm_read_msr);
  570. #else
  571. msr_LIN_EXCLUSIVE_AREA_05[u32CoreId] = Lin_schm_read_msr(); /*read MSR (to store interrupts state)*/
  572. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  573. if (ISR_ON(msr_LIN_EXCLUSIVE_AREA_05[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  574. {
  575. OsIf_SuspendAllInterrupts();
  576. #ifdef _ARM_DS5_C_S32K1XX_
  577. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  578. #endif
  579. }
  580. }
  581. reentry_guard_LIN_EXCLUSIVE_AREA_05[u32CoreId]++;
  582. }
  583. void SchM_Exit_Lin_LIN_EXCLUSIVE_AREA_05(void)
  584. {
  585. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  586. reentry_guard_LIN_EXCLUSIVE_AREA_05[u32CoreId]--;
  587. if ((ISR_ON(msr_LIN_EXCLUSIVE_AREA_05[u32CoreId]))&&(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_05[u32CoreId])) /*if interrupts were enabled*/
  588. {
  589. OsIf_ResumeAllInterrupts();
  590. #ifdef _ARM_DS5_C_S32K1XX_
  591. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  592. #endif
  593. }
  594. }
  595. void SchM_Enter_Lin_LIN_EXCLUSIVE_AREA_06(void)
  596. {
  597. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  598. if(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_06[u32CoreId])
  599. {
  600. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT) && (!defined MCAL_PLATFORM_ARM_M0PLUS))
  601. msr_LIN_EXCLUSIVE_AREA_06[u32CoreId] = OsIf_Trusted_Call_Return(Lin_schm_read_msr);
  602. #else
  603. msr_LIN_EXCLUSIVE_AREA_06[u32CoreId] = Lin_schm_read_msr(); /*read MSR (to store interrupts state)*/
  604. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  605. if (ISR_ON(msr_LIN_EXCLUSIVE_AREA_06[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  606. {
  607. OsIf_SuspendAllInterrupts();
  608. #ifdef _ARM_DS5_C_S32K1XX_
  609. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  610. #endif
  611. }
  612. }
  613. reentry_guard_LIN_EXCLUSIVE_AREA_06[u32CoreId]++;
  614. }
  615. void SchM_Exit_Lin_LIN_EXCLUSIVE_AREA_06(void)
  616. {
  617. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  618. reentry_guard_LIN_EXCLUSIVE_AREA_06[u32CoreId]--;
  619. if ((ISR_ON(msr_LIN_EXCLUSIVE_AREA_06[u32CoreId]))&&(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_06[u32CoreId])) /*if interrupts were enabled*/
  620. {
  621. OsIf_ResumeAllInterrupts();
  622. #ifdef _ARM_DS5_C_S32K1XX_
  623. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  624. #endif
  625. }
  626. }
  627. void SchM_Enter_Lin_LIN_EXCLUSIVE_AREA_07(void)
  628. {
  629. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  630. if(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_07[u32CoreId])
  631. {
  632. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT) && (!defined MCAL_PLATFORM_ARM_M0PLUS))
  633. msr_LIN_EXCLUSIVE_AREA_07[u32CoreId] = OsIf_Trusted_Call_Return(Lin_schm_read_msr);
  634. #else
  635. msr_LIN_EXCLUSIVE_AREA_07[u32CoreId] = Lin_schm_read_msr(); /*read MSR (to store interrupts state)*/
  636. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  637. if (ISR_ON(msr_LIN_EXCLUSIVE_AREA_07[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  638. {
  639. OsIf_SuspendAllInterrupts();
  640. #ifdef _ARM_DS5_C_S32K1XX_
  641. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  642. #endif
  643. }
  644. }
  645. reentry_guard_LIN_EXCLUSIVE_AREA_07[u32CoreId]++;
  646. }
  647. void SchM_Exit_Lin_LIN_EXCLUSIVE_AREA_07(void)
  648. {
  649. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  650. reentry_guard_LIN_EXCLUSIVE_AREA_07[u32CoreId]--;
  651. if ((ISR_ON(msr_LIN_EXCLUSIVE_AREA_07[u32CoreId]))&&(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_07[u32CoreId])) /*if interrupts were enabled*/
  652. {
  653. OsIf_ResumeAllInterrupts();
  654. #ifdef _ARM_DS5_C_S32K1XX_
  655. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  656. #endif
  657. }
  658. }
  659. void SchM_Enter_Lin_LIN_EXCLUSIVE_AREA_08(void)
  660. {
  661. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  662. if(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_08[u32CoreId])
  663. {
  664. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT) && (!defined MCAL_PLATFORM_ARM_M0PLUS))
  665. msr_LIN_EXCLUSIVE_AREA_08[u32CoreId] = OsIf_Trusted_Call_Return(Lin_schm_read_msr);
  666. #else
  667. msr_LIN_EXCLUSIVE_AREA_08[u32CoreId] = Lin_schm_read_msr(); /*read MSR (to store interrupts state)*/
  668. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  669. if (ISR_ON(msr_LIN_EXCLUSIVE_AREA_08[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  670. {
  671. OsIf_SuspendAllInterrupts();
  672. #ifdef _ARM_DS5_C_S32K1XX_
  673. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  674. #endif
  675. }
  676. }
  677. reentry_guard_LIN_EXCLUSIVE_AREA_08[u32CoreId]++;
  678. }
  679. void SchM_Exit_Lin_LIN_EXCLUSIVE_AREA_08(void)
  680. {
  681. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  682. reentry_guard_LIN_EXCLUSIVE_AREA_08[u32CoreId]--;
  683. if ((ISR_ON(msr_LIN_EXCLUSIVE_AREA_08[u32CoreId]))&&(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_08[u32CoreId])) /*if interrupts were enabled*/
  684. {
  685. OsIf_ResumeAllInterrupts();
  686. #ifdef _ARM_DS5_C_S32K1XX_
  687. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  688. #endif
  689. }
  690. }
  691. void SchM_Enter_Lin_LIN_EXCLUSIVE_AREA_09(void)
  692. {
  693. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  694. if(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_09[u32CoreId])
  695. {
  696. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT) && (!defined MCAL_PLATFORM_ARM_M0PLUS))
  697. msr_LIN_EXCLUSIVE_AREA_09[u32CoreId] = OsIf_Trusted_Call_Return(Lin_schm_read_msr);
  698. #else
  699. msr_LIN_EXCLUSIVE_AREA_09[u32CoreId] = Lin_schm_read_msr(); /*read MSR (to store interrupts state)*/
  700. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  701. if (ISR_ON(msr_LIN_EXCLUSIVE_AREA_09[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  702. {
  703. OsIf_SuspendAllInterrupts();
  704. #ifdef _ARM_DS5_C_S32K1XX_
  705. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  706. #endif
  707. }
  708. }
  709. reentry_guard_LIN_EXCLUSIVE_AREA_09[u32CoreId]++;
  710. }
  711. void SchM_Exit_Lin_LIN_EXCLUSIVE_AREA_09(void)
  712. {
  713. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  714. reentry_guard_LIN_EXCLUSIVE_AREA_09[u32CoreId]--;
  715. if ((ISR_ON(msr_LIN_EXCLUSIVE_AREA_09[u32CoreId]))&&(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_09[u32CoreId])) /*if interrupts were enabled*/
  716. {
  717. OsIf_ResumeAllInterrupts();
  718. #ifdef _ARM_DS5_C_S32K1XX_
  719. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  720. #endif
  721. }
  722. }
  723. void SchM_Enter_Lin_LIN_EXCLUSIVE_AREA_10(void)
  724. {
  725. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  726. if(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_10[u32CoreId])
  727. {
  728. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT) && (!defined MCAL_PLATFORM_ARM_M0PLUS))
  729. msr_LIN_EXCLUSIVE_AREA_10[u32CoreId] = OsIf_Trusted_Call_Return(Lin_schm_read_msr);
  730. #else
  731. msr_LIN_EXCLUSIVE_AREA_10[u32CoreId] = Lin_schm_read_msr(); /*read MSR (to store interrupts state)*/
  732. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  733. if (ISR_ON(msr_LIN_EXCLUSIVE_AREA_10[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  734. {
  735. OsIf_SuspendAllInterrupts();
  736. #ifdef _ARM_DS5_C_S32K1XX_
  737. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  738. #endif
  739. }
  740. }
  741. reentry_guard_LIN_EXCLUSIVE_AREA_10[u32CoreId]++;
  742. }
  743. void SchM_Exit_Lin_LIN_EXCLUSIVE_AREA_10(void)
  744. {
  745. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  746. reentry_guard_LIN_EXCLUSIVE_AREA_10[u32CoreId]--;
  747. if ((ISR_ON(msr_LIN_EXCLUSIVE_AREA_10[u32CoreId]))&&(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_10[u32CoreId])) /*if interrupts were enabled*/
  748. {
  749. OsIf_ResumeAllInterrupts();
  750. #ifdef _ARM_DS5_C_S32K1XX_
  751. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  752. #endif
  753. }
  754. }
  755. void SchM_Enter_Lin_LIN_EXCLUSIVE_AREA_11(void)
  756. {
  757. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  758. if(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_11[u32CoreId])
  759. {
  760. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT) && (!defined MCAL_PLATFORM_ARM_M0PLUS))
  761. msr_LIN_EXCLUSIVE_AREA_11[u32CoreId] = OsIf_Trusted_Call_Return(Lin_schm_read_msr);
  762. #else
  763. msr_LIN_EXCLUSIVE_AREA_11[u32CoreId] = Lin_schm_read_msr(); /*read MSR (to store interrupts state)*/
  764. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  765. if (ISR_ON(msr_LIN_EXCLUSIVE_AREA_11[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  766. {
  767. OsIf_SuspendAllInterrupts();
  768. #ifdef _ARM_DS5_C_S32K1XX_
  769. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  770. #endif
  771. }
  772. }
  773. reentry_guard_LIN_EXCLUSIVE_AREA_11[u32CoreId]++;
  774. }
  775. void SchM_Exit_Lin_LIN_EXCLUSIVE_AREA_11(void)
  776. {
  777. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  778. reentry_guard_LIN_EXCLUSIVE_AREA_11[u32CoreId]--;
  779. if ((ISR_ON(msr_LIN_EXCLUSIVE_AREA_11[u32CoreId]))&&(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_11[u32CoreId])) /*if interrupts were enabled*/
  780. {
  781. OsIf_ResumeAllInterrupts();
  782. #ifdef _ARM_DS5_C_S32K1XX_
  783. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  784. #endif
  785. }
  786. }
  787. void SchM_Enter_Lin_LIN_EXCLUSIVE_AREA_12(void)
  788. {
  789. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  790. if(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_12[u32CoreId])
  791. {
  792. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT) && (!defined MCAL_PLATFORM_ARM_M0PLUS))
  793. msr_LIN_EXCLUSIVE_AREA_12[u32CoreId] = OsIf_Trusted_Call_Return(Lin_schm_read_msr);
  794. #else
  795. msr_LIN_EXCLUSIVE_AREA_12[u32CoreId] = Lin_schm_read_msr(); /*read MSR (to store interrupts state)*/
  796. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  797. if (ISR_ON(msr_LIN_EXCLUSIVE_AREA_12[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  798. {
  799. OsIf_SuspendAllInterrupts();
  800. #ifdef _ARM_DS5_C_S32K1XX_
  801. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  802. #endif
  803. }
  804. }
  805. reentry_guard_LIN_EXCLUSIVE_AREA_12[u32CoreId]++;
  806. }
  807. void SchM_Exit_Lin_LIN_EXCLUSIVE_AREA_12(void)
  808. {
  809. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  810. reentry_guard_LIN_EXCLUSIVE_AREA_12[u32CoreId]--;
  811. if ((ISR_ON(msr_LIN_EXCLUSIVE_AREA_12[u32CoreId]))&&(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_12[u32CoreId])) /*if interrupts were enabled*/
  812. {
  813. OsIf_ResumeAllInterrupts();
  814. #ifdef _ARM_DS5_C_S32K1XX_
  815. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  816. #endif
  817. }
  818. }
  819. void SchM_Enter_Lin_LIN_EXCLUSIVE_AREA_13(void)
  820. {
  821. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  822. if(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_13[u32CoreId])
  823. {
  824. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT) && (!defined MCAL_PLATFORM_ARM_M0PLUS))
  825. msr_LIN_EXCLUSIVE_AREA_13[u32CoreId] = OsIf_Trusted_Call_Return(Lin_schm_read_msr);
  826. #else
  827. msr_LIN_EXCLUSIVE_AREA_13[u32CoreId] = Lin_schm_read_msr(); /*read MSR (to store interrupts state)*/
  828. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  829. if (ISR_ON(msr_LIN_EXCLUSIVE_AREA_13[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  830. {
  831. OsIf_SuspendAllInterrupts();
  832. #ifdef _ARM_DS5_C_S32K1XX_
  833. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  834. #endif
  835. }
  836. }
  837. reentry_guard_LIN_EXCLUSIVE_AREA_13[u32CoreId]++;
  838. }
  839. void SchM_Exit_Lin_LIN_EXCLUSIVE_AREA_13(void)
  840. {
  841. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  842. reentry_guard_LIN_EXCLUSIVE_AREA_13[u32CoreId]--;
  843. if ((ISR_ON(msr_LIN_EXCLUSIVE_AREA_13[u32CoreId]))&&(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_13[u32CoreId])) /*if interrupts were enabled*/
  844. {
  845. OsIf_ResumeAllInterrupts();
  846. #ifdef _ARM_DS5_C_S32K1XX_
  847. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  848. #endif
  849. }
  850. }
  851. void SchM_Enter_Lin_LIN_EXCLUSIVE_AREA_14(void)
  852. {
  853. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  854. if(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_14[u32CoreId])
  855. {
  856. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT) && (!defined MCAL_PLATFORM_ARM_M0PLUS))
  857. msr_LIN_EXCLUSIVE_AREA_14[u32CoreId] = OsIf_Trusted_Call_Return(Lin_schm_read_msr);
  858. #else
  859. msr_LIN_EXCLUSIVE_AREA_14[u32CoreId] = Lin_schm_read_msr(); /*read MSR (to store interrupts state)*/
  860. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  861. if (ISR_ON(msr_LIN_EXCLUSIVE_AREA_14[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  862. {
  863. OsIf_SuspendAllInterrupts();
  864. #ifdef _ARM_DS5_C_S32K1XX_
  865. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  866. #endif
  867. }
  868. }
  869. reentry_guard_LIN_EXCLUSIVE_AREA_14[u32CoreId]++;
  870. }
  871. void SchM_Exit_Lin_LIN_EXCLUSIVE_AREA_14(void)
  872. {
  873. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  874. reentry_guard_LIN_EXCLUSIVE_AREA_14[u32CoreId]--;
  875. if ((ISR_ON(msr_LIN_EXCLUSIVE_AREA_14[u32CoreId]))&&(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_14[u32CoreId])) /*if interrupts were enabled*/
  876. {
  877. OsIf_ResumeAllInterrupts();
  878. #ifdef _ARM_DS5_C_S32K1XX_
  879. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  880. #endif
  881. }
  882. }
  883. void SchM_Enter_Lin_LIN_EXCLUSIVE_AREA_15(void)
  884. {
  885. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  886. if(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_15[u32CoreId])
  887. {
  888. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT) && (!defined MCAL_PLATFORM_ARM_M0PLUS))
  889. msr_LIN_EXCLUSIVE_AREA_15[u32CoreId] = OsIf_Trusted_Call_Return(Lin_schm_read_msr);
  890. #else
  891. msr_LIN_EXCLUSIVE_AREA_15[u32CoreId] = Lin_schm_read_msr(); /*read MSR (to store interrupts state)*/
  892. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  893. if (ISR_ON(msr_LIN_EXCLUSIVE_AREA_15[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  894. {
  895. OsIf_SuspendAllInterrupts();
  896. #ifdef _ARM_DS5_C_S32K1XX_
  897. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  898. #endif
  899. }
  900. }
  901. reentry_guard_LIN_EXCLUSIVE_AREA_15[u32CoreId]++;
  902. }
  903. void SchM_Exit_Lin_LIN_EXCLUSIVE_AREA_15(void)
  904. {
  905. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  906. reentry_guard_LIN_EXCLUSIVE_AREA_15[u32CoreId]--;
  907. if ((ISR_ON(msr_LIN_EXCLUSIVE_AREA_15[u32CoreId]))&&(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_15[u32CoreId])) /*if interrupts were enabled*/
  908. {
  909. OsIf_ResumeAllInterrupts();
  910. #ifdef _ARM_DS5_C_S32K1XX_
  911. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  912. #endif
  913. }
  914. }
  915. void SchM_Enter_Lin_LIN_EXCLUSIVE_AREA_16(void)
  916. {
  917. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  918. if(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_16[u32CoreId])
  919. {
  920. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT) && (!defined MCAL_PLATFORM_ARM_M0PLUS))
  921. msr_LIN_EXCLUSIVE_AREA_16[u32CoreId] = OsIf_Trusted_Call_Return(Lin_schm_read_msr);
  922. #else
  923. msr_LIN_EXCLUSIVE_AREA_16[u32CoreId] = Lin_schm_read_msr(); /*read MSR (to store interrupts state)*/
  924. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  925. if (ISR_ON(msr_LIN_EXCLUSIVE_AREA_16[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  926. {
  927. OsIf_SuspendAllInterrupts();
  928. #ifdef _ARM_DS5_C_S32K1XX_
  929. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  930. #endif
  931. }
  932. }
  933. reentry_guard_LIN_EXCLUSIVE_AREA_16[u32CoreId]++;
  934. }
  935. void SchM_Exit_Lin_LIN_EXCLUSIVE_AREA_16(void)
  936. {
  937. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  938. reentry_guard_LIN_EXCLUSIVE_AREA_16[u32CoreId]--;
  939. if ((ISR_ON(msr_LIN_EXCLUSIVE_AREA_16[u32CoreId]))&&(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_16[u32CoreId])) /*if interrupts were enabled*/
  940. {
  941. OsIf_ResumeAllInterrupts();
  942. #ifdef _ARM_DS5_C_S32K1XX_
  943. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  944. #endif
  945. }
  946. }
  947. void SchM_Enter_Lin_LIN_EXCLUSIVE_AREA_17(void)
  948. {
  949. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  950. if(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_17[u32CoreId])
  951. {
  952. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT) && (!defined MCAL_PLATFORM_ARM_M0PLUS))
  953. msr_LIN_EXCLUSIVE_AREA_17[u32CoreId] = OsIf_Trusted_Call_Return(Lin_schm_read_msr);
  954. #else
  955. msr_LIN_EXCLUSIVE_AREA_17[u32CoreId] = Lin_schm_read_msr(); /*read MSR (to store interrupts state)*/
  956. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  957. if (ISR_ON(msr_LIN_EXCLUSIVE_AREA_17[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  958. {
  959. OsIf_SuspendAllInterrupts();
  960. #ifdef _ARM_DS5_C_S32K1XX_
  961. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  962. #endif
  963. }
  964. }
  965. reentry_guard_LIN_EXCLUSIVE_AREA_17[u32CoreId]++;
  966. }
  967. void SchM_Exit_Lin_LIN_EXCLUSIVE_AREA_17(void)
  968. {
  969. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  970. reentry_guard_LIN_EXCLUSIVE_AREA_17[u32CoreId]--;
  971. if ((ISR_ON(msr_LIN_EXCLUSIVE_AREA_17[u32CoreId]))&&(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_17[u32CoreId])) /*if interrupts were enabled*/
  972. {
  973. OsIf_ResumeAllInterrupts();
  974. #ifdef _ARM_DS5_C_S32K1XX_
  975. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  976. #endif
  977. }
  978. }
  979. void SchM_Enter_Lin_LIN_EXCLUSIVE_AREA_18(void)
  980. {
  981. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  982. if(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_18[u32CoreId])
  983. {
  984. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT) && (!defined MCAL_PLATFORM_ARM_M0PLUS))
  985. msr_LIN_EXCLUSIVE_AREA_18[u32CoreId] = OsIf_Trusted_Call_Return(Lin_schm_read_msr);
  986. #else
  987. msr_LIN_EXCLUSIVE_AREA_18[u32CoreId] = Lin_schm_read_msr(); /*read MSR (to store interrupts state)*/
  988. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  989. if (ISR_ON(msr_LIN_EXCLUSIVE_AREA_18[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  990. {
  991. OsIf_SuspendAllInterrupts();
  992. #ifdef _ARM_DS5_C_S32K1XX_
  993. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  994. #endif
  995. }
  996. }
  997. reentry_guard_LIN_EXCLUSIVE_AREA_18[u32CoreId]++;
  998. }
  999. void SchM_Exit_Lin_LIN_EXCLUSIVE_AREA_18(void)
  1000. {
  1001. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  1002. reentry_guard_LIN_EXCLUSIVE_AREA_18[u32CoreId]--;
  1003. if ((ISR_ON(msr_LIN_EXCLUSIVE_AREA_18[u32CoreId]))&&(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_18[u32CoreId])) /*if interrupts were enabled*/
  1004. {
  1005. OsIf_ResumeAllInterrupts();
  1006. #ifdef _ARM_DS5_C_S32K1XX_
  1007. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  1008. #endif
  1009. }
  1010. }
  1011. void SchM_Enter_Lin_LIN_EXCLUSIVE_AREA_19(void)
  1012. {
  1013. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  1014. if(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_19[u32CoreId])
  1015. {
  1016. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT) && (!defined MCAL_PLATFORM_ARM_M0PLUS))
  1017. msr_LIN_EXCLUSIVE_AREA_19[u32CoreId] = OsIf_Trusted_Call_Return(Lin_schm_read_msr);
  1018. #else
  1019. msr_LIN_EXCLUSIVE_AREA_19[u32CoreId] = Lin_schm_read_msr(); /*read MSR (to store interrupts state)*/
  1020. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  1021. if (ISR_ON(msr_LIN_EXCLUSIVE_AREA_19[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  1022. {
  1023. OsIf_SuspendAllInterrupts();
  1024. #ifdef _ARM_DS5_C_S32K1XX_
  1025. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  1026. #endif
  1027. }
  1028. }
  1029. reentry_guard_LIN_EXCLUSIVE_AREA_19[u32CoreId]++;
  1030. }
  1031. void SchM_Exit_Lin_LIN_EXCLUSIVE_AREA_19(void)
  1032. {
  1033. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  1034. reentry_guard_LIN_EXCLUSIVE_AREA_19[u32CoreId]--;
  1035. if ((ISR_ON(msr_LIN_EXCLUSIVE_AREA_19[u32CoreId]))&&(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_19[u32CoreId])) /*if interrupts were enabled*/
  1036. {
  1037. OsIf_ResumeAllInterrupts();
  1038. #ifdef _ARM_DS5_C_S32K1XX_
  1039. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  1040. #endif
  1041. }
  1042. }
  1043. void SchM_Enter_Lin_LIN_EXCLUSIVE_AREA_20(void)
  1044. {
  1045. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  1046. if(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_20[u32CoreId])
  1047. {
  1048. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT) && (!defined MCAL_PLATFORM_ARM_M0PLUS))
  1049. msr_LIN_EXCLUSIVE_AREA_20[u32CoreId] = OsIf_Trusted_Call_Return(Lin_schm_read_msr);
  1050. #else
  1051. msr_LIN_EXCLUSIVE_AREA_20[u32CoreId] = Lin_schm_read_msr(); /*read MSR (to store interrupts state)*/
  1052. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  1053. if (ISR_ON(msr_LIN_EXCLUSIVE_AREA_20[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  1054. {
  1055. OsIf_SuspendAllInterrupts();
  1056. #ifdef _ARM_DS5_C_S32K1XX_
  1057. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  1058. #endif
  1059. }
  1060. }
  1061. reentry_guard_LIN_EXCLUSIVE_AREA_20[u32CoreId]++;
  1062. }
  1063. void SchM_Exit_Lin_LIN_EXCLUSIVE_AREA_20(void)
  1064. {
  1065. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  1066. reentry_guard_LIN_EXCLUSIVE_AREA_20[u32CoreId]--;
  1067. if ((ISR_ON(msr_LIN_EXCLUSIVE_AREA_20[u32CoreId]))&&(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_20[u32CoreId])) /*if interrupts were enabled*/
  1068. {
  1069. OsIf_ResumeAllInterrupts();
  1070. #ifdef _ARM_DS5_C_S32K1XX_
  1071. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  1072. #endif
  1073. }
  1074. }
  1075. void SchM_Enter_Lin_LIN_EXCLUSIVE_AREA_21(void)
  1076. {
  1077. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  1078. if(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_21[u32CoreId])
  1079. {
  1080. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT) && (!defined MCAL_PLATFORM_ARM_M0PLUS))
  1081. msr_LIN_EXCLUSIVE_AREA_21[u32CoreId] = OsIf_Trusted_Call_Return(Lin_schm_read_msr);
  1082. #else
  1083. msr_LIN_EXCLUSIVE_AREA_21[u32CoreId] = Lin_schm_read_msr(); /*read MSR (to store interrupts state)*/
  1084. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  1085. if (ISR_ON(msr_LIN_EXCLUSIVE_AREA_21[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  1086. {
  1087. OsIf_SuspendAllInterrupts();
  1088. #ifdef _ARM_DS5_C_S32K1XX_
  1089. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  1090. #endif
  1091. }
  1092. }
  1093. reentry_guard_LIN_EXCLUSIVE_AREA_21[u32CoreId]++;
  1094. }
  1095. void SchM_Exit_Lin_LIN_EXCLUSIVE_AREA_21(void)
  1096. {
  1097. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  1098. reentry_guard_LIN_EXCLUSIVE_AREA_21[u32CoreId]--;
  1099. if ((ISR_ON(msr_LIN_EXCLUSIVE_AREA_21[u32CoreId]))&&(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_21[u32CoreId])) /*if interrupts were enabled*/
  1100. {
  1101. OsIf_ResumeAllInterrupts();
  1102. #ifdef _ARM_DS5_C_S32K1XX_
  1103. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  1104. #endif
  1105. }
  1106. }
  1107. void SchM_Enter_Lin_LIN_EXCLUSIVE_AREA_22(void)
  1108. {
  1109. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  1110. if(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_22[u32CoreId])
  1111. {
  1112. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT) && (!defined MCAL_PLATFORM_ARM_M0PLUS))
  1113. msr_LIN_EXCLUSIVE_AREA_22[u32CoreId] = OsIf_Trusted_Call_Return(Lin_schm_read_msr);
  1114. #else
  1115. msr_LIN_EXCLUSIVE_AREA_22[u32CoreId] = Lin_schm_read_msr(); /*read MSR (to store interrupts state)*/
  1116. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  1117. if (ISR_ON(msr_LIN_EXCLUSIVE_AREA_22[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  1118. {
  1119. OsIf_SuspendAllInterrupts();
  1120. #ifdef _ARM_DS5_C_S32K1XX_
  1121. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  1122. #endif
  1123. }
  1124. }
  1125. reentry_guard_LIN_EXCLUSIVE_AREA_22[u32CoreId]++;
  1126. }
  1127. void SchM_Exit_Lin_LIN_EXCLUSIVE_AREA_22(void)
  1128. {
  1129. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  1130. reentry_guard_LIN_EXCLUSIVE_AREA_22[u32CoreId]--;
  1131. if ((ISR_ON(msr_LIN_EXCLUSIVE_AREA_22[u32CoreId]))&&(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_22[u32CoreId])) /*if interrupts were enabled*/
  1132. {
  1133. OsIf_ResumeAllInterrupts();
  1134. #ifdef _ARM_DS5_C_S32K1XX_
  1135. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  1136. #endif
  1137. }
  1138. }
  1139. void SchM_Enter_Lin_LIN_EXCLUSIVE_AREA_23(void)
  1140. {
  1141. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  1142. if(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_23[u32CoreId])
  1143. {
  1144. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT) && (!defined MCAL_PLATFORM_ARM_M0PLUS))
  1145. msr_LIN_EXCLUSIVE_AREA_23[u32CoreId] = OsIf_Trusted_Call_Return(Lin_schm_read_msr);
  1146. #else
  1147. msr_LIN_EXCLUSIVE_AREA_23[u32CoreId] = Lin_schm_read_msr(); /*read MSR (to store interrupts state)*/
  1148. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  1149. if (ISR_ON(msr_LIN_EXCLUSIVE_AREA_23[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  1150. {
  1151. OsIf_SuspendAllInterrupts();
  1152. #ifdef _ARM_DS5_C_S32K1XX_
  1153. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  1154. #endif
  1155. }
  1156. }
  1157. reentry_guard_LIN_EXCLUSIVE_AREA_23[u32CoreId]++;
  1158. }
  1159. void SchM_Exit_Lin_LIN_EXCLUSIVE_AREA_23(void)
  1160. {
  1161. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  1162. reentry_guard_LIN_EXCLUSIVE_AREA_23[u32CoreId]--;
  1163. if ((ISR_ON(msr_LIN_EXCLUSIVE_AREA_23[u32CoreId]))&&(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_23[u32CoreId])) /*if interrupts were enabled*/
  1164. {
  1165. OsIf_ResumeAllInterrupts();
  1166. #ifdef _ARM_DS5_C_S32K1XX_
  1167. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  1168. #endif
  1169. }
  1170. }
  1171. void SchM_Enter_Lin_LIN_EXCLUSIVE_AREA_24(void)
  1172. {
  1173. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  1174. if(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_24[u32CoreId])
  1175. {
  1176. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT) && (!defined MCAL_PLATFORM_ARM_M0PLUS))
  1177. msr_LIN_EXCLUSIVE_AREA_24[u32CoreId] = OsIf_Trusted_Call_Return(Lin_schm_read_msr);
  1178. #else
  1179. msr_LIN_EXCLUSIVE_AREA_24[u32CoreId] = Lin_schm_read_msr(); /*read MSR (to store interrupts state)*/
  1180. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  1181. if (ISR_ON(msr_LIN_EXCLUSIVE_AREA_24[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  1182. {
  1183. OsIf_SuspendAllInterrupts();
  1184. #ifdef _ARM_DS5_C_S32K1XX_
  1185. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  1186. #endif
  1187. }
  1188. }
  1189. reentry_guard_LIN_EXCLUSIVE_AREA_24[u32CoreId]++;
  1190. }
  1191. void SchM_Exit_Lin_LIN_EXCLUSIVE_AREA_24(void)
  1192. {
  1193. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  1194. reentry_guard_LIN_EXCLUSIVE_AREA_24[u32CoreId]--;
  1195. if ((ISR_ON(msr_LIN_EXCLUSIVE_AREA_24[u32CoreId]))&&(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_24[u32CoreId])) /*if interrupts were enabled*/
  1196. {
  1197. OsIf_ResumeAllInterrupts();
  1198. #ifdef _ARM_DS5_C_S32K1XX_
  1199. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  1200. #endif
  1201. }
  1202. }
  1203. void SchM_Enter_Lin_LIN_EXCLUSIVE_AREA_25(void)
  1204. {
  1205. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  1206. if(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_25[u32CoreId])
  1207. {
  1208. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT) && (!defined MCAL_PLATFORM_ARM_M0PLUS))
  1209. msr_LIN_EXCLUSIVE_AREA_25[u32CoreId] = OsIf_Trusted_Call_Return(Lin_schm_read_msr);
  1210. #else
  1211. msr_LIN_EXCLUSIVE_AREA_25[u32CoreId] = Lin_schm_read_msr(); /*read MSR (to store interrupts state)*/
  1212. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  1213. if (ISR_ON(msr_LIN_EXCLUSIVE_AREA_25[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  1214. {
  1215. OsIf_SuspendAllInterrupts();
  1216. #ifdef _ARM_DS5_C_S32K1XX_
  1217. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  1218. #endif
  1219. }
  1220. }
  1221. reentry_guard_LIN_EXCLUSIVE_AREA_25[u32CoreId]++;
  1222. }
  1223. void SchM_Exit_Lin_LIN_EXCLUSIVE_AREA_25(void)
  1224. {
  1225. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  1226. reentry_guard_LIN_EXCLUSIVE_AREA_25[u32CoreId]--;
  1227. if ((ISR_ON(msr_LIN_EXCLUSIVE_AREA_25[u32CoreId]))&&(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_25[u32CoreId])) /*if interrupts were enabled*/
  1228. {
  1229. OsIf_ResumeAllInterrupts();
  1230. #ifdef _ARM_DS5_C_S32K1XX_
  1231. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  1232. #endif
  1233. }
  1234. }
  1235. void SchM_Enter_Lin_LIN_EXCLUSIVE_AREA_26(void)
  1236. {
  1237. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  1238. if(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_26[u32CoreId])
  1239. {
  1240. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT) && (!defined MCAL_PLATFORM_ARM_M0PLUS))
  1241. msr_LIN_EXCLUSIVE_AREA_26[u32CoreId] = OsIf_Trusted_Call_Return(Lin_schm_read_msr);
  1242. #else
  1243. msr_LIN_EXCLUSIVE_AREA_26[u32CoreId] = Lin_schm_read_msr(); /*read MSR (to store interrupts state)*/
  1244. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  1245. if (ISR_ON(msr_LIN_EXCLUSIVE_AREA_26[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  1246. {
  1247. OsIf_SuspendAllInterrupts();
  1248. #ifdef _ARM_DS5_C_S32K1XX_
  1249. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  1250. #endif
  1251. }
  1252. }
  1253. reentry_guard_LIN_EXCLUSIVE_AREA_26[u32CoreId]++;
  1254. }
  1255. void SchM_Exit_Lin_LIN_EXCLUSIVE_AREA_26(void)
  1256. {
  1257. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  1258. reentry_guard_LIN_EXCLUSIVE_AREA_26[u32CoreId]--;
  1259. if ((ISR_ON(msr_LIN_EXCLUSIVE_AREA_26[u32CoreId]))&&(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_26[u32CoreId])) /*if interrupts were enabled*/
  1260. {
  1261. OsIf_ResumeAllInterrupts();
  1262. #ifdef _ARM_DS5_C_S32K1XX_
  1263. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  1264. #endif
  1265. }
  1266. }
  1267. void SchM_Enter_Lin_LIN_EXCLUSIVE_AREA_27(void)
  1268. {
  1269. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  1270. if(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_27[u32CoreId])
  1271. {
  1272. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT) && (!defined MCAL_PLATFORM_ARM_M0PLUS))
  1273. msr_LIN_EXCLUSIVE_AREA_27[u32CoreId] = OsIf_Trusted_Call_Return(Lin_schm_read_msr);
  1274. #else
  1275. msr_LIN_EXCLUSIVE_AREA_27[u32CoreId] = Lin_schm_read_msr(); /*read MSR (to store interrupts state)*/
  1276. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  1277. if (ISR_ON(msr_LIN_EXCLUSIVE_AREA_27[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  1278. {
  1279. OsIf_SuspendAllInterrupts();
  1280. #ifdef _ARM_DS5_C_S32K1XX_
  1281. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  1282. #endif
  1283. }
  1284. }
  1285. reentry_guard_LIN_EXCLUSIVE_AREA_27[u32CoreId]++;
  1286. }
  1287. void SchM_Exit_Lin_LIN_EXCLUSIVE_AREA_27(void)
  1288. {
  1289. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  1290. reentry_guard_LIN_EXCLUSIVE_AREA_27[u32CoreId]--;
  1291. if ((ISR_ON(msr_LIN_EXCLUSIVE_AREA_27[u32CoreId]))&&(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_27[u32CoreId])) /*if interrupts were enabled*/
  1292. {
  1293. OsIf_ResumeAllInterrupts();
  1294. #ifdef _ARM_DS5_C_S32K1XX_
  1295. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  1296. #endif
  1297. }
  1298. }
  1299. #ifdef MCAL_TESTING_ENVIRONMENT
  1300. /**
  1301. @brief This function checks that all entered exclusive areas were also exited.
  1302. @details This function checks that all entered exclusive areas were also exited. The check
  1303. is done by verifying that all reentry_guard_* static variables are back to the
  1304. zero value.
  1305. @param[in] void No input parameters
  1306. @return void This function does not return a value. Test asserts are used instead.
  1307. @pre None
  1308. @post None
  1309. @remarks Covers
  1310. @remarks Implements
  1311. */
  1312. void SchM_Check_lin(void)
  1313. {
  1314. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  1315. EU_ASSERT(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_00[u32CoreId]);
  1316. reentry_guard_LIN_EXCLUSIVE_AREA_00[u32CoreId] = 0UL; /*reset reentry_guard_LIN_EXCLUSIVE_AREA_00 for the next test in the suite*/
  1317. EU_ASSERT(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_01[u32CoreId]);
  1318. reentry_guard_LIN_EXCLUSIVE_AREA_01[u32CoreId] = 0UL; /*reset reentry_guard_LIN_EXCLUSIVE_AREA_01 for the next test in the suite*/
  1319. EU_ASSERT(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_02[u32CoreId]);
  1320. reentry_guard_LIN_EXCLUSIVE_AREA_02[u32CoreId] = 0UL; /*reset reentry_guard_LIN_EXCLUSIVE_AREA_02 for the next test in the suite*/
  1321. EU_ASSERT(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_03[u32CoreId]);
  1322. reentry_guard_LIN_EXCLUSIVE_AREA_03[u32CoreId] = 0UL; /*reset reentry_guard_LIN_EXCLUSIVE_AREA_03 for the next test in the suite*/
  1323. EU_ASSERT(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_04[u32CoreId]);
  1324. reentry_guard_LIN_EXCLUSIVE_AREA_04[u32CoreId] = 0UL; /*reset reentry_guard_LIN_EXCLUSIVE_AREA_04 for the next test in the suite*/
  1325. EU_ASSERT(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_05[u32CoreId]);
  1326. reentry_guard_LIN_EXCLUSIVE_AREA_05[u32CoreId] = 0UL; /*reset reentry_guard_LIN_EXCLUSIVE_AREA_05 for the next test in the suite*/
  1327. EU_ASSERT(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_06[u32CoreId]);
  1328. reentry_guard_LIN_EXCLUSIVE_AREA_06[u32CoreId] = 0UL; /*reset reentry_guard_LIN_EXCLUSIVE_AREA_06 for the next test in the suite*/
  1329. EU_ASSERT(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_07[u32CoreId]);
  1330. reentry_guard_LIN_EXCLUSIVE_AREA_07[u32CoreId] = 0UL; /*reset reentry_guard_LIN_EXCLUSIVE_AREA_07 for the next test in the suite*/
  1331. EU_ASSERT(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_08[u32CoreId]);
  1332. reentry_guard_LIN_EXCLUSIVE_AREA_08[u32CoreId] = 0UL; /*reset reentry_guard_LIN_EXCLUSIVE_AREA_08 for the next test in the suite*/
  1333. EU_ASSERT(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_09[u32CoreId]);
  1334. reentry_guard_LIN_EXCLUSIVE_AREA_09[u32CoreId] = 0UL; /*reset reentry_guard_LIN_EXCLUSIVE_AREA_09 for the next test in the suite*/
  1335. EU_ASSERT(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_10[u32CoreId]);
  1336. reentry_guard_LIN_EXCLUSIVE_AREA_10[u32CoreId] = 0UL; /*reset reentry_guard_LIN_EXCLUSIVE_AREA_10 for the next test in the suite*/
  1337. EU_ASSERT(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_11[u32CoreId]);
  1338. reentry_guard_LIN_EXCLUSIVE_AREA_11[u32CoreId] = 0UL; /*reset reentry_guard_LIN_EXCLUSIVE_AREA_11 for the next test in the suite*/
  1339. EU_ASSERT(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_12[u32CoreId]);
  1340. reentry_guard_LIN_EXCLUSIVE_AREA_12[u32CoreId] = 0UL; /*reset reentry_guard_LIN_EXCLUSIVE_AREA_12 for the next test in the suite*/
  1341. EU_ASSERT(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_13[u32CoreId]);
  1342. reentry_guard_LIN_EXCLUSIVE_AREA_13[u32CoreId] = 0UL; /*reset reentry_guard_LIN_EXCLUSIVE_AREA_13 for the next test in the suite*/
  1343. EU_ASSERT(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_14[u32CoreId]);
  1344. reentry_guard_LIN_EXCLUSIVE_AREA_14[u32CoreId] = 0UL; /*reset reentry_guard_LIN_EXCLUSIVE_AREA_14 for the next test in the suite*/
  1345. EU_ASSERT(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_15[u32CoreId]);
  1346. reentry_guard_LIN_EXCLUSIVE_AREA_15[u32CoreId] = 0UL; /*reset reentry_guard_LIN_EXCLUSIVE_AREA_15 for the next test in the suite*/
  1347. EU_ASSERT(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_16[u32CoreId]);
  1348. reentry_guard_LIN_EXCLUSIVE_AREA_16[u32CoreId] = 0UL; /*reset reentry_guard_LIN_EXCLUSIVE_AREA_16 for the next test in the suite*/
  1349. EU_ASSERT(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_17[u32CoreId]);
  1350. reentry_guard_LIN_EXCLUSIVE_AREA_17[u32CoreId] = 0UL; /*reset reentry_guard_LIN_EXCLUSIVE_AREA_17 for the next test in the suite*/
  1351. EU_ASSERT(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_18[u32CoreId]);
  1352. reentry_guard_LIN_EXCLUSIVE_AREA_18[u32CoreId] = 0UL; /*reset reentry_guard_LIN_EXCLUSIVE_AREA_18 for the next test in the suite*/
  1353. EU_ASSERT(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_19[u32CoreId]);
  1354. reentry_guard_LIN_EXCLUSIVE_AREA_19[u32CoreId] = 0UL; /*reset reentry_guard_LIN_EXCLUSIVE_AREA_19 for the next test in the suite*/
  1355. EU_ASSERT(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_20[u32CoreId]);
  1356. reentry_guard_LIN_EXCLUSIVE_AREA_20[u32CoreId] = 0UL; /*reset reentry_guard_LIN_EXCLUSIVE_AREA_20 for the next test in the suite*/
  1357. EU_ASSERT(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_21[u32CoreId]);
  1358. reentry_guard_LIN_EXCLUSIVE_AREA_21[u32CoreId] = 0UL; /*reset reentry_guard_LIN_EXCLUSIVE_AREA_21 for the next test in the suite*/
  1359. EU_ASSERT(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_22[u32CoreId]);
  1360. reentry_guard_LIN_EXCLUSIVE_AREA_22[u32CoreId] = 0UL; /*reset reentry_guard_LIN_EXCLUSIVE_AREA_22 for the next test in the suite*/
  1361. EU_ASSERT(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_23[u32CoreId]);
  1362. reentry_guard_LIN_EXCLUSIVE_AREA_23[u32CoreId] = 0UL; /*reset reentry_guard_LIN_EXCLUSIVE_AREA_23 for the next test in the suite*/
  1363. EU_ASSERT(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_24[u32CoreId]);
  1364. reentry_guard_LIN_EXCLUSIVE_AREA_24[u32CoreId] = 0UL; /*reset reentry_guard_LIN_EXCLUSIVE_AREA_24 for the next test in the suite*/
  1365. EU_ASSERT(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_25[u32CoreId]);
  1366. reentry_guard_LIN_EXCLUSIVE_AREA_25[u32CoreId] = 0UL; /*reset reentry_guard_LIN_EXCLUSIVE_AREA_25 for the next test in the suite*/
  1367. EU_ASSERT(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_26[u32CoreId]);
  1368. reentry_guard_LIN_EXCLUSIVE_AREA_26[u32CoreId] = 0UL; /*reset reentry_guard_LIN_EXCLUSIVE_AREA_26 for the next test in the suite*/
  1369. EU_ASSERT(0UL == reentry_guard_LIN_EXCLUSIVE_AREA_27[u32CoreId]);
  1370. reentry_guard_LIN_EXCLUSIVE_AREA_27[u32CoreId] = 0UL; /*reset reentry_guard_LIN_EXCLUSIVE_AREA_27 for the next test in the suite*/
  1371. }
  1372. #endif /*MCAL_TESTING_ENVIRONMENT*/
  1373. #define RTE_STOP_SEC_CODE
  1374. #include "Rte_MemMap.h"
  1375. #ifdef __cplusplus
  1376. }
  1377. #endif
  1378. /** @} */