Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: paramucho@hotmail.com (paramucho)
Subject: Re: PDP11 Values from MFPT
Date: Fri, 20 Jan 2012 13:29:23 GMT	[thread overview]
Message-ID: <4f1f1d51.30229405@nntp.aioe.org> (raw)
In-Reply-To: jf9h5u$7ol$1@Iltempo.Update.UU.SE

On Thu, 19 Jan 2012 17:42:37 +0100, Johnny Billquist <bqt@softjar.se>
wrote:

>On 2012-01-19 15.30, paramucho wrote:
>> On Wed, 18 Jan 2012 19:12:24 +0100, Johnny Billquist<bqt@softjar.se>
>> wrote:
>>
>> <snip>
>>>> An output serial port is a fairly reliable timing device. You just
>>>> send nulls to the port and treat the interrupts as timer events. I
>>>> first used this technique when the clock on the PDP-11 I was using at
>>>> the Hannover computer show died on me a few hours before the show
>>>> started.
>>>
>>> Hum? So what do you detect? 50Hz vs. 60Hz, and the speed of the console
>>> port. Useful, but I would think you'd like to detect more.
>>
>> It sets out to automatically detect the clock speed, and that's what
>> it does. What more should it detect?
>
>Well, this whole thread started out with the question of how to detect 
>what CPU/machine you are running on. Which seems like a valid thing to 
>sometimes want to know.

The autohertz feature is just part of a more general bootstrap
detection process. I also have detect the usual things such as
available memory, CPU type, FPU, EIS, LSI and so on. All that code is
pretty straight-forward and carried out by many PDP-11 operating
systems.

The approach I take on RUST/XM is a little bit more interesting though
because I don't assume I'm in kernel mode with access to the I/O page
for a lot of the initial tests. I did that so that I could reuse the
code in a general environment detection utility and so that I act
sensibly if an attempt was made to boot in VAX compatibility mode.

>> Of course, other conditions are detected, including emulators and the
>> presence of a DEC programmable clock.
>
>How do you detect emulation or a DEC programmable clock this way?

The other conditions aren't detected with a timing loop...you seem to
be talking about general detection and timing-loop detection all at
the same time...or are we in alternate universes again...

>>> Also, this might be messy if someone actually use a clock source with
>>> some other frequency...
>>> (800Hz seems to have been somewhat popular as well).
>>
>> It supports the standard DEC configurations. For non-standard hardware
>> it fails benignly and can be overridden with a bootstrap .INI file
>> entry or a startup command file. It's not messy at all.
>
>Well, any 11/73, 11/83, 11/84, 11/93 or 11/94 have in the setup menu the 
>option to run the system clock at power line frequency, 50 Hz, 60 Hz or 
>800 Hz. Seems rather standard hardware to me.
>I have not checked if the 11/53 have the same option. For older 
>machines, you need the programmable clock to select anything but line 
>frequency.

The 800hz option isn't present on the 11/73. It's not documented in
the CPU guide and I note that SimH only provides the "JCLK" option for
the 8x and 9x CPUs but not for the 73.

In any case, since the option settings for 50/60/800 hz are visible in
a processor register (xx177520) I don't need to detect the setting in
a timing loop. It's just a matter of a CPU and CSR detect.

At present CPU support for RUST systems hasn't advanced beyond the
11/73. Later stuff is on the TODO list, but until someone who can also
test the code requests the functionality there are better ways to
waste my time.

<snip>
>>> The problem
>>> obviously being that when you go to virtual serial ports, that is no
>>> longer true, since the serial data can be clocked out at any speed even
>>> thought you might think it is some other, fixed speed.
>>
>> That's not a real-world problem. These tests are performed during
>> bootstrap on the system console.
>
>All my emulated machines have a virtual serial port. It does not take 
>much, or any time at all, to write a byte to the serial console port. 
>And I think that is very much the real world.
>The console lines are in reality telnet ports.

The test is not performed on emulated machines, which is why it's not
a real-world problem for moi. There is no problem to solve.

<snip>
>And I'm maybe a little surprised that RT-11 don't use WAIT, but then 
>again, it's a simple single-user system, so it might not be totally 
>shocking that it don't use WAIT.

According to SimH documentation the SET CPU IDLE code benefits RSX and
RSTS but not RT-11 or UNIX. Unix is not a single-user operating
system. I'm not sure about the many other operating systems written
for the PDP-11. You note elsewhere that a later version of BSD
supports WAIT, but Bob Supnik is probably talking about "Unix" Unix.

