Changeset a31845f7 in rtems


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

LIBPCI: added PCI layer to cpukit/libpci

Files:
35 added
11 edited

Legend:

Unmodified
Added
Removed
  • cpukit/Makefile.am

    re51eb80 ra31845f7  
    1010SUBDIRS += libcsupport libblock libfs
    1111SUBDIRS += libnetworking librpc
     12SUBDIRS += libpci
    1213SUBDIRS += libi2c
    1314SUBDIRS += libmisc
     
    9697include_rtems_HEADERS += include/rtems/userenv.h
    9798include_rtems_HEADERS += include/rtems/fs.h
     99if !LIBPCI
    98100include_rtems_HEADERS += include/rtems/pci.h
     101endif
    99102include_rtems_HEADERS += include/rtems/concat.h
    100103include_rtems_HEADERS += include/rtems/status-checks.h
  • cpukit/configure.ac

    re51eb80 ra31845f7  
    410410AM_CONDITIONAL(SHA,[test x"$HAVE_SHA" = x"yes"])
    411411AC_MSG_RESULT([$HAVE_SHA])
     412
     413# Filter libpci to only build for architectures that have support for it
     414AC_MSG_CHECKING([whether CPU supports libpci])
     415case $RTEMS_CPU in
     416  sparc)
     417   HAVE_LIBPCI=yes ;;
     418  *)
     419   HAVE_LIBPCI=no ;;
     420esac
     421AM_CONDITIONAL(LIBPCI,[test x"$HAVE_LIBPCI" = x"yes"])
     422AC_MSG_RESULT([$HAVE_LIBPCI])
    412423
    413424RTEMS_AMPOLISH3
     
    449460libcsupport/Makefile
    450461libnetworking/Makefile
     462libpci/Makefile
    451463librpc/Makefile
    452464libmisc/Makefile
  • cpukit/preinstall.am

    re51eb80 ra31845f7  
    233233PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/fs.h
    234234
     235if !LIBPCI
    235236$(PROJECT_INCLUDE)/rtems/pci.h: include/rtems/pci.h $(PROJECT_INCLUDE)/rtems/$(dirstamp)
    236237        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/pci.h
    237238PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/pci.h
    238 
     239endif
    239240$(PROJECT_INCLUDE)/rtems/concat.h: include/rtems/concat.h $(PROJECT_INCLUDE)/rtems/$(dirstamp)
    240241        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/concat.h
  • cpukit/sapi/include/confdefs.h

    re51eb80 ra31845f7  
    34813481#endif
    34823482
     3483/*
     3484 *  Select PCI Configuration Library
     3485 */
     3486#ifdef RTEMS_PCI_CONFIG_LIB
     3487  #ifdef CONFIGURE_INIT
     3488    #define PCI_LIB_NONE 0
     3489    #define PCI_LIB_AUTO 1
     3490    #define PCI_LIB_STATIC 2
     3491    #define PCI_LIB_READ 3
     3492    #define PCI_LIB_PERIPHERAL 4
     3493    #if CONFIGURE_PCI_LIB == PCI_LIB_AUTO
     3494      #define PCI_CFG_AUTO_LIB
     3495      #include <pci/cfg.h>
     3496      struct pci_bus pci_hb;
     3497      #define PCI_LIB_INIT pci_config_auto
     3498      #define PCI_LIB_CONFIG pci_config_auto_register
     3499    #elif CONFIGURE_PCI_LIB == PCI_LIB_STATIC
     3500      #define PCI_CFG_STATIC_LIB
     3501      #include <pci/cfg.h>
     3502      #define PCI_LIB_INIT pci_config_static
     3503      #define PCI_LIB_CONFIG NULL
     3504      /* Let user define PCI configuration (struct pci_bus pci_hb) */
     3505    #elif CONFIGURE_PCI_LIB == PCI_LIB_READ
     3506      #define PCI_CFG_READ_LIB
     3507      #include <pci/cfg.h>
     3508      #define PCI_LIB_INIT pci_config_read
     3509      #define PCI_LIB_CONFIG NULL
     3510      struct pci_bus pci_hb;
     3511    #elif CONFIGURE_PCI_LIB == PCI_LIB_PERIPHERAL
     3512      #define PCI_LIB_INIT pci_config_peripheral
     3513      #define PCI_LIB_CONFIG NULL
     3514      /* Let user define PCI configuration (struct pci_bus pci_hb) */
     3515    #elif CONFIGURE_PCI_LIB == PCI_LIB_NONE
     3516      #define PCI_LIB_INIT NULL
     3517      #define PCI_LIB_CONFIG NULL
     3518      /* No PCI Configuration at all, user can use/debug access routines */
     3519    #else
     3520      #error NO PCI LIBRARY DEFINED
     3521    #endif
     3522
     3523    const int pci_config_lib_type = CONFIGURE_PCI_LIB;
     3524    int (*pci_config_lib_init)(void) = PCI_LIB_INIT;
     3525    void (*pci_config_lib_register)(void *config) = PCI_LIB_CONFIG;
     3526  #endif
     3527#endif
     3528
    34833529#ifdef __cplusplus
    34843530}
  • cpukit/wrapup/Makefile.am

    re51eb80 ra31845f7  
    6767TMP_LIBS += ../libi2c/libi2c.a
    6868
     69TMP_LIBS += ../libpci/libpci.a
     70
    6971if LIBNETWORKING
    7072TMP_LIBS += ../libnetworking/libnetworking.a
  • doc/ada_user/Makefile.am

    re51eb80 ra31845f7  
    1717    $(top_builddir)/user/glossary.texi $(top_builddir)/user/init.texi \
    1818    $(top_builddir)/user/intr.texi $(top_builddir)/user/io.texi \
     19    $(top_builddir)/user/libpci.texi  \
    1920    $(top_builddir)/user/mp.texi $(top_builddir)/user/msg.texi \
    2021    $(top_builddir)/user/overview.texi $(top_builddir)/user/part.texi \
  • doc/ada_user/ada_user.texi

    re51eb80 ra31845f7  
    109109* Multiprocessing Manager::
    110110* Symmetric Multiprocessing Services::
     111* PCI Library::
    111112* Stack Bounds Checker::
    112113* CPU Usage Statistics::
     
    154155@include user/mp.texi
    155156@include user/smp.texi
     157@include user/libpci.texi
    156158@include user/stackchk.texi
    157159@include user/cpuuse.texi
  • doc/develenv/direct.t

    re51eb80 ra31845f7  
    449449RPC/XDR source to RTEMS.
    450450
     451@item $@{RTEMS_ROOT@}/cpukit/libpci/
     452This directory contains RTEMS PCI Library.
     453
    451454@item $@{RTEMS_ROOT@}/cpukit/posix/
    452455This directory contains the RTEMS implementation
  • doc/user/Makefile.am

    re51eb80 ra31845f7  
    1616    schedule.texi rtmon.texi barrier.texi bsp.texi userext.texi conf.texi \
    1717    mp.texi stackchk.texi cpuuse.texi object.texi chains.texi rbtree.texi \
    18     timespec.texi cbs.texi dirstat.texi smp.texi
     18    timespec.texi cbs.texi dirstat.texi smp.texi libpci.texi
    1919
    2020COMMON_FILES += $(top_srcdir)/common/cpright.texi
     
    167167        $(BMENU2) -p  "Multiprocessing Manager MULTIPROCESSING_ANNOUNCE - Announce the arrival of a packet"\
    168168            -u "Top" \
     169            -n "PCI Library" < $< > $@
     170
     171libpci.texi: libpci.t
     172        $(BMENU2) -p "Symmetric Multiprocessing Services TASK_SET_AFFINITY - Set task processor affinity" \
     173            -u "Top" \
    169174            -n "Stack Bounds Checker" < $< > $@
    170175
    171176stackchk.texi: stackchk.t
    172         $(BMENU2) -p "Symmetric Multiprocessing Services TASK_SET_AFFINITY - Set task processor affinity" \
     177        $(BMENU2) -p "PCI Library PCI Shell command" \
    173178            -u "Top" \
    174179            -n "CPU Usage Statistics" < $< > $@
  • doc/user/c_user.texi

    re51eb80 ra31845f7  
    108108* Multiprocessing Manager::
    109109* Symmetric Multiprocessing Services::
     110* PCI Library::
    110111* Stack Bounds Checker::
    111112* CPU Usage Statistics::
     
    153154@include mp.texi
    154155@include smp.texi
     156@include libpci.texi
    155157@include stackchk.texi
    156158@include cpuuse.texi
  • doc/user/conf.t

    re51eb80 ra31845f7  
    52745274
    52755275@c
     5276@c === PCI Library ===
     5277@c
     5278@section PCI Library
     5279
     5280This section defines the system configuration paramters supported
     5281by @code{rtems/confdefs.h} related to configuring the PCI Library
     5282for RTEMS.
     5283
     5284The PCI Library startup behaviour can be configured in four diffent
     5285ways depending on how @code{CONFIGURE_PCI_CONFIG_LIB} is defined:
     5286
     5287@itemize @bullet
     5288@findex PCI_LIB_AUTO
     5289@item @code{PCI_LIB_AUTO} is used to enable the PCI auto configuration
     5290software. PCI will be automatically probed, PCI buses enumerated, all
     5291devices and bridges will be initialized using Plug & Play software
     5292routines. The PCI device tree will be populated based on the PCI devices
     5293found in the system, PCI devices will be configured by allocating address
     5294region resources automatically in PCI space according to the BSP or host
     5295bridge driver set up.
     5296
     5297@findex PCI_LIB_READ
     5298@item @code{PCI_LIB_READ} is used to enable the PCI read configuration
     5299software. The current PCI configuration is read to create the RAM
     5300representation (the PCI device tree) of the PCI devices present. PCI devices
     5301are assumed to already have been initialized and PCI buses enumrated, it is
     5302therefore required that a BIOS or a boot loader has set up configuration space
     5303prior to booting into RTEMS.
     5304
     5305@findex PCI_LIB_STATIC
     5306@item @code{PCI_LIB_STATIC} is used to enable the PCI static configuration
     5307software. The user provides a PCI tree with information how all PCI devices
     5308are to be configured at compile time by linking in a custom
     5309@code{struct pci_bus pci_hb} tree. The static PCI library will not probe PCI
     5310for devices, instead it will assume that all devices defined by the user is
     5311present, it will enumerate the PCI buses and configure all PCI devices in
     5312static configuration accordingly. Since probe and allocation software is not
     5313needed the startup is faster, have smaller footprint and does not require
     5314dynamic memory allocation.
     5315
     5316@findex PCI_LIB_PERIPHERAL
     5317@item @code{PCI_LIB_PERIPHERAL} is used to enable the PCI peripheral
     5318configuration. It is similar to @code{PCI_LIB_STATIC}, but is will never write
     5319the configuration to the PCI devices since PCI peripherals are not allowed to
     5320access PCI configuration space.
     5321
     5322@end itemize
     5323
     5324Note that selecting PCI_LIB_STATIC or PCI_LIB_PERIPHERAL but not defining
     5325@code{pci_hb} will reuslt in link errors. Note also that in these modes
     5326Plug & Play is not performed.
     5327
     5328@c
    52765329@c === Go Tasks ===
    52775330@c
Note: See TracChangeset for help on using the changeset viewer.