diff options
Diffstat (limited to 'firmware/target/mips/mmu-mips.c')
-rw-r--r-- | firmware/target/mips/mmu-mips.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/firmware/target/mips/mmu-mips.c b/firmware/target/mips/mmu-mips.c index 3c1b932325..570b209e3a 100644 --- a/firmware/target/mips/mmu-mips.c +++ b/firmware/target/mips/mmu-mips.c | |||
@@ -99,14 +99,15 @@ static void add_wired_entry(unsigned long entrylo0, unsigned long entrylo1, | |||
99 | restore_irq(old_irq); | 99 | restore_irq(old_irq); |
100 | } | 100 | } |
101 | 101 | ||
102 | void map_address(unsigned long virtual, unsigned long physical, unsigned long length) | 102 | void map_address(unsigned long virtual, unsigned long physical, |
103 | unsigned long length, unsigned int cache_flags) | ||
103 | { | 104 | { |
104 | unsigned long entry0 = (physical & PFN_MASK) << PFN_SHIFT; | 105 | unsigned long entry0 = (physical & PFN_MASK) << PFN_SHIFT; |
105 | unsigned long entry1 = ((physical+length) & PFN_MASK) << PFN_SHIFT; | 106 | unsigned long entry1 = ((physical+length) & PFN_MASK) << PFN_SHIFT; |
106 | unsigned long entryhi = virtual & ~VPN2_SHIFT; | 107 | unsigned long entryhi = virtual & ~VPN2_SHIFT; |
107 | 108 | ||
108 | entry0 |= (M_EntryLoG | M_EntryLoV | (K_CacheAttrC << S_EntryLoC) ); | 109 | entry0 |= (M_EntryLoG | M_EntryLoV | (cache_flags << S_EntryLoC) ); |
109 | entry1 |= (M_EntryLoG | M_EntryLoV | (K_CacheAttrC << S_EntryLoC) ); | 110 | entry1 |= (M_EntryLoG | M_EntryLoV | (cache_flags << S_EntryLoC) ); |
110 | 111 | ||
111 | add_wired_entry(entry0, entry1, entryhi, DEFAULT_PAGE_MASK); | 112 | add_wired_entry(entry0, entry1, entryhi, DEFAULT_PAGE_MASK); |
112 | } | 113 | } |
@@ -119,7 +120,7 @@ void tlb_init(void) | |||
119 | 120 | ||
120 | local_flush_tlb_all(); | 121 | local_flush_tlb_all(); |
121 | /* | 122 | /* |
122 | map_address(0x80000000, 0x80000000, 0x4000); | 123 | map_address(0x80000000, 0x80000000, 0x4000, K_CacheAttrC); |
123 | map_address(0x80004000, 0x80004000, MEM * 0x100000); | 124 | map_address(0x80004000, 0x80004000, MEM * 0x100000, K_CacheAttrC); |
124 | */ | 125 | */ |
125 | } | 126 | } |