PDP-10 / its

Incompatible Timesharing System
Other
858 stars 83 forks source link

Get KL ITS running. #1632

Closed larsbrinkhoff closed 5 years ago

larsbrinkhoff commented 5 years ago

Insert mad ramblings about running ITS on @rcornwell's upcoming KL10 simulator. Until it's available, I'll test things on a KA10.

There is some info here: #744

larsbrinkhoff commented 5 years ago

My understanding is that @rcornwell isn't planning to simulate the front end PDP-11. So we side step KLDCP, IOELEV, and sharing disk and memory.

larsbrinkhoff commented 5 years ago

So I believe the appropriate way to boot would be to first get NTSDDT running. On the real MC, we would then boot the second FE over DL10, but maybe leave that for later.

Starting ITS is then done from DDT by loading it from disk: $L .; ITS and then $G.

larsbrinkhoff commented 5 years ago

CC @SMJ watch this space for updates.

larsbrinkhoff commented 5 years ago

I made a new KA10 SALV to format an RP04 pack. Because that's what KL10 ITS boots from.

It turns out the KA10 simulator doesn't handle the "write data with headers" command very well. Something is written to the disk image file, but when SALV reads it back there's a mismatch. (See https://github.com/rcornwell/sims/issues/113) By adding a question to skip the verification, the formatting can complete.

eswenson1 commented 5 years ago

Does the NSALV (used with klh10 emulator) support formatting an RP04 pack correctly?

larsbrinkhoff commented 5 years ago

It does look like NSALV supports RP04 too, since it retains RH10 code along with added RH11 code. But I'm not sure it'll run on a KA10. It's on my mental to-do list to check this. (EDIT: made issue #1722)

Meanwhile, the old SALV is closer to working now. I found that for KL10 it's using the newer DF10C with 22-bit adressing, rather than DF10. I'm about to test a fix for this.

larsbrinkhoff commented 5 years ago

SALV MARK now works. As do LISTF and CHKR.

NTS DDT assembled with disk functions also works, e.g. ^F to list files and $L to load.

DSKDMP also works with an RP04, although it normally wasn't used on MIT-MC.

larsbrinkhoff commented 5 years ago

I have a KA10 ITS running with RH10 and an RP04 pack. However, ^Z doesn't give me a HACTRN, just this:

 LOGOUT ___002 0

KL ITS 1648 SYSTEM JOB USING THIS CONSOLE.

(Yes, "KL ITS" is a misnomer.) Apparently there's some problem loading SYS; ATSIGN HACTRN.

larsbrinkhoff commented 5 years ago

@rcornwell pointed me in the right direction: the MIT hardware hacked DF10 stores address bits 15-17 inverted in the control word bits 0-2. After having fixed the RH10 code in DISK, I can now ^Z and log in.

larsbrinkhoff commented 5 years ago

Note to self:

11STNK has a BDUMP command to save a KLDCP.BIN file in the right format for the front end.

But I don't know if this is the plain KLDCP, or the one including IOELEV.

larsbrinkhoff commented 5 years ago

@rcornwell wrote:

Now I got to finger out how to build a KL ITS

Look if the MX configuration looks OK... actually you'd probably want to remove a few things, like the DL10 ttys. Maybe they do no harm, but they certainly won't do any good.

Assemble a KL10 version of SALV too.

Write the binary to the . directory. Shut down, boot into DDT, and type $L ITS BIN, and then $$L SALV BIN. Then $Y ITS to save this for future runs. $G to start.

The general process is described here, though KL10 details are missing: https://github.com/PDP-10/its/issues/1646

larsbrinkhoff commented 5 years ago

I tested NTS DDT on the KL10 simulator. I.e. pdp10-kl from the "kl10" branch. It seems to work fine including console I/O and reading @ ITS off disk.

larsbrinkhoff commented 5 years ago

I could not make a KL10 (N)SALV. I.e. assembling SALV for MC produces many errors. Assembling NSALV for MCKL is no good either.

larsbrinkhoff commented 5 years ago

MX ITS isn't entirely well either:

KA:DISK 1226 SYSTEM;
MTICL1+3        33653    2.     1-020   RP04P   Undefined in IFN
MTICL1+3        33653    2.     1-020   WRONG NUMBER OF KINDS OF DISK DRIVE
MTICL1+3        33653    2.     1-024   RP04P   Undefined in IFN
    ==> INSERTED:  FSDEFS 43
KA:T300 DEFS7 SYSTEM;
MTICL1+3        33653    4.     2-017   MFDBLK  Undefined in =

This could be my fault for hacking the RH10 stuff.

rcornwell commented 5 years ago

I made these changes to MC to get it to compile:

`diff --git a/build/pdp10-kl/config.202 b/build/pdp10-kl/config.202 index 13a0ef7..3e82ee2 100644 --- a/build/pdp10-kl/config.202 +++ b/build/pdp10-kl/config.202 @@ -423,12 +423,12 @@ DEFOPT SWPWSP==0 ;NO WORKING-SET SWAP SCHEDULER DEFOPT PAGPRE==1 ;PAGE-IN PREEMPTION DEFOPT SCHBLN==20. ;NUMBER OF RUNNABLE JOBS TO REMEMBER

-DEFOPT NQS==6 ;# OF DISK UNITS (3 RP04'S AND 3 T-300'S) +DEFOPT NQS==3 ;# OF DISK UNITS (3 RP04'S AND 3 T-300'S) DEFOPT NTUTBL==2 ;TUTS ARE TWO BLOCKS LONG DEFSYM NUDSL==500. ;# USER DIRECTORIES ON DISK DEFOPT NQCHN==50. ;NUMBER 2314 CHNLS DEFOPT RH10P==1 ;HAS DEC RH10 DISK CONTROL (RP04) -DEFOPT T300P==3 ;TRIDENT T-300S VIA PDP-11 START AT DRIVE 3 +DEFOPT T300P==0 ;TRIDENT T-300S VIA PDP-11 START AT DRIVE 3 DEFOPT QRDCMP==0 ;SOFTWARE READ-COMPARE, HARDWARE IS PINING FOR THE ; FJORDS (But this isn't debugged yet.) DEFOPT DMDSK==1 ;USES DM DISK FORMAT @@ -438,7 +438,7 @@ DEFOPT QAUTHP==1 ;KEEPS TRACK OF FILE AUTHORS DEFOPT NMTCS==1 ;NUMBER MAG TAPE UNITS DEFOPT TM10B==1 ;DF10-BASED TAPE CONTROLLER

-DEFOPT DL10P==1 ;HAS DL10/DC76 TTY CONTROLLER +DEFOPT DL10P==0 ;HAS DL10/DC76 TTY CONTROLLER DEFOPT PDCLKP==1 ;HAS "DeCoriolis" CLOCK

DEFOPT NETP==1 ; Has net connection @@ -451,7 +451,7 @@ DEFOPT IMPUS==106 ; ARPA net host number DEFOPT IMPUS3==<IPADDR 10,1,0,6> ; Internet host number DEFOPT NCPP==0 ; Flush NCP code DEFOPT NNETCH==30. ; # NCP network channels -DEFOPT CHAOSP==1 ;HAS CHAOS NET +DEFOPT CHAOSP==0 ;HAS CHAOS NET DEFOPT MYCHAD==1440 ;CHAOS NET ADDRESS DEFOPT NINDX==50. ;NUMBER OF INDICES DEFOPT DLCP==1 ;CHAOS NET GOES THROUGH DL10 @@ -459,7 +459,7 @@ DEFOPT DLCP==1 ;CHAOS NET GOES THROUGH DL10 DEFOPT NOTYS==0 ;# KA-10 CONSOLE 0 TTYS DEFOPT NETYS==33. ;# KL-10 DTE20 TTYS NEWDTE==1 ;TEMPORARY CONDITIONAL TO ENABLE NEW DTE20 PROTOCOL -DEFOPT NDLTYS==4. ;# TTYS ON DL10/DC76 +DEFOPT NDLTYS==0. ;# TTYS ON DL10/DC76 ;Note: 3d TTY on DL10 is VT52 by console. DEFOPT NSTTYS==25. ;# OF STY'S (PSEUDO-TTY'S)

`

larsbrinkhoff commented 5 years ago

That looks good, but I still get this:

MTICL1+3        33617    2.     1-020   RP04P   Undefined in IFN
MTICL1+3        33617    2.     1-020   WRONG NUMBER OF KINDS OF DISK DRIVE
MTICL1+3        33617    2.     1-024   RP04P   Undefined in IFN

SWODF4+12       6722     0.    76-078   NBLKS   Undefined

And I still think it's my fault...

larsbrinkhoff commented 5 years ago

Need to add RP04P==1 and RP06P==0 to MX' CONFIG.

larsbrinkhoff commented 5 years ago

SALV needs the same addition in the MC configuration. Now it assembles cleanly.

larsbrinkhoff commented 5 years ago

Testing SALV. GETSTS is ok:

GETSTS$G'
CONTROLLER STATUS:22-BIT CHANNEL
DONE
CURRENT REGISTER:CONTROL=400000002070
CURRENT DRIVE=0
DRV CTL=4070 
DRV STATUS=10700 VOLUME VALID,DRIVE READY,CONN THIS CTRLR,MEDIUM ONLINE
DRV DESIRED CYL=632 
DRV CURRENT CYL=632 
DRV TRACK-SECTOR=10017 
DRV OFFSET=0 
DRV ER1=0 
DRV ER2=0 
DRV ER3=0 
DDT

But MARK and CHKR just hang.

larsbrinkhoff commented 5 years ago

I just did this with the updated SALV:

:MIDAS DSK0: .; KL SALV_SYSTEM; SALV Time-sharing? N Machine? MC

Then in NTS DDT:

$L KL SALV

GETSTS$G etc

EDIT: KL SALV, not KL ITS.

larsbrinkhoff commented 5 years ago

LISTF also hangs.

By the way, ^F in DDT just outputs . and then nothing more. On a KA10, it types . then CRLF and the directory listing.

eswenson1 commented 5 years ago

Is LISTF even supported in exec ddt?

eswenson1 commented 5 years ago

Are you sure you meant “$L KL ITS” and not “$L KL SALV”?

And what happened when you invoked those SALV entrypoints? Did you try CHKR? Did it work?

rcornwell commented 5 years ago

Check and make sure that you have support for DF10C, or if I got ITS style DF10's be accident.

larsbrinkhoff commented 5 years ago

LISTF is a SALV subroutine.

Sorry, yes, KL SALV.

MARK, CHRK, and LISTF all did nothing, just hung.

I'll check the DF10.

larsbrinkhoff commented 5 years ago

DDT says $DFWC='261600000000 which is correct for the DF10C version of SALV.

eswenson1 commented 5 years ago

Do breakpoints work in DDT? Can you use breakpoints at successive points to find out where/why it hangs? And use binary search?

larsbrinkhoff commented 5 years ago

Breakpoints do work.

MARK immediately calls INIT, which never returns. It seems the CONO PAG, at INIT+14 hangs.


$L KL SALV

INIT/'   0   
INIT+1/   MOVEI P,PDL   
INIT+2/   SETZM DTEOPR   
INIT+3/   CONO 267760   
INIT+4/   CONO PI,10000   
INIT+5/   CONSZ PAG,THEEND   
INIT+6/   JRST INIT+12   
INIT+7/   DATAI CCA,0   
INIT+10/   CONSZ 200000   
INIT+11/   JRST INIT+10   
INIT+12/   MOVEI TT,SALVPF   .$B   
INIT+13/   MOVEM TT,PFNPC   
INIT+14/   CONO PAG,600001   .$B   
INIT+15/   DATAO PAG,223203   .$B   
INIT+16/   MOVEI TT,UUOHLT   .$B

MARK$G
$1B>>INIT+12   $P
$2B>>INIT+14   $P
rcornwell commented 5 years ago

No idea why it would hang here. Can you set a simh breakpoint there and show the CPU history for the last 20 to 30 instructions and see where it is going?

I don't see any KI page table set up. Nor do I see it enabling ITS paging. On the KL10 lower exec memory is mapped.

larsbrinkhoff commented 5 years ago

Using a SIMH breakpoint and single stepping, I see it's making it past the CONO and onwards. I'll investigate more.

larsbrinkhoff commented 5 years ago

I also set T300P==0 in SALV. Stepping in SIMH, I see it returns from INIT back to MARK+1.

larsbrinkhoff commented 5 years ago

It seems to be stuck waiting for DTEFLG to be set:

DTEXIO: SETZM DTEFLG
        MOVEM A,DTECMD
        SETZM DTEF11
        CONO DTE,%DBL11
        SKIPN DTEFLG  
         JRST .-1
        SETZM DTEFLG
        MOVE A,DTEF11
        POPJ P,
larsbrinkhoff commented 5 years ago

DTEFLG==444

rcornwell commented 5 years ago

What is it putting into DTECMD?

larsbrinkhoff commented 5 years ago

15

I think it's trying to output a CR LF.


$L KL SALV

D?   DTEXIO='220116   
Simulation stopped, PC: 773536 (JRST 0,773535)
sim> break 220116
sim> c
MARK$G

Breakpoint, PC: 220116 (SETZM 0,444)
sim> s

Step expired, PC: 220117 (MOVEM 1,451)
sim> ex 1
1:      000000000015
rcornwell commented 5 years ago

After outputing the character: DTF11 (450) should be zero, DTMTD (455) should be -2, and DTFLG (444) should be -1.

Note CPU needs to be ITS mode, otherwise these locations will be off the EBT.

larsbrinkhoff commented 5 years ago

SALV does this:

        CONO PAG,600000+EPT/1000 ;SET UP EPT, ENABLE CACHE, DISABLE PAGING AND TRAPS
        DATAO PAG,[100000,,400000+EPT/1000]     ;UPT=EPT

And EPT==1000.

larsbrinkhoff commented 5 years ago

I set a breakpoint at DTEXIO, all I get is:


sim> c
DBG(11378422460)> CTY CONO: CTY Ring 11 DB
DBG(11378422460)> CTY CONO: CTY 203 CONO 020000 220121
DBG(11378422662)> CTY DETAIL: CTY secondary 000000000000

Simulation stopped, PC: 220123 (JRST 0,220122)
sim> show cpu
CPU     idle enabled, Serial: 1025 (default)
        512KW, ITS
rcornwell commented 5 years ago

Try this patch:

`diff --git a/PDP10/kl10_fe.c b/PDP10/kl10_fe.c index 315abf2..0f7f4c3 100644 --- a/PDP10/kl10_fe.c +++ b/PDP10/kl10_fe.c @@ -472,7 +472,7 @@ void dte_second(UNIT *uptr) { t_stat r;

if KI_22BIT

-#if ITS_KL +#if KL_ITS if ((cpu_unit[0].flags & UNIT_ITSPAGE) == 0)

endif

 base = eb_ptr;

`

eswenson1 commented 5 years ago

Whaaattt?

eswenson1 commented 5 years ago

So @rcornwell found an invalid #IF reference in kl10_fe.c (change ITS_KL to KL_ITS). With that in place, I'm able to load SALV and run CHKR. Here is a session:

KL-10A simulator V4.0-0 Current        git commit id: 257c5b7a
/home/eswenson/kl-its/run-17> set pd ena
Non-existent device
/home/eswenson/kl-its/run-18> set pd on
Non-existent device

^F.

L?   ?   ?   $L SALV KLBIN

CHKR$G'
SALVAGER.317
ACTIVE UNITS ARE:012
UNIT #2 ID IS 2 PK #2
UNIT #1 ID IS 1 PK #1
UNIT #0 ID IS 0 PK #0
USE MFD FROM UNIT:0
READ ALL BLOCKS OF ALL FILES?Y
GET USR DIRS FROM UNIT:0

DDT
$L KL ITS

$$L  SALV KLBIN

$G
SALVAGER.317
EXTRA PACKS MOUNTED.
*** ERROR *** SYSTEM MAY NOT BE BROUGHT BACK UP
DDT
^F.

YS^FNXD?   SYS^FSYS

^FSYS

Note that CHKR ran and deemed my RP04 disks "good". I tried to boot ITS and it failed (presumably because the config is not specifying the right number of disks).

Also note that ^F is still not working.

eswenson1 commented 5 years ago

So It would appear that lars kl-ddt branch has an old SALV and ITS. I updated both and now, I can boot ITS to the point where it runs SALV, but then gets an infinite stream of page faults:

KL-10A simulator V4.0-0 Current        git commit id: 257c5b7a

$L ITS KLBIN

$$L  SALV KLBIN

$G
SALVAGER.319

PXCT ir=251 pc=172016 ad=000000 x=04 c=0 b=1 p=0 rgr
PXCT ir=251 pc=172016 ad=000000 x=04 c=0 b=0 p=0 rgw prev
PXCT ir=251 pc=172016 ad=000000 x=04 c=0 b=1 p=0 rgr
PXCT ir=251 pc=172016 ad=000000 x=04 c=0 b=0 p=0 rgw prev
PXCT ir=251 pc=172016 ad=000000 x=04 c=0 b=1 p=0 rgr
PXCT ir=251 pc=172016 ad=000000 x=04 c=0 b=0 p=0 rgw prev
PXCT ir=251 pc=172016 ad=000000 x=04 c=0 b=1 p=0 rgr
PXCT ir=251 pc=172016 ad=000000 x=04 c=0 b=0 p=0 rgw prev
PXCT ir=251 pc=172016 ad=000000 x=04 c=0 b=1 p=0 rgr
PXCT ir=251 pc=172016 ad=000000 x=04 c=0 b=0 p=0 rgw prev
PXCT ir=251 pc=172016 ad=000000 x=04 c=0 b=1 p=0 rgr
PXCT ir=251 pc=172016 ad=000000 x=04 c=0 b=0 p=0 rgw prev
PXCT ir=251 pc=172016 ad=000000 x=04 c=0 b=1 p=0 rgr
PXCT ir=251 pc=172016 ad=000000 x=04 c=0 b=0 p=0 rgw prev
PXCT ir=251 pc=172016 ad=000000 x=04 c=0 b=1 p=0 rgr
PXCT ir=251 pc=172016 ad=000000 x=04 c=0 b=0 p=0 rgw prev
PXCT ir=251 pc=172016 ad=000000 x=04 c=0 b=1 p=0 rgr
PXCT ir=251 pc=172016 ad=000000 x=04 c=0 b=0 p=0 rgw prev
PXCT ir=251 pc=172016 ad=000000 x=04 c=0 b=1 p=0 rgr
PXCT ir=251 pc=172016 ad=000000 x=04 c=0 b=0 p=0 rgw prev
PXCT ir=251 pc=172016 ad=000000 x=04 c=0 b=1 p=0 rgr
PXCT ir=251 pc=172016 ad=000000 x=04 c=0 b=0 p=0 rgw prev
PXCT ir=251 pc=172016 ad=000000 x=04 c=0 b=1 p=0 rgr
PXCT ir=251 pc=172016 ad=000000 x=04 c=0 b=0 p=0 rgw prev
PXCT ir=251 pc=172016 ad=000000 x=04 c=0 b=1 p=0 rgr
PXCT ir=251 pc=172016 ad=000000 x=04 c=0 b=0 p=0 rgw prev
PXCT ir=251 pc=172016 ad=000000 x=04 c=0 b=1 p=0 rgr
PXCT ir=251 pc=172016 ad=000000 x=04 c=0 b=0 p=0 rgw prev
PXCT ir=251 pc=172016 ad=000000 x=04 c=0 b=1 p=0 rgr
PXCT ir=251 pc=172016 ad=000000 x=04 c=0 b=0 p=0 rgw prev
PXCT ir=251 pc=172016 ad=000000 x=04 c=0 b=1 p=0 rgr
PXCT ir=251 pc=172016 ad=000000 x=04 c=0 b=0 p=0 rgw prev
Page fault 172132 a=1 wr=0 w=1 000000
Page fault 172133 001000172132 300000
Page fault 170503 a=1 wr=0 w=1 000000
Page fault 170504 001000170503 1700040
Page fault 170503 a=1 wr=0 w=1 000000
Page fault 170504 001000170503 1700040
Page fault 170503 a=1 wr=0 w=1 000000
Page fault 170504 001000170503 1700040
Page fault 170503 a=1 wr=0 w=1 000000
Page fault 170504 001000170503 1700040
Page fault 170503 a=1 wr=0 w=1 000000
Page fault 170504 001000170503 1700040
Page fault 170503 a=1 wr=0 w=1 000000
Page fault 170504 001000170503 1700040
Page fault 170503 a=1 wr=0 w=1 000000
Page fault 170504 001000170503 1700040
Page fault 170503 a=1 wr=0 w=1 000000
Page fault 170504 001000170503 1700040
eswenson1 commented 5 years ago

@larsbrinkhoff Can you update this branch to use your latest SALV and CONFIG changes? The ones here built SALV and ITS with 6 disks (3 T300s). I assume you're using the MX config when you build ITS and the MC config when you build SALV.

I updated my local copy of KL ITS to have the changes (referenced above) and I've generated a .;ITS KLBIN and .;SALV KLBIN. I've made a tarball of the ITS system that exhibits the above behavior (and which can be booted with pdp10-ka and also with pdp10-kl (with above errors). The tarball is here: https://s3.amazonaws.com/eswenson-its/public/kl-its-for-kiteguy.tgz

I also generate a listing of ITS and placed it here: https://s3.amazonaws.com/eswenson-its/public/kl-its.list. @rcornwell wanted that.

I would have updated your branch with the changes to SALV and CONFIG -- but it is your branch. So I'll leave that to you to do. Might be nice if we had an active play area here that we all three could work in (so when you're asleep I can hack with kiteguy and when I'm asleep, you can. I assume kiteguy will never sleep, so should be able to productive 24x7! :-)

larsbrinkhoff commented 5 years ago

Good job!

Don't trust the binaries overly much. The branch will be in a state of flux until things stabilize.

larsbrinkhoff commented 5 years ago

You can push commits to the branch.

larsbrinkhoff commented 5 years ago

When the dust settles, I expect to make a new branch or completely rewrite the old one. But it'll be a while yet.

eswenson1 commented 5 years ago

One thing I didn’t check: was the memory setting in config correct for MX and the “run” script? Is it possible that the page faults are caused by ITS config rather than pdp10-kl? Might be good if we shared our SALV and CONFIG since you and I both are using different files than in the Lars/kL/ddt branch.

eswenson1 commented 5 years ago

One more thing, if you pull down the ITS I made for Rich, you’ll see the SALV and CONFIG that I used. Also, I wrote binaries SALV KLBIN and ITS KLBIN, preferring those names to KL ITS and SALV KL. So those are the latest binaries I was using.

That system can be booted with pdp10-ka using run-ka and can be tested with pdp10-kL and run-kl.

larsbrinkhoff commented 5 years ago

Thanks, I'll take it from here :-)

larsbrinkhoff commented 5 years ago

The memory used to be 512K, but I updated it to 2048 like MX.