RTEMS 6.1-rc6
|
See documentation in Cobham Gaisler Driver manual available at http://www.gaisler.com/anonftp/rcc/doc/.
The Driver Manager can be initialized in two different ways:
The driver manager is initalized during RTEMS startup in the rtems_initialize_device_drivers() function when RTEMS is configured with driver manager support.
When RTEMS is not configured with the driver manager, the manager may still be initialized by the user after system startup, typically from the Init() task.
The main difference between the two ways is when interrupt is enabled. Interrupt is enabled for the first time by RTEMS when the Init task is started. This means, for the first case, that drivers can not use interrupt services until after the initialization phase is over and the user request services from the drivers. For the second case of initialization, this means that driver must take extra care during initialization when interrupt is enabled so that spurious interrupts are not generated and that the system does not hang in an infinite IRQ loop.
Most of the problems above are solved for the two methods by specifying in which initialization levels IRQ handling is done. See Level 1 and Level 2 below.
Other differences are that IRQ, System Clock Timer, debug Console and Console can be initialized with the help of the driver manager when initialized during start up. Between Level0 and Level1 the RTEMS I/O Manager drivers are initialized. The LEON3 BSP therefore has two different versions of the basic drivers.
The level of uninitialized devices that have been united with a driver.
The driver is, for the first time, informed of the presence of a device. Only basic initialization.
During this initialization level interrupts may not be registered, enabled or disabled at the IRQ controller, but all IRQ sources should be cleared to avoid spurious interrupts later on.
The statically configured drivers are initialized as normal by RTEMS. The hardware was found in LEVEL1.
CONFIGURE_BSP_PREREQUISITE_DRIVERS may initialize IRQ driver, or IRQ lib initialized when IRQ controller was registered during LEVEL1.
Initialize other device drivers than IRQ, Timer, console:
For standard peripherals this is the first initialization.
Initialize drivers that require features/APIs provided by drivers in LEVEL2.
Such features may involve services that require IRQ to be implemented.
Unused extra level.
List of devices that experienced: