kernel boots in vmware and bochs. but not real hardware

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Anthony

kernel boots in vmware and bochs. but not real hardware

Post by Anthony »

my kernel boots fine in both vmware and bochs. but fails to boot on real hardware. all real computers i test it on now just reboot over and over. I have no clue how i can debug this.

i wasn't able to test it on any real hardware for quite some time because i just moved to San Jose and all i had for a while was my laptop with no floppy. In that time, i added quite a bit of code. Paging. Memory Management. CPUID stuff. ATA stuff. and some other little things.

any help or suggestions would be appreciated.

(edit: i did find 1 computer that it appears to boot on just fine. an athlon 1 point someodd ghz Compaq).
Curufir

Re:kernel boots in vmware and bochs. but not real hardware

Post by Curufir »

Well there are some differences between VMWare/Bochs and real hardware which might give you somewhere to start.

Real BIOS can give your bootloader different values of CS (Depending on the BIOS). IIRC Bochs/VMWare both use 0x7c0.

Real media will sometimes fail and need to be recalibrated before repeating an operation. Bochs/VMWare images never fail due to bad calibration.

Real hardware starts up with random crap in all non-configured memory. Bochs/VMWare zero everything at system boot.

Aside from that "it reboots" isn't much to go on.
Anthony

Re:kernel boots in vmware and bochs. but not real hardware

Post by Anthony »

Curufir wrote: Aside from that "it reboots" isn't much to go on.
...exactly.

i can't give you much more info when all it does is reboots without any visable output from the kernel...

:(
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Re:kernel boots in vmware and bochs. but not real hardware

Post by Brendan »

Hi,
Anthony wrote:i can't give you much more info when all it does is reboots without any visable output from the kernel...
No visable output doesn't necessarily mean no output - real computers can be fast enough that the output disappears before it can be seen.

One debugging technique is to place something like "cli; hlt" in the OS and see if it reaches this. Depending on whether it reaches the halt or reboots you'd shift the halt and try again. It can be time consuming, but as long as your problem occurs before scheduling, paging and IRQs are started you can end up with a good idea of where the problem is.


Cheers,

Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
viral

Re:kernel boots in vmware and bochs. but not real hardware

Post by viral »

Hello...
Without making new thread.... Where can I find VMware emulator(if it is emulator)? I am using bochs. Is VMware free?
AR

Re:kernel boots in vmware and bochs. but not real hardware

Post by AR »

VMWare is a "professional" emulator, it is much faster than Bochs but isn't as useful for OS Development (No debugger, it is only meant for complete OS' like Windows, Linux and BSD)
http://www.vmware.com/products/desktop/ws_features.html

You can get a 30day trial for free but the workstation edition will set you back US$190.
Post Reply