[PATCH 10] IO_MANAGER: early dynamic driver registration

Joel Sherrill joel.sherrill at OARcorp.com
Fri Feb 3 14:02:03 UTC 2012


On 02/03/2012 07:48 AM, Sebastian Huber wrote:
> On 02/03/2012 11:39 AM, Daniel Hellstrom wrote:
>> On 02/03/2012 08:45 AM, Sebastian Huber wrote:
>>> On 02/02/2012 03:46 PM, Daniel Hellstrom wrote:
>>>> Adds the possibility to register drivers before the IO Manager has
>>>> completed the initialization. Sometimes the BSP may want to register
>>>> a driver dynamically early in the boot process.
>>>>
>>>> Signed-off-by: Daniel Hellstrom<daniel at gaisler.com>
>>> Isn't it possible to use the system state for this? This would make this
>>> additional global variable superfluous.
>> That would break code that register drivers after the IO_Manager has been
>> initialized and before the system state is updated. That would break my
>> particular use case just because of that. Besizes , the IO manager will depend
>> on the system state, but is okay I guess? I can also change from a int to a
>> char to reduce data increase with only one byte?
>>
>> What do you think?
> I guess you use the boot_card() function to start your system?  At which point
> do you registers these BSP specific drivers?  Can't you use the
> bsp_pretasking_hook() or CONFIGURE_BSP_PREREQUISITE_DRIVERS?
>
It sounds like Daniel wants to register drivers before RTEMS has had
a chance to initialize its data structures. That is going to be
problematic.

What type of drivers are you registering?

boot_card() is the master initialization sequencer.  Sebastian is
right that you can use the bsp_pretasking_hook() or you can
use the bsp_predriver_hook().

CONFIGURE_BSP_PREREQUISITE_DRIVERS was added so the
BSP can ensure a required driver runs first.  The
CONFIGURE_APPLICATION_PREREQUISITE_DRIVERS was
actually added by a user who had an ERC32 based VMEBus
board. They used that configuration point to ensure the
VMEBus was initialized before any drivers accessed it.

A general issue is that dynamically registering drivers requires
that the application configure driver slots for them. By default,
there are no slots for dynamically registered drivers. So this is
imposing a configuration requirement from the BSP.

I think backing off to understand your requirement would be
a good thing to do.


-- 
Joel Sherrill, Ph.D.             Director of Research&   Development
joel.sherrill at OARcorp.com        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
     Support Available             (256) 722-9985





More information about the devel mailing list