LGDT crashing bootloader
Re: LGDT crashing bootloader
also if this was a PEBCAK then someone else would have surely noticed my mistake.
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: LGDT crashing bootloader
Claiming
P.S. Try to follow these guidelines: http://www.catb.org/~esr/faqs/smart-questions.html - especially the part about bugs
Is almost PEBCAK by definition.bochs doesnt work on my pc
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
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.
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.
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
-
- Member
- Posts: 153
- Joined: Sun Jan 07, 2007 9:40 am
- Contact:
Re: LGDT crashing bootloader
What assembler are you using? Some assemblers will require some extra info: lgdt [fword ptr cs:gdtr]mrnoob wrote:lgdt[cs:gdtr], i get a syntax error and i cant seem to get any kind of segment:offset links working
Re: LGDT crashing bootloader
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
alright ive fixed it and have just completed a small multi-os bootloader for use with my OS!
Thanks for the help
Thanks for the help