PDP11: Allow a device to have a linked list of DIB structures
This allows a single device to have multiple disjoint parts of the I/O page
This commit is contained in:
parent
2ed1ed9049
commit
5f0370749e
2 changed files with 13 additions and 11 deletions
|
@ -527,6 +527,7 @@ struct pdp_dib {
|
|||
/* simulated through a single */
|
||||
/* DEVICE structure (e.g., DZ, VH, DL, DC). */
|
||||
/* Populated by auto-configure */
|
||||
struct pdp_dib *next; /* devices with more than one DIB can chain them */
|
||||
};
|
||||
|
||||
typedef struct pdp_dib DIB;
|
||||
|
|
|
@ -406,17 +406,18 @@ for (i = 0; i < 7; i++) /* seed PIRQ intr */
|
|||
if ((r = cpu_build_dib ())) /* build CPU entries */
|
||||
return r;
|
||||
for (i = 0; (dptr = sim_devices[i]) != NULL; i++) { /* loop thru dev */
|
||||
dibp = (DIB *) dptr->ctxt; /* get DIB */
|
||||
if (dibp && !(dptr->flags & DEV_DIS)) { /* defined, enabled? */
|
||||
if (dptr->flags & DEV_MBUS) { /* Massbus? */
|
||||
if ((r = build_mbus_tab (dptr, dibp))) /* add to Mbus tab */
|
||||
return r;
|
||||
}
|
||||
else { /* no, Unibus */
|
||||
if ((r = build_ubus_tab (dptr, dibp))) /* add to Unibus tab */
|
||||
return r;
|
||||
}
|
||||
} /* end if enabled */
|
||||
for (dibp = (DIB *) dptr->ctxt; dibp; dibp = dibp->next) { /* loop thru dibs */
|
||||
if (dibp && !(dptr->flags & DEV_DIS)) { /* defined, enabled? */
|
||||
if (dptr->flags & DEV_MBUS) { /* Massbus? */
|
||||
if ((r = build_mbus_tab (dptr, dibp))) /* add to Mbus tab */
|
||||
return r;
|
||||
}
|
||||
else { /* no, Unibus */
|
||||
if ((r = build_ubus_tab (dptr, dibp))) /* add to Unibus tab */
|
||||
return r;
|
||||
}
|
||||
} /* end if enabled */
|
||||
}
|
||||
} /* end for */
|
||||
return SCPE_OK;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue