Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions VAX/vax630_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -619,6 +619,7 @@ int32 Map_ReadB (uint32 ba, int32 bc, uint8 *buf)
int32 i;
uint32 ma, dat;

ba = ba & QBMAMASK;
if ((ba | bc) & 03) { /* check alignment */
for (i = ma = 0; i < bc; i++, buf++) { /* by bytes */
if ((ma & VA_M_OFF) == 0) { /* need map? */
Expand Down Expand Up @@ -651,7 +652,7 @@ int32 Map_ReadW (uint32 ba, int32 bc, uint16 *buf)
int32 i;
uint32 ma,dat;

ba = ba & ~01;
ba = ba & QBMAMASK & ~01;
bc = bc & ~01;
if ((ba | bc) & 03) { /* check alignment */
for (i = ma = 0; i < bc; i = i + 2, buf++) { /* by words */
Expand Down Expand Up @@ -683,6 +684,7 @@ int32 Map_WriteB (uint32 ba, int32 bc, const uint8 *buf)
int32 i;
uint32 ma, dat;

ba = ba & QBMAMASK;
if ((ba | bc) & 03) { /* check alignment */
for (i = ma = 0; i < bc; i++, buf++) { /* by bytes */
if ((ma & VA_M_OFF) == 0) { /* need map? */
Expand Down Expand Up @@ -715,7 +717,7 @@ int32 Map_WriteW (uint32 ba, int32 bc, const uint16 *buf)
int32 i;
uint32 ma, dat;

ba = ba & ~01;
ba = ba & QBMAMASK & ~01;
bc = bc & ~01;
if ((ba | bc) & 03) { /* check alignment */
for (i = ma = 0; i < bc; i = i + 2, buf++) { /* by words */
Expand Down
12 changes: 10 additions & 2 deletions VAX/vax_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,12 @@

#define QB_VEC_MASK 0x1FC /* Interrupt Vector value mask */

/* Qbus memory space */

#define QBMAWIDTH 22 /* Qmem addr width */
#define QBMSIZE (1u << QBMAWIDTH) /* Qmem length */
#define QBMAMASK (QBMSIZE - 1) /* Qmem addr mask */

int32 int_req[IPL_HLVL] = { 0 }; /* intr, IPL 14-17 */
int32 int_vec_set[IPL_HLVL][32] = { 0 }; /* bits to set in vector */
int32 cq_scr = 0; /* SCR */
Expand Down Expand Up @@ -765,6 +771,7 @@ int32 Map_ReadB (uint32 ba, int32 bc, uint8 *buf)
int32 i;
uint32 ma, dat;

ba = ba & QBMAMASK;
if ((ba | bc) & 03) { /* check alignment */
for (i = ma = 0; i < bc; i++, buf++) { /* by bytes */
if ((ma & VA_M_OFF) == 0) { /* need map? */
Expand Down Expand Up @@ -797,7 +804,7 @@ int32 Map_ReadW (uint32 ba, int32 bc, uint16 *buf)
int32 i;
uint32 ma,dat;

ba = ba & ~01;
ba = ba & QBMAMASK & ~01;
bc = bc & ~01;
if ((ba | bc) & 03) { /* check alignment */
for (i = ma = 0; i < bc; i = i + 2, buf++) { /* by words */
Expand Down Expand Up @@ -829,6 +836,7 @@ int32 Map_WriteB (uint32 ba, int32 bc, const uint8 *buf)
int32 i;
uint32 ma, dat;

ba = ba & QBMAMASK;
if ((ba | bc) & 03) { /* check alignment */
for (i = ma = 0; i < bc; i++, buf++) { /* by bytes */
if ((ma & VA_M_OFF) == 0) { /* need map? */
Expand Down Expand Up @@ -861,7 +869,7 @@ int32 Map_WriteW (uint32 ba, int32 bc, const uint16 *buf)
int32 i;
uint32 ma, dat;

ba = ba & ~01;
ba = ba & QBMAMASK & ~01;
bc = bc & ~01;
if ((ba | bc) & 03) { /* check alignment */
for (i = ma = 0; i < bc; i = i + 2, buf++) { /* by words */
Expand Down
Loading