This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: RedBoot serial rx interrupts
- To: Grant Edwards <grante at visi dot com>
- Subject: Re: [ECOS] RedBoot serial rx interrupts
- From: Gary Thomas <gthomas at cambridge dot redhat dot com>
- Date: Sat, 13 Jan 2001 16:13:47 -0700 (MST)
- Cc: ecos-discuss at sources dot redhat dot com
- Organization: Red Hat, Inc.
On 13-Jan-2001 Grant Edwards wrote:
> On Sat, Jan 13, 2001 at 03:11:34PM -0700, Gary Thomas wrote:
>
>> This looks OK and I think I mispoke before. GDB_BREAK can and will
>> be set, even for RAM based RedBoot.
>
> Does that mean that it's normal for RedBoot to unmask serial
> interrupts?
>
>> However, interrupts should never actually get turned on in the
>> RedBoot environment. The only place where interrupts are
>> enabled is in the path where the kernel scheduler is enabled.
>>
>> Are you seeing otherwise? If so, where?
>
> My Ethernet driver initialization routine ends up calling
> cyg_drv_isr_lock() and cyg_drv_isr_unlock(). The latter
> enables interrupts.
Maybe we should improve this interface to return an indication of
whether the interrupts _were_ on when "isr_lock()" was called to
avoid this in the future. I'll think about it.
>
> I can add #defines to my driver code to turn those into noops
> unless CYGPKG_NET is defined.
>
> This raises the question: is it OK to call those two routines
> during network device initialization?
It's not necessary. Interrupts are always off during any system
initialization, so you could just leave this out [and feel safe].