visopsys.org

Visopsys Forums
It is currently Wed Sep 20, 2017 1:57 pm

All times are UTC




Post new topic Reply to topic  [ 29 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: Problems with APIC on QEMU
PostPosted: Thu Oct 30, 2014 11:02 pm 
Offline

Joined: Sun Sep 01, 2013 7:58 pm
Posts: 29
Visopsys 0.75 does not boot successfully on QEMU (tested on 2.0.0 and 2.1.0), it stays still while waiting for IDE drive interrupts.. (as compiling the kernel with debug enabled reveals). I did a bit of research and I found the culprit: it is the APIC support that was added in this very release.
Visopsys disables any old-style interrupt controllers if it finds an APIC-compatible interrupt controller.
It seems that QEMU's APIC support does not work correctly, and thus the kernel seems unable to get (at least some) interrupts.
The workaround right now is disabling the APIC driver, but as there is no way to configure a Visopsys kernel when compiling or at runtime, one first needs to comment the relevant line for the APIC driver in src/kernel/kernelDevice.c (just make a search for APIC in the file) in the sources and then build the system from sources again.
This makes Visopsys 0.75 work and boot fine on QEMU.

I made floppy, CD and USB images with APIC already disabled:
http://unhaut.fav.cc/visopsys/visopsys-0.75-noapic-img.zip (floppy)
http://unhaut.fav.cc/visopsys/visopsys-0.75-noapic-iso.zip (CD ISO image)
http://unhaut.fav.cc/visopsys/visopsys-0.75-noapic-usb.zip (USB image)

You can use these with QEMU until this issue is fixed.

_________________
Visopsys@Unhaut - http://unhaut.fav.cc/visopsys


Top
 Profile  
 
 Post subject: Re: Problems with APIC on QEMU
PostPosted: Fri Oct 31, 2014 12:41 am 
Offline
User avatar

Joined: Tue Nov 16, 2010 7:20 pm
Posts: 459
Ah, dang, sorry guys. I didn't test the new APIC code with Qemu, only VMware and some real systems.

I notice that when I turn on the APIC in VirtualBox things fail also.

I'll look into it.


Top
 Profile  
 
 Post subject: Re: Problems with APIC on QEMU
PostPosted: Fri Oct 31, 2014 12:46 am 
Offline
User avatar

Joined: Tue Nov 16, 2010 7:20 pm
Posts: 459
I tried to make the new APIC code quite conservative, only enabling itself when it thinks everything is kosher, but when it does enable, it has to disable the PIC. Mixed mode is complicated, and not really recommended, so in the kernel it has to be one or the other.


Top
 Profile  
 
 Post subject: Re: Problems with APIC on QEMU
PostPosted: Thu Dec 04, 2014 3:50 am 
Offline
User avatar

Joined: Tue Nov 16, 2010 7:20 pm
Posts: 459
Hi nextvolume,

I was seeing similar error messages in VirtualBox, but I've had difficulties setting up Qemu on my dev machine. Could you possibly try dropping this version of the APIC driver into your source tree, and see whether it solves the problems you've been seeing with missing interrupts, etc.?

I seem to have solved it in VirtualBox, and the error messages were so similar to Qemu (Ronaldees had the same error messages). It would be helpful if you guys could give it a quick test.


Attachments:
kernelApicDriver.c [26.76 KiB]
Downloaded 388 times
Top
 Profile  
 
 Post subject: Re: Problems with APIC on QEMU
PostPosted: Thu Dec 04, 2014 4:33 pm 
Offline
User avatar

Joined: Tue Nov 16, 2010 7:20 pm
Posts: 459
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: Problems with APIC on QEMU
PostPosted: Thu Dec 04, 2014 10:02 pm 
Offline

Joined: Sun Sep 01, 2013 7:58 pm
Posts: 29
I dropped the file in the 0.75N1 source tree and unfortunately it does not work for me in QEMU.

_________________
Visopsys@Unhaut - http://unhaut.fav.cc/visopsys


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

Joined: Tue Nov 16, 2010 7:20 pm
Posts: 459
Thanks for trying it. Hmm, perhaps I changed something else in my tree (not in that file) that helps. Everything seems good with this Qemu (downloaded today) and my 0.76 tree. I was thinking I'm ready to do another release, though I will do some more testing for a few days. Do you want to try a pre-release 0.76 .iso?


Top
 Profile  
 
 Post subject: Re: Problems with APIC on QEMU
PostPosted: Fri Dec 05, 2014 9:11 am 
Offline

Joined: Sun Sep 01, 2013 7:58 pm
Posts: 29
Yes, it would be nice if I could try a prelease ISO.

_________________
Visopsys@Unhaut - http://unhaut.fav.cc/visopsys


Top
 Profile  
 
 Post subject: Re: Problems with APIC on QEMU
PostPosted: Mon Dec 08, 2014 12:12 am 
Offline
User avatar

Joined: Tue Nov 16, 2010 7:20 pm
Posts: 459
Here we go. This is just about ready to release, I think, unless you guys tell me it's still seriously broken http://visopsys.org/files/visopsys/visopsys-2014-12-07-iso.zip


Top
 Profile  
 
 Post subject: Re: Problems with APIC on QEMU
PostPosted: Wed Dec 10, 2014 8:50 am 
Offline

Joined: Sun Sep 01, 2013 7:58 pm
Posts: 29
Unfortunately it still won't work on QEMU, I use version 2.1.0.
Just an idea: ever thought about registering if a certain key is pressed in the OS loader, and then disabling APIC if it was?

_________________
Visopsys@Unhaut - http://unhaut.fav.cc/visopsys


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 29 posts ]  Go to page 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