Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
* TS10 Emulator Updates (KA655)
@ 2002-02-07  0:33 sword7
  2002-02-08  0:11 ` TS10 Emulator - a bug had been found! sword7
  0 siblings, 1 reply; 10+ messages in thread
From: sword7 @ 2002-02-07  0:33 UTC (permalink / raw)


Hello folks:

I finished implemented the KA655 module into my TS10 emulator (VAX 
section).  I successfully booted KA655 firmware to the >>> prompt but
I only have a problem with test 53 (countdown 31).  It complaint that 
programmable timers are slightly too fast or slow (subtest 9 and A).
Test 53 tested programmable timers how fast or slow by using TODR 
register.  I am figuring out why because my clock service calibrates two 
timers by using instructions/sec to update tick rate each 10 msecs (each 
tick is estimated 1 kHz).

On NetBSD/vax 1.5.2, I successfully booted system without any problems.
NetBSD boot reported that MicroVAX 3800/3900 series instead of MicroVAX II.
I was able logged into system.

On OpenVMS v7.2, it resulted the same like MicroVAX II! It stalled after
2nd RQDX3 initialization (with interrupt enables).  Well, I made a log 
from Simh VAX emulator to compare with my debug.log.  Yes, same addresses 
and contents on both log files.  (On MicroVAX II, there were very 
different addresses and contents.)  I now detected some differences 
between my debug.log and sim_log files during RQDX3 initialization.  I 
suspect perhaps queue instructions.  First queue has same address but 
2nd, 3rd, and 4rd queues had different addresss (difference is hex 200).

When OpenVMS detected Unit #1 has medium online, it did requested read 
access (21) on 1st queue.  OpenVMS started to send online and 2nd gus 
commands to the unit #1 (boot drive).  When it received 2nd GUS reponse
from RQDX3 (Unit #1), it processed and labeled as SABKUP$DUA1 but removed 
a read access request!  That cause the OpenVMS system to stall.  It never 
happened in Simh VAX emulator.   If it does not remove a read access
request, it will continue to read some blocks and display time/data dialog 
later.

Kevin, do you recongize that?  Ok, I will keep you posted when new 
somthing happens more...

Thank you!

-- 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)


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: TS10 Emulator - a bug had been found!
  2002-02-07  0:33 TS10 Emulator Updates (KA655) sword7
@ 2002-02-08  0:11 ` sword7
  2002-02-08  2:45   ` Jeff Campbell
  0 siblings, 1 reply; 10+ messages in thread
From: sword7 @ 2002-02-08  0:11 UTC (permalink / raw)


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! :-(

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)


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: TS10 Emulator - a bug had been found!
  2002-02-08  0:11 ` TS10 Emulator - a bug had been found! sword7
@ 2002-02-08  2:45   ` Jeff Campbell
  2002-02-08 13:48     ` sword7
  0 siblings, 1 reply; 10+ messages in thread
