Port-vax archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: PSA: Clock drift and pkgin



On Fri, 15 Dec 2023, Johnny Billquist wrote:

> > > I'm quite sure that all VAXen that have a hires clock uses it in time
> > > difference calculations.
> > > There are two of them; the ICR version and the clock chip version. See
> > > clock.c
> > > for more info.
> > 
> >   Thanks for the pointer.  Hmm, indeed we have this:
> > 
> > #if VAX46 || VAXANY
> > static struct timecounter vax_diag_tc = {
> > 	.tc_get_timecount = vax_diag_get_counter,
> > 	.tc_counter_mask = ~0u,
> > 	.tc_frequency = 1000000,
> > 	.tc_name = "diagtimer",
> > 	.tc_quality = 100,
> > };
> > #endif
> > 
> > but the frequency recorded in this structure does not correspond to one in
> > hardware, which is 2^26/68.26s => 983136Hz, according to the KA46 spec.  I
> > need to rebuild the kernel anyway as sadly GENERIC doesn't have the TC-USB
> > option enabled, so I'll see if fixing the frequency changes things anyhow.
> 
> 983136 is pretty close to 1000000. However, without looking at the code, isn't
> that the diagnostics timecounter? Now used for anything really related to time
> keeping, but just for some other information, like sampling the state of the
> cpu and so on?

 It's just a free-running counter, as good as any.  The KA46 has no ICR.

  Maciej


Home | Main Index | Thread Index | Old Index