All of lore.kernel.org
 help / color / mirror / Atom feed
From: Albert ARIBAUD <albert.u.boot@aribaud.net>
To: u-boot@lists.denx.de
Subject: [U-Boot] Prefetch abort exception
Date: Thu, 16 Jan 2014 14:20:11 +0100	[thread overview]
Message-ID: <20140116142011.23377320@lilith> (raw)
In-Reply-To: <CAD6P=4gFQ=yHdjzFUvaivBZ_AAo38BpKYMRyhfLhCRdX+ysSbA@mail.gmail.com>

Hi Parimala,

On Thu, 16 Jan 2014 17:55:10 +0530, Parimala Baggiri
<baggiriparimala@gmail.com> wrote:

> Hello,
> 
> On Tue, Jan 14, 2014 at 11:30 AM, Albert ARIBAUD
> <albert.u.boot@aribaud.net>wrote:
> 
> > Hi Parimala,
> >
> > On Mon, 13 Jan 2014 19:00:04 +0530, Parimala Baggiri
> > <baggiriparimala@gmail.com> wrote:
> >
> > > Hello,
> > >
> > > I have added interrupt support for armv7 platform, by implementing the
> > > do_irq and irq_install_handler and arch_interrupt_init functions.
> > >
> > > Initially default_isr is the handler function installed for all the
> > > interrupts.
> > >
> > > From my standalone application, I am enabling the interrupts and
> > installing
> > > the handler to be called for my peripheral interrupt.
> > >
> > > If I don't install my handler, U-Boot executes default_isr successfully.
> > >
> > > If I use my handler, when the interrupt occurs I am getting the prefetch
> > > abort exception with the following dump
> > > prefetch abort
> > > pc : [<ebd78002>]          lr : [<bff8f720>]
> > > sp : bfeef200  ip : bfeef358     fp : bfef1d48
> > > r10: bfef1d78  r9 : 00000002     r8 : bfeeff58
> > > r7 : bffac284  r6 : 60000153     r5 : bffbb5c0  r4 : 00000000
> > > r3 : bffab29c  r2 : 00000000     r1 : 000003e8  r0 : 8500178c
> > > Flags: nZCv  IRQs off  FIQs off  Mode IRQ_32
> > > Resetting CPU ...
> > >
> > > resetting ...
> > >
> > > U-Boot SPL 2013.01.-rc1-00003-g43ee87a-dirty (Jan 10 2014 - 16:04:35)
> > > OMAP4460 ES1.1
> > > OMAP SD/MMC: 0
> > > reading u-boot.img
> > > reading u-boot.img
> > >
> > > Can any one please help me to solve this?
> >
> > You're the best suited to tell, since you're the only one who can read
> > or test the code, so the following question is just a wild guess: does
> > the interrupt handler properly save (and restore) the interrupted
> > context, and does it properly establish (and dispose of) its own
> > context?
> >
> > Thank you all for the suggestions
> I found that, using "printf" statement within my ISR is causing the
> prefetch abort.

Well, it usually isn't a good idea to try and use such functions as
printf() within an interrupt handler, if only because you might have
interrupted a call to printf(), and printf() might not be re-entrant,
which could explain the abort you see.

Besides, even with a re-entrant printf() implementation, interrupting
printf() to do a printf() will propably result in mangled output.

> Regards,
> Parimala

Amicalement,
-- 
Albert.

      reply	other threads:[~2014-01-16 13:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-13 13:30 [U-Boot] Prefetch abort exception Parimala Baggiri
2014-01-14  6:00 ` Albert ARIBAUD
2014-01-16 12:25   ` Parimala Baggiri
2014-01-16 13:20     ` Albert ARIBAUD [this message]

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=20140116142011.23377320@lilith \
    --to=albert.u.boot@aribaud.net \
    --cc=u-boot@lists.denx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.