Please help me understand "Translation Fault" in custom device drivers, and how to debug
Oleksandr Tymoshenko
gonzo at bluezbox.com
Sun Dec 4 19:13:44 UTC 2016
> On Dec 4, 2016, at 10:32 AM, Lee D <embaudarm at gmail.com> wrote:
>
> Hello,
>
> I need help understanding what a translation fault is, and how to debug
> it. I have googled like crazy but can't seem to find any detailed
> information.
>
> I am working on an embedded system using an ARM processor, and consequently
> am writing a bunch of device device drivers for my custom hardware.
>
> I am having a problem with occasional crashes when kldload'ing my modules
> in a boot script. I get various errors, including "Translation Fault" (L1
> or L2), "Alignment Fault", "vm_fault", and "undefined instruction in
> kernel". My code works 95% of the time though.
>
> I never see any crashes while running, so I don't think this is a flaky
> hardware problem.
>
> Any suggestions on what kernel debugger commands to enter to gather
> information would also be helpful. Here are the commands I am currently
> recording the output of when I get a crash:
>
> db> bt
> db> ps
> db> show intr
> db> show proc 618
> db> show allpcpu
> db> show allrman
> db> show intrcnt
> db> show proc
> db> show procvm
>
> For a single concrete example, here is a backtrace of a device driver that
> failed with a translation fault on kldload. This BT is unique in that it
> actually seems to contain useful information. Most of the backtraces just
> show some abort/exeception related calls and then say "Unable to unwind
> into user space" (paraphrased), leaving me no info about where my crash
> happened.
>
> FreeBSD 10.3
Hi Lee,
Random crashes during kldload sounds like missing or incomplete icache
sync to me. You can take a look at icache-realted fixes in HEAD’s sys/arm
and try to backport them to 10.3.
More information about the freebsd-hackers
mailing list