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).
kernel boots in vmware and bochs. but not real hardware
Re:kernel boots in vmware and bochs. but not real hardware
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.
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.
Re:kernel boots in vmware and bochs. but not real hardware
...exactly.Curufir wrote: Aside from that "it reboots" isn't much to go on.
i can't give you much more info when all it does is reboots without any visable output from the kernel...
Re:kernel boots in vmware and bochs. but not real hardware
Hi,
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
No visable output doesn't necessarily mean no output - real computers can be fast enough that the output disappears before it can be seen.Anthony wrote:i can't give you much more info when all it does is reboots without any visable output from the kernel...
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.
Re:kernel boots in vmware and bochs. but not real hardware
Hello...
Without making new thread.... Where can I find VMware emulator(if it is emulator)? I am using bochs. Is VMware free?
Without making new thread.... Where can I find VMware emulator(if it is emulator)? I am using bochs. Is VMware free?
Re:kernel boots in vmware and bochs. but not real hardware
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.
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.