Code review comment for lp:~epics-core/epics-base/devlib2mmio

Revision history for this message
Andrew Johnson (anj) wrote :

When I started testing this code on VxWorks I came up with a major problem: There are two non-standards for the sysIn*/sysOut* PCIbus access routine names, and older (68K-based) boards don't have them at all.

The code works fine on the mv2700, mv5100 and mv6100 BSPs, but it won't load on the mv2100 or mv3100 without modifying the BSP. When I load the libCom tests on those boards I get this:

mv3100> load "bin/vxWorks-ppc32sf/libComTestHarness.munch"
Warning: module 0x31a9c0 holds reference to undefined symbol sysIn32.
Warning: module 0x31a9c0 holds reference to undefined symbol sysIn16.
Warning: module 0x31a9c0 holds reference to undefined symbol sysOut16.
Warning: module 0x31a9c0 holds reference to undefined symbol sysOut32.
ld(): module contains undefined symbol(s) and may be unusable.
value = 0 = 0x0

On these BSPs the access routines are named sysInLong(), sysInWord(), sysOutLong() and sysOutWord(), and of course we can't distinguish between them at compile-time since the same object code can be loaded on most boards.

On the 68K-based BSPs that don't have a PCIbus, I get this:

5.5.2> load "bin/vxWorks-68040/libComTestHarness.munch"
undefined symbol: _sysOutByte
undefined symbol: _sysInByte
undefined symbol: _sysOut16
undefined symbol: _sysIn16
undefined symbol: _sysOut32
undefined symbol: _sysIn32
ld error: Module contains undefined symbol(s) and may be unusable.
value = 0 = 0x0

The 68K family use a.out format binaries which don't support weak symbols, but those are available o the PowerPC boards and could be used. A better solution though would be to do symbol look-ups with symFindByNameEPICS() at C++ static initialization time, which will work on all architectures.

Sorry it has taken me this long to bring this issue to your attention.

- Andrew

« Back to merge proposal