[ntp:questions] PCI Syncclock32 driver(s)

hit_those at hotmail.com hit_those at hotmail.com
Fri Aug 17 10:27:24 UTC 2007


On Aug 16, 7:09 pm, "rodeb... at yahoo.com" <rodeb... at yahoo.com> wrote:
> 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
> server 127.127.21.0
>
> When you do ./configure, please include in the options --enable-GPSVME
> --enable-linuxcaps
>
> 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",
> unit);
>         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",
> unit);
>         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

Hi,

I have added server 127.127.21.0 to ntp.conf.

I have also located /proc/bus/pci/devices and found this entry under
10b59030.

0300       10b59030         5            fdbff000         cf01
fdbfe000
                                     0            0
0            fde00000
                                     80          80
20           0
                                     0            0
10000

I'm afraid most of what else you said went a bit over my head because
I may have oversold myself when I said I'm fairly new to this as I am
VERY new to this.  So I have a few more questions:

How do I 'do' ./configure and where can I get the refclock_gpsvme.c
driver from?

I apologise for my lack of knowledge in this area and really
appreciate your help on this.  Of course, if your patch will do all
this for me then I would be very interested in it (email address:
hit_those at talk21.com)!!

Thanks for your help.
Phil.







More information about the questions mailing list