Bochs Works, Real PC Doesn't
Bochs Works, Real PC Doesn't
Hi,
Just wondering if anyone knew why bochs would work, and a real PC will not?
I have just attempted to run my OS on a real PC and it failed to work. I have been developing it for a while and testing in bochs, but for some reason bochs allows what my PC doesn't.
Just wondering if anyone knew why bochs would work, and a real PC will not?
I have just attempted to run my OS on a real PC and it failed to work. I have been developing it for a while and testing in bochs, but for some reason bochs allows what my PC doesn't.
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:Bochs Works, Real PC Doesn't
for the same kind of reason it could work on real PC #A and not on real PC #B, including (but not limited to):
- bios aren't same, so one could have extension the other hasn't
- clocks or cycles per instruction aren't same, so timings of CPU vs I/O aren't conserved and some I/O device might go wrong. For instance, some code i wrote for Pentium that used a short jmp to wait for I/O cycle completion didn't work on my new AMD K6-II because that computer had some jump-anticipation hardware that prevented it to flush its pipeline.
- one of the PC don't have a standard hardware (laptops, mostly)
- one has a bug the other hasn't...
Re:Bochs Works, Real PC Doesn't
In my code I go into unreal mode, could this be the problem code?
I am going to test this, however I though maybe you have experienced this.
I am going to test this, however I though maybe you have experienced this.
Re:Bochs Works, Real PC Doesn't
OK, this was the problem, now I need to know this (not really need, but more I want to know) how does GRUB get the kernel at 1MB+.
I have looked for the sources for GRUB and this site http://www.gnu.org/software/grub says that it is not realesed to the public yet.
So does anyone know how to get the kernel at or above 1MB, I was thinking that GRUB would read the floppy directly, but that would require alot of code, is this how it does it?
thanks.
I have looked for the sources for GRUB and this site http://www.gnu.org/software/grub says that it is not realesed to the public yet.
So does anyone know how to get the kernel at or above 1MB, I was thinking that GRUB would read the floppy directly, but that would require alot of code, is this how it does it?
thanks.
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:Bochs Works, Real PC Doesn't
unreal mode is usually well-supported (though undocumented) by processors ... however, you should not expect your BIOS loads sectors beyond 1Mb barrier successfuly: you need a 2-steps code (first load from floppy using bios into a low-memory area and then move it above 1MB either with the help of unreal mode or through the high-mem-copy feature of BIOS INT15h ...PlayOS wrote: In my code I go into unreal mode, could this be the problem code?
Re:Bochs Works, Real PC Doesn't
Yeah, I will probably try INT15 because I was loading the kernel in below 1MB and then copying it above so I dont know why it was failing.
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:Bochs Works, Real PC Doesn't
maybe you can also try to find a program that _do_ use unreal mode and see if it runs on your machine ...
Re:Bochs Works, Real PC Doesn't
GRUB switches from PMode to Real Mode over and over again in it's code so that it can use BIOS interrupts yet still get the OS loaded @ the 1MB mark. You can see the code for GRUB here:
http://savannah.gnu.org/cgi-bin/viewcvs/grub/grub/
K.J.
http://savannah.gnu.org/cgi-bin/viewcvs/grub/grub/
K.J.
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:Bochs Works, Real PC Doesn't
oh, and just to mention ... My own OS works pretty fine on real hardware, but on BOCHS (unknown version - about 4 monthes aged ?), it just freezes the main processing task once the CLOCK has been pushed to 1KHz !??
any clue ? do someone know how i could see where the hang occurs ? the keyboard IRQ are still processed ... maybe i just asked for a too fast clock and have no time to process anything else (would be weird, though ...)
any clue ? do someone know how i could see where the hang occurs ? the keyboard IRQ are still processed ... maybe i just asked for a too fast clock and have no time to process anything else (would be weird, though ...)
Re:Bochs Works, Real PC Doesn't
Well...my FritzOS won't EVEN boot with bochs...a Linux Seg Fault happens just when it starts reading the floppy...
I can't wait for Bochs 2...
I can't wait for Bochs 2...
Re:Bochs Works, Real PC Doesn't
YES YEA!!!!!!
Bochs Pre 2 boots FritzOS!!!!!!!!!!!
Never mind whatever I said about bochs!
2 is wonderful!!!!!
No more reboot -f's!!!!!
;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D
Bochs Pre 2 boots FritzOS!!!!!!!!!!!
Never mind whatever I said about bochs!
2 is wonderful!!!!!
No more reboot -f's!!!!!
;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D