OK. I've decided to use GRUB... So much simple
Can anyone tell me how to install grub on a FAT12 1.44M FD?
Working on bochs but not on real PC
-
- Member
- Posts: 127
- Joined: Sat Sep 29, 2007 5:43 pm
- Location: Amsterdam, The Netherlands
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.
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.
- AlfaOmega08
- Member
- Posts: 226
- Joined: Wed Nov 07, 2007 12:15 pm
- Location: Italy
- Masterkiller
- Member
- Posts: 153
- Joined: Sat May 05, 2007 6:20 pm
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 trustedAlfaOmega08 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...
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 :(
- AlfaOmega08
- Member
- Posts: 226
- Joined: Wed Nov 07, 2007 12:15 pm
- Location: Italy
- AlfaOmega08
- Member
- Posts: 226
- Joined: Wed Nov 07, 2007 12:15 pm
- Location: Italy
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
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:
Code: Select all
MOV ESP, _sys_stack
Now the kernel works on VPC2007 too!!!
I hope this can help some other one with my same problem.
Thanks everyone.
Bye