[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cpukit/bspkit split.



On Tue, 2005-02-22 at 18:04 +0300, Sergei Organov wrote:
> Ralf Corsepius <ralf.corsepius@rtems.org> writes:
> 

> 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?
Not necessarily. Implementing it under libbsp is just one possibility.

However, where is its API defined? If either you implement a BSP
specific API, then the BSP's headers is the appropriate place, or you
implement a cpu-family API. In this case, a libcpu header is the
appropriate location.

> Overall, my currently preferred suggestion is:
> 
> 1. Have exception management code in libcpu/shared.
> 2. Have interrupt management code in libbsp/shared.
I am strongly opposed to implement anything below libbsp/shared or
libbsp/<cpu>/shared (I guess this is what you actually mean), because it
helps people to avoid thinking on APIs. Have a look at the currently
existing BSPs and how they use "<cpu>/shared".

Ralf