Hello, I'm having problems while using the 2 stage bootloader from http://www.brokenthorn.com/Resources/Demos/Demo4.zip
The problem is that it works perfectly on bochs, qemu and my new pc, but when I try it on my old pc, it just reboot after jumping to the kernel.
I'm sure the processor executed garbage instructions and made a triple fault and didn't load the 3rd stage.
The second stage gets loaded perfectly. In it I install the gdt, enable a20 line, load root directory table from floppy, load kernel in memory, using bios interruptions, and then I switch to pmode and jump to my kernel.
By the way, these are the specifications:
Processor: Pentium MMX 233mhz
Ram: 64MiB
Bios: Award Modular Bios PCI/PNP 586 4.51PG
Floppy Drive: NEC FD1231H
Chipset: 08/14/97-vXPro+-USB-Ultr-2A5ldh09c-00
If anyone had experienced this error, I'd like to know how you solved it.
Thanks,
Gonzalo
problem loading files from floppy
- gzaloprgm
- Member
- Posts: 141
- Joined: Sun Sep 23, 2007 4:53 pm
- Location: Buenos Aires, Argentina
- Contact:
problem loading files from floppy
Last edited by gzaloprgm on Mon Jan 21, 2008 8:56 pm, edited 2 times in total.
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();}
- gzaloprgm
- Member
- Posts: 141
- Joined: Sun Sep 23, 2007 4:53 pm
- Location: Buenos Aires, Argentina
- Contact:
Thanks combuster but it's not that problem.Combuster wrote:The link is dead.
Are you sure you don't use processor features that aren't available, or some other incorrect assumption? Try manually compiling a bochs version that pretends to be a 386 or 486 and see if the problem appears there as well.
I'm using a Pentium MMX so I guess the problem is from the bios/chipset rather than an invalid instruction.
Now I fixed the link.
The second stage sets the stack, installs the gdt, enables a20 gate using keyboard controller, loads the root directory table from a floppy using bios interruptions, then it looks for the kernel file and loads it in memory, and then it goes to pmode, set the stack and jumpes into the kernel.