Re: PSA: Clock drift and pkgin

"Maciej W. Rozycki" <[email protected]>
Newsgroups gmane.os.netbsd.ports.vax
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.