From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Wayne Warren <wwarren@emacinc.com>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai] Adeos I-Pipe patch problem on vendor-specific kernel
Date: Mon, 22 Oct 2012 21:25:13 +0200 [thread overview]
Message-ID: <50859D99.5040009@xenomai.org> (raw)
In-Reply-To: <1350933768.17153.16.camel@ENG-09-LX.emacinc.com>
On 10/22/2012 09:22 PM, Wayne Warren wrote:
> This code is the __set_irq_handler function which, given an interrupt
> number/id, appears to set up an entry in an irq_desc array. This
> structure (irq_desc) appears to be the place to go for information
> related to a given IRQ id.
>
> We seem to have discovered the problem, which was that this array was
> not initialized with enough slots...in
> arch/arm/plat-omap/include/play/irqs.h OMAP_GPMC_NR_IRQS was defined as
> 7 rather than 8 (there are actually 8 GPMC chip selects). In a
> roundabout way, this macro is used to calculate the array size for
> irq_desc.
>
> Since gpmc_init() was using GPMC_CS_NUM as a bound in the for loop that
> was calling __set_irq_handler and the "irq" variable in that same
> function was initialized using OMAP_GPMC_IRQ_BASE, it seems like:
>
> - OMAP_GPMC_NR_IRQS should be used in the for loop instead of
> GPMC_CS_NUM,
> - GPMC_CS_NUM should be used to define OMAP_GPMC_NR_IRQS,
> - or at the very least, GPMC_CS_NUM and OMAP_GPMC_NR_IRQS should be
> set to the same constant value (8).
>
> I think maybe the first two of those together should be the fix, but I
> am still fairly lost here. Temporarily, we have set OMAP_GPMC_NR_IRQS to
> 8 which eliminates the data abort exception that was occurring in
> __set_irq_handler.
>
> But we still have a kernel panic. Stepping further through the
> start_kernel function in GDB leads to local_irq_enable() which after
> some investigation is preprocessed into __ipipe_unstall_root().
>
> It is the last line of this function, "local_irq_enable_hw()" where the
> next data abort exception occurs. This line translates into the
> assembler instruction "cpsie i" which is the last instruction before
> __dabt_svc(). Any idea what might be going on there?
>
> Thanks again for your help and prompt replies, they are very helpful.
Chances are you are calling into Adeos code too early. Normally, the
first call to local_irq_enable() happens in init/main.c, after the call
to __ipipe_init() (you should see both in function start_kernel). I
suspect you can not call services such as __set_irq_handler too early in
the boot process.
--
Gilles.
next prev parent reply other threads:[~2012-10-22 19:25 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-02 21:08 [Xenomai] Adeos I-Pipe patch problem on vendor-specific kernel Wayne Warren
2012-10-02 21:32 ` Gilles Chanteperdrix
2012-10-02 21:35 ` Gilles Chanteperdrix
2012-10-04 16:57 ` Wayne Warren
2012-10-04 17:09 ` Gilles Chanteperdrix
2012-10-04 18:02 ` Gilles Chanteperdrix
2012-10-05 8:06 ` Gilles Chanteperdrix
2012-10-05 18:47 ` Wayne Warren
2012-10-05 20:16 ` Gilles Chanteperdrix
2012-10-05 21:47 ` Wayne Warren
2012-10-05 22:43 ` Gilles Chanteperdrix
2012-10-06 4:29 ` Wayne Warren
2012-10-06 9:46 ` Gilles Chanteperdrix
2012-10-09 20:55 ` Wayne Warren
2012-10-09 21:12 ` Gilles Chanteperdrix
2012-10-19 21:22 ` Wayne Warren
2012-10-20 1:33 ` Gilles Chanteperdrix
2012-10-22 19:22 ` Wayne Warren
2012-10-22 19:25 ` Gilles Chanteperdrix [this message]
2012-10-22 19:34 ` Wayne Warren
2012-10-22 21:12 ` Gilles Chanteperdrix
2012-10-23 15:32 ` Wayne Warren
2012-10-23 20:12 ` Gilles Chanteperdrix
2012-10-24 17:32 ` Wayne Warren
2012-10-24 17:38 ` Gilles Chanteperdrix
2012-10-24 17:55 ` Wayne Warren
2012-10-24 18:05 ` Gilles Chanteperdrix
2012-10-24 18:26 ` Wayne Warren
2012-10-24 18:36 ` Gilles Chanteperdrix
2012-10-24 17:36 ` Wayne Warren
2012-10-24 17:57 ` Gilles Chanteperdrix
2012-10-20 8:24 ` Gilles Chanteperdrix
2012-10-19 21:32 ` Wayne Warren
2012-10-20 1:36 ` Gilles Chanteperdrix
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=50859D99.5040009@xenomai.org \
--to=gilles.chanteperdrix@xenomai.org \
--cc=wwarren@emacinc.com \
--cc=xenomai@xenomai.org \
/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.