Subject: sh4 pmap bug? (Re: port-dreamcast/34243)
To: None <port-sh3@netbsd.org>
From: Valeriy E. Ushakov <uwe@ptc.spbu.ru>
List: port-sh3
Date: 08/23/2006 16:26:46
Can someone who is more familiar with sh4 pmap take a look at this PR?
On Wed, Aug 23, 2006 at 06:02:04 +0400, Valeriy E. Ushakov wrote:
> I've traced it a bit further. What happens is that we see an infinite
> recurring tlb miss for the instruction we are stuck at:
>
> 0x20690a9c: mov.l @r4, r1 ! where r4 == 0x206a0fcc
>
> Some debugging printfs show that the following sequence of calls is
> repeated over and over:
>
> tlbinv: va=20690000 (from pmap_remove)
>
> _pteld: va=20690a9c flags=1 -> entry == 0
>
> tlbupd: va=20690000 pte=0c6f1158 (from pmap_enter)
> tlbinv: va=20690000 (from sh4_tlb_update)
>
> _pteld: va=20690a9c flags=1 -> entry=0c6f1158 =V
> tlbupd: va=20690a9c pte=0c6f1158 (from __pmap_pte_load)
> tlbinv: va=20690a9c (from sh4_tlb_update)
>
>
> And DDB shows that TLB looks very strage. Note lots of invalid
> entries for the page in question:
>
> db> mach tlb
> multiple virtual storage mode, SQ access: (kernel)
> random counter limit=61
> ASID=3 (passwd)---ITLB DUMP ---
> VPN ASID PFN AREA VDCGWtPR SZ TC SA
> U/K U/K
> 0x20690800 3 0x0c6f1000 3 ._|._ rr 4K
> 0x20690800 3 0x0c6f1000 3 |_|._ rr 4K
> 0x20690800 3 0x0c6f1000 3 ._|._ rr 4K
> 0x20690800 3 0x0c6f1000 3 ._|._ rr 4K
> ---UTLB DUMP---
> VPN ASID PFN AREA VDCGWtPR SZ TC SA
> U/K U/K
> 0x206a0000 3 0x0c6f1000 3 ..|.. rr 4K
> 0x20690000 3 0x0c6f1000 3 ..|.. rr 4K
> 0x20690000 3 0x0c6f1000 3 ..|.. rr 4K
> 0x206a0000 3 0x0c6f1000 3 ..|.. rr 4K
> 0x20690000 3 0x0c6f1000 3 ..|.. rr 4K
> 0xc0024000 0 0x0ff68000 3 ||||. _w 4K
> 0x206a0000 3 0x0c6f1000 3 ..|.. rr 4K
> 0x206a0000 3 0x0c6f1000 3 ..|.. rr 4K
> 0x206a0000 3 0x0c6f1000 3 ..|.. rr 4K
> 0x20690000 3 0x0c6f1000 3 ..|.. rr 4K
> 0xc0046000 0 0x0ff43000 3 ||||. _w 4K
> 0x20690000 3 0x0c6f1000 3 ..|.. rr 4K
> 0x206a0000 3 0x0c6f1000 3 ..|.. rr 4K
> 0x20690000 3 0x0c6f1000 3 ..|.. rr 4K
> 0x20690000 3 0x0c6f1000 3 ..|.. rr 4K
> 0x206a0000 3 0x0c6f1000 3 ..|.. rr 4K
> 0xc1648000 0 0x0ffe1000 3 ||||. _w 4K
> 0x20690000 3 0x0c6f1000 3 ..|.. rr 4K
> 0x20690000 3 0x0c6f1000 3 ..|.. rr 4K
> 0x206a0000 3 0x0c6f1000 3 ..|.. rr 4K
> 0xc006e000 0 0x0d440000 3 ||||. _w 4K
> 0x20690000 3 0x0c6f1000 3 ..|.. rr 4K
> 0x20690000 3 0x0c6f1000 3 ..|.. rr 4K
> 0x20690000 3 0x0c6f1000 3 ..|.. rr 4K
> 0x20690000 3 0x0c6f1000 3 ..|.. rr 4K
> 0x20690000 3 0x0c6f1000 3 ..|.. rr 4K
> 0x206a0000 3 0x0c6f1000 3 ..|.. rr 4K
> 0x20690000 3 0x0c6f1000 3 |.|.. rr 4K
> 0x20690000 3 0x0c6f1000 3 ..|.. rr 4K
> 0x20690000 3 0x0c6f1000 3 ..|.. rr 4K
> 0x20690000 3 0x0c6f1000 3 ..|.. rr 4K
> 0xc0063000 0 0x0ff17000 3 ||||. _w 4K
> 0x20690000 3 0x0c6f1000 3 ..|.. rr 4K
> 0x206a0000 3 0x0c6f1000 3 ..|.. rr 4K
> 0x206a0000 3 0x0c6f1000 3 ..|.. rr 4K
> 0xc1adf000 0 0x0d429000 3 ||||. _w 4K
> 0x206a0000 3 0x0c6f1000 3 ..|.. rr 4K
> 0xc0060000 0 0x0ff1a000 3 ||||. _w 4K
> 0x20690000 3 0x0c6f1000 3 ..|.. rr 4K
> 0xc006d000 0 0x0d445000 3 ||||. _w 4K
> 0x20690000 3 0x0c6f1000 3 ..|.. rr 4K
> 0x20690000 3 0x0c6f1000 3 ..|.. rr 4K
> 0x20690000 3 0x0c6f1000 3 ..|.. rr 4K
> 0xc0064000 0 0x0ff16000 3 ||||. _w 4K
> 0x20690000 3 0x0c6f1000 3 ..|.. rr 4K
> 0x20690000 3 0x0c6f1000 3 ..|.. rr 4K
> 0x20690000 3 0x0c6f1000 3 ..|.. rr 4K
> 0xc005f000 0 0x0ff1b000 3 ||||. _w 4K
> 0x206a0000 3 0x0c6f1000 3 ..|.. rr 4K
> 0x206a0000 3 0x0c6f1000 3 ..|.. rr 4K
> 0x20690000 3 0x0c6f1000 3 ..|.. rr 4K
> 0xc004d000 0 0x0ff3c000 3 ||||. _w 4K
> 0x206a0000 3 0x0c6f1000 3 ..|.. rr 4K
> 0xc001d000 0 0x0ff70000 3 ||||. _w 4K
> 0x206a0000 3 0x0c6f1000 3 ..|.. rr 4K
> 0x206a0000 3 0x0c6f1000 3 ..|.. rr 4K
> 0x20690000 3 0x0c6f1000 3 ..|.. rr 4K
> 0x20690000 3 0x0c6f1000 3 ..|.. rr 4K
> 0xc000a000 0 0x0ffcd000 3 ||||. _w 4K
> 0xc004e000 0 0x0ff3a000 3 ||||. _w 4K
> 0xc0023000 0 0x0ff6a000 3 ||||. _w 4K
> 0xc2344000 0 0x0c676000 3 ||||. _w 4K
> 0xc2345000 0 0x0c677000 3 ||||. _w 4K
> 0xc2346000 0 0x0c678000 3 ||||. _w 4K
SY, Uwe
--
uwe@ptc.spbu.ru | Zu Grunde kommen
http://snark.ptc.spbu.ru/~uwe/ | Ist zu Grunde gehen