From: Johnny Billquist <bqt@softjar.se>
Subject: Re: PDP11 Values from MFPT
Date: Wed, 18 Jan 2012 12:20:28 +0100 [thread overview]
Message-ID: <jf69ts$tpf$1@Iltempo.Update.UU.SE> (raw)
In-Reply-To: <4f12e49d$0$295$14726298@news.sunsite.dk>
I'm not entirely sure what your question is, Jerome...
But I'll make some comments anyway.
On 2012-01-15 15:37, Jerome H. Fine wrote:
> I have an interesting hardware question.
>
> I have been looking at the results for the program RESORC.SAV in RT-11
> with respect the MFPT instruction. When the J11 chip is used, the value
> is 5 and the Maintenance Register at 177750 seems to determine what the
> rest of the actual hardware supports.
Correct.
> I thought it would also be helpful for the user to know if an emulator
> is being
> used, either software or hardware, or if perhaps some other 3rd party
> hardware
> CPU. I would probably target the various 3rd party boards as far as hardware
> is concerned (such as QED and Mentec). For software emulators, I would
> suggest that only the high end PDP-11 processors be supported (the DEC
> CPUs which support the MFPT instruction) in order to keep things simple,
> at least initially.
If an emulator wants to truly emulate a specific CPU, then you cannot
just go and change the behavior of the emulator, since you will break
the basic idea behind it.
As far as different implementations goes, what is the difference between
an emulator and a "real" CPU? Both are running code to implement the
PDP-11 architecture. It's just that if the emulator is running on an x86
(for example), the microcode happens to be identical to x86 assembler,
whilst the J11 (for example) have a microcode CPU which we don't know
much about, but it still executes the microcode instructions...
> An incomplete list of software emulators is:
> SIMH
> Ersatz-11
>
> An incomplete list of hardware boards is:
> QED - more than 1?
> Mentec - at least 3
> and I can remember at least 2 others, but not the company names.
You have Strobe Data, which I'm sure you'll remember now that I mention
them.
> Right now the Logical Co. has a combined emulator called a
> PDQ-1000 board which actually plugs into a Qbus which takes
> only 4 slots, but includes CPU, memory and many controllers.
Yes... And...?
> Thus far, the high order byte of the MFPT instruction always seems
> to be zero and is currently ignored by the RESORC.SAV program.
> Under SIMH and Ersatz-11, it would be trivial to use the high order
> byte of the MFPT instruction to signify which software emulator is
> being used.
Right, except then they wouldn't truthfully emulate a J11.
And basing your design on how one application in RT-11 works seems like
an extremely bad idea.
> Can anyone who has a DEC (or non-DEC) PDP-11 system easily
> available determine the actual value returned by the MFPT instruction?
> As far as I know:
>
> MFPT Value Hardware
> 1 PDP-11/44
> 3 PDP-11/24 (should be 2)
> 3 PDP-11/23
> 4 SBC-11/21
> 5 All J11 chips including 11/73, 11/83, 11/93
That is all the values that MFPT can return. (Or rather - all the values
that were returned by any CPUs designed by DEC.)
> I assume that it would be extremely difficult, probably not worth the
> effort, to modify the high order byte of the MFPT instruction at this
> point for the 3rd party PDP-11 CPU boards, such as from Mentec.
Some Mentec boards use a J11. You can guess what they return. For the
other boards, they also seem to pretend to be J11 CPUs, which is a bit
sad, but that can't be helped.
> Can anyone comment on this assumption? Might there be another
> way for hardware to the tell a user which 3rd party board is being
> used as a PDP-11?
Please differ between which *board* is being used, as opposed to which
CPU. MFPT will only tell you which CPU is used, not which board.
> The other possibility is to use the Maintenance Register at 177750,
> although I suspect that there might not be any more bit available.
That register is specifically designed to tell you which board you have,
as opposed to MFPT, which tells which CPU.
And yes, there are bits left.
In the mainenance register, you have 4 bits allocated to system type.
(Note, not CPU type, system type.)
0 - 11/73
1 - J11-A (M11, N11)
2 - KDJ11-B (11/73, 11/83)
3 - KXJ11 (11/73)
4 - 11/53
5 - 11/93
This I collected from the system identification code in RSX. The 0 is
not explicitly stated to be an 11/73, rather, the code checks for the
values 1-5, and if none of those, it assumes it is an 11/73. I very much
doubt any DEC boards ever used any codes above 5, although you can have
up to 15.
The CPU identification code in RSX is very useful to read on how to
identify what kind of system it is.
Essentially, it goes like this:
1) Check if the SYSID registers exist
1.1) If yes, this is an 11/70 or 11/74.
1.2) Check if high bit of PDR is usable.
1.3) If yes, this is an 11/74. If no, this is an 11/70
2) Try MFPT
2.1) If it worked, we have a basic idea of system
2.2) 1 - 11/44
2.3) 3 - Possibly 11/23B or 11/24
2.3.1) Read maintenance register
2.3.2.1) If that succeded - check if bits 4-7
2.3.2.2) If 4-7 = 0 it is an XT system. Treat as unknown system.
2.3.3) Try writing to SWR
2.3.3.1) If that fails - system is an 11/23B
2.3.3.2) If that succeeds - system is an 11/24
2.4) 5 - J11 Based machine
2.4.1) Read maintenance register, look at bits 4-7
2.4.1.1) If that fails - unknown machine
2.4.1.2) 4 - 11/53
2.4.1.3) 3 - KXJ11 based 11/73
2.4.1.4) 1 - Real J11-A?
2.4.1.4.1) Check if writing to kernel PDR7 change state of W bit of
register to written.
2.4.1.4.1.1) If yes, we have an M11
2.4.1.4.2) Try MED instruction
2.4.1.4.2.1) If it works, we have an N11
2.4.1.4.3) Unknown type of CPU
2.4.1.5) 2 - KDJ11-B type. (11/83, 11/84)
2.4.1.6) 5 - KDJ11-E-type. (11/93, 11/94) (Codenamed Thunderbird apparently)
2.4.1.7) All others are called 11/73 (But the code will actually store
model as 11/9x)
3) If MFPT fails, M+ states that system must be 11/60, 11/34, 11/45,
LSI-11, 11/04, 11/05, 11/10, 11/15, 11/20 or 11/40.
3.1) Check 11/60 MED instruction
3.1.1) If that works, it is an 11/60
3.2) Check 11/34 MFPS instruction
3.2.1) If that works, it is an 11/34
3.3) Check 11/45 PIRQ register
3.3.1) If that exist, it is an 11/45
3.4) Of the rest, RSX-11M-PLUS only works on the 11/40
Also, for the machines which both have Qbus and Unibus variants, the
code then goes on to check if the machine have a Unibus map, and if so,
changes it to the Unibus version of the CPU.
All with the reservation that I might have missed something, written
something down wrong in my transcribing the code into the rules above,
and that this is obviously not enough to actually implement it, since
the details for some of these steps are rather intricate in actual
execution.
Anyway. If you have something that intends to implement a J11, it should
do the same thing a J11 does, which means MFPT should return 5. Anything
else is bad.
The maintenance register is a possible place to put something else in,
if you just want to identify your actual system differently, but once
more, if you really want to emulate an existing system, you cannot touch
that register either.
If you want some "foolproof" way of detecting that you are inside an
emulated machine, I'd say that adding a new instruction from the unused
opcodes is probably a better idea. I wouldn't expect anything to
actually try using an undefined opcode anyway, so no existing code
should be hurt by it. And your "new" code will also work on real
machines, in that you will instead get a trap if you try that instruction.
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
next prev parent reply other threads:[~2012-01-18 11:20 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
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 [this message]
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