linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Ricardo <ricardo.ribalda@gmail.com>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: Kernel completely crashes after accessing an unmapped area.
Date: Fri, 21 Nov 2008 20:17:53 +1100	[thread overview]
Message-ID: <1227259073.7185.228.camel@pasglop> (raw)
In-Reply-To: <aa76a2be0811190459x461128a5m82eb5d8d8d6da5fe@mail.gmail.com>

On Wed, 2008-11-19 at 13:59 +0100, Ricardo wrote:
> Hello All:
> 
>   I am using the paulus tree popwerpc linux kernel for a ppc440 cpu
> located in a Virtex5 FPGA.
> 
>   While developing some drivers (a simple gpio device) I have notice
> that if I try to access an unmapped area (an address without any
> register/device attached), the system completely crashes... I remember
> that doing the same with a ppc400 cpu the system showed a
> "Instruction/Data bus error" and continue working.
> 
>   My question: The ppc440 cannot recover from this types of errors or
> is a kernel missing feature/bug?

You may want to look at the patch I posted recently:

powerpc: Fix 460EX/460GT machine check handling

>From the look of your log, we aren't using the right type of machine
check handler for your core and it may need a similar treatement as the
above processors.

There are two kind of 440 cores vs. machine checks. On the old kind,
machine checks used to be critical interrupts (and thus used CSRR0 and
CSRR1 to save the context) while on the new kind, machine checks are
their own type of exception with a dedicated pair of context save
registers MCSRR0 and MCSRR1.

It -looks- like the problem might be that the kernel isn't using the
right set for your core. It uses by default the old style unless
you change the machine check IVOR to point to MachineCheckA
which is done by calling __fixup_440A_mcheck() in your CPU init routine
for example, as we do for other 440 cores.

So you would have to hook up a setup_cpu routine in cputable for
those guys (I can see the virtex cores seem to not have any at
this stage) and also change their machine check pointer to 
use machine_check_440A instead of machine_check_4xx so the machine
check details are properly decoded.

Of course check your Virtex user manual to make sure that's indeed
what is happening :-)

Cheers,
Ben.

  reply	other threads:[~2008-11-21  9:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-19 12:59 Kernel completely crashes after accessing an unmapped area Ricardo
2008-11-21  9:17 ` Benjamin Herrenschmidt [this message]
2009-01-08 11:38   ` Ricardo
  -- strict thread matches above, loose matches on Subject: below --
2008-11-20 12:11 Ricardo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1227259073.7185.228.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=ricardo.ribalda@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).