What is it?
devLib2 is an extension to the EPICS OS independent VME bus access library found in the EPICS Base. The MMIO API is included in EPICS Base >=184.108.40.206
Releases can be found at http://sourceforge.net/projects/epics/files/devlib2/
VCS source browser https://github.com/epics-modules/devlib2
Or checked out with
git clone https://github.com/epics-modules/devlib2.git
The canonical version of this page is http://epics.sourceforge.net/devlib2/
EPICS Base >= 220.127.116.11
devLib2 adds features in several areas: PCI bus access, VME64x CSR/CSR, and memory mapped I/O (MMIO) operations.
The PCI bus access interface is entirely new. It is currently implemented for RTEMS, vxWorks, and Linux (with some limitations). The PCI interface provides functions for: searching the bus, mapping devices into process memory, and (dis)connecting interrupts.
Runtime selection of implementations is also supported. This allows code using this interface to compile and link for all target, even those which lack an implementation.
The VME64x library provides several functions for accessing the CSR/CR address space defined by VME64 and extended by VME64x. This includes: probing by slot number and matching by identifier registers, definitions of standard registers, and functions to access them.
The MMIO library provides an OS and CPU architecture independent way to safely access memory mapped I/O devices. Makes guarantees of the width and order of accesses.
2.8 (Sept. 2016)
- Fixes an bug with epicsMMIO.h for some targets where a single read macro expands to either 2 (16 bit) or 4 (32 bit) loads in situations where a byte swap is necessary. Effects all targets except RTEMS on powerpc to some degree. On Linux be_*() or le_*() are effected (depending on target byte order). On vxWorks nat_*() and le_* are effected on big endian targets, and le_*() on little endian targets.
- pci: Bump API version to 1.3
- pci: Add PCI ID match macro DEVPCI_DEVICE_ANY()
- pci: Add member epicsPCIDevice::slot and macro DEVPCI_NO_SLOT
- pci/linux: Look at /sys/bus/pci/slots/*/address to populate slot member.
- pci: Add function devPCIFindSpec() to search by text string. Understands PCI bus address, slot number, and/or instance number
- Add devPCIShowMatch() variant of devPCIShow() using devPCIFindSpec().
2.7 (Jan. 2016)
- configure: optionally include $(TOP)/configure/RELEASE.local and $(TOP)/../RELEASE.local. $(EPICS_BASE) is no longer defined by default in configure/RELEASE and must be explicitly set in one of the possible RELEASE* files.
- Fix compile failure on vxWorks (Eric Bjorklund)
- Add missing extern "C" in epicsMMIO.h for vxWorks (Eric Bjorklund)
- In epicsMMIODef.h replace 'inline' with 'static inline' for C compatibility.
- RTEMS: handle BSPs with offset PCI addresses
- pci/linux: devPCIDebug>1 enables more debug output when searching/matching PCI devices.
- pci/linux: fix error preventing use of uio devices other than uio0.
- vme: add vmewrite(), vmeirqattach(), and vmeirq() iocsh commands for debugging/development with VME devices.
2.6 (May 2015)
- VCS repository moved to github.com
- Increment API version to 1.2 (was 1.0)
- epicsMMIO.h included in EPICS Base 3.15.1, not installed by this module.
Work by Andrew Johnson
- Import support for vxWorks 5.5 on m68k and powerpc from EPICS Base.
Work by Till Straumann
- Add PCI Config space access functions devPCIConfigRead##() and devPCIConfigWrite##()
- Add devPCIEnableInterrupt() and devPCIDisableInterrupt().
- Linux: invoke the UIO irqcontrol callback function with a 1 or 0.
- vxWorks: call intEnable or intDisable (enabled by default). (Dirk Zimoch)
Work by Dirk Zimoch
- Rework of the Linux PCI bus scan to support PCI domains. Previously domain 0 was used implicitly.
- Rework of the vxWorks/RTEMS PCI bus scan to allow wildcards in device search. This allows devPCIShow for all PCI devices like in Linux.
- Fixes for 64 bit BARs.
- vxWorks: use BAR address directly if sysBusToLocalAdrs does not support PCI.
- Changes in devPCIShow to get nicer output.
Work by Michael Davidsaver
2.5 (May 2014)
- Linux: possible string corruption in vallocPrintf() Found by Till Straumann
- vxWorks: lookup symbols including sysBusToLocalAdrs at runtime. Work by Eric and Dirk Zimoch
- RTEMS: Select no-op MMIO implementation for m68k (no special handling required)
2.4 (Oct. 2012)
- Remove C++ style comments from epicsMMIODef.h and devcsr.h
- Fix Issue preventing Custom PCI bus implementation. (Found by Dan Eichel)
- Linux "ISR" thread stack size not correct (Fixed by Till Straumann)
- Linux: Previous versions expected Linux kernel modules to leave gaps for un-mappable PCI BARs (I/O Ports). However, most existing kernel modules don't do this. Add a flag to devPCIToLocalAddr() to specify how a device's kernel module does mapping. The default is to map as in previous versions. (New behavior by Till Straumann) See documentation of devPCIToLocalAddr().
2.3 (Apr. 2012)
- Include proper headers to enable memory barriers for vxWorks >= 6.6
- Fallback to noop when vxWorks memory barriers are not available
- Fix incorrect return code when connecting pci interrupts on vxWorks
2.2 (Sept. 2011)
- linux: follow changes to /sys (needed for kernel >2.6.26)
- pci: IOC shell functions added: pciread()
- pci: vxworks translate PCI addresses
- Build on vxWorks 6.8 (Thanks to Andrew Johnson)
- pci: Make operations reentrant on RTEMS and vxWorks (previously was not oops.)
- pci: Fix bug with devPCIBarLen on RTEMS and vxWorks.
2.1 (Jan. 2011)
- Fix build issue with 3.14.12 with RTEMS pc386 (found by Jim Chen from Hytec)
- Add notification of missed PCI interrupt events on Linux
- Additional arguement 'count' for vmeread() to show blocks of registers
- Add section to PCI Usage on x86 Port I/O
- Add section to PCI Access in Linux concerning hardware requirements
2.0 (Sept. 2010)
- Michael Davidsaver firstname.lastname@example.org@email@example.com@firstname.lastname@example.org
Till Straumann email@example.com@.firstname.lastname@example.org..email@example.com@m.ford..firstname.lastname@example.org
Dirk Zimoch dirk..email@example.com@firstname.lastname@example.org@m.i.ch