/* * Version 4 cores have a true harvard style separate instruction * and data cache. Enable data and instruction caches, also enable write * buffers and branch accelerator.
*/ /* attention : enabling CACR_DESB requires a "nop" to flush the store buffer */ /* use '+' instead of '|' for assembler's sake */
/* Enable data cache */ /* Enable data store buffer */ /* outside ACRs : No cache, precise */ /* Enable instruction+branch caches */ #ifdefined(CONFIG_M5407) #define CACHE_MODE (CACR_DEC+CACR_DESB+CACR_DDCM_P+CACR_BEC+CACR_IEC) #else #define CACHE_MODE (CACR_DEC+CACR_DESB+CACR_DDCM_P+CACR_BEC+CACR_IEC+CACR_EUSP) #endif #define CACHE_INIT (CACR_DCINVA+CACR_BCINVA+CACR_ICINVA)
#ifdefined(CONFIG_MMU) /* * If running with the MMU enabled then we need to map the internal * register region as non-cacheable. And then we map all our RAM as * cacheable and supervisor access only.
*/ #define ACR0_MODE (ACR_BA(IOMEMBASE)+ACR_ADMSK(IOMEMSIZE)+ \
ACR_ENABLE+ACR_SUPER+ACR_CM_OFF_PRE+ACR_SP) #ifdefined(CONFIG_CACHE_COPYBACK) #define ACR1_MODE (ACR_BA(CONFIG_RAMBASE)+ACR_ADMSK(CONFIG_RAMSIZE)+ \
ACR_ENABLE+ACR_SUPER+ACR_SP+ACR_CM_CP) #else #define ACR1_MODE (ACR_BA(CONFIG_RAMBASE)+ACR_ADMSK(CONFIG_RAMSIZE)+ \
ACR_ENABLE+ACR_SUPER+ACR_SP+ACR_CM_WT) #endif #define ACR2_MODE 0 #define ACR3_MODE (ACR_BA(CONFIG_RAMBASE)+ACR_ADMSK(CONFIG_RAMSIZE)+ \
ACR_ENABLE+ACR_SUPER+ACR_SP)
#else
/* * For the non-MMU enabled case we map all of RAM as cacheable.
*/ #ifdefined(CONFIG_CACHE_COPYBACK) #define DATA_CACHE_MODE (ACR_ENABLE+ACR_ANY+ACR_CM_CP) #else #define DATA_CACHE_MODE (ACR_ENABLE+ACR_ANY+ACR_CM_WT) #endif #define INSN_CACHE_MODE (ACR_ENABLE+ACR_ANY)
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.