simh-testsetgenerator/Interdata
Davis Johnson 8085f5ea25 ID32: Fix DP unit busy test
The problem turned out to be a call to sim_is_active() from id_dp.c with
an invalid pointer. This surprised me some since this isn’t a module that
changed significantly.

In normal disk operation the driver accesses the disk address (sometimes
called file address in the hardware docs) before accessing the controller
address. The simh disk emulator (dp.c) sets a current disk variable,
dp_svun, to the current disk address when a disk is accessed. It gets
set to 0 initially and under some other circumstances.

The address of passed to sim_is_active() is calculated, in part, by
subtracting the controller address from the disk address. This results
in a bigish negative offset from the beginning of an array if dp_svun
is 0.

The diagnostic sends a disarm-disable (x’c0’) command to every device
address, from 0 to x’3ff’. This hits the controller before the disk,
exercising the error.

This same thing happened in v38-1, but sim_is_active() did not
dereference the pointer passed to it, but scanned an array for that
pointer value. The current version does dereference the pointer.

My crude fix, which does not make me happy, is to replace the call
sim_is_active(uptr) with (dp_svun && sim_is_active(uptr)). This does
give behavior identical to v38-1 and allows me to proceed.
2021-07-21 18:44:35 -07:00
..
id16_cpu.c ID16, ID32: Compiler warning cleanup 2020-10-20 03:09:33 -07:00
id16_dboot.c ALL: Massive 'const' cleanup 2016-05-15 15:25:33 -07:00
id16_sys.c All: Declare sim_stop_messages as an array SCPE_BASE long 2020-09-02 15:56:07 -07:00
id32_cpu.c ID16, ID32: Compiler warning cleanup 2020-10-20 03:09:33 -07:00
id32_dboot.c ALL: Massive 'const' cleanup 2016-05-15 15:25:33 -07:00
id32_sys.c All: Declare sim_stop_messages as an array SCPE_BASE long 2020-09-02 15:56:07 -07:00
id_defs.h ALL: Massive 'const' cleanup 2016-05-15 15:25:33 -07:00
id_diag.txt Notes For V3.8 2011-04-15 08:35:43 -07:00
id_dp.c ID32: Fix DP unit busy test 2021-07-21 18:44:35 -07:00
id_fd.c ALL: Correct help text in "SET <unit> LOCKED" MTAB entries 2021-04-19 15:22:15 -07:00
id_fp.c ALL: Massive 'const' cleanup 2016-05-15 15:25:33 -07:00
id_idc.c ALL: Correct help text in "SET <unit> LOCKED" MTAB entries 2021-04-19 15:22:15 -07:00
id_io.c ALL: Massive 'const' cleanup 2016-05-15 15:25:33 -07:00
id_lp.c PDP1, PDP10, PDP11, ID16, ID32, NOVA, VAX: Open LPT, PTP devices for append 2020-04-28 07:09:20 -07:00
id_mt.c ALL: Standardize writelock behavior adding global UNIT_WLK & UNIT_WPRT 2021-04-19 10:58:51 -07:00
id_pas.c alpha, HP2100, ID16, ID32, I7094, PDP11 and VAX: Fix array REG definitions 2020-03-06 16:29:17 -08:00
id_pt.c ALL: Massive 'const' cleanup 2016-05-15 15:25:33 -07:00
id_tt.c ID16, ID32: Fixed testing of 8b mode and echoed character (COVERITY) 2017-03-20 07:47:42 -07:00
id_ttp.c ID16, ID32: Fixed testing of 8b mode and echoed character (COVERITY) 2017-03-20 07:47:42 -07:00
id_uvc.c ALL: Massive 'const' cleanup 2016-05-15 15:25:33 -07:00