RT-11 is definitely a multi-task/job system. Late versions of the
system support "system jobs" running just about any system program
(I've never actually used the feature though). So, if multi-process is
a reason for WAIT, then it applies equally to RT-11.

In any case, it's more a question of single-CPU than it is single-
user. There's no particular benefit to using WAIT in a single-CPU
configuration. Up until 2006 the instruction was effectively ignored
by SimH and is still ignored out-of-the-box for SimH. 

It's not necessary for a system to use every feature provided by the
hardware architecture. For example, the original planned use of
interrupt vectors has essentially been ignored by RT-11 and RSX for
years which uniformly take interrupts at PR7 and then lower priority
to the device level rather than letting the vector do that job as
originally planned. Then there's the PDP-11 virtual memory feature,
not to forget MARK.

>Do you know how the idle loop displays anything on the switch register 
>in RT-11? Does it actually write to the switch register? Do you know 
>where in the code it is? Trying to look a little at the RT-11 sources...

A long, long time ago, when I was a young coder, I could more-or-less
recite the RT-11 monitor code from memory, and yes, the idle loop code
is still in the sources even though switch registers are long gone.

As discussed in our earlier threads, I usually don't waste my time
presenting details of RT-11 in our discussions since you generally
don't respond (beyond snipping), but since you ask I'll summarise my
fuller response to Glenn here. 

No official DEC distribution of RT-11 had a monitor binary with a WAIT
instruction in the idle loop. 

Up until V5.4, which was quite late in RT-11's life cycle, there was
no provision at all for WAIT in the loop. A patch point was introduced
late in RT-11's life cycle, around V5.4, which allowed for a WAIT
instruction to be patched in, but that patch point was not used by the
RT-11 bootstrap during startup and was not documented in CUSTOM.TXT
which provides information on monitor patch points. It is essentially
DEC-private. 

So the closest you get to WAIT in RT-11 is ";;; WAIT". Indeed, the
commented WAIT shows that the inclusion of the instruction was
considered and rejected.

See my response to Glenn for more details.

(I'm heartened to see that you're finally reading the RT-11 sources.
Welcome to the bright side of the road comrade :-)

>>>> The API is also used to detect the emulator, get a startup comand and
>>>> a few other tasks. It's the sort of thing which could grow and grow...
>>>>
>>>> Here's the autohertz/baud check from the RUST/SJ bootstrap module.
>>>> "bnew" and "beqw" combine compare and branch instructions.
>>>
>>> [...]
>>> The problem being that 50 and 60 Hz are not the only two clock
>>> frequencies you might find on a PDP-11... :-)
>>
>> They are the only two line clock frequencies supported by RT-11 and
>> RUST. The test is not performed if a programmable clock is available.
>> I have never had a request for the support of any other kind of clock
>> frequency. In any case, as stated a few times, the test can be
>> overriden. I don't see a real-world problem here at all. It's one of
>> my favorite little routines.
>
>Ouch. RSX supports any clock frequency, and you can also change it 
>dynamically on M+ systems. (Well, more than 65535 Hz is not possible, 
>and in the old times of real hardware, I think the recommendation was to 
>not use something higher than 1000 Hz, because the overhead from the 
>clock interrupts would start to take too much CPU time.)

Once again, the point of the timing loop is to determine the line
clock frequency during *bootstrap*. Dynamic changing of the clock
frequency at runtime is not an issue it attempts to address, could
address or needs to address. 

>And even the line clock type can actually give you other frequencies, as 
>I mentioned above, depending on which machines you have.

You mentioned one other "line clock" frequency only (800hz), not
plural "frequencies", but it's not necessary to autodetect that
frequency since the information in that case is available in a
processor register.

Indeed, despite your vociferous objections and invented issues there
is *no* problem. For most machines the feature automatically detects
the line frequency. If not, it fails benignly. It doesn't apply to
virtual ports or dynamic runtime changes. It doesn't need to detect
800hz. It can be overriden with a .INI file or the startup command
file.

I know that my European and Australian 50hz customers would have loved
to have had the feature back in the 80s. I only came up with the
feature when I decided to rejuvinate my systems over the last decade
to introduce some of more beneficial recent operating systems ideas,
and one of those good ideas is that systems should figure out for
themselves what hardware they have without bugging users.

Are we done yet? Can we find something else to chew? :-)

Ian


  parent reply	other threads:[~2012-01-20 13:29 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 [this message]
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
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