mirror of
https://github.com/simh/simh.git
synced 2026-01-25 19:56:25 +00:00
VAX & VAX780 Generalized setting TODR for all OSes.
Unbound the TODR value from the 100hz clock tick interrupt. TODR now behaves like the original battery backed-up clock and runs with the wall clock, not the simulated instruction clock (except when running ROM diagnostics).
Two operational modes are available:
- Default VMS mode, which is similar to the previous
behavior in that without initializing the TODR it
would default to the value VMS would set it to if
VMS knew the correct time. This would be correct
almost all the time unless a VMS disk hadn't been
booted from for more than a year. This mode
produces strange time results for non VMS OSes on
each system boot.
- OS Agnostic mode. This mode behaves precisely like
the VAX780 TODR and works correctly for all OSes.
This mode is enabled by attaching the TODR to a
battery backup state file for the TOY clock
(i.e. sim> attach TODR TOY_CLOCK). When operating
in OS Agnostic mode, the TODR will initially start
counting from 0 and be adjusted differently when an
OS specifically writes to the TODR. VMS will prompt
to set the time on the initial boot unless the SYSGEN
parameter TIMEPROMPTWAIT is set to 0.
This commit is contained in:
10
sim_timer.h
10
sim_timer.h
@@ -31,6 +31,15 @@
|
||||
#ifndef _SIM_TIMER_H_
|
||||
#define _SIM_TIMER_H_ 0
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#ifndef CLOCK_REALTIME
|
||||
#define CLOCK_REALTIME 1
|
||||
#define NEED_CLOCK_REALTIME 1
|
||||
int clock_gettime(int clock_id, struct timespec *tp);
|
||||
#endif
|
||||
|
||||
|
||||
#define SIM_NTIMERS 8 /* # timers */
|
||||
#define SIM_TMAX 500 /* max timer makeup */
|
||||
|
||||
@@ -51,6 +60,7 @@
|
||||
#define SIM_THROT_PCT 3
|
||||
|
||||
t_bool sim_timer_init (void);
|
||||
void sim_timespec_diff (struct timespec *diff, struct timespec *min, struct timespec *sub);
|
||||
int32 sim_rtcn_init (int32 time, int32 tmr);
|
||||
void sim_rtcn_init_all (void);
|
||||
int32 sim_rtcn_calb (int32 ticksper, int32 tmr);
|
||||
|
||||
Reference in New Issue
Block a user