Page 2 of 2
Re: LGDT crashing bootloader
Posted: Wed Dec 03, 2008 5:42 pm
by mrnoob
also if this was a PEBCAK then someone else would have surely noticed my mistake.
Re: LGDT crashing bootloader
Posted: Wed Dec 03, 2008 6:11 pm
by Combuster
Claiming
bochs doesnt work on my pc
Is almost PEBCAK by definition.
P.S. Try to follow these guidelines:
http://www.catb.org/~esr/faqs/smart-questions.html - especially the part about bugs
Re: LGDT crashing bootloader
Posted: Wed Dec 03, 2008 9:15 pm
by neon
I dont see any indication between 16 bit and 32 bit code sections (bits 16 and bits 32)...although this would not cause your problem. However, if your INT 0x10 call re-enables hardware interrupts it will triple fault as soon as you enter protected mode.
I recommend insuring its disabled before the jump into protected mode. Also, posting your Bochs log file will be helpful in finding the problem. If Bochs displays PANIC errors, then post them here so that we can guide you in fixing them.
Re: LGDT crashing bootloader
Posted: Thu Dec 04, 2008 9:08 am
by tantrikwizard
mrnoob wrote:lgdt[cs:gdtr], i get a syntax error and i cant seem to get any kind of segment:offset links working
What assembler are you using? Some assemblers will require some extra info: lgdt [fword ptr cs:gdtr]
Re: LGDT crashing bootloader
Posted: Thu Dec 04, 2008 3:22 pm
by mrnoob
as86. I have since realised that it isnt supported by any kind of forum and is basically made of fail. Ill be converting the code to nasm to be in with a better chance.
Re: LGDT crashing bootloader
Posted: Thu Dec 18, 2008 2:53 pm
by mrnoob
alright ive fixed it and have just completed a small multi-os bootloader for use with my OS!
Thanks for the help