⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 initcache.s

📁 realview22.rar
💻 S
字号:
;;  Copyright ARM Ltd 2002. All rights reserved.
;;
;;  This code enables caches on a 92X core
;;
;;  It is called by $Sub$$main(), before the main application is entered
;;
;;  This code must be run from a privileged mode

        PRESERVE8

        AREA   INIT92XCACHE, CODE, READONLY      ; name this block of code

        EXPORT cache_init
cache_init     FUNCTION

;
; Set global core configurations
;===============================
;
        MRC     p15, 0, r0, c1, c0, 0       ; read CP15 register 1 into r0

        ORR     r0, r0, #(0x1  <<12)        ; enable I Cache
        ORR     r0, r0, #(0x1  <<2)         ; enable D Cache

        MCR     p15, 0, r0, c1, c0, 0       ; write CP15 register 1
        MOV     pc, lr
        ENDFUNC
        
        END                                 ; mark the end of this file

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -