Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 04 Mar 2013 17:21:00 -0800
From:      Oleksandr Tymoshenko <gonzo@bluezbox.com>
To:        freebsd-arm@freebsd.org
Subject:   Re: Weird kernel mode data abort panic on Zedboard.
Message-ID:  <5135487C.80107@bluezbox.com>
In-Reply-To: <51354125.4060500@sbcglobal.net>
References:  <51354125.4060500@sbcglobal.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On 3/4/2013 4:49 PM, Thomas Skibo wrote:
>
> Hello, again.
>
> I thought I'd describe this kernel panic and see if anyone has seen 
> anything similar.  This is on the Zedboard (ARM Cortex-A9 armv6).
>
> I can consistently panic the kernel by ftp'ing files to a local 
> filesystem.  It crashes every fourth time or so in the same manner.  
> The specific fault is a 'Permission Fault (P)' on the first page of 
> data in a file buf.
>
> The fault occurs in ffs_write() when it attempts to uiomove/copyin 
> data from user space to the file buf.  The first write faults but 
> copyin() catches the fault and then calls vfs_bio_clrbuf() which tries 
> to zero out the buf data.  It's the second fault that causes the panic.
>
> Using Xilinx's XMD tool, I can walk the page table in physical memory 
> and find the PTE.  It is always okay and has priviledged read and 
> write permissions.  Curiously, sometimes I get another permission 
> fault if I try to read from the fault address in the debugger.  That 
> tells me there is a stale TLB entry without read permissions either.  
> The other buf pages seem okay.
>
> Any ideas?  I can duplicate this with l2 cache turned off.  I can also 
> duplicate it using a USB-ethernet interface instead of the Zynq cgem 
> ethernet interface so it's not that driver.

Just a hunch here - looks like TLB entry is not update properly. Might 
be missing
PTE_SYNC in pmap-v6.c. Or current PTE_SYNC implementation does not cover
all requirements for your platform. I'd say latter - but without proper 
debugging
it's just guesswork.



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