Changeset e7fade3 in rtems


Ignore:
Timestamp:
Nov 28, 2011, 8:52:03 AM (7 years ago)
Author:
Daniel Hellstrom <daniel@…>
Branches:
4.11, master
Children:
1c5a7e5
Parents:
02550220
git-author:
Daniel Hellstrom <daniel@…> (11/28/11 08:52:03)
git-committer:
Daniel Hellstrom <daniel@…> (04/16/15 23:10:16)
Message:

DRVMGR: added driver manager to cpukit/libdrvmgr

Files:
28 added
9 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/shared/include/bootcard.h

    r02550220 re7fade3  
    5757
    5858void bsp_predriver_hook(void);
     59
     60void bsp_driver_level_hook( int level );
    5961
    6062void bsp_postdriver_hook(void);
  • c/src/make/configure.ac

    r02550220 re7fade3  
    2121RTEMS_ENABLE_NETWORKING
    2222RTEMS_ENABLE_CXX
     23RTEMS_ENABLE_DRVMGR
    2324
    2425RTEMS_ENV_RTEMSBSP
  • configure.ac

    r02550220 re7fade3  
    2929RTEMS_ENABLE_MULTILIB
    3030RTEMS_ENABLE_PARAVIRT
     31RTEMS_ENABLE_DRVMGR
    3132
    3233AC_ARG_ENABLE([docs],
  • cpukit/Makefile.am

    r02550220 re7fade3  
    99SUBDIRS += libcrypt
    1010SUBDIRS += libcsupport libblock libfs
     11SUBDIRS += libdrvmgr
    1112SUBDIRS += libnetworking librpc
    1213SUBDIRS += libpci
     
    239240include_rtems_HEADERS += libmisc/fsmount/fsmount.h
    240241
     242## Driver manager
     243include_drvmgrdir = $(includedir)/drvmgr
     244include_drvmgr_HEADERS = libdrvmgr/drvmgr.h
     245include_drvmgr_HEADERS += libdrvmgr/drvmgr_confdefs.h
     246include_drvmgr_HEADERS += libdrvmgr/drvmgr_list.h
     247
    241248## HACK: doxygen filter.
    242249EXTRA_DIST = doxy-filter
  • cpukit/configure.ac

    r02550220 re7fade3  
    1818RTEMS_ENABLE_PARAVIRT
    1919RTEMS_ENABLE_PROFILING
     20RTEMS_ENABLE_DRVMGR
    2021
    2122RTEMS_ENV_RTEMSCPU
     
    229230  [1],
    230231  [if networking is enabled])
     232
     233RTEMS_CPUOPT([RTEMS_DRVMGR_STARTUP],
     234  [test x"$enable_drvmgr" = xyes],
     235  [1],
     236  [if driver manager api is supported])
    231237
    232238RTEMS_CPUOPT([RTEMS_VERSION],
     
    454460posix/Makefile
    455461libblock/Makefile
     462libdrvmgr/Makefile
    456463libfs/Makefile
    457464libfs/src/nfsclient/Makefile
  • cpukit/preinstall.am

    r02550220 re7fade3  
    528528PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/fsmount.h
    529529
     530$(PROJECT_INCLUDE)/drvmgr/$(dirstamp):
     531        @$(MKDIR_P) $(PROJECT_INCLUDE)/drvmgr
     532        @: > $(PROJECT_INCLUDE)/drvmgr/$(dirstamp)
     533PREINSTALL_DIRS += $(PROJECT_INCLUDE)/drvmgr/$(dirstamp)
     534
     535$(PROJECT_INCLUDE)/drvmgr/drvmgr.h: libdrvmgr/drvmgr.h $(PROJECT_INCLUDE)/drvmgr/$(dirstamp)
     536        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/drvmgr/drvmgr.h
     537PREINSTALL_FILES += $(PROJECT_INCLUDE)/drvmgr/drvmgr.h
     538
     539$(PROJECT_INCLUDE)/drvmgr/drvmgr_confdefs.h: libdrvmgr/drvmgr_confdefs.h $(PROJECT_INCLUDE)/drvmgr/$(dirstamp)
     540        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/drvmgr/drvmgr_confdefs.h
     541PREINSTALL_FILES += $(PROJECT_INCLUDE)/drvmgr/drvmgr_confdefs.h
     542
     543$(PROJECT_INCLUDE)/drvmgr/drvmgr_list.h: libdrvmgr/drvmgr_list.h $(PROJECT_INCLUDE)/drvmgr/$(dirstamp)
     544        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/drvmgr/drvmgr_list.h
     545PREINSTALL_FILES += $(PROJECT_INCLUDE)/drvmgr/drvmgr_list.h
     546
  • cpukit/sapi/include/confdefs.h

    r02550220 re7fade3  
    161161 */
    162162#define CONFIGURE_LIBIO_POSIX_KEYS 1
     163
     164/**
     165 *  Driver Manager Configuration
     166 */
     167#ifdef RTEMS_DRVMGR_STARTUP
     168  #define CONFIGURE_DRVMGR_SEMAPHORES 1
     169#else
     170  #define CONFIGURE_DRVMGR_SEMAPHORES 0
     171#endif
    163172
    164173#ifdef CONFIGURE_INIT
     
    21712180      CONFIGURE_TERMIOS_SEMAPHORES + CONFIGURE_LIBBLOCK_SEMAPHORES + \
    21722181      CONFIGURE_SEMAPHORES_FOR_FILE_SYSTEMS + \
    2173       CONFIGURE_NETWORKING_SEMAPHORES)
     2182      CONFIGURE_NETWORKING_SEMAPHORES + CONFIGURE_DRVMGR_SEMAPHORES)
    21742183
    21752184  /**
  • cpukit/sapi/src/exinit.c

    r02550220 re7fade3  
    5757#include <rtems/posix/posixapi.h>
    5858
     59#ifdef RTEMS_DRVMGR_STARTUP
     60  #include <drvmgr/drvmgr.h>
     61#endif
     62
    5963Objects_Information *_Internal_Objects[ OBJECTS_INTERNAL_CLASSES_LAST + 1 ];
    6064
     
    162166void rtems_initialize_before_drivers(void)
    163167{
     168  #ifdef RTEMS_DRVMGR_STARTUP
     169  _DRV_Manager_initialization();
     170  #endif
    164171
    165172  #if defined(RTEMS_MULTIPROCESSING)
     
    183190   */
    184191
     192  #ifdef RTEMS_DRVMGR_STARTUP
     193  /* BSPs has already registered their "root bus" driver in the
     194   * bsp_predriver hook or so.
     195   *
     196   * Init Drivers to Level 1, constraints:
     197   *   - Interrupts and system clock timer does not work.
     198   *   - malloc() work, however other memory services may not
     199   *     have been initialized yet.
     200   *   - initializes most basic stuff
     201   *
     202   * Typical setup in Level 1:
     203   *   - Find most devices in system, do PCI scan and configuration.
     204   *   - Reset hardware if needed.
     205   *   - Install IRQ driver
     206   *   - Install Timer driver
     207   *   - Install console driver and debug printk()
     208   *   - Install extra memory.
     209   */
     210  _DRV_Manager_init_level(1);
     211  bsp_driver_level_hook(1);
     212  #endif
     213
     214  /* Initialize I/O drivers.
     215   *
     216   * Driver Manager note:
     217   * All drivers may not be registered yet. Drivers will dynamically
     218   * be initialized when registered in level 2,3 and 4.
     219   */
    185220  _IO_Initialize_all_drivers();
     221
     222  #ifdef RTEMS_DRVMGR_STARTUP
     223  /* Init Drivers to Level 2, constraints:
     224   *  - Interrupts can be registered and enabled.
     225   *  - System Clock is running
     226   *  - Console may be used.
     227   *
     228   * This is typically where drivers are initialized
     229   * for the first time.
     230   */
     231  _DRV_Manager_init_level(2);
     232  bsp_driver_level_hook(2);
     233
     234  /* Init Drivers to Level 3
     235   *
     236   * This is typically where normal drivers are initialized
     237   * for the second time, they may depend on other drivers
     238   * API inited in level 2
     239   */
     240  _DRV_Manager_init_level(3);
     241  bsp_driver_level_hook(3);
     242
     243  /* Init Drivers to Level 4,
     244   * Init drivers that depend on services initialized in Level 3
     245   */
     246  _DRV_Manager_init_level(4);
     247  bsp_driver_level_hook(4);
     248  #endif
    186249
    187250  #if defined(RTEMS_MULTIPROCESSING)
  • cpukit/wrapup/Makefile.am

    r02550220 re7fade3  
    6464
    6565TMP_LIBS += ../libmisc/libuuid.a
    66 
    6766TMP_LIBS += ../libi2c/libi2c.a
    68 
    6967TMP_LIBS += ../libpci/libpci.a
     68TMP_LIBS += ../libdrvmgr/libdrvmgr.a
    7069
    7170if LIBNETWORKING
Note: See TracChangeset for help on using the changeset viewer.