BSP_install_rtems_irq_handler API
Thomas Doerfler
Thomas.Doerfler at imd-systems.de
Thu Jan 3 19:15:41 UTC 2002
Hi Till,
moving to the new API (at least for PowerPC) is encouraged,
because the old exception handling code has some bad links
between libbsp and libcpu code/preprocessor statements.
I am currently moving the helas403 BSP and PPC403/405 CPU code
to the new exception handling, and I really have a split
opinion on the new API. I think that some part are really
nice, like to "irq_on" and "irq_off" functions in the drivers,
but you are right, not passing the vector numbers to the irq
function is really one design flaw among others (IMHO):
*IRQ/exception related numbers are generously mixed into one
enumeration, this makes things hard to distinguish
*at least for PPC there seems to be no standard way to
provide a new exception handler without giving it its own
assembler entry/exit code, although the default handler
code could easily be modified to support this
*part of the related files is placed in libcpu, another part
in libbsp, without clear definitions which parts are
architecture specific, which are microcontroller specific
and which are really board specific. (maybe a hirarchy
lib/libbsp/<arch>/shared/<controllerchip>/xxx would help
there)
Maybe your mail might start a discussion how to improve
structure, but it will take some time (and testing) to reorder
things once more. I also don't think that changing the API
every year is a good idea... My idea would be to discuss ideas
how to improve things and then, when a consensus is there
rework them.
Bye,
Thomas.
> Hi all.
>
> I realize that more and more BSPs are migrating to the
> new interrupt management API. Has the design
> of this new API (which IMHO is rather clumsy) ever
> been thoroughly discussed?
>
> I believe that it is a major design flaw not to pass
> the ISR any information (user pointer or at least the
> vector number). Without ugly hacks, it is impossible
> for a driver to support multiple instances of a device
> or for BSPs to support interrupt sharing.
>
> What was the reason for making ISRs
>
> typedef void (*rtems_irq_hdl) (void);
>
> and is there still a chance to change this API??
>
> Regards
>
> -- Till.
--------------------------------------------
IMD Ingenieurbuero fuer Microcomputertechnik
Thomas Doerfler Herbststrasse 8
D-82178 Puchheim Germany
email: Thomas.Doerfler at imd-systems.de
PGP public key available at: http://www.imd-
systems.de/pgp_key.htm
More information about the users
mailing list