The memory management toggle-in passes (see /devices/pdp11/machine/1170/panel/debugger)
This commit is contained in:
parent
b3bf213cd9
commit
0afab359ad
7 changed files with 222 additions and 178 deletions
|
|
@ -9,3 +9,98 @@ machines:
|
|||
---
|
||||
|
||||
{% include machine.html id="test1170" %}
|
||||
|
||||
Toggle-Ins
|
||||
----------
|
||||
|
||||
From the [PDP-11/70 Maintenance Service Guide](http://archive.pcjs.org/pubs/dec/pdp11/1170/PDP1170_Maintenance_Service_Guide_Apr88.pdf),
|
||||
Chapter 4:
|
||||
|
||||
There are several useful toggle-ins that are probably not very well known. They are as follows:
|
||||
|
||||
Memory Management
|
||||
|
||||
Use the following toggle-in to verify the correct operation of Memory Management Relocation.
|
||||
|
||||
200/012737 MOV #400,@#177572 (load maint. bit in MMRO)
|
||||
202/000400
|
||||
204/177572
|
||||
206/012737 MOV #070707,@#200 (move 070707 to virtual 200)
|
||||
210/070707
|
||||
212/000200
|
||||
214/000000 HLT
|
||||
|
||||
300/000300 Preset loc 300 to 300
|
||||
|
||||
17772300/077406 Set Kernel I PDR 0 to R/W 4K page
|
||||
17772340/000001 Set Kernel I PAR 0 to (Base address 100)
|
||||
|
||||
Load Address 200
|
||||
Start Display = 000216 (Halt@214)
|
||||
Load Address 300
|
||||
Exam Display = 070707 ... Relocation works
|
||||
|
||||
With the PDPjs Debugger, the above "toggle-in" is more easily entered like so:
|
||||
|
||||
e 200 012737 000400 177572 012737 070707 000200 000000
|
||||
e 300 000300
|
||||
e 17772300 077406
|
||||
e 17772340 000001
|
||||
r pc 200
|
||||
|
||||
The "g" command should produce these results:
|
||||
|
||||
>> e 200 012737 000400 177572 012737 070707 000200 000000
|
||||
changing 000200 from 00000 to 12737
|
||||
changing 000202 from 00000 to 00400
|
||||
changing 000204 from 00000 to 77572
|
||||
changing 000206 from 00000 to 12737
|
||||
changing 000210 from 00000 to 70707
|
||||
changing 000212 from 00000 to 00200
|
||||
changing 000214 from 00000 to 00000
|
||||
>> e 300 000300
|
||||
changing 000300 from 00000 to 00300
|
||||
>> e 17772300 077406
|
||||
changing 00017772300 from 00000 to 77406
|
||||
>> e 17772340 000001
|
||||
changing 00017772340 from 00000 to 00001
|
||||
>> r pc 200
|
||||
updated registers:
|
||||
R0=000000 R1=000000 R2=000000 R3=000000 R4=000000 R5=000000
|
||||
SP=000000 PC=000200 PS=000013 SW=00000000 T0 N1 Z0 V1 C1
|
||||
000200: 012737 000400 177572 MOV #400,@#177572
|
||||
>> g
|
||||
running
|
||||
stopped (3 instructions, 32 cycles, 9 ms, 3556 hz)
|
||||
R0=000000 R1=000000 R2=000000 R3=000000 R4=000000 R5=000000
|
||||
SP=000000 PC=000214 PS=000001 SW=00000000 T0 N0 Z0 V0 C1
|
||||
000214: 000000 HALT
|
||||
>> dw 300 l1
|
||||
000300 70707
|
||||
|
||||
---
|
||||
|
||||
Unibus Map Checkout
|
||||
|
||||
Use the following console operating procedure to verify the correct operation of the Unibus Map.
|
||||
|
||||
Load Address 500
|
||||
Deposit 125252 Known Data
|
||||
|
||||
Load Address 17000500
|
||||
Deposit 125252 Data Path Ok
|
||||
|
||||
Load Address 17000700
|
||||
Deposit 070707 Known Data
|
||||
|
||||
Load Address 17770202 Map register 0 Hi
|
||||
Deposit 000000 Relocation constant
|
||||
|
||||
Load Address 17770200 Map register 0 Lo
|
||||
Deposit 000200 Relocation constant
|
||||
|
||||
Load Address 17772516 MMR3
|
||||
Deposit 000040 Enable map
|
||||
|
||||
Load address 17000500 Relocates to 700
|
||||
Examine 070707 ... Relocated ok
|
||||
|
|
|
|||
|
|
@ -8,58 +8,3 @@ PDP-11 Test Panels
|
|||
------------------
|
||||
|
||||
* [Terminal Test Panel](terminal.xml) (with [Debugger](debugger/terminal.xml))
|
||||
|
||||
Toggle-Ins
|
||||
----------
|
||||
|
||||
From the [PDP-11/70 Maintenance Service Guide](http://archive.pcjs.org/pubs/dec/pdp11/1170/PDP1170_Maintenance_Service_Guide_Apr88.pdf),
|
||||
Chapter 4:
|
||||
|
||||
There are several useful toggle-ins that are probably not very well known. They are as follows:
|
||||
|
||||
Memory Management
|
||||
|
||||
Use the following toggle-in to verify the correct operation of Memory Management Relocation.
|
||||
|
||||
200/012737 MOV #400,@#177572 (load maint. bit in MMRO)
|
||||
202/000400
|
||||
204/177572
|
||||
206/012737 MOV #070707,@#200 (move 070707 to virtual 200)
|
||||
210/070707
|
||||
212/000200
|
||||
214/000000 HLT
|
||||
|
||||
300/000300 Preset loc 300 to 300
|
||||
|
||||
17772300/077406 Set Kernal I PDR 0 to R/W 4K page
|
||||
17772340/000001 Set Kernal I PAR 0 to (Base address 100)
|
||||
|
||||
Load Address 200
|
||||
Start Display = 000216 (Halt@214)
|
||||
Load Address 300
|
||||
Exam Display = 070707 ... Relocation works
|
||||
|
||||
Unibus Map Checkout
|
||||
|
||||
Use the following console operating procedure to verify the correct operation of the Unibus Map.
|
||||
|
||||
Load Address 500
|
||||
Deposit 125252 Known Data
|
||||
|
||||
Load Address 17000500
|
||||
Deposit 125252 Data Path Ok
|
||||
|
||||
Load Address 17000700
|
||||
Deposit 070707 Known Data
|
||||
|
||||
Load Address 17770202 Map register 0 Hi
|
||||
Deposit 000000 Relocation constant
|
||||
|
||||
Load Address 17770200 Map register 0 Lo
|
||||
Deposit 000200 Relocation constant
|
||||
|
||||
Load Address 17772516 MMR3
|
||||
Deposit 000040 Enable map
|
||||
|
||||
Load address 17000500 Relocates to 700
|
||||
Examine 070707 ... Relocated ok
|
||||
|
|
|
|||
|
|
@ -93,8 +93,8 @@ function BusPDP11(parmsBus, cpu, dbg)
|
|||
* For PDPjs machines, the ideal block size is 8Kb (IOPAGE_LENGTH), the size of the IOPAGE on all PDP-11 machines;
|
||||
* as a result, our IOController functions assume that all incoming offsets are within a single 8Kb block.
|
||||
*/
|
||||
this.addrTotal = Math.pow(2, this.nBusWidth);
|
||||
this.nBusLimit = this.nBusMask = (this.addrTotal - 1) | 0;
|
||||
this.addrTotal = 1 << this.nBusWidth;
|
||||
this.nBusLimit = this.nBusMask = (this.addrTotal - 1);
|
||||
this.nBlockSize = BusPDP11.IOPAGE_LENGTH;
|
||||
this.nBlockShift = Math.log2(this.nBlockSize); // ES6 ALERT (alternatively: Math.log(this.nBlockSize) / Math.LN2)
|
||||
this.nBlockLen = this.nBlockSize >> 2;
|
||||
|
|
@ -457,7 +457,9 @@ BusPDP11.prototype.setIOPageRange = function(nRange)
|
|||
}
|
||||
if (nRange) {
|
||||
this.nIOPageRange = nRange;
|
||||
addr = (1 << nRange) - BusPDP11.IOPAGE_LENGTH;
|
||||
addr = (1 << nRange);
|
||||
this.nBusLimit = this.nBusMask = (addr - 1);
|
||||
addr -= BusPDP11.IOPAGE_LENGTH;
|
||||
this.prevIOPageBlocks = this.getMemoryBlocks(addr, BusPDP11.IOPAGE_LENGTH);
|
||||
if (this.realIOPageBlocks) {
|
||||
this.setMemoryBlocks(addr, BusPDP11.IOPAGE_LENGTH, this.realIOPageBlocks);
|
||||
|
|
|
|||
|
|
@ -1312,15 +1312,16 @@ CPUStatePDP11.prototype.mapUnibus = function(addr)
|
|||
*/
|
||||
CPUStatePDP11.prototype.mapVirtualToPhysical = function(virtualAddress, accessFlags)
|
||||
{
|
||||
var page, pdr, physicalAddress, errorMask = 0;
|
||||
var page, pdr, physicalAddress;
|
||||
|
||||
this.assert(!(virtualAddress & ~0x1ffff) && accessFlags);
|
||||
|
||||
/*
|
||||
* Verify that 1) the incoming virtual address is within the 17-bit I/D range, 2) that
|
||||
* accessFlags is properly set, and 3) that the MMU is enabled (because non-MMU code paths
|
||||
* should no longer be going through this function; the Bus component is responsible for
|
||||
* mapping physical addresses appropriately).
|
||||
* This can happen when the DSTMODE (MAINT) bit of MMR0 is set but *not* the ENABLED bit.
|
||||
*/
|
||||
this.assert(!(virtualAddress & ~0x1ffff) && accessFlags && (accessFlags & this.mmuEnable));
|
||||
if (!(accessFlags & this.mmuEnable)) {
|
||||
return virtualAddress;
|
||||
}
|
||||
|
||||
this.mmuLastVirtual = virtualAddress;
|
||||
|
||||
|
|
@ -1329,6 +1330,7 @@ CPUStatePDP11.prototype.mapVirtualToPhysical = function(virtualAddress, accessFl
|
|||
pdr = this.mmuPDR[this.mmuMode][page];
|
||||
physicalAddress = ((this.mmuPAR[this.mmuMode][page] << 6) + (virtualAddress & 0x1fff)) & this.mmuMask;
|
||||
|
||||
var errorMask = 0;
|
||||
switch (pdr & 0x7) {
|
||||
case 1: // read-only with trap
|
||||
errorMask = 0x1000; // MMU trap
|
||||
|
|
|
|||
|
|
@ -316,7 +316,7 @@ var PDP11 = {
|
|||
PAGE_D: 0x0010, // last fault occurred in D space
|
||||
PAGE_MODE: 0x0060, // processor mode as of last fault
|
||||
COMPLETED: 0x0080, // last instruction completed
|
||||
DSTMODE: 0x0100, // only destination mode references will be relocated (for diagnostic use)
|
||||
DSTMODE: 0x0100, // only destination mode references will be relocated (aka MAINT bit)
|
||||
MMU_TRAPS: 0x0200, // enable MMU traps
|
||||
UNUSED: 0x0C00,
|
||||
TRAP_MMU: 0x1000, // trap: MMU
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue