mirror of
https://github.com/simh/simh.git
synced 2026-04-17 00:36:00 +00:00
PDP11: Fixed bug in CSM (John Dundas)
John Dundas said:
Bob and all,
I ran across what I believe to be a bug in the CSM code:
case 070: /* CSM */
if (CPUT (HAS_CSM) && (MMR3 & MMR3_CSM) || (cm != MD_KER)) {
According to the Architecture Handbook, CSM may be executed only if the MMR3 bit is set AND the mode is not Kernel. Changing the code to:
case 070: /* CSM */
if (CPUT (HAS_CSM) && (MMR3 & MMR3_CSM) && (cm != MD_KER)) {
also has the effect of making the ZKDKB0 diagnostic much happier.
Thanks,
John
--
John A. Dundas III
This commit is contained in:
@@ -25,6 +25,7 @@
|
|||||||
|
|
||||||
cpu PDP-11 CPU
|
cpu PDP-11 CPU
|
||||||
|
|
||||||
|
05-Dec-13 RMS Fixed bug in CSM (John Dundas)
|
||||||
23-Oct-13 RMS Fixed PS behavior on initialization and boot
|
23-Oct-13 RMS Fixed PS behavior on initialization and boot
|
||||||
10-Apr-13 RMS MMR1 does not track PC changes (Johnny Billquist)
|
10-Apr-13 RMS MMR1 does not track PC changes (Johnny Billquist)
|
||||||
29-Apr-12 RMS Fixed compiler warning (Mark Pizzolato)
|
29-Apr-12 RMS Fixed compiler warning (Mark Pizzolato)
|
||||||
@@ -1298,7 +1299,7 @@ while (reason == 0) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 070: /* CSM */
|
case 070: /* CSM */
|
||||||
if ((CPUT (HAS_CSM) && (MMR3 & MMR3_CSM)) || (cm != MD_KER)) {
|
if (CPUT (HAS_CSM) && (MMR3 & MMR3_CSM) && (cm != MD_KER)) {
|
||||||
dst = dstreg? R[dstspec]: ReadW (GeteaW (dstspec));
|
dst = dstreg? R[dstspec]: ReadW (GeteaW (dstspec));
|
||||||
PSW = get_PSW () & ~PSW_CC; /* PSW, cc = 0 */
|
PSW = get_PSW () & ~PSW_CC; /* PSW, cc = 0 */
|
||||||
STACKFILE[cm] = SP;
|
STACKFILE[cm] = SP;
|
||||||
|
|||||||
Reference in New Issue
Block a user