From: Jeff Campbell @ 2002-02-08  2:45 UTC (permalink / raw)


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: TS10 Emulator - a bug had been found!
  2002-02-08  2:45   ` Jeff Campbell
@ 2002-02-08 13:48     ` sword7
  2002-02-08 20:48       ` Jeff Campbell
  0 siblings, 1 reply; 10+ messages in thread
From: sword7 @ 2002-02-08 13:48 UTC (permalink / raw)


Jeff:

Yes, that is right.  That's why OpenVMS stalled after RQDX3 initialization 
and all units scanned.  When RQDX3 initialization was completed, OpenVMS 
checked saved interrupt flags from ring base table and see command 
interrupt flag is set then jumped to check all queues by using 
INSQUE/REMQUE instructions but found nothing.  Then returned back to
null job and never do the read access.

After it was fixed in my RQDX3 emulation, now all saved interrupt flags
are response interrupt is one but command interrupt is zero.  OpenVMS
checked everything before exit RQDX3 initization.  When it made sure that
command interrupt is zero, it gave green signal to start I/O data acceses.  
Then OpenVMS issued IPL 8 software interrupt and returned back to null 
job.  Then interrupt immediately occured after REI executed and checked 
any requests.  It found something and issued IPL 4 software interrupt and 
returned back to null job.  Then interrupt immediated occured and started 
to execute at IPL 4.  It jumped into the I/O data routines and tried to 
dequeue I/O requests from its queue (80AE6350) at 80C68AD9.  It found 
queue empty and gave up.  It just gave up before next instructions that 
is starting I/O data access.  It retuned back to null job forever....

According to debug.log, it failed to enqueue I/O requests to 80AE6350
during MSCP initialization step #1.  It did in SIMH emulator.  That
is big difference that I detected in both log files.  In TS10 emulator,
it never encounter 80C7476D that contains INSQUE instruction with queue 
80AE6350.  In SIMH emulator, it did encountered 80C7476D.  There are
300,000 lines between step #1 and step #2.  According to VAX
Internal and Data Structures, it is in processing at step 44 during
EXE$INIT routine.  I believed that LDR$CQ_IMAGES (sp?) perhaps is messed 
up or so.

-- 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)


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: TS10 Emulator - a bug had been found!
  2002-02-08 13:48     ` sword7
@ 2002-02-08 20:48       ` Jeff Campbell
  2002-02-08 21:28         ` TS10 Emulator - A PROBEx bug found!!! sword7
  0 siblings, 1 reply; 10+ messages in thread
From: Jeff Campbell @ 2002-02-08 20:48 UTC (permalink / raw)


Tim,

Dumb question. 8-)

Is your emulator code single threaded? That is, not coded as a
multithreaded application.

The reason I ask is that the INS/REMQUE instructions are atomic. A
queued element should not 'disappear' before the it's expected removal.
Maybe the queue header is being overwritten (initialized after an item
has been inserted into the queue.)

Jeff
n8wxs@arrl.net

sword7@speakeasy.org wrote:
> 
> Jeff:
> 
> Yes, that is right.  That's why OpenVMS stalled after RQDX3 initialization
> and all units scanned.  When RQDX3 initialization was completed, OpenVMS
> checked saved interrupt flags from ring base table and see command
> interrupt flag is set then jumped to check all queues by using
> INSQUE/REMQUE instructions but found nothing.  Then returned back to
> null job and never do the read access.
> 
> After it was fixed in my RQDX3 emulation, now all saved interrupt flags
> are response interrupt is one but command interrupt is zero.  OpenVMS
> checked everything before exit RQDX3 initization.  When it made sure that
> command interrupt is zero, it gave green signal to start I/O data acceses.
> Then OpenVMS issued IPL 8 software interrupt and returned back to null
> job.  Then interrupt immediately occured after REI executed and checked
> any requests.  It found something and issued IPL 4 software interrupt and
> returned back to null job.  Then interrupt immediated occured and started
> to execute at IPL 4.  It jumped into the I/O data routines and tried to
> dequeue I/O requests from its queue (80AE6350) at 80C68AD9.  It found
> queue empty and gave up.  It just gave up before next instructions that
> is starting I/O data access.  It retuned back to null job forever....
> 
> According to debug.log, it failed to enqueue I/O requests to 80AE6350
> during MSCP initialization step #1.  It did in SIMH emulator.  That
> is big difference that I detected in both log files.  In TS10 emulator,
> it never encounter 80C7476D that contains INSQUE instruction with queue
> 80AE6350.  In SIMH emulator, it did encountered 80C7476D.  There are
> 300,000 lines between step #1 and step #2.  According to VAX
> Internal and Data Structures, it is in processing at step 44 during
> EXE$INIT routine.  I believed that LDR$CQ_IMAGES (sp?) perhaps is messed
> up or so.
> 
> -- 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)


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: TS10 Emulator - A PROBEx bug found!!!
  2002-02-08 20:48       ` Jeff Campbell
@ 2002-02-08 21:28         ` sword7
  2002-02-08 23:36           ` Jeff Campbell
  2002-02-09  3:58           ` Zane H. Healy
  0 siblings, 2 replies; 10+ messages in thread
