1
0
mirror of https://github.com/open-simh/simh.git synced 2026-04-28 21:07:43 +00:00

VAX8200: Fix access to watch chip wtc_rd() and wtc_wr()

- Recent changes in vax_watch.c changed the input parameter from a
  physical address to a register address within the watch chip.
- vax630_sysdev.c called the older wtc_wr() with the new parameter,
  but the length argument has been removed.
- The watch chip never starts as valid.  Make it valid when the TODR is
  attached (i.e. reflecting a connected battery).
- 64 bytes of bus addresses for the watch chip can sometimes be dispatched
  to wtc_rd() and wtc_wr().  Make sure that reasonable memory is always
  referenced for all potential accesses.
- restore vax8200 to makefile which got lost in a prior merge.
This commit is contained in:
Mark Pizzolato
2019-04-23 10:41:10 -07:00
parent a712ba29a6
commit b1766b6dcf
10 changed files with 168 additions and 69 deletions

View File

@@ -34,7 +34,6 @@
*/
#include "vax_defs.h"
#include <time.h>
#ifdef DONT_USE_INTERNAL_ROM
#if defined(VAX_620)
@@ -165,10 +164,6 @@ extern int32 qbmap_rd (int32 pa);
extern void qbmap_wr (int32 pa, int32 val, int32 lnt);
extern int32 qbmem_rd (int32 pa);
extern void qbmem_wr (int32 pa, int32 val, int32 lnt);
extern int32 wtc_rd (int32 pa);
extern void wtc_wr (int32 pa, int32 val, int32 lnt);
extern void wtc_set_valid (void);
extern void wtc_set_invalid (void);
extern int32 iccs_rd (void);
extern int32 todr_rd (void);
extern int32 rxcs_rd (void);
@@ -411,7 +406,7 @@ void nvr_wr (int32 pa, int32 val, int32 lnt)
int32 rg = (pa + 1 - NVRBASE) >> 1;
if (rg < 14) /* watch chip */
wtc_wr (rg, val, lnt);
wtc_wr (rg, val);
else {
int32 orig_nvr = (int32)nvr[rg];