microblaze: Use MICROBLAZE_TLB_SIZE in asm code

TLB size was hardcoded in asm code. This patch brings ability
to change TLB size only in one place. (mmu.h).

Signed-off-by: Michal Simek <monstr@monstr.eu>
This commit is contained in:
Michal Simek 2010-03-24 10:09:17 +01:00
parent 9373dd6ab1
commit 0691c97d74
2 changed files with 3 additions and 3 deletions

View File

@ -134,7 +134,7 @@ _copy_bram:
* virtual to physical. * virtual to physical.
*/ */
nop nop
addik r3, r0, 63 /* Invalidate all TLB entries */ addik r3, r0, MICROBLAZE_TLB_SIZE -1 /* Invalidate all TLB entries */
_invalidate: _invalidate:
mts rtlbx, r3 mts rtlbx, r3
mts rtlbhi, r0 /* flush: ensure V is clear */ mts rtlbhi, r0 /* flush: ensure V is clear */

View File

@ -29,7 +29,7 @@
.type _tlbia, @function .type _tlbia, @function
.align 4; .align 4;
_tlbia: _tlbia:
addik r12, r0, 63 /* flush all entries (63 - 3) */ addik r12, r0, MICROBLAZE_TLB_SIZE - 1 /* flush all entries (63 - 3) */
/* isync */ /* isync */
_tlbia_1: _tlbia_1:
mts rtlbx, r12 mts rtlbx, r12
@ -75,7 +75,7 @@ early_console_reg_tlb_alloc:
* Load a TLB entry for the UART, so that microblaze_progress() can use * Load a TLB entry for the UART, so that microblaze_progress() can use
* the UARTs nice and early. We use a 4k real==virtual mapping. * the UARTs nice and early. We use a 4k real==virtual mapping.
*/ */
ori r4, r0, 63 ori r4, r0, MICROBLAZE_TLB_SIZE - 1
mts rtlbx, r4 /* TLB slot 2 */ mts rtlbx, r4 /* TLB slot 2 */
or r4,r5,r0 or r4,r5,r0