Skip to content

Commit 195b14d

Browse files
committed
[nrf noup] Add missing CPPWR for ARM V8M
This is a workaround, TF-M v2.3 introduced a patch file for the CMSIS where it includes missing definitions for CPPWR. I don't want want to fork CMSIS just for that, or try to update CMSIS for the whole Zephyr with this PR. So I patched the relevant code for the cortex-m33 in TF-M in the file that uses it. This is not ideal but also not a big issue because the patch has been submitted and merged in the upstream repo: ARM-software/CMSIS_6#243 So this commit can be dropped when Zephyr updates to a version that includes this change. Signed-off-by: Georgios Vasilakis <georgios.vasilakis@nordicsemi.no>
1 parent a36badf commit 195b14d

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

secure_fw/spm/core/arch/tfm_arch_v8m_main.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,21 @@
2323

2424
#include "compiler_ext_defs.h" /* Keep last. */
2525

26+
#if defined(__ARM_ARCH_8M_MAIN__)
27+
/** \brief SCnSCB Coprocessor Power Control Register Definitions */
28+
#define SCnSCB_CPPWR_SUS11_Pos 23U /*!< CPPWR: SUS11 Position */
29+
#define SCnSCB_CPPWR_SUS11_Msk (1UL << SCnSCB_CPPWR_SUS11_Pos) /*!< CPPWR: SUS11 Mask */
30+
31+
#define SCnSCB_CPPWR_SU11_Pos 22U /*!< CPPWR: SU11 Position */
32+
#define SCnSCB_CPPWR_SU11_Msk (1UL << SCnSCB_CPPWR_SU11_Pos) /*!< CPPWR: SU11 Mask */
33+
34+
#define SCnSCB_CPPWR_SUS10_Pos 21U /*!< CPPWR: SUS10 Position */
35+
#define SCnSCB_CPPWR_SUS10_Msk (1UL << SCnSCB_CPPWR_SUS10_Pos) /*!< CPPWR: SUS10 Mask */
36+
37+
#define SCnSCB_CPPWR_SU10_Pos 20U /*!< CPPWR: SU10 Position */
38+
#define SCnSCB_CPPWR_SU10_Msk (1UL << SCnSCB_CPPWR_SU10_Pos) /*!< CPPWR: SU10 Mask */
39+
#endif
40+
2641
#if !defined(__ARM_ARCH_8M_MAIN__) && !defined(__ARM_ARCH_8_1M_MAIN__)
2742
#error "Unsupported ARM Architecture."
2843
#endif

0 commit comments

Comments
 (0)