BOOTLOADER
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
mmu.h
Go to the documentation of this file.
1 /************************************************
2  NAME : MMU.H
3  DESC :
4  Revision: 02.28.2002 ver 0.0
5  ************************************************/
6 
7 #include "2440slib.h"
8 
9 #ifndef __MMU_H__
10 #define __MMU_H__
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14 
15 #define DESC_SEC (0x2|(1<<4))
16 #define CB (3<<2) //cache_on, write_back
17 #define CNB (2<<2) //cache_on, write_through
18 #define NCB (1<<2) //cache_off,WR_BUF on
19 #define NCNB (0<<2) //cache_off,WR_BUF off
20 #define AP_RW (3<<10) //supervisor=RW, user=RW
21 #define AP_RO (2<<10) //supervisor=RW, user=RO
22 
23 #define DOMAIN_FAULT (0x0)
24 #define DOMAIN_CHK (0x1)
25 #define DOMAIN_NOTCHK (0x3)
26 #define DOMAIN0 (0x0<<5)
27 #define DOMAIN1 (0x1<<5)
28 
29 #define DOMAIN0_ATTR (DOMAIN_CHK<<0)
30 #define DOMAIN1_ATTR (DOMAIN_FAULT<<2)
31 
32 #define RW_CB (AP_RW|DOMAIN0|CB|DESC_SEC)
33 #define RW_CNB (AP_RW|DOMAIN0|CNB|DESC_SEC)
34 #define RW_NCNB (AP_RW|DOMAIN0|NCNB|DESC_SEC)
35 #define RW_FAULT (AP_RW|DOMAIN1|NCNB|DESC_SEC)
36 
37 void MMU_Init(void);
38 void MMU_SetMTT(int vaddrStart,int vaddrEnd,int paddrStart,int attr);
39 void ChangeRomCacheStatus(int attr);
40 
41 #ifdef __cplusplus
42 }
43 #endif
44 
45 #endif /*__MMU_H__*/