Rev 319 | Rev 329 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 319 | Rev 326 | ||
---|---|---|---|
Line 32... | Line 32... | ||
32 | #include <arch/types.h> |
32 | #include <arch/types.h> |
33 | 33 | ||
34 | #define cp0_status_ie_enabled_bit (1<<0) |
34 | #define cp0_status_ie_enabled_bit (1<<0) |
35 | #define cp0_status_exl_exception_bit (1<<1) |
35 | #define cp0_status_exl_exception_bit (1<<1) |
36 | #define cp0_status_erl_error_bit (1<<2) |
36 | #define cp0_status_erl_error_bit (1<<2) |
37 | #define cp0_status_bev_bootstrap_bit (1<<22) |
- | |
38 | #define cp0_status_um_bit (1<<4) |
37 | #define cp0_status_um_bit (1<<4) |
- | 38 | #define cp0_status_bev_bootstrap_bit (1<<22) |
|
- | 39 | #define cp0_status_fpu_bit (1<<29) |
|
39 | 40 | ||
40 | #define cp0_status_im7_shift 15 |
41 | #define cp0_status_im7_shift 15 |
41 | /* |
42 | /* |
42 | * Magic value for use in msim. |
43 | * Magic value for use in msim. |
43 | * On AMD Duron 800Mhz, this roughly seems like one us. |
44 | * On AMD Duron 800Mhz, this roughly seems like one us. |
44 | */ |
45 | */ |
45 | #define cp0_compare_value 10000 |
46 | #define cp0_compare_value 10000 |
46 | 47 | ||
- | 48 | static inline void tlbp(void) |
|
- | 49 | { |
|
- | 50 | __asm__ volatile ("tlbp"); |
|
- | 51 | } |
|
- | 52 | ||
- | 53 | static inline void tlbr(void) |
|
- | 54 | { |
|
- | 55 | __asm__ volatile ("tlbr"); |
|
- | 56 | } |
|
- | 57 | static inline void tlbwi(void) |
|
- | 58 | { |
|
- | 59 | __asm__ volatile ("tlbwi"); |
|
- | 60 | } |
|
- | 61 | static inline void tlbwr(void) |
|
- | 62 | { |
|
- | 63 | __asm__ volatile ("tlbwr"); |
|
- | 64 | } |
|
- | 65 | ||
- | 66 | ||
- | 67 | ||
47 | extern __u32 cp0_index_read(void); |
68 | extern __u32 cp0_index_read(void); |
48 | extern void cp0_idnex_write(__u32 val); |
69 | extern void cp0_idnex_write(__u32 val); |
49 | 70 | ||
50 | extern __u32 cp0_random_read(void); |
71 | extern __u32 cp0_random_read(void); |
51 | 72 | ||
Line 84... | Line 105... | ||
84 | extern __u32 cp0_epc_read(void); |
105 | extern __u32 cp0_epc_read(void); |
85 | extern void cp0_epc_write(__u32 val); |
106 | extern void cp0_epc_write(__u32 val); |
86 | 107 | ||
87 | extern __u32 cp0_prid_read(void); |
108 | extern __u32 cp0_prid_read(void); |
88 | 109 | ||
89 | extern void tlbp(void); |
- | |
90 | extern void tlbr(void); |
- | |
91 | extern void tlbwi(void); |
- | |
92 | extern void tlbwr(void); |
- | |
93 | - | ||
94 | #endif |
110 | #endif |