visopsys.org

Visopsys Forums
It is currently Fri Jan 19, 2018 12:33 pm

All times are UTC




Post new topic Reply to topic  [ 33 posts ]  Go to page Previous  1, 2, 3, 4  Next
Author Message
 Post subject: Re: PCnet / FAST III
PostPosted: Thu Dec 04, 2014 4:34 pm 
Offline
User avatar

Joined: Tue Nov 16, 2010 7:20 pm
Posts: 460
Alright, I did get Qemu up and running. There are some seemingly-harmless error messages from the RTC driver, but the APIC code seems alright now.

The problem was related to prioritizing multiple interrupts-in-service, for anyone who's interested in that level of detail ;-)


Top
 Profile  
 
 Post subject: Re: PCnet / FAST III
PostPosted: Sat Dec 06, 2014 4:55 pm 
Offline
User avatar

Joined: Tue May 20, 2014 5:19 pm
Posts: 80
andymc wrote:
Alright, I did get Qemu up and running. There are some seemingly-harmless error messages from the RTC driver, but the APIC code seems alright now.

The problem was related to prioritizing multiple interrupts-in-service, for anyone who's interested in that level of detail ;-)


Hi Andy:

I've had to do some traveling, and don't currently have access to my dev machine. But, I'll try the new APIC code as soon as I can. I concur with NextVolume that it would be great to have a .76 release with some of the most recent improvements.

Glad you got your QEMU running. I wonder if you've been using GDB on your QEMU instance? I guess you're not that much in favor of interactive debugging, so you likely follow Linus's admonition that interactive debuggers make for sloppier code. I don't think I have that much patience - LOL - so I'd probably decide to go fishing before I'd write an entire application without one!

- Ron


Top
 Profile  
 
 Post subject: Re: PCnet / FAST III
PostPosted: Mon Dec 08, 2014 12:37 am 
Offline
User avatar

Joined: Tue Nov 16, 2010 7:20 pm
Posts: 460
Cheers Ron,

I posted a link to a pre-release ISO image in that other thread http://visopsys.org/forums/viewtopic.php?f=3&t=250&p=1116#p1116

I haven't tried your debugging technique yet. I'm not against interactive debuggers at all, but the "printing stuff out" method works well for me in most cases - at least when I know the code well enough, and know roughly where to look. When it's unfamiliar code, or it's some tricky multi-threading scenario, then stepping is often the right way to identify problem areas.


Top
 Profile  
 
 Post subject: Re: PCnet / FAST III
PostPosted: Thu Dec 11, 2014 11:38 pm 
Offline
User avatar

Joined: Tue May 20, 2014 5:19 pm
Posts: 80
Hello again Andy:

Well, I downloaded the ISO image from the link in your message (above), and it works fine with my QEMU version 1.1.2, running on Debian Wheezy (7.5).

Edit:
It looks like there are some intermittent issues, found on a second run. The system sometimes hangs as it did before.


Top
 Profile  
 
 Post subject: Re: PCnet / FAST III
PostPosted: Sun Dec 14, 2014 5:29 pm 
Offline
User avatar

Joined: Tue May 20, 2014 5:19 pm
Posts: 80
This post was redundant with a following one. (should be deleted)


Last edited by ronaldlees on Tue Dec 16, 2014 2:20 pm, edited 8 times in total.

Top
 Profile  
 
 Post subject: Re: PCnet / FAST III
PostPosted: Sun Dec 14, 2014 6:15 pm 
Offline
User avatar

Joined: Tue May 20, 2014 5:19 pm
Posts: 80
Andy:

IMO Visopsys runs pretty well without the APIC enabled. With APIC enabled, I don't get the same result every time. It seems to be a little varied as to what will happen. I'm not familiar enough with visopsys at this time to make any intelligent guesses as to cause. Working on it though!

