1
0
mirror of https://github.com/wfjm/w11.git synced 2026-04-30 13:42:21 +00:00

pdp11_sequencer: BUGFIX: use I space for all mode=1,2,3 if reg=pc

- tcode/cpu_mmu.mac: add test F1.1 (verify fix)

Closes #35
This commit is contained in:
wfjm
2022-09-12 11:12:59 +02:00
parent 9614b01644
commit 278d2e229d
5 changed files with 148 additions and 39 deletions

View File

@@ -95,6 +95,8 @@ The full set of tests is only run for tagged releases.
- rtl/w11a
- pdp11_mmu: BUGFIX: correct trap and PDR A logic, see
[ECO-033](ECO-033-MMU_AFC-1_PDR-A.md)
- pdp11_sequencer: BUGFIX: use I space for all mode=1,2,3 if reg=pc, see
[ECO-034](ECO-034-MMU_d-space-pc.md)
- src/librwxxtpp
- RtclRw11Cpu.cpp: quit before mem write if asm-11 error seen
- tools/asm-11/lib

View File

@@ -0,0 +1,53 @@
# ECO-033: D space used instead of I space for some PC specifiers (2022-09-08)
### Scope
- was in w11a since 2009
- affects: all w11a systems
### Symptom summary
Test 072 of `ekbee1` fails with
```
D-SPACE ENABLE CIRCUITRY HAS FAILED
ERROR AUTOI/D VIRTUAL
REGISTR REGISTR ADDRESS TESTNO PC AT ABORT
100027 000000 060410 000072 060412
100027 000027 060416 000072 060422
```
The test does
```
060410: tst (pc)
060416: cmp #240,(pc)
```
and expects that these accesses are done to I space.
They are done to D space instead.
### Analysis
The w11 used D space only for `(pc)+` and `@(pc)+` specifiers.
The w11a has 4 specifier flows
- srcr: for source read
- dstr: for destination read (in `CMP`, `BIT`, `TST`, ...)
- dstw: for destination write (also read-modify-write)
- dsta: for destination address (in `JSR`, `JMP`)
A code review showed what was OK and what needed a fix
```
s_srcr_def OK mov (pc),r0
s_srcr_inc OK mov #123,r0
s_dstr_def FIXED cmp,#123,(pc)
s_dstr_inc OK cmp r0,#123
s_dstw_def FIXED mov r0,(pc) modifies I space code !
s_dstw_inc FIXED for mode=2 mov r0,#133 modifies I space code !
s_dstw_inc OK for mode=3 mov r0,@#lbl
s_dsta_inc OK
```
Note: the 11/70 uses D space for modes 1-5 in the source specifier flow,
and for mode 1-3 in the destination specifier flow.
### Fixes
Add `pispace` modifiers for the `do_memread*` and `do_memwrite*` calls in
pdp11_sequencer.vhd.
### Hindsight
Took 13 years to fix. The fixed address modes are of very little practical
value and are not used in normal code. And certainly used not when running
with kernel D mode enabled.

View File

@@ -3,29 +3,6 @@ Notes
- resolved issues are summarized in [resolved issues](README_resolved_issues.md)
- the case id indicates the release when the issue was first recognized.
### V0.791-3 {[issue #35](https://github.com/wfjm/w11/issues/35)} -- MMU: D space used instead of I space for PC deferred specifiers
Test 072 of `ekbee1` fails with
```
D-SPACE ENABLE CIRCUITRY HAS FAILED
ERROR AUTOI/D VIRTUAL
REGISTR REGISTR ADDRESS TESTNO PC AT ABORT
100027 000000 060410 000072 060412
100027 000027 060416 000072 060422
```
The test does
```
060410: tst (pc)
060416: cmp #240,(pc)
```
and expects that these accesses are done to I space.
They are done to D space instead.
The w11 uses D space only for `(pc)+` and `@(pc)+` specifiers.
Clearly a bug.
Wasn't detected so far because this access mode has no practical value
and this therefore not used in normal software.
### V0.50-2 {[issue #28](https://github.com/wfjm/w11/issues/28)} -- RK11: write protect action too slow
Some simple RK11 drivers, especially in test codes, don't poll for completion