[ntp:questions] PCI Syncclock32 driver(s)

rodebiet at yahoo.com rodebiet at yahoo.com
Thu Aug 16 18:09:38 UTC 2007

On 16 aug, 17:20, phil.johns... at baesystems.com wrote:
> Hi,
> I have recently installed a PCI Syncclock 32 into a PC running Fedora
> Core 6 however I require a driver (or drivers) so that the system uses
> the PCI Syncclock32 as a reference clock for a time server.
> Can anyone help or point me in the right direction?  I am fairly new
> to all this so may need further explanations at some point.
> Thanks in advance.

Unfortunately, the PCI-SyncClock32 is not supported out-of-the-box. I
use Redhat Enterprise Server 4, and in that version ntpd is not
configured with --enable-GPSVME.

I assume that you know how to build the ntpd from the source code.

you have to use reflock driver type 21, so put in your /etc/ntp.conf

When you do ./configure, please include in the options --enable-GPSVME

the reference clock driver is in ntp/refclock_gpsvme.c, but this
driver is written for HP-UX. It does not support Linux, you need to
change that.

the following part is the problem in refclock_gpsvme.c:

    sprintf(buf, DEVICE, unit);         /* dev file name        */
    fd[unit] = open(buf, O_RDONLY);     /* open device file     */
    if (fd[unit] < 0) {
        msyslog(LOG_ERR, "psc_start: unit: %d, open failed.  %m",
        return 0;

    /* get the address of the mapped regs       */
    if (ioctl(fd[unit], PSC_REGS, &regp[unit]) < 0) {
        msyslog(LOG_ERR, "psc_start: unit: %d, ioctl failed.  %m",
        return 0;

this bit needs to be replaced by some code that does memory mapping on
Linux. The are several ways of achieving this. One way is:
the physical address of the PCI-SyncClock32 can be found by looking
in /proc/bus/pci/devices for the entry with vendor/device id 10b59030.
the address in the Base Address Register 2 is the address you need.
Then you have to memory map this to a user space address using mmap.

I have made a patch to do all this, however, if do not have it with me
at the moment, so a I have to send it to you later, if you're
interested. I did not submit this patch to ntp.org, because I want to
do some more testing.

Hope it helps, Rode Biet

More information about the questions mailing list