/* SPDX-License-Identifier: GPL-2.0 */
/*
* Common defines for v7m cpus
*/
#define V7M_SCS_ICTR IOMEM(0 xe000e004)
#define V7M_SCS_ICTR_INTLINESNUM_MASK 0 x0000000f
#define BASEADDR_V7M_SCB IOMEM(0 xe000ed00)
#define V7M_SCB_CPUID 0 x00
#define V7M_SCB_ICSR 0 x04
#define V7M_SCB_ICSR_PENDSVSET (1 << 28 )
#define V7M_SCB_ICSR_PENDSVCLR (1 << 27 )
#define V7M_SCB_ICSR_RETTOBASE (1 << 11 )
#define V7M_SCB_ICSR_VECTACTIVE 0 x000001ff
#define V7M_SCB_VTOR 0 x08
#define V7M_SCB_AIRCR 0 x0c
#define V7M_SCB_AIRCR_VECTKEY (0 x05fa << 16 )
#define V7M_SCB_AIRCR_SYSRESETREQ (1 << 2 )
#define V7M_SCB_SCR 0 x10
#define V7M_SCB_SCR_SLEEPDEEP (1 << 2 )
#define V7M_SCB_CCR 0 x14
#define V7M_SCB_CCR_STKALIGN (1 << 9 )
#define V7M_SCB_CCR_DC (1 << 16 )
#define V7M_SCB_CCR_IC (1 << 17 )
#define V7M_SCB_CCR_BP (1 << 18 )
#define V7M_SCB_SHPR2 0 x1c
#define V7M_SCB_SHPR3 0 x20
#define V7M_SCB_SHCSR 0 x24
#define V7M_SCB_SHCSR_USGFAULTENA (1 << 18 )
#define V7M_SCB_SHCSR_BUSFAULTENA (1 << 17 )
#define V7M_SCB_SHCSR_MEMFAULTENA (1 << 16 )
#define V7M_xPSR_FRAMEPTRALIGN 0 x00000200
#define V7M_xPSR_EXCEPTIONNO V7M_SCB_ICSR_VECTACTIVE
/*
* When branching to an address that has bits [ 31 : 28 ] = = 0 xf an exception return
* occurs . Bits [ 27 : 5 ] are reserved ( SBOP ) . If the processor implements the FP
* extension Bit [ 4 ] defines if the exception frame has space allocated for FP
* state information , SBOP otherwise . Bit [ 3 ] defines the mode that is returned
* to ( 0 - > handler mode ; 1 - > thread mode ) . Bit [ 2 ] defines which sp is used
* ( 0 - > msp ; 1 - > psp ) . Bits [ 1 : 0 ] are fixed to 0 b01 .
*/
#define EXC_RET_STACK_MASK 0 x00000004
#define EXC_RET_THREADMODE_PROCESSSTACK (3 << 2 )
/* Cache related definitions */
#define V7M_SCB_CLIDR 0 x78 /* Cache Level ID register */
#define V7M_SCB_CTR 0 x7c /* Cache Type register */
#define V7M_SCB_CCSIDR 0 x80 /* Cache size ID register */
#define V7M_SCB_CSSELR 0 x84 /* Cache size selection register */
/* Memory-mapped MPU registers for M-class */
#define MPU_TYPE 0 x90
#define MPU_CTRL 0 x94
#define MPU_CTRL_ENABLE 1
#define MPU_CTRL_PRIVDEFENA (1 << 2 )
#define PMSAv7_RNR 0 x98
#define PMSAv7_RBAR 0 x9c
#define PMSAv7_RASR 0 xa0
#define PMSAv8_RNR 0 x98
#define PMSAv8_RBAR 0 x9c
#define PMSAv8_RLAR 0 xa0
#define PMSAv8_RBAR_A(n) (PMSAv8_RBAR + 8 *(n))
#define PMSAv8_RLAR_A(n) (PMSAv8_RLAR + 8 *(n))
#define PMSAv8_MAIR0 0 xc0
#define PMSAv8_MAIR1 0 xc4
/* Cache opeartions */
#define V7M_SCB_ICIALLU 0 x250 /* I-cache invalidate all to PoU */
#define V7M_SCB_ICIMVAU 0 x258 /* I-cache invalidate by MVA to PoU */
#define V7M_SCB_DCIMVAC 0 x25c /* D-cache invalidate by MVA to PoC */
#define V7M_SCB_DCISW 0 x260 /* D-cache invalidate by set-way */
#define V7M_SCB_DCCMVAU 0 x264 /* D-cache clean by MVA to PoU */
#define V7M_SCB_DCCMVAC 0 x268 /* D-cache clean by MVA to PoC */
#define V7M_SCB_DCCSW 0 x26c /* D-cache clean by set-way */
#define V7M_SCB_DCCIMVAC 0 x270 /* D-cache clean and invalidate by MVA to PoC */
#define V7M_SCB_DCCISW 0 x274 /* D-cache clean and invalidate by set-way */
#define V7M_SCB_BPIALL 0 x278 /* D-cache clean and invalidate by set-way */
#ifndef __ASSEMBLY__
enum reboot_mode;
void armv7m_restart(enum reboot_mode mode, const char *cmd);
#endif /* __ASSEMBLY__ */
Messung V0.5 in Prozent C=92 H=100 G=95
¤ Dauer der Verarbeitung: 0.8 Sekunden
(vorverarbeitet am 2026-09-28)
¤
*© Formatika GbR, Deutschland