From: paramucho@hotmail.com (paramucho)
Subject: Re: PDP11 Values from MFPT
Date: Sun, 12 Feb 2012 17:23:32 GMT [thread overview]
Message-ID: <4f37ec05.63303162@nntp.aioe.org> (raw)
In-Reply-To: jh6ldn$8uo$1@Iltempo.Update.UU.SE
On Sat, 11 Feb 2012 22:09:11 +0100, Johnny Billquist <bqt@softjar.se>
wrote:
<snip>
>>> Why would your program crash if the PC wasn't incremented by 4, by the
>>> way???
>>
>> Because my code is very simple:
>>
>> [setup code]
>> test instruction
>> [report code]
>>
>> When the test instruction crashs the trap ISR simply registers the
>> fact and RTI's with the C-bit and V-bit set. If the RTI PC was wrong
>> then my test code would presumably fail. Note, the code which actually
>> tests RTI, RETURN, JMP etc has a workaround.
>
>Oh. I assumed you just printed the information in the trap handler, and
>didn't return. Seemed like the simple way to do things. But if you
>return, then it becomes more important that the PC points to the next
>instruction. I suspect that means that your program might actually fail
>on some PDP-11 models.
>
>For example, if you do a
>
> MOV (R0)+,@(PC)+
>
>where it traps on the R0 reference, might, and probably will have the PC
>pointing to the pointer, and not the next instruction on many PDP-11s.
I'm well aware of that, however the technique is commonplace in RT-11
for the simple cases. As I said, I use the non-returning trap handler
technique for RTI, RETURN etc. Actually, the main problem with the
RT-11 technique is that you can mask other traps. Anyway, I had to
move all the tests to the trap handler yesterday when I finally put
the condition code tracking in.
<snip>
>>>> 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:
TST <I/O address> ; Check device present
T11NOP ; NOP on T11
BCS ... ; error detected
(Note, these tests use exactly the trap technique I described above).
>> 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.
>> PDP-11 software was frequently distributed in a variety of
>> NHD/EIS/FPU/FIS/EAE versions.
>
>I know some layered products which came with different versions of
>libraries. The NHD version works on all machines, while the other ones
>are faster, but requires that hardware to be available to be able to run.
>Seems perfectly reasonable.
I make the same point as above.
<snip>
>>> 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://www.vaxcluster.de/mambo/index.php?option=displaypage&Itemid=224&op=incl&SubMenu=&slideshow=16&directory=dec_manuals
<snip>
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.
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.
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.
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.
Ian
next prev parent reply other threads:[~2012-02-12 17:23 UTC|newest]
Thread overview: 222+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-15 14:37 PDP11 Values from MFPT Jerome H. Fine
2012-01-18 6:03 ` paramucho
2012-01-18 11:28 ` Johnny Billquist
2012-01-18 13:05 ` glen herrmannsfeldt
2012-01-18 13:26 ` Johnny Billquist
2012-01-26 3:24 ` Jerome H. Fine
2012-01-26 13:38 ` Johnny Billquist
2012-01-29 1:32 ` Jerome H. Fine
2012-01-29 1:43 ` Johnny Billquist
2012-01-26 3:23 ` Jerome H. Fine
2012-01-18 16:02 ` paramucho
2012-01-18 18:12 ` Johnny Billquist
2012-01-19 14:30 ` paramucho
2012-01-19 16:42 ` Johnny Billquist
2012-01-19 20:32 ` glen herrmannsfeldt
2012-01-20 13:32 ` paramucho
2012-01-20 13:29 ` paramucho
2012-01-20 16:48 ` Johnny Billquist
2012-01-21 12:25 ` paramucho
2012-01-21 20:15 ` Johnny Billquist
2012-01-26 3:25 ` Jerome H. Fine
2012-01-26 6:09 ` paramucho
2012-01-26 6:30 ` paramucho
2012-01-26 13:50 ` Johnny Billquist
2012-01-29 1:52 ` Jerome H. Fine
2012-01-29 2:08 ` Johnny Billquist
2012-01-26 13:48 ` Johnny Billquist
2012-01-26 13:46 ` Johnny Billquist
2012-01-29 1:35 ` Jerome H. Fine
2012-01-18 12:41 ` glen herrmannsfeldt
2012-01-18 13:18 ` Johnny Billquist
2012-01-18 14:28 ` glen herrmannsfeldt
2012-01-18 15:14 ` Johnny Billquist
2012-01-18 21:54 ` glen herrmannsfeldt
2012-01-18 22:32 ` Al Kossow
2012-01-19 0:22 ` Johnny Billquist
2012-01-19 1:30 ` glen herrmannsfeldt
2012-01-19 14:32 ` Bob Koehler
2012-01-19 16:45 ` Johnny Billquist
2012-01-20 17:55 ` Bob Koehler
2012-01-20 18:38 ` Bill Gunshannon
2012-01-18 16:25 ` paramucho
2012-01-18 18:00 ` Johnny Billquist
2012-01-19 14:25 ` paramucho
2012-01-19 16:50 ` Johnny Billquist
2012-01-20 13:32 ` paramucho
2012-01-20 16:54 ` Johnny Billquist
2012-01-21 13:16 ` paramucho
2012-01-21 13:58 ` Bob Eager
2012-01-21 20:02 ` Johnny Billquist
2012-01-22 11:59 ` Johnny Billquist
2012-01-22 14:03 ` paramucho
2012-01-22 16:15 ` Johnny Billquist
2012-01-23 4:14 ` paramucho
2012-01-18 13:20 ` Bob Eager
2012-01-19 14:29 ` Bob Koehler
2012-01-21 12:44 ` Tim Shoppa
2012-01-21 13:50 ` paramucho
2012-01-22 16:56 ` Tim Shoppa
2012-01-22 18:11 ` glen herrmannsfeldt
2012-01-23 3:52 ` paramucho
2012-01-21 14:25 ` glen herrmannsfeldt
2012-01-21 16:46 ` Bob Eager
2012-01-25 22:12 ` Tim Shoppa
2012-01-26 3:22 ` Jerome H. Fine
2012-01-26 13:46 ` paramucho
2012-01-29 1:34 ` Jerome H. Fine
2012-01-29 15:46 ` paramucho
2012-02-01 3:53 ` Jerome H. Fine
2012-02-01 11:22 ` paramucho
2012-02-01 11:48 ` Johnny Billquist
2012-02-01 13:48 ` paramucho
2012-02-01 14:43 ` stan
2012-02-01 16:37 ` paramucho
2012-02-01 18:05 ` stan
2012-02-02 2:24 ` Jerome H. Fine
2012-02-02 0:14 ` Johnny Billquist
2012-02-02 2:25 ` Jerome H. Fine
2012-02-02 9:29 ` Johnny Billquist
2012-02-02 18:52 ` glen herrmannsfeldt
2012-02-03 0:12 ` Johnny Billquist
2012-02-03 4:07 ` Jerome H. Fine
2012-02-03 14:15 ` Johnny Billquist
2012-02-03 15:00 ` paramucho
2012-02-02 13:31 ` paramucho
2012-02-02 19:07 ` glen herrmannsfeldt
2012-02-03 0:16 ` Johnny Billquist
2012-02-03 4:23 ` glen herrmannsfeldt
2012-02-03 12:01 ` Johnny Billquist
2012-02-03 15:36 ` Joe Oswald
2012-02-07 10:46 ` Johnny Billquist
2012-02-03 4:29 ` Jerome H. Fine
2012-02-03 12:50 ` Bill Gunshannon
2012-02-04 8:42 ` Charles Richmond
2012-02-04 13:38 ` paramucho
2012-02-04 16:03 ` Bill Gunshannon
2012-02-04 16:39 ` paramucho
2012-02-03 10:48 ` paramucho
2012-02-03 11:24 ` Johnny Billquist
2012-02-04 17:06 ` paramucho
2012-02-04 18:22 ` paramucho
2012-02-04 18:55 ` Johnny Billquist
2012-02-04 19:13 ` Bill Gunshannon
2012-02-05 13:28 ` Johnny Billquist
2012-02-05 18:15 ` glen herrmannsfeldt
2012-02-04 18:51 ` Johnny Billquist
2012-02-04 23:09 ` glen herrmannsfeldt
2012-02-05 14:01 ` paramucho
2012-02-05 15:31 ` Johnny Billquist
2012-02-06 13:50 ` paramucho
2012-02-06 14:45 ` Johnny Billquist
2012-02-06 14:58 ` paramucho
2012-02-06 16:25 ` Johnny Billquist
2012-02-05 14:27 ` Johnny Billquist
2012-02-05 13:57 ` paramucho
2012-02-05 15:44 ` Johnny Billquist
2012-02-06 13:51 ` paramucho
2012-02-06 14:56 ` Johnny Billquist
2012-02-06 16:40 ` Johnny Billquist
2012-02-07 14:50 ` paramucho
2012-02-07 16:20 ` Johnny Billquist
2012-02-08 13:34 ` paramucho
2012-02-08 16:03 ` Johnny Billquist
2012-02-08 16:58 ` paramucho
2012-02-08 22:29 ` Johnny Billquist
2012-02-10 13:12 ` paramucho
2012-02-10 19:20 ` glen herrmannsfeldt
2012-02-11 13:12 ` paramucho
2012-02-11 20:06 ` glen herrmannsfeldt
2012-02-11 20:23 ` Johnny Billquist
2012-02-10 19:29 ` Johnny Billquist
2012-02-11 13:15 ` paramucho
2012-02-11 21:09 ` Johnny Billquist
2012-02-12 17:23 ` paramucho [this message]
2012-02-12 18:35 ` paramucho
2012-02-13 17:30 ` paramucho
2012-02-14 13:14 ` Johnny Billquist
2012-02-14 16:20 ` paramucho
2012-02-14 17:30 ` Johnny Billquist
2012-02-13 23:18 ` Johnny Billquist
2012-02-14 16:20 ` paramucho
2012-02-14 17:47 ` Johnny Billquist
2012-02-14 18:17 ` paramucho
2012-02-14 19:54 ` Johnny Billquist
2012-02-15 12:58 ` paramucho
2012-02-15 17:12 ` Johnny Billquist
2012-02-16 13:54 ` paramucho
2012-02-16 20:15 ` Johnny Billquist
2012-02-17 12:41 ` paramucho
2012-02-17 17:13 ` Johnny Billquist
2012-02-18 11:24 ` Johnny Billquist
2012-02-18 14:28 ` paramucho
2012-02-18 20:07 ` Johnny Billquist
2012-02-18 11:55 ` paramucho
2012-02-18 20:58 ` Johnny Billquist
2012-02-20 2:29 ` Jerome H. Fine
2012-02-20 5:54 ` paramucho
2012-02-20 17:14 ` Jerome H. Fine
2012-02-20 18:05 ` Johnny Billquist
2012-02-21 6:16 ` paramucho
2012-02-21 17:38 ` Jerome H. Fine
2012-02-21 19:31 ` Johnny Billquist
2012-02-20 5:53 ` paramucho
2012-02-20 10:28 ` Johnny Billquist
2012-02-21 3:33 ` Jerome H. Fine
2012-02-21 6:17 ` paramucho
2012-02-21 10:23 ` Johnny Billquist
2012-02-21 11:37 ` paramucho
2012-02-21 14:16 ` Johnny Billquist
2012-02-21 16:42 ` paramucho
2012-02-21 19:43 ` Johnny Billquist
2012-02-22 12:21 ` paramucho
2012-02-22 14:12 ` paramucho
2012-02-22 15:26 ` Johnny Billquist
2012-02-22 14:33 ` paramucho
2012-02-22 15:53 ` Johnny Billquist
2012-02-22 16:48 ` paramucho
2012-02-22 21:17 ` Johnny Billquist
2012-02-23 12:42 ` paramucho
2012-02-23 13:51 ` paramucho
2012-02-23 15:17 ` Johnny Billquist
2012-02-20 2:22 ` Jerome H. Fine
2012-02-20 6:07 ` paramucho
2012-02-21 3:29 ` Jerome H. Fine
2012-02-21 8:06 ` paramucho
2012-02-21 10:38 ` Johnny Billquist
2012-02-21 11:54 ` paramucho
2012-02-21 14:20 ` Johnny Billquist
2012-02-21 15:13 ` paramucho
2012-02-21 15:20 ` Johnny Billquist
2012-02-22 2:51 ` Jerome H. Fine
2012-02-22 6:37 ` paramucho
2012-01-18 11:20 ` Johnny Billquist
2012-01-26 3:21 ` Jerome H. Fine
2012-01-26 14:12 ` Johnny Billquist
2012-01-26 15:26 ` paramucho
2012-01-29 1:41 ` Jerome H. Fine
2012-01-29 2:04 ` Johnny Billquist
2012-01-29 2:31 ` Johnny Billquist
2012-01-29 1:39 ` Jerome H. Fine
2012-01-29 1:45 ` Johnny Billquist
2012-01-30 2:21 ` Bob Supnik
2012-01-31 7:14 ` paramucho
2012-01-31 9:42 ` Johnny Billquist
2012-01-31 14:24 ` Bill Gunshannon
2012-01-31 20:17 ` Johnny Billquist
2012-01-31 21:39 ` Bill Gunshannon
2012-01-31 23:43 ` glen herrmannsfeldt
2012-02-01 3:56 ` Jerome H. Fine
2012-02-01 11:53 ` Johnny Billquist
2012-02-01 13:48 ` paramucho
2012-02-02 0:20 ` Johnny Billquist
2012-02-02 2:22 ` Jerome H. Fine
2012-02-01 12:14 ` Johnny Billquist
2012-02-01 16:27 ` glen herrmannsfeldt
2012-02-01 5:28 ` Charles Richmond
2012-02-01 11:54 ` Johnny Billquist
2012-02-01 3:55 ` Jerome H. Fine
2012-02-01 11:22 ` paramucho
2012-02-01 12:03 ` Johnny Billquist
2012-02-01 3:54 ` Jerome H. Fine
2012-02-01 12:09 ` Johnny Billquist
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox