sh4_cache.h File Reference

Back to the index.

Macros
sh4_cache.h File Reference

Go to the source code of this file.

Macros

#define SH4_ICACHE_SIZE   8192
 
#define SH4_DCACHE_SIZE   16384
 
#define SH4_EMODE_ICACHE_SIZE   16384
 
#define SH4_EMODE_DCACHE_SIZE   32768
 
#define SH4_CACHE_LINESZ   32
 
#define SH4_CCR   0xff00001c
 
#define SH4_CCR_EMODE   0x80000000
 
#define SH4_CCR_IIX   0x00008000
 
#define SH4_CCR_ICI   0x00000800
 
#define SH4_CCR_ICE   0x00000100
 
#define SH4_CCR_OIX   0x00000080
 
#define SH4_CCR_ORA   0x00000020
 
#define SH4_CCR_OCI   0x00000008
 
#define SH4_CCR_CB   0x00000004
 
#define SH4_CCR_WT   0x00000002
 
#define SH4_CCR_OCE   0x00000001
 
#define SH4_QACR0   0xff000038
 
#define SH4_QACR1   0xff00003c
 
#define SH4_QACR_AREA_SHIFT   2
 
#define SH4_QACR_AREA_MASK   0x0000001c
 
#define SH4_CCIA   0xf0000000
 
#define CCIA_A   0x00000008 /* associate bit */
 
#define CCIA_ENTRY_SHIFT   5 /* line size 32B */
 
#define CCIA_ENTRY_MASK   0x00001fe0 /* [12:5] 256-entries */
 
#define CCIA_EMODE_ENTRY_MASK   0x00003fe0 /* [13:5] 512-entries */
 
#define CCIA_V   0x00000001
 
#define CCIA_TAGADDR_MASK   0xfffffc00 /* [31:10] */
 
#define SH4_CCID   0xf1000000
 
#define CCID_L_SHIFT   2
 
#define CCID_L_MASK   0x1c /* line-size is 32B */
 
#define CCID_ENTRY_MASK   0x00001fe0 /* [12:5] 256-entries */
 
#define SH4_CCDA   0xf4000000
 
#define CCDA_A   0x00000008 /* associate bit */
 
#define CCDA_ENTRY_SHIFT   5 /* line size 32B */
 
#define CCDA_ENTRY_MASK   0x00003fe0 /* [13:5] 512-entries */
 
#define CCDA_V   0x00000001
 
#define CCDA_U   0x00000002
 
#define CCDA_TAGADDR_MASK   0xfffffc00 /* [31:10] */
 
#define SH4_CCDD   0xf5000000
 
#define SH4_SQ   0xe0000000
 
#define SH4_CACHE_FLUSH()
 
#define SH4_EMODE_CACHE_FLUSH()
 
#define SH7750_CACHE_FLUSH()   SH4_CACHE_FLUSH()
 
#define SH7750S_CACHE_FLUSH()   SH4_CACHE_FLUSH()
 
#define SH7751_CACHE_FLUSH()   SH4_CACHE_FLUSH()
 
#define SH7750R_CACHE_FLUSH()   SH4_EMODE_CACHE_FLUSH()
 
#define SH7751R_CACHE_FLUSH()   SH4_EMODE_CACHE_FLUSH()
 

Macro Definition Documentation

◆ CCDA_A

#define CCDA_A   0x00000008 /* associate bit */

Definition at line 92 of file sh4_cache.h.

◆ CCDA_ENTRY_MASK

#define CCDA_ENTRY_MASK   0x00003fe0 /* [13:5] 512-entries */

Definition at line 94 of file sh4_cache.h.

◆ CCDA_ENTRY_SHIFT

#define CCDA_ENTRY_SHIFT   5 /* line size 32B */

Definition at line 93 of file sh4_cache.h.

◆ CCDA_TAGADDR_MASK

#define CCDA_TAGADDR_MASK   0xfffffc00 /* [31:10] */

Definition at line 98 of file sh4_cache.h.

◆ CCDA_U

#define CCDA_U   0x00000002

Definition at line 97 of file sh4_cache.h.

◆ CCDA_V

#define CCDA_V   0x00000001

Definition at line 96 of file sh4_cache.h.

◆ CCIA_A

#define CCIA_A   0x00000008 /* associate bit */

Definition at line 75 of file sh4_cache.h.

◆ CCIA_EMODE_ENTRY_MASK

#define CCIA_EMODE_ENTRY_MASK   0x00003fe0 /* [13:5] 512-entries */

