1 #ifndef __MIPS_H__ 2 #define __MIPS_H__ 3 4 #define CP0_INDEX $0 5 #define CP0_ENTRYLO0 $2 6 #define CP0_ENTRYLO1 $3 7 #define CP0_CONTEXT $4 8 #define CP0_PAGEMASK $5 9 #define CP0_WIRED $6 10 #define CP0_ENTRYHI $10 11 #define CP0_STATUS $12 12 #define CP0_CAUSE $13 13 #define CP0_EPC $14 14 #define CP0_CONFIG $16 15 #define CP0_WATCHLO $18 16 #define CP0_TAGLO $28 17 #define CP0_TAGHI $29 18 19 #define STATUS_CP0 0x10000000 20 #define STATUS_BEV 0x00400000 21 #define STATUS_IRQ 0x0000fc00 22 #define STATUS_UM 0x00000010 23 #define STATUS_ERL 0x00000004 24 #define STATUS_EXL 0x00000002 25 #define STATUS_IE 0x00000001 26 27 #define CAUSE_IV 0x00800000 28 29 #define TLB_CACHED 0x00000018 30 #define TLB_UNCACHED 0x00000010 31 #define TLB_DIRTY 0x00000004 32 #define TLB_VALID 0x00000002 33 #define TLB_GLOBAL 0x00000001 34 35 #define TLB_READ (TLB_CACHED | TLB_VALID) 36 #define TLB_WRITE (TLB_CACHED | TLB_DIRTY | TLB_VALID) 37 #define TLB_ALL_READ (TLB_CACHED | TLB_VALID | TLB_GLOBAL) 38 #define TLB_ALL_WRITE (TLB_CACHED | TLB_DIRTY | TLB_VALID | TLB_GLOBAL) 39 40 #endif /* __MIPS_H__ */