From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,8310825ecaa45519 X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 2002-02-07 18:07:38 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news.xnet.com!dfw-peer.news.verio.net!dfw-feed.news.verio.net!news.verio.net!news!not-for-mail Message-ID: <3C633298.777E71E5@ins-msi.com> From: Jeff Campbell Organization: INS-MSI Inc. X-Mailer: Mozilla 4.79 [en] (WinNT; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.sys.dec Subject: Re: TS10 Emulator - a bug had been found! References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Fri, 08 Feb 2002 02:45:12 GMT NNTP-Posting-Host: 209.190.8.133 X-Trace: news 1013136312 209.190.8.133 (Thu, 07 Feb 2002 21:45:12 EST) NNTP-Posting-Date: Thu, 07 Feb 2002 21:45:12 EST Xref: archiver1.google.com comp.sys.dec:11873 sword7@speakeasy.org wrote: > > Good News!! Well, I found a serious bug in TS10 emulator that cause the > OpenVMS stalled after RQDX3 initialization. I found that by using two > log files from Simh and TS10 emulators and comparing difference between > them. I fixed it in my RQDX3 emulation (rq_PutDesc) to not put 1 on > command interrupt unless commands slot is only one or previous > command descriptor belongs to RQDX3 controller. After it was fixed, > OpenVMS now is trying read blocks from the Installation CD but stalled - > another bug showed up! :-( Assuming ring transition interrupts are enabled... The command ring transition interrupt should occur only when the command ring is full - the port owns all the slots - and the port has removed (processed) one of the entries. The interrupt tells the host that another command may be issued, assuming a) there is another command and b) there are enough credits to allow the command to be posted to the port. A ring sized at 32 slots needs to have 32 MSCP commands pending before the port will generate the command ring transition interrupt. It will not generate an interrupt when removing one command from the ring if ring did not also have 31 other commands pending. A "ring" sized with 1 slot should always generate a transition interrupt as each posted command is processed. The logic is: the ring has gone from full to not full. The receive transition interrupt scheme works the other way: an interrupt will be generated when the receive ring goes from empty to not empty. That is, the port has posted a response to the host. The command and receive rings are circular FIFO queues. Your emulation code needs to keep track of where the next expected command will be and where the next response needs to go. This is done by honoring the ownership bit in each ring entry. After initialization, the host owns all the command ring entries: the ownership bit in each of the command ring entries is a zero. The port owns all the response ring entries: the ownership bit in each entry is a one. > > I quickly found another bug when I debugged disassembled traces from > my debug.log. REMQUE tried to dequeue entry but queue already is empty > during MSCP read routine. I searched for cause by using two logs from > Simh and TS10 emulators and found a cause between sequence initialization > step 1 and step 2. On Simh, OpenVMS enqueued read access requests > by using INSQUE instruction during MSCP initialization step #1 but it > never happened in my debug.log from TS10 emulator. There was long > execution between step #1 and step #2 - estimated 300,000 lines! I > am narrowing down between step #1 and step #2 to find specific > area that has a bug. > > Yes, after a bug was fixed, OpenVMS got slightly further due to another > bug. Whew. > > That's why debuggers and programmers are blind without their source codes. > With source codes, bugs can be find much easilier. :-( > > -- Tim Stark > > -- > Timothy Stark <>< Inet: sword7@speakeasy.org > -------------------------------------------------------------------------- > "For God so loved the world, that he gave his only begotten Son, that > whosoever believeth in him should not perish, but have everlasting life. > Amen." -- John 3:16 (King James Version Bible) Jeff Campbell n8wxs@arrl.net