Definition at line 78 of file sh4_cache.h.

◆ CCIA_ENTRY_MASK

#define CCIA_ENTRY_MASK   0x00001fe0 /* [12:5] 256-entries */

Definition at line 77 of file sh4_cache.h.

◆ CCIA_ENTRY_SHIFT

#define CCIA_ENTRY_SHIFT   5 /* line size 32B */

Definition at line 76 of file sh4_cache.h.

◆ CCIA_TAGADDR_MASK

#define CCIA_TAGADDR_MASK   0xfffffc00 /* [31:10] */

Definition at line 81 of file sh4_cache.h.

◆ CCIA_V

#define CCIA_V   0x00000001

Definition at line 80 of file sh4_cache.h.

◆ CCID_ENTRY_MASK

#define CCID_ENTRY_MASK   0x00001fe0 /* [12:5] 256-entries */

Definition at line 87 of file sh4_cache.h.

◆ CCID_L_MASK

#define CCID_L_MASK   0x1c /* line-size is 32B */

Definition at line 86 of file sh4_cache.h.

◆ CCID_L_SHIFT

#define CCID_L_SHIFT   2

Definition at line 85 of file sh4_cache.h.

◆ SH4_CACHE_FLUSH

#define SH4_CACHE_FLUSH ( )
Value:
do { \
uint32_t __e, __a; \
\
/* D-cache */ \
for (__e = 0; __e < (SH4_DCACHE_SIZE / SH4_CACHE_LINESZ); __e++) {\
__a = SH4_CCDA | (__e << CCDA_ENTRY_SHIFT); \
(*(volatile uint32_t *)__a) &= ~(CCDA_U | CCDA_V); \
} \
/* I-cache */ \
for (__e = 0; __e < (SH4_ICACHE_SIZE / SH4_CACHE_LINESZ); __e++) {\
__a = SH4_CCIA | (__e << CCIA_ENTRY_SHIFT); \
(*(volatile uint32_t *)__a) &= ~(CCIA_V); \
} \
} while(/*CONSTCOND*/0)

Definition at line 108 of file sh4_cache.h.

◆ SH4_CACHE_LINESZ

#define SH4_CACHE_LINESZ   32

Definition at line 53 of file sh4_cache.h.

◆ SH4_CCDA

#define SH4_CCDA   0xf4000000

Definition at line 90 of file sh4_cache.h.

◆ SH4_CCDD

#define SH4_CCDD   0xf5000000

Definition at line 100 of file sh4_cache.h.

◆ SH4_CCIA

#define SH4_CCIA   0xf0000000

Definition at line 73 of file sh4_cache.h.

◆ SH4_CCID

#define SH4_CCID   0xf1000000

Definition at line 83 of file sh4_cache.h.

◆ SH4_CCR

#define SH4_CCR   0xff00001c

Definition at line 55 of file sh4_cache.h.

◆ SH4_CCR_CB

#define SH4_CCR_CB   0x00000004

Definition at line 63 of file sh4_cache.h.

◆ SH4_CCR_EMODE

#define SH4_CCR_EMODE   0x80000000

Definition at line 56 of file sh4_cache.h.

◆ SH4_CCR_ICE

#define SH4_CCR_ICE   0x00000100

Definition at line 59 of file sh4_cache.h.

◆ SH4_CCR_ICI

#define SH4_CCR_ICI   0x00000800

Definition at line 58 of file sh4_cache.h.

◆ SH4_CCR_IIX

#define SH4_CCR_IIX   0x00008000

Definition at line 57 of file sh4_cache.h.

◆ SH4_CCR_OCE

#define SH4_CCR_OCE   0x00000001

Definition at line 65 of file sh4_cache.h.

◆ SH4_CCR_OCI

#define SH4_CCR_OCI   0x00000008

Definition at line 62 of file sh4_cache.h.

◆ SH4_CCR_OIX

#define SH4_CCR_OIX   0x00000080

Definition at line 60 of file sh4_cache.h.

◆ SH4_CCR_ORA

#define SH4_CCR_ORA   0x00000020

Definition at line 61 of file sh4_cache.h.

◆ SH4_CCR_WT

#define SH4_CCR_WT   0x00000002

Definition at line 64 of file sh4_cache.h.

◆ SH4_DCACHE_SIZE

#define SH4_DCACHE_SIZE   16384

Definition at line 50 of file sh4_cache.h.

◆ SH4_EMODE_CACHE_FLUSH

