This is the mail archive of the
ecos-patches@sourceware.org
mailing list for the eCos project.
Re: Interrupt attach patch (2)
- From: Nick Garnett <nickg at ecoscentric dot com>
- To: ecos-patches at sources dot redhat dot com
- Date: 08 May 2007 09:08:49 +0100
- Subject: Re: Interrupt attach patch (2)
- References: <f1faln$g27$1@sea.gmane.org>
Dave Lawrence <dlawrence@ad-holdings.co.uk> writes:
> Cyg_Interrupt:attach updates the interrupt level before installing the
> vector. Depending on the hardware, updating the interrupt level can
> immediately cause an interrupt, resulting in the interrupt occurring
> before the handler is installed.
>
This should not happen. Generally, on hardware where interrupt
enable/disable is implemented by setting the priority level, the HAL
maintains the priority in RAM and only installs the selected level in
the hardware when the interrupt is enabled.
While this patch is probably benign, it does have the effect of
covering up a potential bug in the HAL. While that may be seen as
defensive programming in this case, it still leaves the bug in the HAL
to bite in other situations. So the HAL really needs to be fixed, not
the kernel.
[Background: AD Holdings are a customer of eCosCentric, and are
(presumably) using a HAL that we wrote, which is designed to work as
described above. So we really need more details of when this occurs so
we can track down a possible bug. This has been requested off-list.]
--
Nick Garnett eCos Kernel Architect
eCosCentric Limited http://www.eCosCentric.com/ The eCos experts
Barnwell House, Barnwell Drive, Cambridge, UK. Tel: +44 1223 245571
Registered in England and Wales: Reg No 4422071.