source: rtems/cpukit/libdrvmgr/README @ eff69891

4.115
Last change on this file since eff69891 was e7fade3, checked in by Daniel Hellstrom <daniel@…>, on 11/28/11 at 08:52:03

DRVMGR: added driver manager to cpukit/libdrvmgr

  • Property mode set to 100644
File size: 3.6 KB
Line 
1DRIVER MANAGER
2==============
3
4See documentation in Aeroflex Gaisler Driver manual.
5
6
7INITIALIZATION
8==============
9The Driver Manager can be intialized in two different ways:
10 1. during RTEMS startup
11 2. started by user, typically in the Init task
12
13The driver manager is initalized during RTEMS startup in the
14rtems_initialize_device_drivers() function when RTEMS is
15configured with driver manager support.
16
17When RTEMS is not configured with the driver manager, the manager
18may still be initialized by the user after system startup, typically
19from the Init() task.
20
21The main difference between the two ways is when interrupt
22is enabled. Interrupt is enabled for the first time by RTEMS when
23the Init task is started. This means, for the first case, that
24drivers can not use interrupt services until after the
25initialization phase is over and the user request services from
26the drivers. For the second case of initialization, this means
27that driver must take extra care during initalization when interrupt
28is enabled so that spurious interrupts are not generated and that the
29system does not hang in an infinite IRQ loop.
30
31Most of the problems above are solved for the two methods by
32specifying in which initialization levels IRQ handling is done.
33See Level 1 and Level 2 below.
34
35Other differences is that IRQ, System Clock Timer, debug Console
36and Console can be initalized by the help of the driver manager
37when initialized during start up. Between Level0 and Level1 the
38RTEMS I/O Manager drivers are initialized. The LEON3 BSP has
39therefore two different versions of the basic drivers.
40
41
42LEVEL0
43------
44The level of uninitialized devices that have been united with a
45driver.
46
47
48LEVEL1 - FIND/RESET/IRQ Clear
49-----------------------------
50The driver is for the first time informed of the presence of a
51device. Only basic initialization.
52
53- Find all hardware needed for IRQ, Console, Timer and hardware
54  that need to be reset.
55- Reset hardware, so that interrupts are not generated by mistake
56  when enabled later on.
57- Init low level non-interrupt (polling-mode) services needed by
58  drivers init LEVEL2 and onwards, such as
59   * Debug UART console for printk()
60   * Timer API (non-IRQ)
61   * GPIO (non-IRQ)
62   * Special non-main memory configuration, washing
63- Register IRQ controller at BSP IRQ library
64- Register Timer for system clock
65- Register Console UART
66
67During this intialization level interrupts may not be registered,
68enabled or disabled at the IRQ controller. But, all IRQ sources
69should be cleared to avoid spurious interrupts later on.
70
71
72AFTER LEVEL1 - if initialized during startup
73--------------------------------------------
74The statically configured drivers are initialized as normally by RTEMS. The
75hardware was found in LEVEL1.
76
77CONFIGURE_BSP_PREREQUISITE_DRIVERS may initialize IRQ driver, or
78IRQ lib initialized when IRQ controller was registered during LEVEL1.
79
80
81LEVEL2
82------
83Initialize other device drivers than IRQ, Timer, console:
84- ISR can be registered, enabled, disabled at IRQ controller
85   (IRQ is still masked by CPU interrupt level if initialized during
86   RTEMS startup)
87- Timer API that does not require IRQ can be used
88- printf() can be used
89
90For standard peripherals this is the first initialization.
91
92
93LEVEL3
94------
95Initialize drivers that require features/APIs provided by drivers
96in LEVEL2.
97
98Such features may involve services that require IRQ to be implemented.
99
100
101LEVEL4
102------
103Unused extra level.
104
105
106
107LEVEL INACTIVE - NOT ENABLED DEVICES
108------------------------------------
109List of devices that experienced:
110 - no driver found for device (not united)
111 - ignored (not united with a driver, forced by user)
112 - an error was reported by device driver during initialization
Note: See TracBrowser for help on using the repository browser.