visopsys.org

Visopsys Forums
It is currently Thu Oct 19, 2017 5:20 pm

All times are UTC




Post new topic Reply to topic  [ 29 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
 Post subject: Re: Problems with APIC on QEMU
PostPosted: Thu Dec 11, 2014 11:05 pm 
Offline
User avatar

Joined: Tue Nov 16, 2010 7:20 pm
Posts: 459
That is perplexing. My Ubuntu 12.04 has the latest Qemu, but it says 1.0:

# qemu-i386 -version
qemu-i386 version 1.0 (qemu-kvm-1.0), Copyright (c) 2003-2008 Fabrice Bellard

Something funny is going on around here. The Qemu website says 1.0 was released in 2011. Perhaps the Ubuntu guys aren't updating it for 12.04.


Top
 Profile  
 
 Post subject: Re: Problems with APIC on QEMU
PostPosted: Thu Dec 11, 2014 11:41 pm 
Offline
User avatar

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

Yes, I think the Debian (and by heredity Ubuntu) distros tend to lag behind the current version of some apps like QEMU. Anyway, as I posted in another thread, I tried the latest ISO (2014-12-07) and it works fine with my QEMU 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: Problems with APIC on QEMU
PostPosted: Fri Dec 12, 2014 12:55 pm 
Offline
User avatar

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

It seems the kernel on the 2014-12-07 ISO is a release version? It'd be nice to have debug info on interim releases to help out with the debugging.

Code:
$ gdb ./visopsys
GNU gdb (GDB) 7.4.1-debian
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/body/visopsys...(no debugging symbols found)...done.
(gdb)



- Ron


Top
 Profile  
 
 Post subject: Re: Problems with APIC on QEMU
PostPosted: Fri Dec 12, 2014 1:13 pm 
Offline
User avatar

Joined: Tue Nov 16, 2010 7:20 pm
Posts: 459
Hi Ron, thanks for the updates. I downloaded the latest Qemu source last night, but deferred building it because I need to install more build tools (g++ for example). I put Xubuntu 14.04 (blech!) on my wife's laptop, so I'll see whether I can get that to download a newer Qemu package.

Yes, good point about the debug version - I guess I should make both available. I'll do that tonight (UK time) when I get home -- after the office Xmas party. Let's see if I remember! :lol:


Top
 Profile  
 
 Post subject: Re: Problems with APIC on QEMU
PostPosted: Fri Dec 12, 2014 1:23 pm 
Offline
User avatar

Joined: Tue May 20, 2014 5:19 pm
Posts: 80
andymc wrote:
...... I'll do that tonight (UK time) when I get home -- after the office Xmas party. Let's see if I remember! :lol:


Depending on the type of eggnog they'll have there?

LOL - Have fun at your party.

- Ron


Top
 Profile  
 
 Post subject: Re: Problems with APIC on QEMU
PostPosted: Sat Dec 13, 2014 10:47 am 
Offline
User avatar

Joined: Tue Nov 16, 2010 7:20 pm
Posts: 459
Thanks Ron. As it turned out, I remembered but I was too sleepy.

Here are debug and release ISOs of my current 0.76 branch:
http://visopsys.org/files/visopsys/visopsys-2014-12-13-iso-debug.zip
http://visopsys.org/files/visopsys/visopsys-2014-12-13-iso-release.zip


Top
 Profile  
 
 Post subject: Re: Problems with APIC on QEMU
PostPosted: Sun Dec 14, 2014 2:52 pm 
Offline
User avatar

Joined: Tue May 20, 2014 5:19 pm
Posts: 80
Many thanks Andy. Hopefully, I can muddle around in your modified kernel now, but with a little better map to see where I'm going!


Top
 Profile  
 
 Post subject: Re: Problems with APIC on QEMU
PostPosted: Tue Dec 16, 2014 3:18 pm 
Offline
User avatar

Joined: Tue May 20, 2014 5:19 pm
Posts: 80
Ok, I went back and spent some more time with the Debian Wheezy Qemu setup. ISOs that work just fine on the FreeBSD host seem to hang on the Debian host. So, maybe it's some qemu issue, rather than a visopsys problem.

The way it hangs on the Debian/Qemu host is interesting. The screen gets to the point where it stops displaying kernel messages. The last message is typically "disk error" related, but not always. The thing is - that I can continue to single step the kernel at that point, and it seems to be in its normal kernel loop.

I lazily clicked along in the emacs debug console, watching it spin round and round through what seemed to be the regular kernel loop functions. Mainly, those functions were scheduler(), markTaskBusy(), kernelMemSet(), createNewProcess(), kernelSysTimerRead(), spawnIdleThread, kernelDebugOutput, kernelDetectBiosPnp, kernelInterruptHook, requestProcess(), kernelProcessRestoreInts(), kernelProcessInterrupts(), chooseNextProcess, and a few others.

So, I guess it just missed the creation of some process, and sits there spinning wheels, with no GUI activity, no display other than the kernel messages, and no response to mouse, keyboard, etc. Or, interrupts have been turned off at that point? Once I understand the call sequence better, maybe I can determine if that is so.

Anyway, I'm getting a feel for the basic kernel loop, if nothing else. Also at the same time getting an appreciation for what Andy has put into this OS! I'm wondering if I could recompile the kernel with the -pg option and get a little better understanding of the kernel's internal machinations. This is WAY too much fun! The OS works almost perfectly on the FreeBSD/Qemu host.

Update:

- The C library needs to implement "mcount()" in order to use the -pg profiling options. It probably would be necessary to implement other functions to display the info collected.

- I installed Qemu on the Haiku operating system and was able to run Visopsys-0.74 on it. On the same Haiku Qemu setup, the APIC enabled Visopsys "seems" to hang, as described above.


Top
 Profile  
 
 Post subject: Re: Problems with APIC on QEMU
PostPosted: Mon Apr 13, 2015 1:59 am 
Offline
User avatar

Joined: Tue Nov 16, 2010 7:20 pm
Posts: 459
Sigh :(

After considerable effort, I was able to build and install the latest Qemu
Code:
QEMU emulator version 2.2.1, Copyright (c) 2003-2008 Fabrice Bellard
but I can't reproduce the error. I tried my current code (0.8 branch), the pending 0.77 release, and the previous 0.76 release. They all loaded and ran perfectly.

I used these commands:
Code:
qemu-img create -f raw visopsys.img 1G
qemu-system-i386 -hda visopsys.img -cdrom <my .iso file> -boot d
can anyone else maybe try this latest version of Qemu with 0.76? Perhaps the Qemu guys have fixed something?

This is the last item on my list before releasing 0.77. I was really hoping I'd be able to reproduce this.


Top
 Profile  
 
 Post subject: Re: Problems with APIC on QEMU
PostPosted: Tue Apr 14, 2015 12:30 am 
Offline
User avatar

Joined: Tue Nov 16, 2010 7:20 pm
Posts: 459
Ok, I got Qemu 2.0.0 and 2.1.0, and I think I see the problem now. It does boot, but the IDE driver seems to struggle receiving interrupts (Ron, I remember something you posted, stepping through waiting for ATAPI interrupts)


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


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:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group