BTW: I looked at the kernel in the 2014-12-13-debug ISO, and it doesn't have debug info. Well - at least gdb doesn't think so. :-(. I think your debug target may not be inserting the "-g". Anyway, I've been loading debug info from an older kernel that I compiled, which may explain some of the misalignments seen in the debugging sessions.

I wonder if you've ever considered a Trac bug page? It might be a better place to put overly long diagnostic text runs.


Last edited by ronaldlees on Fri Dec 19, 2014 1:34 pm, edited 8 times in total.

Top
 Profile  
 
 Post subject: Re: PCnet / FAST III
PostPosted: Sun Dec 14, 2014 8:00 pm 
Offline
User avatar

Joined: Tue May 20, 2014 5:19 pm
Posts: 80
I've observed that single stepping the kernel, you'll often invoke an artificial timeout. During one run, the visopsys screen had:

Code:
Visopsys 0.75
Copyright (C) 1998-2014 J. Andrew McLaughlin
Starting, one moment please ...
Detecting hardware: real time clock Error::kernelRtcDriver.c:waitOperationComplete(395):
Disk 01 no interrupt received - timeout


I had set a breakpoint, and caused the time-out. Then, when I resumed, I observed the following call graph as I continued:

Code:
0xc0024f0e in kernelMultitaskerGetProcesses (buffer=0xc002084e, buffSize=2014)
    at kernelMultitasker.c:2398
2398   }
(gdb) n
kernelMultitaskerGetCurrentProcessId () at kernelMultitasker.c:2402
2402   {
(gdb) n
flushLogStream () at kernelLog.c:57
57      status = kernelLockGet(&logLock);
(gdb) n
58      if (status < 0)
(gdb) n
pushBytes (theStream=0xc009017c, number=61,
    buffer=0xc00d6d28 "Dec 16 20:12:17 2014 Disk 03 no interrupt received - timeout\n") at kernelStream.c:282
282      if ((theStream == NULL) || (buffer == NULL))
(gdb) n
kernelLockGet (getLock=0xc009017c) at kernelLock.c:126
126            return (status = ERR_BUSY);
(gdb) n


Last edited by ronaldlees on Fri Dec 19, 2014 1:27 pm, edited 18 times in total.

Top
 Profile  
 
 Post subject: Re: PCnet / FAST III
PostPosted: Sun Dec 14, 2014 11:03 pm 
Offline
User avatar

Joined: Tue May 20, 2014 5:19 pm
Posts: 80
andymc wrote:
The problem was related to prioritizing multiple interrupts-in-service, for anyone who's interested in that level of detail ;-)


Andy: The "prioritizing multiple interrupt..." and very related topics are covered in pretty decent detail in this link:

http://developer.novell.com/devres/lang ... mpmemo.htm

The authors indicate that often times interrupt service and driver routines for devices must be modified to switch from PIC to APIC (excuse my lack of experience with this). Did you find it necessary to change much? The document is a little old, so maybe some of the described issues have been resolved in hardware by now.


Last edited by ronaldlees on Wed Dec 17, 2014 2:17 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: PCnet / FAST III
PostPosted: Tue Dec 16, 2014 11:15 pm 
Offline
User avatar

Joined: Tue Nov 16, 2010 7:20 pm
Posts: 460
Thanks Ron. It's pretty hard to make sense of this, I think maybe because your sources won't match up with the binary download I gave you (usually, I'm not keen on releasing sources before things are stable and ready for release).

Can you tell me what command line you've been using with Qemu to reproduce these hangs?

The Visopsys kernel doesn't switch between PIC and APIC. That's called mixed mode, and it's generally considered to be a bad idea (or at least, a pain in the backside).

ronaldlees wrote:
http://developer.novell.com/devres/langrp/lan/dispatch/smpmemo.htm

This seems like a good overview of things. I'll read through it to make sure I haven't missed anything obvious, but at this stage I think I understand the APIC pretty well :)


Top
 Profile  
 
 Post subject: Re: PCnet / FAST III
PostPosted: Wed Dec 17, 2014 2:30 am 
Offline
User avatar

Joined: Tue May 20, 2014 5:19 pm
Posts: 80
Andy:

On FreeBSD10 with qemu, Visopsys is working pretty well. In fact, I'm having trouble making it break.

Here's the qemu line:

Code:
qemu -hda ./visopsys1.img -cdrom ./visopsys-2014-12-13.iso -boot d -s -serial stdio -S


Last edited by ronaldlees on Fri Dec 19, 2014 1:32 pm, edited 1 time in total.

Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 33 posts ]  Go to page Previous  1, 2, 3, 4  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group