From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Thread: fdd80,5cdb0c1dbaceb85b X-Google-NewGroupId: yes X-Google-Thread: ffc31,5cdb0c1dbaceb85b X-Google-NewGroupId: yes X-Google-Thread: 1164f8,5cdb0c1dbaceb85b X-Google-NewGroupId: yes X-Google-Attributes: gide311f70d09,gidf4c4f7386e,gidd180ab3bd8,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.73.229 with SMTP id o5mr11008738pbv.7.1329175125965; Mon, 13 Feb 2012 15:18:45 -0800 (PST) Path: wr5ni21792pbc.0!nntp.google.com!news2.google.com!eweka.nl!lightspeed.eweka.nl!194.134.4.91.MISMATCH!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!194.109.133.84.MISMATCH!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!news.stack.nl!newsfeed.Update.UU.SE!news.Update.UU.SE!not-for-mail From: Johnny Billquist Newsgroups: alt.sys.pdp11,vmsnet.pdp-11,comp.sys.dec Subject: Re: PDP11 Values from MFPT Date: Tue, 14 Feb 2012 00:18:44 +0100 Organization: Update Computer Club Message-ID: References: <4f30d0d8.41682905@nntp.aioe.org> <4f313229.43518694@nntp.aioe.org> <4f37717c.29259157@nntp.aioe.org> <4f339e98.40806741@nntp.aioe.org> <4f360d68.39000374@nntp.aioe.org> <4f396a03.27713593@nntp.aioe.org> <4f37ec05.63303162@nntp.aioe.org> NNTP-Posting-Host: 178-83-31-172.dynamic.hispeed.ch Mime-Version: 1.0 X-Trace: Iltempo.Update.UU.SE 1329175125 26894 178.83.31.172 (13 Feb 2012 23:18:45 GMT) X-Complaints-To: newsmaster@Update.UU.SE NNTP-Posting-Date: Mon, 13 Feb 2012 23:18:45 +0000 (UTC) User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:10.0.1) Gecko/20120208 Thunderbird/10.0.1 In-Reply-To: <4f37ec05.63303162@nntp.aioe.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 2012-02-12 18:23, paramucho wrote: > On Sat, 11 Feb 2012 22:09:11 +0100, Johnny Billquist > wrote: > >>>>> Architectures are not retrospective, they are working specifications >>>>> of new implementations. The point I'm making about the PDP-11 is that >>>>> it didn't stick to the architecture (unless you reduce the term >>>>> "architecture" to something very fuzzy, almost aspirational). >>>> >>>> And I disagree. The different PDP-11s were not implemented out of a blue >>>> sky, but did actually follow some principles defined way back in 1969. >>>> The PDP-11 architecture. >>>> If they didn't follow that, then the machines would not have been >>>> usable. There is a reason why RT-11 and RSX will work on all different >>>> PDP-11 models. They implement the same architecture. >>> >>> The reason that RT-11 works on all the PDP-11 models is because it >>> contains code which manages all the architectural variations. RT-11 >>> won't boot on a T11/SBC-11 unless you have the version of RT-11 which >>> inserts NOPs here and there to manage the interrupt scheme. >> >> Hmm. I think I can't remember much of any model-specific code in RSX. >> But I'm sure there are some things in a few places... >> >> Searching through the code right now, in the SST handler, I can't >> actually find any model-specific code... > > I wouldn't expect to find LSI or T11 conditionals in code that runs on > memory mapped machines. In any case, you also listed RT-11 in your > claim above, and RT-11 supported the LSI-11 and T11. In the RT-11 > bootstrap you'll find these sequences: RSX can also run on non-memorymapped machines. M+ can not, but 11M definitely can. But I should check that distribution to make sure that file isn't different. But almost all files are the same between 11M and M+, with conditionals in them. > TST ; Check device present > T11NOP ; NOP on T11 > BCS ... ; error detected > > (Note, these tests use exactly the trap technique I described above). Ah, with a trap handler setting the carry if you have a bus timeout? Yes, RSX do that in the boot sequence, when trying to figure out which machine you have. Also, if you have a device driver trying to come online, it will fail and be marked offline if the device don't respond to the address. However, this whole thing is run the same way on all models that I can see, the only odd thing in your code being that T11NOP, which I'm curious about... >>> Code developed exclusively on an LSI-11 often crashs when moved to >>> other PDP-11s because the LSI-11 does not implement odd address traps. >>> That has always been a major drag. >> >> I remember that it does not trap odd address access at all. Bad, but >> hard to do much about. > > The whole point of the architecture approach was to avoid precisely > this kind of incompatibility. That's why I've said that the PDP-11 is > somewhere in between the pre-architectural and architectural worlds. > All the main PDP-11 architectural issues had their roots in > cost-technology trade-offs. There are always implementations that might differ one way or another from the generally accepted behavior. Often with bad effects, but it's a trade-off. That is, however, no argument for or against the existence of an architecture. There are VAXen with horrible deviations from that architecture as well. I can't remember which model now, but there is one with a very incompatible MMU. Mostly used in things like the X-terminals DEC made, if I remember right. >>>> By the way, the stack and PC modifications of a MARK instruction are >>>> also guaranteed to never have been done in case of a trap. >>> >>> I had looked in various "architectural" documents for information on >>> MARK in this regard :-) Where did you find it? >> >> It's in the "Architecture Handbook". >> Atleast the earlier version, which I gave a link to before. I wish I had >> the latest version online. Anyone know if it's available somewhere? > > Which link was that? The only link I can find in this stream is the > link I provided, but all that has is a picture of the front cover. http://bitsavers.trailing-edge.com/pdf/dec/pdp11/handbooks/PDP11_Handbook1979.pdf Page 164, the description of MMR1. I really should locate the later version online... > BTW: I checked the 11/34 and J11 XXDP diagnostics at bitsavers last > night. The SR1 test on the 11/34 just expects a big, fat zero. On the > J11 the tests are limited to various combinations of "mov > (r1)+,-(r5)", mixing up autoinc and autodec. That's it. Cheap bastards. :-) > As noted above, I've implemented the condition code tests (and I'm > running a bit late with the promised code because of that). The test > below shows the PS to be 30000 BEFORE the test. AFTER the test it is > 30004. I repeat the test with an initial PS of 30017 (all condition > codes set). The AFTER state is 30005. I only show the repeated test if > there is a difference between its PS BEFORE and AFTER state. > > J11: > SimH: > Test03: mtpi *(r0)+ > Before: R0=100000 SP=740 PC=3110 PS=30000 > After: R0=100002 SP=742 PC=3112 PS=30004 > Vec=250 SR0=100151 SR1=[20|26] SR2=3110 > > Before: R0=100000 SP=740 PC=3110 PS=30017 > After: R0=100002 SP=742 PC=3112 PS=30005 > Vec=250 SR0=100151 SR1=[20|26] SR2=3110 > > I've also cleaned up some other display details. VEC is now the trap > vector. SP and PC are always the SP and PC (I was using R0 sometimes > in the previous version). Adding the PS has forced me to wrap the MMU > information on to a separate line. > > E11 doesn't have the condition code problem, but you may recall that > this is one of two tests we marked as a BUG because the AFTER state > has SP+2 but there's no recovery information. > > E11: > Test03: mtpi *(r0)+ > Before: R0=100000 SP=740 PC=3110 PS=30000 > After: R0=100000 SP=742 PC=3112 PS=30000 > Vec=250 SR0=100151 SR1=[0|0] SR2=3110 > > What I realized tonight however is that the E11 bug distracted me from > noticing a bigger problem: The J11 and SimH might give us the backout > information for the stack ([20|26]), but it's of no use because the > MTPI stack operand will have already been overwritten by the MMU trap. > The value we wanted to write to user space (for example) can't be > recovered. Sweet jesus. That is right. MFPx/MTPx instructions can't be restarted. It's a design error in the PDP-11. Gha, that's ugly. > Basically, if we want to implement demand paging, we're screwed. MFPx > and MTPx are the basic tools used in the kernel to copy information to > and from user space. The workarounds are horrible (i.e. converting the > virtual address to a par/offset pair and mapping via a window). I'll > be very interested to know if the 11/70 has the problem. I'm willing to bet money that the 11/70 behaves the same way. The solution would actually be to make sure the address in userspace you want to read/write is in memory, so that you don't get page faults. Using memory mapping registers for this wouldn't be fun. One more trick that can be used is to only support/use MFPx/MTPx in kernel in the sequence of a push to the stack followed by this. That way, you could, as a part of the restart detect this special case, and back up to the previous instruction to redo the push as well. > Coming back to the condition codes, I note that J11 and SimH both > begin altering the CC's before an instruction is complete. That could > be fatal to a restarted ADC/SBC, ROL/ROR, ASH/ASHC instructions since > the C bit might be altered. I need new tests for that. Yikes. Even more problems. That sounds really weird and bad. Johnny -- Johnny Billquist || "I'm on a bus || on a psychedelic trip email: bqt@softjar.se || Reading murder books pdp is alive! || tryin' to stay hip" - B. Idol