cpukit/bspkit split.

Sergei Organov osv at topconrd.ru
Tue Feb 22 15:04:35 UTC 2005


Ralf Corsepius <ralf.corsepius at rtems.org> writes:

> On Tue, 2005-02-22 at 12:37 +0100, Thomas Doerfler wrote:
> > Hi,
> > 
> > I missed the beginning of this discussion thread (and the 
> > related once), but now, since things are getting a bit more 
> > concrete, I would join in:
> > 
> > > 
> > > Are these device drivers supposed to be part of cpukit? If not, and I do
> > > think they shouldn't be, then the question is irrelevant to the cpukit
> > > interface, -- all these definitions should be put into another file that
> > > must not be included by the header that defines cpukit interface.
> > 
> > I agree totally. In cpukit, only those vector number should be 
> > defined, which belong to the cpu core. In fact for PowerPC, 
> > these vector numbers are "exception vectors", not interrupt 
> > vectors. Unfortunately, the exception vector numbers differ 
> > slightly from CPU core to CPU core.
>
> Which means the corresponding code in RTEMS is mal-designed.

They are naturally different. I think we have 3 alternatives to manage
it: 

1. Try to manage differences at link/run time instead of compile-time.
2. Move exception management out of cpukit into libcpu.
3. Manage differences through different multilib variants.

My own preference currently seems to b (2).

> 
> > The interrupt vector numbers are more or less PIC dependant, 
> > although they might be shared between boards with the same 
> > integrated chips like MPC860 or MPC8260. So they should be 
> > located somewhere in a bsp/shared directory (how about something 
> > like: lib/libbsp/powerpc/shared/mpc860/include/mpc860.h)
>
> I disagree - you are shifting around problems. IMO, libcpu would be the
> appropriate location.

Now I tend to disagree in turn. What Thomas suggests is more natural
place. Ask yourself a question: where would I put the code if the PIC is
not integrated? The answer is: in libbsp. Right? If so, support for
integrated parts should also be put in libbsp. The fact that a
peripheral is integrated is in fact irrelevant, I believe.

Besides, given board could happen not to use integrated peripheral and
use an external one instead. For example, the boards I use don't use
mpc56x integrated serial channels in favor of external QUART.

Overall, my currently preferred suggestion is:

1. Have exception management code in libcpu/shared.
2. Have interrupt management code in libbsp/shared.

-- 
Sergei.




More information about the users mailing list