#define SH4_EMODE_CACHE_FLUSH ( )
Value:
do { \
uint32_t __e, __a; \
\
/* D-cache */ \
for (__e = 0;__e < (SH4_EMODE_DCACHE_SIZE / SH4_CACHE_LINESZ);__e++) {\
__a = SH4_CCDA | (__e << CCDA_ENTRY_SHIFT); \
(*(volatile uint32_t *)__a) &= ~(CCDA_U | CCDA_V); \
} \
/* I-cache */ \
for (__e = 0;__e < (SH4_EMODE_ICACHE_SIZE / SH4_CACHE_LINESZ);__e++) {\
__a = SH4_CCIA | (__e << CCIA_ENTRY_SHIFT); \
(*(volatile uint32_t *)__a) &= ~(CCIA_V); \
} \
} while(/*CONSTCOND*/0)

Definition at line 124 of file sh4_cache.h.

◆ SH4_EMODE_DCACHE_SIZE

#define SH4_EMODE_DCACHE_SIZE   32768

Definition at line 52 of file sh4_cache.h.

◆ SH4_EMODE_ICACHE_SIZE

#define SH4_EMODE_ICACHE_SIZE   16384

Definition at line 51 of file sh4_cache.h.

◆ SH4_ICACHE_SIZE

#define SH4_ICACHE_SIZE   8192

Definition at line 49 of file sh4_cache.h.

◆ SH4_QACR0

#define SH4_QACR0   0xff000038

Definition at line 67 of file sh4_cache.h.

◆ SH4_QACR1

#define SH4_QACR1   0xff00003c

Definition at line 68 of file sh4_cache.h.

◆ SH4_QACR_AREA_MASK

#define SH4_QACR_AREA_MASK   0x0000001c

Definition at line 70 of file sh4_cache.h.

◆ SH4_QACR_AREA_SHIFT

#define SH4_QACR_AREA_SHIFT   2

Definition at line 69 of file sh4_cache.h.

◆ SH4_SQ

#define SH4_SQ   0xe0000000

Definition at line 103 of file sh4_cache.h.

◆ SH7750_CACHE_FLUSH

#define SH7750_CACHE_FLUSH ( )    SH4_CACHE_FLUSH()

Definition at line 140 of file sh4_cache.h.

◆ SH7750R_CACHE_FLUSH

#define SH7750R_CACHE_FLUSH ( )    SH4_EMODE_CACHE_FLUSH()

Definition at line 147 of file sh4_cache.h.

◆ SH7750S_CACHE_FLUSH

#define SH7750S_CACHE_FLUSH ( )    SH4_CACHE_FLUSH()

Definition at line 141 of file sh4_cache.h.

◆ SH7751_CACHE_FLUSH

#define SH7751_CACHE_FLUSH ( )    SH4_CACHE_FLUSH()

Definition at line 142 of file sh4_cache.h.

◆ SH7751R_CACHE_FLUSH

#define SH7751R_CACHE_FLUSH ( )    SH4_EMODE_CACHE_FLUSH()

Definition at line 148 of file sh4_cache.h.

SH4_DCACHE_SIZE
#define SH4_DCACHE_SIZE
Definition: sh4_cache.h:50
SH4_CCDA
#define SH4_CCDA
Definition: sh4_cache.h:90
CCDA_V
#define CCDA_V
Definition: sh4_cache.h:96
SH4_EMODE_ICACHE_SIZE
#define SH4_EMODE_ICACHE_SIZE
Definition: sh4_cache.h:51
SH4_CCIA
#define SH4_CCIA
Definition: sh4_cache.h:73
CCIA_ENTRY_SHIFT
#define CCIA_ENTRY_SHIFT
Definition: sh4_cache.h:76
SH4_CACHE_LINESZ
#define SH4_CACHE_LINESZ
Definition: sh4_cache.h:53
CCIA_V
#define CCIA_V
Definition: sh4_cache.h:80
CCDA_U
#define CCDA_U
Definition: sh4_cache.h:97
SH4_EMODE_DCACHE_SIZE
#define SH4_EMODE_DCACHE_SIZE
Definition: sh4_cache.h:52
SH4_ICACHE_SIZE
#define SH4_ICACHE_SIZE
Definition: sh4_cache.h:49
CCDA_ENTRY_SHIFT
#define CCDA_ENTRY_SHIFT
Definition: sh4_cache.h:93

Generated on Tue Mar 24 2020 14:04:48 for GXemul by doxygen 1.8.17