1 /* SPDX-License-Identifier: GPL-2.0 */ 1 2 /* 3 * Common defines for v7m cpus 4 */ 5 #define V7M_SCS_ICTR IOMEM( 6 #define V7M_SCS_ICTR_INTLINESNUM_MASK 7 8 #define BASEADDR_V7M_SCB IOMEM( 9 10 #define V7M_SCB_CPUID 0x00 11 12 #define V7M_SCB_ICSR 0x04 13 #define V7M_SCB_ICSR_PENDSVSET 14 #define V7M_SCB_ICSR_PENDSVCLR 15 #define V7M_SCB_ICSR_RETTOBASE 16 #define V7M_SCB_ICSR_VECTACTIVE 17 18 #define V7M_SCB_VTOR 0x08 19 20 #define V7M_SCB_AIRCR 0x0c 21 #define V7M_SCB_AIRCR_VECTKEY 22 #define V7M_SCB_AIRCR_SYSRESETREQ 23 24 #define V7M_SCB_SCR 0x10 25 #define V7M_SCB_SCR_SLEEPDEEP 26 27 #define V7M_SCB_CCR 0x14 28 #define V7M_SCB_CCR_STKALIGN 29 #define V7M_SCB_CCR_DC 30 #define V7M_SCB_CCR_IC 31 #define V7M_SCB_CCR_BP 32 33 #define V7M_SCB_SHPR2 0x1c 34 #define V7M_SCB_SHPR3 0x20 35 36 #define V7M_SCB_SHCSR 0x24 37 #define V7M_SCB_SHCSR_USGFAULTENA 38 #define V7M_SCB_SHCSR_BUSFAULTENA 39 #define V7M_SCB_SHCSR_MEMFAULTENA 40 41 #define V7M_xPSR_FRAMEPTRALIGN 42 #define V7M_xPSR_EXCEPTIONNO 43 44 /* 45 * When branching to an address that has bits 46 * occurs. Bits [27:5] are reserved (SBOP). If 47 * extension Bit [4] defines if the exception 48 * state information, SBOP otherwise. Bit [3] 49 * to (0 -> handler mode; 1 -> thread mode). B 50 * (0 -> msp; 1 -> psp). Bits [1:0] are fixed 51 */ 52 #define EXC_RET_STACK_MASK 53 #define EXC_RET_THREADMODE_PROCESSSTACK 54 55 /* Cache related definitions */ 56 57 #define V7M_SCB_CLIDR 0x78 /* Cac 58 #define V7M_SCB_CTR 0x7c /* Cac 59 #define V7M_SCB_CCSIDR 0x80 /* Cac 60 #define V7M_SCB_CSSELR 0x84 /* Cac 61 62 /* Memory-mapped MPU registers for M-class */ 63 #define MPU_TYPE 0x90 64 #define MPU_CTRL 0x94 65 #define MPU_CTRL_ENABLE 1 66 #define MPU_CTRL_PRIVDEFENA (1 << 2) 67 68 #define PMSAv7_RNR 0x98 69 #define PMSAv7_RBAR 0x9c 70 #define PMSAv7_RASR 0xa0 71 72 #define PMSAv8_RNR 0x98 73 #define PMSAv8_RBAR 0x9c 74 #define PMSAv8_RLAR 0xa0 75 #define PMSAv8_RBAR_A(n) (PMSAv8_RBAR + 76 #define PMSAv8_RLAR_A(n) (PMSAv8_RLAR + 77 #define PMSAv8_MAIR0 0xc0 78 #define PMSAv8_MAIR1 0xc4 79 80 /* Cache opeartions */ 81 #define V7M_SCB_ICIALLU 0x250 /* I-c 82 #define V7M_SCB_ICIMVAU 0x258 /* I-c 83 #define V7M_SCB_DCIMVAC 0x25c /* D-c 84 #define V7M_SCB_DCISW 0x260 /* D-c 85 #define V7M_SCB_DCCMVAU 0x264 /* D-c 86 #define V7M_SCB_DCCMVAC 0x268 /* D-c 87 #define V7M_SCB_DCCSW 0x26c /* D-c 88 #define V7M_SCB_DCCIMVAC 0x270 /* D-c 89 #define V7M_SCB_DCCISW 0x274 /* D-c 90 #define V7M_SCB_BPIALL 0x278 /* D-c 91 92 #ifndef __ASSEMBLY__ 93 94 enum reboot_mode; 95 96 void armv7m_restart(enum reboot_mode mode, con 97 98 #endif /* __ASSEMBLY__ */ 99
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.