OSDev.org

The Place to Start for Operating System Developers
It is currently Sun May 19, 2024 8:56 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: bochs & floating points
PostPosted: Tue Dec 20, 2005 12:00 am 
Offline
Member
Member

Joined: Fri Nov 18, 2005 12:00 am
Posts: 26
Location: a perfect view out of the novotel
all right, this is probably another small mistake, but i can't get bochs to do floating point math at all. i started working on the math apis of my os and thought i had it all wrong until i tested it on a real machine. is there some kind of secret line i have to put in a bochs config file?

_________________
laika, come home.


Last edited by robert macabre on Tue Dec 20, 2005 12:00 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: bochs & floating points
PostPosted: Tue Dec 20, 2005 12:00 am 
Offline
Member
Member

Joined: Tue Oct 26, 2004 11:00 pm
Posts: 144
Location: Australia
check to see if you're emulating an old-style CPU...maybe a setting is around that area that you need to change?

Single step in bochs...see what it thinks about your FPU instructions

_________________
Two things are infinite: The universe and human stupidity. But I'm not quite sure about the universe.
--- Albert Einstein


Top
 Profile  
 
 Post subject: Re: bochs & floating points
PostPosted: Fri Dec 23, 2005 12:00 am 
Offline
Member
Member

Joined: Fri Nov 18, 2005 12:00 am
Posts: 26
Location: a perfect view out of the novotel
all right, i'm going to suppose that just for these past couple days i'm braindead. i looked through the settings that i could use in the configuration file. i looked through the website. it all seems to tell me that floating point instructions should work automatically. could it be the build of bochs i have, 2.2.1? i'm hoping that there IS something i have overlooked so that i don't have to keep creating a disk from the image and putting it in a real PC, etc.

anyone have any idea what i might do to make the FPU work in bochs?
and while i'm asking, anyone have any suggestions on things i can do to get (even little) speed improvements for bochs?

_________________
laika, come home.


Top
 Profile  
 
 Post subject: Re: bochs & floating points
PostPosted: Sat Dec 24, 2005 12:00 am 
Offline
Member
Member
User avatar

Joined: Sat Nov 20, 2004 12:00 am
Posts: 382
Location: Wellesley, Ontario, Canada
For speed improvements, try using qemu :)

I know of quite a few that use qemu regularly, and then bochs only when there's a serious issue. Personally, I use qemu exclusively.

As per the floating point, unfortunately, I have no suggestions :( Might also be interesting to see how qemu does with your code.

Is there a specific portion of your code that crashes/traps? If so, perhaps you could post that part?

Cheers,
Jeff


Top
 Profile  
 
 Post subject: Re: bochs & floating points
PostPosted: Sat Dec 24, 2005 12:00 am 
Offline
Member
Member

Joined: Fri Nov 18, 2005 12:00 am
Posts: 26
Location: a perfect view out of the novotel
it's not that it crashes or traps; it's just that all floating point operations (and by that i mean the ones done natively by the cpu, +, -, *, /, etc.) make 0 in bochs. on a real system they come up with the values they're supposed to. it makes it a little bit time consuming to develop certain parts of the kernel haha. i have no idea what's wrong; it really doesn't make sense to me. i thought maybe i had a build of bochs that didn't have an fpu, but i got the one from their site blablabla. but thanks about the qemu tip :] i ran across the qemo site the other day, but i didn't know much about it and had never heard anything. i'll definitely check it out.

_________________
laika, come home.


Top
 Profile  
 
 Post subject: Re: bochs & floating points
PostPosted: Sat Dec 24, 2005 12:00 am 
Offline
Member
Member

Joined: Fri Nov 18, 2005 12:00 am
Posts: 26
Location: a perfect view out of the novotel
wow, i wish i had tried qemu before, and with the accelerator it's going to prove itself indispensible i think. the FPU stuff is working like it should and it's a lot easier to configure than bochs. thanks tons!

_________________
laika, come home.


Top
 Profile  
 
 Post subject: Re: bochs & floating points
PostPosted: Mon Dec 26, 2005 12:00 am 
Offline
Member
Member
User avatar

Joined: Sat Nov 20, 2004 12:00 am
Posts: 382
Location: Wellesley, Ontario, Canada
Glad to hear it worked for you.

One other nice thing I've found about qemu is that you can redirect serial and parallel port traffic to devices.

Since my boot sequence contains a ridiculous amount of trace at the moment, I often find it difficult to track down a stubbourn error. I'm often adding extra trace and asserts at various points in order to narrow down the search. With qemu, however, I was able to simply write my own serial port driver and configure the kernel to duplicate trace out to the serial port. I can them have qemu redirect the serial port to stdout and I'm now able to scroll through all of my boot messages (whereas previously I could only see the 25 lines that hadn't scrolled offscreen yet).


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot], SemrushBot [Bot] and 32 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