Page 2 of 2
Posted: Fri Feb 08, 2008 9:05 am
by AlfaOmega08
OK. I've decided to use GRUB... So much simple
Can anyone tell me how to install grub on a FAT12 1.44M FD?
Posted: Fri Feb 08, 2008 9:31 am
by StephanvanSchaik
How to use GRUB
Edit:
Enabling the A20 line
I have the feeling that you wanted to load the kernel at the 1MB barrier. This is possible but you need to set up the GDT correctly and enable the A20 line before loading the kernel. If you have loaded the kernel then you need to enter protected mode and then you can execute the kernel if it is flat binary.
Posted: Fri Feb 08, 2008 12:30 pm
by AlfaOmega08
Yes, I tried to load and jump to the kernel after the 1st MB. But I've enable A20 before to load the kernel.
When I've changed the A20 code for keyboard with the one for the port 0x92, VPC enter in an infinite loop after the A20 enabling, without any error message. Bha...
Thanks for the guide
Posted: Sat Feb 09, 2008 1:14 am
by Masterkiller
AlfaOmega08 wrote:When I've changed the A20 code for keyboard with the one for the port 0x92, VPC enter in an infinite loop after the A20 enabling, without any error message. Bha...
Yes, that is possible, because System control port also contains a reset bit and sometimes on reading it mistaken read to '1' (which should reset CPU). Well, I don't remember well everything that I read, but port 0x92 is used to enable A20 in some version of linux, so I think it can be trusted
Here some example code:
Code: Select all
EnableA20:
PUSH ax
CLI
IN al, 0x92
TEST al, 02h
JNZ ea20_Success
OR al, 02h
AND al, 0xFE
OUT 0x92, al
IN al, 0x92
TEST al, 02h
JNZ ea20_Success
JMP ea20_Fail
ea20_Success: ;say 'A20 enabled' and return
ea20_Fail: ;blah, try some other way :(
It is more simple than keyboard controller
Posted: Sat Feb 09, 2008 6:49 am
by AlfaOmega08
I'll try in another moment. Now I've solved using Bochs. Anytime I'll write a module to enable and disable A20 like linux does.
Thanks for the code you posted
Posted: Wed Feb 13, 2008 9:08 am
by AlfaOmega08
I can't believe it!!!
My os works fine with bochs
But I have wanted to retry with my bootloader
When starting on VMWare, it exits, with a message of stack fault...
After lots of hours, with a huge number of stack faults...
I've found the solution in the Bran's Kernel Dev Tutorial!!!
Just putting the:
before the call to the main function, in the start.asm file, i've solved the problem.
Now the kernel works on VPC2007 too!!!
I hope this can help some other one with my same problem.
Thanks everyone.
Bye