bochs & floating points
-
- Member
- Posts: 26
- Joined: Fri Nov 18, 2005 12:00 am
- Location: a perfect view out of the novotel
bochs & floating points
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?
Last edited by robert macabre on Tue Dec 20, 2005 12:00 am, edited 1 time in total.
laika, come home.
-
- Member
- Posts: 144
- Joined: Tue Oct 26, 2004 11:00 pm
- Location: Australia
Re: bochs & floating points
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
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
--- Albert Einstein
-
- Member
- Posts: 26
- Joined: Fri Nov 18, 2005 12:00 am
- Location: a perfect view out of the novotel
Re: bochs & floating points
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?
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.
- carbonBased
- Member
- Posts: 382
- Joined: Sat Nov 20, 2004 12:00 am
- Location: Wellesley, Ontario, Canada
- Contact:
Re: bochs & floating points
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
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
-
- Member
- Posts: 26
- Joined: Fri Nov 18, 2005 12:00 am
- Location: a perfect view out of the novotel
Re: bochs & floating points
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.
-
- Member
- Posts: 26
- Joined: Fri Nov 18, 2005 12:00 am
- Location: a perfect view out of the novotel
Re: bochs & floating points
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.
- carbonBased
- Member
- Posts: 382
- Joined: Sat Nov 20, 2004 12:00 am
- Location: Wellesley, Ontario, Canada
- Contact:
Re: bochs & floating points
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).
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).