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.189.72 with SMTP id gg8mr5403894pbc.4.1327066171070; Fri, 20 Jan 2012 05:29:31 -0800 (PST) Path: lh20ni203708pbb.0!nntp.google.com!news1.google.com!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail From: paramucho@hotmail.com (paramucho) Newsgroups: alt.sys.pdp11,vmsnet.pdp-11,comp.sys.dec Subject: Re: PDP11 Values from MFPT Date: Fri, 20 Jan 2012 13:29:23 GMT Organization: Aioe.org NNTP Server Message-ID: <4f1f1d51.30229405@nntp.aioe.org> References: <4f12e49d$0$295$14726298@news.sunsite.dk> <4f175c07.15409279@nntp.aioe.org> <4f16e707.10168332@nntp.aioe.org> <4f181c7d.40278662@nntp.aioe.org> Reply-To: paramucho@hotmail.com NNTP-Posting-Host: yPe0Vz9rK3epnEf2vEo6yg.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 X-Newsreader: Forte Agent 1.5/32.451 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit On Thu, 19 Jan 2012 17:42:37 +0100, Johnny Billquist wrote: >On 2012-01-19 15.30, paramucho wrote: >> On Wed, 18 Jan 2012 19:12:24 +0100, Johnny Billquist >> wrote: >> >> >>>> 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. >>> 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. >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