Port-vax archive

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

Re: Wrong timestamps in vax test results



BSD uses a bias of (1<<28) for TODR to see if it has a reasonable value, otherwise it complains.

-- R

Den 2026-04-11 kl. 17:29, skrev Johnny Billquist:
Yeah, it's the TODR I was thinking about.
Possibly 0 if power lost, or not "working", which is a clear indication that time isn't available.

However, if it is non-zero, we don't really know much. It will wrap after approx 497 days. What happens then is unclear. Some machines might stop the counter, others just keep counting. If power have been lost, TODR might be zero, or might just be some low value. VARM recommends that a system sets it to something like a month in, so that it can be obvious if power was lost. However, that is only true if the system as not been powered off more than one year, otherwise, even if that counter is powered the whole time, you have no idea what time it is.

And yes, some machines don't even have a TODR. So this also becomes a question of what machine is emulated. But the majority of all VAXen have a TODR. Ones that don't: uVAX I, uVAX II, 8800, CVAX and VVAX.

But the "preposterous value" is just a subjective value that NetBSD triggers on. There are no "obvious" preposterous values.

  Johnny

On 2026-04-11 15:41, Mouse wrote:
You need to set the clock, using ntp, or a command, or whatever.
VAXen in general do not have an external clock that tells absolute
time.  There is a clock that runs when power is off, but it only
keeps track of time for about a year before it wraps (it's a simple
counter).

Don't both of those depend on the particular VAX in question? The one
I know best (the KA630) does have a clock chip that keeps absolute
time (but with one-second resolution), and I'm fairly sure it doesn't
have any "simple counter" clock that runs when power is off - are you
talking about the TODR?  It can be subsetted out and even if present
may not have battery backup; even if it does, the battery backup often
won't last anything like a year (the "year" probably comes from the
TODR wraparound time, which is between 497 and 498 days).
EL-00032-00-decStd32_Jan90 says

       The counter has an optional battery back-up  power supply  sufficient
       for  at  least  100 hours of operation, [...]
                                        [...].  If the battery has failed, so        that time is not accurate, then the register is cleared upon power-up.

and also says the MicroVAX-II TODR "Reads as zero, ignores writes".
EK-KA630-UG-001 (pages 4-3 and 4-4) agrees, describing the TODR as
"read as 0, no operation (NOP) on write".

Not that I expect SIMH's KA630 to be popular as a test machine; if
nothing else, if the simulation is accurate it's limited to 16M of RAM.

/~\ The ASCII                  Mouse
\ / Ribbon Campaign
  X  Against HTML        mouse%rodents-montreal.org@localhost
/ \ Email!         7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B




Home | Main Index | Thread Index | Old Index