Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Apr 2008 13:03:52 +0900
From:      "Naoki Hamada" <nao@tom-yam.or.jp>
To:        freebsd-mips@freebsd.org
Subject:   minor fix for tlb manipulations
Message-ID:  <2da2ec620804222103r7e90af37j2d36b0f0bc049abb@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
------=_Part_16944_4087999.1208923432996
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

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@tom-yam.or.jp

------=_Part_16944_4087999.1208923432996
Content-Type: application/octet-stream; name=tlb.diff
Content-Transfer-Encoding: base64
X-Attachment-Id: f_ffdded6a1
Content-Disposition: attachment; filename=tlb.diff

ZGlmZiAtdXIgc3JjLm9yaWcvc3lzL21pcHMvbWlwcy90bGIuUyBzcmMvc3lzL21pcHMvbWlwcy90
bGIuUwotLS0gc3JjLm9yaWcvc3lzL21pcHMvbWlwcy90bGIuUwkyMDA4LTAzLTMxIDE1OjU1OjU2
LjAwMDAwMDAwMCArMDkwMAorKysgc3JjL3N5cy9taXBzL21pcHMvdGxiLlMJMjAwOC0wNC0yMiAw
OToyNToxMy4wMDAwMDAwMDAgKzA5MDAKQEAgLTIzOSw2ICsyMzksNyBAQAogCV9NVEMwCXplcm8s
IENPUF8wX1RMQl9MTzAJCSMgWmVybyBvdXQgbG93IGVudHJ5MC4KIAlfTVRDMAl6ZXJvLCBDT1Bf
MF9UTEJfTE8xCQkjIFplcm8gb3V0IGxvdyBlbnRyeTEuCiAJbXRjMAl6ZXJvLCBDT1BfMF9UTEJf
UEdfTUFTSyAJIyBaZXJvIG91dCBtYXNrIGVudHJ5LgorCXNybAlhMCwgYTAsIDEJCQkjIGFzc3Vt
ZSBldmVuIG51bWJlcgkKIC8qCiAgKiBBbGlnbiB0aGUgc3RhcnRpbmcgdmFsdWUgKHQxKSBhbmQg
dGhlIHVwcGVyIGJvdW5kIChhMCkuCiAgKi8KQEAgLTQ3MSw3ICs0NzIsNyBAQAogCW10YzAJemVy
bywgQ09QXzBfU1RBVFVTX1JFRwkJIyBkaXNhYmxlIGludGVycnVwdHMKIAogCV9NRkMwCXQ0LCBD
T1BfMF9UTEJfSEkJCSMgR2V0IGN1cnJlbnQgUElECi0JbW92ZQl0MiwgYTAKKwlzcmwJdDIsIGEw
LCAxCQkJIyBhc3N1bWUgZXZlbiBudW1iZXIKIAltZmMwCXQxLCBDT1BfMF9UTEJfV0lSRUQKIAls
aQl2MCwgTUlQU19LU0VHMF9TVEFSVCArIDB4MGZmZjAwMDAJIyBpbnZhbGlkIGFkZHJlc3MKIAlt
ZmMwCXQzLCBDT1BfMF9UTEJfUEdfTUFTSwkJIyBzYXZlIGN1cnJlbnQgcGdNYXNrCg==
------=_Part_16944_4087999.1208923432996--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2da2ec620804222103r7e90af37j2d36b0f0bc049abb>