From: sword7 @ 2002-02-08 21:28 UTC (permalink / raw)


Jeff Campbell <jcampbell@ins-msi.com> wrote:
> Tim,

> Dumb question. 8-)

> Is your emulator code single threaded? That is, not coded as a
> multithreaded application.

> The reason I ask is that the INS/REMQUE instructions are atomic. A
> queued element should not 'disappear' before the it's expected removal.
> Maybe the queue header is being overwritten (initialized after an item
> has been inserted into the queue.)

> Jeff
> n8wxs@arrl.net

Jeff:

Very good news!!!

Well, I finally found a very serious bug in my TS10 emulator that cause 
OpenVMS to crashed quietly dring RQDX3 initialization.  PROBEx 
instructions!

After I fixed that, OpenVMS finally displayed date/time dailog!!  I
entered date and stamp and OpenVMS successfully booted to a dollar!!
Also OpenVMS displayed information about devices and asked me to enter
'yes' to continue.

I entered 'backup/image dua1:[000000]vms072.b/save dua0:' and
sucessfully restored system disk.  I rebooted system...  

I was looking for a serious bug for many months until now!!

Whew!

-- 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)


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: TS10 Emulator - A PROBEx bug found!!!
  2002-02-08 21:28         ` TS10 Emulator - A PROBEx bug found!!! sword7
@ 2002-02-08 23:36           ` Jeff Campbell
  2002-02-09  3:58           ` Zane H. Healy
  1 sibling, 0 replies; 10+ messages in thread
From: Jeff Campbell @ 2002-02-08 23:36 UTC (permalink / raw)


Excellent!!

Jeff

sword7@speakeasy.org wrote:
> 
> Jeff Campbell <jcampbell@ins-msi.com> wrote:
> > Tim,
> 
> > Dumb question. 8-)
> 
> > Is your emulator code single threaded? That is, not coded as a
> > multithreaded application.
> 
> > The reason I ask is that the INS/REMQUE instructions are atomic. A
> > queued element should not 'disappear' before the it's expected removal.
> > Maybe the queue header is being overwritten (initialized after an item
> > has been inserted into the queue.)
> 
> > Jeff
> > n8wxs@arrl.net
> 
> Jeff:
> 
> Very good news!!!
> 
> Well, I finally found a very serious bug in my TS10 emulator that cause
> OpenVMS to crashed quietly dring RQDX3 initialization.  PROBEx
> instructions!
> 
> After I fixed that, OpenVMS finally displayed date/time dailog!!  I
> entered date and stamp and OpenVMS successfully booted to a dollar!!
> Also OpenVMS displayed information about devices and asked me to enter
> 'yes' to continue.
> 
> I entered 'backup/image dua1:[000000]vms072.b/save dua0:' and
> sucessfully restored system disk.  I rebooted system...
> 
> I was looking for a serious bug for many months until now!!
> 
> Whew!
> 
> -- 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)


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: TS10 Emulator - A PROBEx bug found!!!
  2002-02-08 21:28         ` TS10 Emulator - A PROBEx bug found!!! sword7
  2002-02-08 23:36           ` Jeff Campbell
@ 2002-02-09  3:58           ` Zane H. Healy
  2002-02-09  5:28             ` sword7
  2002-02-10  5:58             ` sword7
  1 sibling, 2 replies; 10+ messages in thread
From: Zane H. Healy @ 2002-02-09  3:58 UTC (permalink / raw)


sword7@speakeasy.org wrote:
> I entered 'backup/image dua1:[000000]vms072.b/save dua0:' and
> sucessfully restored system disk.  I rebooted system...  

