minor fix for tlb manipulations

Naoki Hamada nao at tom-yam.or.jp
Wed Apr 23 04:30:33 UTC 2008


Hi,

I found a slight problem in tlb.S which tries to manipulate
no-existing tlbs. The argument of Mips_TLBFlush() and mips_TBIAP() is
the number of tlbs to deal with, but both functions process the same
number of tlb pairs, so twice the number of actual tlbs.

TLBWI entry of "MIPS32 Architecture For Programmers Volume II: The
MIPS32 Instruction Set" states that "The operation is UNDEFINED if the
contents of the Index register are greater than or equal to the number
of TLB entries in the processor." It seems to do no harm to my system,
but your mileage may vary.

Included patches remedy this problem, but strictly speaking, it does
not properly works if the argument is an odd number, I hardly imagine
in which situation it occurs.

Naoki Hamada
nao at tom-yam.or.jp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tlb.diff
Type: application/octet-stream
Size: 789 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-mips/attachments/20080423/1e42b0f5/tlb.obj


More information about the freebsd-mips mailing list