Changeset 1b645c3 in rtems


Ignore:
Timestamp:
Apr 8, 2015, 3:00:43 PM (5 years ago)
Author:
Daniel Hellstrom <daniel@…>
Branches:
4.11, master
Children:
cc3f87c
Parents:
f4bf22c
git-author:
Daniel Hellstrom <daniel@…> (04/08/15 15:00:43)
git-committer:
Daniel Hellstrom <daniel@…> (04/16/15 23:10:28)
Message:

LIBPCI: corrected documentation

Location:
doc/user
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • doc/user/conf.t

    rf4bf22c r1b645c3  
    52785278@section PCI Library
    52795279
    5280 This section defines the system configuration paramters supported
     5280This section defines the system configuration parameters supported
    52815281by @code{rtems/confdefs.h} related to configuring the PCI Library
    52825282for RTEMS.
    52835283
    5284 The PCI Library startup behaviour can be configured in four diffent
     5284The PCI Library startup behaviour can be configured in four different
    52855285ways depending on how @code{CONFIGURE_PCI_CONFIG_LIB} is defined:
    52865286
     
    52995299software. The current PCI configuration is read to create the RAM
    53005300representation (the PCI device tree) of the PCI devices present. PCI devices
    5301 are assumed to already have been initialized and PCI buses enumrated, it is
     5301are assumed to already have been initialized and PCI buses enumerated, it is
    53025302therefore required that a BIOS or a boot loader has set up configuration space
    53035303prior to booting into RTEMS.
     
    53085308are to be configured at compile time by linking in a custom
    53095309@code{struct pci_bus pci_hb} tree. The static PCI library will not probe PCI
    5310 for devices, instead it will assume that all devices defined by the user is
     5310for devices, instead it will assume that all devices defined by the user are
    53115311present, it will enumerate the PCI buses and configure all PCI devices in
    53125312static configuration accordingly. Since probe and allocation software is not
    5313 needed the startup is faster, have smaller footprint and does not require
     5313needed the startup is faster, has smaller footprint and does not require
    53145314dynamic memory allocation.
    53155315
    53165316@findex PCI_LIB_PERIPHERAL
    53175317@item @code{PCI_LIB_PERIPHERAL} is used to enable the PCI peripheral
    5318 configuration. It is similar to @code{PCI_LIB_STATIC}, but is will never write
     5318configuration. It is similar to @code{PCI_LIB_STATIC}, but it will never write
    53195319the configuration to the PCI devices since PCI peripherals are not allowed to
    53205320access PCI configuration space.
  • doc/user/libpci.t

    rf4bf22c r1b645c3  
    33@c  Aeroflex Gaisler AB
    44@c  All rights reserved.
    5 @c
    6 @c  $Id: libpci.t,v v.vv xxxx/yy/zz xx:yy:zz ? Exp $
    75@c
    86
     
    3028systems in mind the PCI Library offers four different configuration options
    3129listed below. It is selected during compile time by defining the appropriate
    32 macros in confdefs.h. It is also possible to enable NONE (No Configuration)
    33 which can be used for debuging PCI access functions.
     30macros in confdefs.h. It is also possible to enable PCI_LIB_NONE (No
     31Configuration) which can be used for debuging PCI access functions.
    3432@itemize @bullet
    3533@item Auto Configuration (do Plug & Play)
     
    5048bridge according to the PCI Bridge Architecture specification.
    5149
    52 Using the unique [bus:slot:func] any device can be configured regardless how PCI
    53 is currently set up as long as all PCI buses are enumerated correctly. The
    54 enumration is done during probing, all bridges are given a bus numbers in
     50Using the unique [bus:slot:func] any device can be configured regardless of how
     51PCI is currently set up as long as all PCI buses are enumerated correctly. The
     52enumeration is done during probing, all bridges are given a bus number in
    5553order for the bridges to respond to accesses from both directions. The PCI
    5654library can assign address ranges to which a PCI device should respond using
     
    6967accessed, the peripheral is set up by the host during start up. In complex
    7068embedded PCI systems the peripheral may need to access other PCI boards than
    71 then host. In such systems a custom (static) configuration of both the host
     69the host. In such systems a custom (static) configuration of both the host
    7270and peripheral may be a convenient solution.
    7371
     
    7876OS.
    7977
    80 
    81  The PCI standard
    82 defines and recommends that the backplane route the interupt lines in a
    83 systematic way, however in
     78The PCI standard defines and recommends that the backplane route the interupt
     79lines in a systematic way, however in standard there is no such requirement.
     80The PCI Auto Configuration Library implements the recommended way of routing
     81which is very common but it is also supported to some extent to override the
     82interrupt routing from the BSP or Host Bridge driver using the configuration
     83structure.
    8484
    8585@subsection Software Components
     
    114114signals are routed between PCI-to-PCI bridges and how PCI INT[A..D]# pins are
    115115mapped to system IRQ. In systems where previous software (boot loader or BIOS)
    116 has already set up this the configuration overwritten or simply read out.
     116has already set up this the configuration is overwritten or simply read out.
    117117
    118118In order to support different configuration methods the following configuration
    119 libraries are available can selectable by the user:
     119libraries are selectable by the user:
    120120@itemize @bullet
    121121@item Auto Configuration (run Plug & Play software)
     
    151151@subsubsection Auto Configuration
    152152
    153 The auto configuration software enumerate PCI buses and initializes all PCI
     153The auto configuration software enumerates PCI buses and initializes all PCI
    154154devices found using Plug & Play. The auto configuration software requires
    155155that a configuration setup has been registered by the driver or BSP in order
    156156to setup the I/O and Memory regions at the correct address ranges. PCI
    157157interrupt pins can optionally be routed over PCI-to-PCI bridges and mapped
    158 to a system interrupt number. Resources are sorted by size and required
     158to a system interrupt number. BAR resources are sorted by size and required
    159159alignment, unused "dead" space may be created when PCI bridges are present
    160 due to the PCI bridge window size does not equal the alignment, to cope with
     160due to the PCI bridge window size does not equal the alignment. To cope with
    161161that resources are reordered to fit smaller BARs into the dead space to minimize
    162162the PCI space required. If a BAR or ROM register can not be allocated a PCI
     
    225225
    226226A PCI peripheral is not allowed to do PCI configuration cycles, which means that
    227 is must either rely on the host to give it the addresses it needs, or that the
     227it must either rely on the host to give it the addresses it needs, or that the
    228228addresses are predefined.
    229229
     
    242242@item PCI I/O space
    243243@item Registers over PCI memory space
    244 @item Translate PCI address into CPU accessible address and vice verse
     244@item Translate PCI address into CPU accessible address and vice versa
    245245@end itemize
    246246
     
    263263pci_dev_t type is used to specify a specific PCI bus, device and function. It
    264264is up to the host driver or BSP to create a valid access to the requested
    265 PCI slot. Requests made to slots that is not supported by hardware should
     265PCI slot. Requests made to slots that are not supported by hardware should
    266266result in PCISTS_MSTABRT and/or data must be ignored (writes) or 0xffffffff
    267267is always returned (reads).
     
    289289given to the functions is not the PCI I/O addresses, the caller must have
    290290translated PCI I/O addresses (available in the PCI BARs) into a BSP or host
    291 driver custom address, see @ref{Access functions} how addresses are
     291driver custom address, see @ref{Access functions} for how addresses are
    292292translated.
    293293
     
    335335The PCI Access Library can provide device drivers with function pointers
    336336executing the above Configuration, I/O and Memory space accesses. The
    337 functions have the same arguments and return values as the as the above
     337functions have the same arguments and return values as the above
    338338functions.
    339339
     
    359359@end example
    360360
    361 PCI devices drivers may be written to support run-time detection of endianess,
     361PCI device drivers may be written to support run-time detection of endianess,
    362362this is mosly for debugging or for development systems. When the product is
    363363finally deployed macros switch to using the inline functions instead which
     
    371371using configuration space routines or in the device tree, the addresses given
    372372are PCI addresses. The below functions can be used to translate PCI addresses
    373 into CPU accessible addresses or vise versa, translation may be different for
     373into CPU accessible addresses or vice versa, translation may be different for
    374374different PCI spaces/regions.
    375375
     
    405405@subsection PCI Shell command
    406406
    407 The RTEMS shell have a PCI command 'pci' which makes it possible to read/write
     407The RTEMS shell has a PCI command 'pci' which makes it possible to read/write
    408408configuration space, print the current PCI configuration and print out a
    409409configuration C-file for the static or peripheral library.
Note: See TracChangeset for help on using the changeset viewer.