> I was looking for a serious bug for many months until now!!

Congratulations!  What happened when you rebooted though?  Was it able to
come back up?  Sounds like you just made some serious progress!

		Zane


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: TS10 Emulator - A PROBEx bug found!!!
  2002-02-09  3:58           ` Zane H. Healy
@ 2002-02-09  5:28             ` sword7
  2002-02-10  5:58             ` sword7
  1 sibling, 0 replies; 10+ messages in thread
From: sword7 @ 2002-02-09  5:28 UTC (permalink / raw)


Zane H. Healy <healyzh@shell1.aracnet.com> wrote:
> Congratulations!  What happened when you rebooted though?  Was it able to
> come back up?  Sounds like you just made some serious progress!

Zane:

Yeah.  Ater rebooted system, it asked me for date/stamp information.
When I entered them, entire TS10 emulator crashed into segmentation fault!
However, I found two bugs quickly and fixed them.  There were FFC and 
EXTZV (operand decoder).   I still am working on it because it ended up
Bug Check #3 (Pagefault with too high IPL).

I will implemnet Ctrl-P into my TS10 emulator to issue external halt
signal.  At this time, I had to exit TS10 and re-run it for each reboot.

-- 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)


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: TS10 Emulator - A PROBEx bug found!!!
  2002-02-09  3:58           ` Zane H. Healy
  2002-02-09  5:28             ` sword7
@ 2002-02-10  5:58             ` sword7
  1 sibling, 0 replies; 10+ messages in thread
From: sword7 @ 2002-02-10  5:58 UTC (permalink / raw)


Zane H. Healy <healyzh@shell1.aracnet.com> wrote:
> Congratulations!  What happened when you rebooted though?  Was it able to
> come back up?  Sounds like you just made some serious progress!

Ok, I fixed another bug in the same EXTZV instruction (operand decoding)
because I forget to add 'OP_VADDR' in autoincrement/immediate block
in vax_DecodeOperand.

OpenVMS finally prints "OpenVMS VAX V7.2 Installation Procedure" after
I entered time/date on date/time dialog.  Then it happened nothing.
I turned trace and looked sample.  I noticed that system caught endless
loop with Bug Check #03C0.  Does anyone know what is #03C0?

I quit and re-ran my TS10 emulator and rebooted it but no time/date
dialog!  I believe that something messed up system disk.  I had 
re-formatted system disk to clear all problems.

My console screen log here:

>>>b dua0
(BOOT/R5:0 DUA0)



  2..
-DUA0
  1..0..


%SYSBOOT-I-SYSBOOT Mapping the SYSDUMP.DMP on the System Disk
%SYSBOOT-W-SYSBOOT Can not map SYSDUMP.DMP on the System Disk
%SYSBOOT-I-SYSBOOT Mapping PAGEFILE.SYS on the System Disk
%SYSBOOT-I-SYSBOOT SAVEDUMP parameter not set to protect the PAGEFILE.SYS
   OpenVMS (TM) VAX Version BI72-72T Major version id = 1 Minor version id = 0

PLEASE ENTER DATE AND TIME (DD-MMM-YYYY  HH:MM)  10-FEB-2002 0:27

           OpenVMS VAX V7.2 Installation Procedure

[then it happened nothing forever....]

Thank you!

-- 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)


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2002-02-10  5:58 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-02-07  0:33 TS10 Emulator Updates (KA655) sword7
2002-02-08  0:11 ` TS10 Emulator - a bug had been found! sword7
2002-02-08  2:45   ` Jeff Campbell
2002-02-08 13:48     ` sword7
2002-02-08 20:48       ` Jeff Campbell
2002-02-08 21:28         ` TS10 Emulator - A PROBEx bug found!!! sword7
2002-02-08 23:36           ` Jeff Campbell
2002-02-09  3:58           ` Zane H. Healy
2002-02-09  5:28             ` sword7
2002-02-10  5:58             ` sword7

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox