This is the mail archive of the ecos-patches@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Moving AUX_CHANNELS, NUM_CHANNELS logic into platform hal


On Mon, 2006-11-27 at 05:18 -0700, Gary Thomas wrote:
> David Fernandez wrote:
> > On Sat, 2006-11-25 at 16:14 -0700, Gary Thomas wrote:
> >   
> >> David Fernandez wrote:
> >>     
> >>> Hi there,
> >>>
> >>> This patch moves a conflicting logic to define
> >>> CYGNUM_HAL_VIRTUAL_VECTOR_NUM_CHANNELS, that was being defined in
> >>> redboot.h and in hal_if.c; to the platform hal, and implemented in a
> >>> more general way, that allows more modules to increase the number of
> >>> channels.
> >>>       
> >> Can you explain the purpose of this change more fully?  e.g. how does
> >> it differ than just expanding on CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS
> >> within the platform HAL (the way it's been done on a number of HALs)?
> >>
> >>     
> > The purpose is to replace the #define
> > CYGNUM_VIRTUAL_VECTOR_NUM_CHANNELS, the problem is that the NUM_CHANNELS
> > define was in two places (hal_if.c and redboot.h), which causes a
> > warning in hal_if.c itself; besides, it seems more appropriate to put
> > that definition in the platform hal cdl, like COMM_CHANNELS is, making
> > it a hal wide macro, and not a local define here and there.
> >   
> 
> On what platform?  Not on any one I'm responsible for!

May be there's been changes regarding this since I take the snapshot I'm
using, My patch puts that logic in the i386 pc platform hal, and the
same could be done in the other platforms...
If you think it's better to keep it like it is ,fine. It just occurred
to me that this could be a better way when I saw the warning regarding
NUM_CHANNELS being defined two times: if hal_if.c and redboot.h

> > At the moment I've only seen that NUM_CHANNELS macro to be used by
> > RedBoot when enabling networking in it; but that other way, it could be
> > used by other modules that could benefit from the same mechanism present
> > in hal_if.c (hal/common).
> >
> > Instead of making the RedBoot networking option to do a "puts" with the
> > AUX_CHANNELS macro, it does now a "implements" command on AUX_CHANNELS,
> > that becomes a interface; then NUM_CHANNELS becomes an option that
> > augments COMM_CHANNELS with a "calculated" value. Is the same thing done
> > in the #defines in redboot.h and hal_if.c, but it seems more general and
> > less redundant.
> >
> >   
> I understand the mechanics - I still don't see how this changes 
> anything.  Do you have a platform that
> needs more "AUX" channels?
> 
It only tries to use a more general approach to what is being accomplish
with the current defines. It just didn't seem god enogh to me to define
the same thing two times...
But, as I said, if you prefer the way it's done at the moment, fine. I
was just a suggestion.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]