From: Grant Edwards <grante@visi.com>
To: Gary Thomas <gthomas@redhat.com>
Cc: Fabrice Gautier <Fabrice_Gautier@sdesigns.com>,
ecos-discuss@sources.redhat.com
Subject: Re: [ECOS] Initialization routines take too long?
Date: Fri, 10 Nov 2000 12:41:00 -0000 [thread overview]
Message-ID: <20001110144309.A14089@visi.com> (raw)
In-Reply-To: <XFMail.20001110131925.gthomas@redhat.com>
On Fri, Nov 10, 2000 at 01:19:25PM -0700, Gary Thomas wrote:
> >> I think it's more likely a problem with what happens when the
> >> ARM IRQ is finally enabled. It appears that the system crashes
> >> if there is a pending interrupt when that happens.
> >
> > Strange, that would mean you can't disable and reenable the IRQ without
> > problem...
>
> As far as I know, this is not a problem with any of our internal ports.
I thought probably not. ;)
> This is not to say that a problem does not exist, but we've never seen such.
>
> However, note that the normal case is for interrupts to remain disabled,
> sometimes for long periods, until the scheduler is started from the main
> thread. Is this how your application works [Grant]?
That depends on the meaning of "interrupts remain disabled".
The IRQ mask bit in the ARM CPU register CPSR remains set (IRQ
disabled) until Cyg_Scheduler::start() is called.
However, individual interrupts are unmasked (enabled in the
interrupt controller) during initialization. This means that
there may be an IRQ pending when Cyg_Scheduler::start() is
called.
If that is the case, the first IRQ is serviced before
HAL_THREAD_LOAD_CONTEXT( &next->stack_ptr ) is called at the
bottom of Cyg_Scheduler::start().
I don't know enough about eCos internals to determine if that's
a problem or not.
The only thing I can think of is that current_thread is set to
a value inconsistent with the actual CPU context at that point,
and that's causing a problem somewhere in the timer interrupt
code.
All of my tasks do seem to get started, but things crash in
random ways. If I speed up my init routines (doesn't matter
which one) or delay that first timer interrupt, things are
fine.
--
Grant Edwards
grante@visi.com
next prev parent reply other threads:[~2000-11-10 12:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-11-10 12:11 Fabrice Gautier
2000-11-10 12:17 ` Grant Edwards
2000-11-10 12:19 ` Gary Thomas
2000-11-10 12:41 ` Grant Edwards [this message]
-- strict thread matches above, loose matches on Subject: below --
2000-11-10 11:58 Fabrice Gautier
2000-11-10 12:02 ` Grant Edwards
2000-11-10 11:42 Grant Edwards
2000-11-10 13:12 ` Grant Edwards
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=20001110144309.A14089@visi.com \
--to=grante@visi.com \
--cc=Fabrice_Gautier@sdesigns.com \
--cc=ecos-discuss@sources.redhat.com \
--cc=gthomas@redhat.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 read-only IMAP folder(s) and NNTP newsgroup(s).