mirror of
https://github.com/simh/simh.git
synced 2026-01-11 23:52:58 +00:00
PDP11 & Unibus/Qbus VAXen: Detect devices missing addresses before boot
If autoconfigure is disabled, either explicitly or implicitly by manual setting of an ADDRESS or VECTOR, detect devices which don't have addresses before boot.
This commit is contained in:
parent
d6ebe32b30
commit
31e7a7f3e0
@ -497,11 +497,13 @@ typedef struct {
|
||||
#define DEV_V_QBUS (DEV_V_UF + 1) /* Qbus */
|
||||
#define DEV_V_Q18 (DEV_V_UF + 2) /* Qbus with <= 256KB */
|
||||
#define DEV_V_MBUS (DEV_V_UF + 3) /* Massbus */
|
||||
#define DEV_V_FFUF (DEV_V_UF + 4) /* first free flag */
|
||||
#define DEV_V_NOAUTOCON (DEV_V_UF + 4) /* Don't autoconfigure */
|
||||
#define DEV_V_FFUF (DEV_V_UF + 5) /* first free flag */
|
||||
#define DEV_UBUS (1u << DEV_V_UBUS)
|
||||
#define DEV_QBUS (1u << DEV_V_QBUS)
|
||||
#define DEV_Q18 (1u << DEV_V_Q18)
|
||||
#define DEV_MBUS (1u << DEV_V_MBUS)
|
||||
#define DEV_NOAUTOCON (1u << DEV_V_NOAUTOCON)
|
||||
|
||||
#define DEV_RDX 8 /* default device radix */
|
||||
|
||||
|
||||
@ -442,6 +442,18 @@ for (i = 0; i < (int32) dibp->lnt; i = i + 2) { /* create entries */
|
||||
iodibp[idx] = dibp; /* remember DIB */
|
||||
}
|
||||
}
|
||||
for (j = 0; (cdptr = sim_devices[j]) != NULL; j++) { /* Look for enabled but unaddressed devices */
|
||||
DIB *cdibp = (DIB *)(cdptr->ctxt);
|
||||
|
||||
if (((sim_switches & SWMASK ('P')) != 0) ||
|
||||
(cdptr->flags & DEV_DIS) ||
|
||||
(cdibp == NULL) ||
|
||||
((cdptr->flags & (DEV_UBUS | DEV_QBUS)) == 0) ||
|
||||
((cdptr->flags & DEV_NOAUTOCON) != 0) ||
|
||||
(cdibp->ba != IOBA_AUTO))
|
||||
continue;
|
||||
return sim_messagef (SCPE_STOP, "%s: Missing Address\n", cdptr->name);
|
||||
}
|
||||
return SCPE_OK;
|
||||
}
|
||||
|
||||
|
||||
@ -62,7 +62,7 @@ DEVICE rom_dev = {
|
||||
ROM_UNITS, 8, 9, 2, 8, 16,
|
||||
rom_ex, rom_dep, rom_reset,
|
||||
&rom_boot, &rom_attach, &rom_detach,
|
||||
&rom_dib[0], DEV_DISABLE | DEV_UBUS | DEV_QBUS,
|
||||
&rom_dib[0], DEV_DISABLE | DEV_UBUS | DEV_QBUS | DEV_NOAUTOCON,
|
||||
0, NULL, NULL, NULL,
|
||||
&rom_help, &rom_help_attach, /* help and attach_help routines */
|
||||
NULL, &rom_description /* description routine */
|
||||
|
||||
@ -709,7 +709,7 @@ DEVICE rp_dev = {
|
||||
RP_NUMDR, DEV_RDX, 30, 1, DEV_RDX, 16,
|
||||
NULL, NULL, &rp_reset,
|
||||
&rp_boot, &rp_attach, &rp_detach,
|
||||
&rp_dib, DEV_DISABLE | DEV_UBUS | DEV_QBUS | DEV_MBUS | DEV_DEBUG | DEV_DISK,
|
||||
&rp_dib, DEV_DISABLE | DEV_MBUS | DEV_DEBUG | DEV_DISK,
|
||||
0, rp_debug, NULL, NULL, &rp_help, NULL, NULL,
|
||||
&rp_description
|
||||
};
|
||||
|
||||
@ -154,17 +154,10 @@ struct xu_device xua = {
|
||||
};
|
||||
|
||||
MTAB xu_mod[] = {
|
||||
#if defined (VM_PDP11)
|
||||
{ MTAB_XTD|MTAB_VDV|MTAB_VALR, 010, "ADDRESS", "ADDRESS",
|
||||
&set_addr, &show_addr, NULL },
|
||||
&set_addr, &show_addr, NULL, "Unibus address" },
|
||||
{ MTAB_XTD|MTAB_VDV|MTAB_VALR, 0, "VECTOR", "VECTOR",
|
||||
&set_vec, &show_vec, NULL },
|
||||
#else
|
||||
{ MTAB_XTD|MTAB_VDV, 0, "ADDRESS", NULL,
|
||||
NULL, &show_addr, NULL, "Unibus address" },
|
||||
{ MTAB_XTD|MTAB_VDV, 0, "VECTOR", NULL,
|
||||
NULL, &show_vec, NULL, "Interrupt vector" },
|
||||
#endif
|
||||
&set_vec, &show_vec, NULL, "Interrupt vector" },
|
||||
{ MTAB_XTD|MTAB_VDV|MTAB_VALR|MTAB_NC, 0, "MAC", "MAC=xx:xx:xx:xx:xx:xx",
|
||||
&xu_setmac, &xu_showmac, NULL, "MAC address" },
|
||||
{ MTAB_XTD |MTAB_VDV|MTAB_NMO, 0, "ETH", NULL,
|
||||
|
||||
@ -199,6 +199,7 @@ extern t_stat cpu_show_memory (FILE* st, UNIT* uptr, int32 val, CONST void* desc
|
||||
#define DEV_UBUS (1u << DEV_V_UBUS)
|
||||
#define DEV_QBUS (1u << DEV_V_QBUS)
|
||||
#define DEV_Q18 (1u << DEV_V_Q18)
|
||||
#define DEV_NOAUTOCON (0)
|
||||
|
||||
#define UNIBUS FALSE /* 22b only */
|
||||
|
||||
|
||||
@ -264,6 +264,7 @@ extern uint32 va_addr; /* QDSS memory offset */
|
||||
#define DEV_UBUS (1u << DEV_V_UBUS)
|
||||
#define DEV_QBUS (1u << DEV_V_QBUS)
|
||||
#define DEV_Q18 (1u << DEV_V_Q18)
|
||||
#define DEV_NOAUTOCON (0)
|
||||
|
||||
#define UNIBUS FALSE /* 22b only */
|
||||
|
||||
|
||||
@ -223,6 +223,7 @@ extern t_stat cpu_show_memory (FILE* st, UNIT* uptr, int32 val, CONST void* desc
|
||||
#define DEV_NEXUS (1u << DEV_V_NEXUS)
|
||||
#define DEV_QBUS (0)
|
||||
#define DEV_Q18 (0)
|
||||
#define DEV_NOAUTOCON (0)
|
||||
|
||||
#define UNIBUS TRUE /* Unibus only */
|
||||
|
||||
|
||||
@ -258,6 +258,7 @@ extern t_stat vax750_show_bootdev (FILE *st, UNIT *uptr, int32 val, CONST void *
|
||||
#define DEV_CI (1u << DEV_V_CI)
|
||||
#define DEV_QBUS (0)
|
||||
#define DEV_Q18 (0)
|
||||
#define DEV_NOAUTOCON (0)
|
||||
|
||||
#define UNIBUS TRUE /* Unibus only */
|
||||
|
||||
|
||||
@ -275,6 +275,7 @@ extern t_stat cpu_show_memory (FILE* st, UNIT* uptr, int32 val, CONST void* desc
|
||||
#define DEV_NEXUS (1u << DEV_V_NEXUS)
|
||||
#define DEV_QBUS (0)
|
||||
#define DEV_Q18 (0)
|
||||
#define DEV_NOAUTOCON (0)
|
||||
|
||||
#define UNIBUS TRUE /* Unibus only */
|
||||
|
||||
|
||||
@ -266,6 +266,7 @@ extern t_stat cpu_show_memory (FILE* st, UNIT* uptr, int32 val, CONST void* desc
|
||||
#define DEV_NEXUS (1u << DEV_V_NEXUS)
|
||||
#define DEV_QBUS (0)
|
||||
#define DEV_Q18 (0)
|
||||
#define DEV_NOAUTOCON (0)
|
||||
|
||||
#define UNIBUS TRUE /* Unibus only */
|
||||
|
||||
|
||||
@ -302,6 +302,7 @@ extern t_stat cpu_show_memory (FILE* st, UNIT* uptr, int32 val, CONST void* desc
|
||||
#define DEV_NEXUS (1u << DEV_V_NEXUS)
|
||||
#define DEV_QBUS (0)
|
||||
#define DEV_Q18 (0)
|
||||
#define DEV_NOAUTOCON (0)
|
||||
|
||||
#define UNIBUS TRUE /* Unibus only */
|
||||
|
||||
|
||||
@ -292,6 +292,7 @@ extern uint32 *vc_buf;
|
||||
#define DEV_UBUS (1u << DEV_V_UBUS)
|
||||
#define DEV_QBUS (1u << DEV_V_QBUS)
|
||||
#define DEV_Q18 (1u << DEV_V_Q18)
|
||||
#define DEV_NOAUTOCON (0)
|
||||
|
||||
#define UNIBUS FALSE /* 22b only */
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user