Loading Kernel
Posted: Fri Aug 12, 2005 11:00 pm
Hello everyone,
I load the kernel from floppy at boot time at some address
(say 0x8000). Everything goes fine for this implementation.
But I decided to Move the Loaded kernel to 1M.
So after boot, I entered Protected Mode with a Dummy GDT and Moved the loaded kernel code from floppy at 0x8000 to 0x100000 using REP MOVSB. and before switching, I loaded Final GDT with proper Base and Limit.
It went fine...... BUT some part of code doesn't
work properly,... like.... if control enters those parts of code, then the system Hangs/ Prints some Junk on Screen and Hangs/ Are crahses.....
The Behaviour varies with the size of kernel when i compile it.....
BUT BUT.... I tried Loading (Moving) at address 0x100300 or Above (say
0x108000)..... Everything Went Fine......
Can some one give suggesstions regarding this problem please....
NOTE:- 1) Don't Move Kernel after Load..... FINE
2) Load at ADDRESS 0x100000..... PROBLEM
3) Load at ADDRESS 0x100300 and ABOVE(tried upto 0x200000).... FINE.
I'm working on SUSE Linux OS.
GCC compiler. Plan Binary Format Kernel....
I load the kernel from floppy at boot time at some address
(say 0x8000). Everything goes fine for this implementation.
But I decided to Move the Loaded kernel to 1M.
So after boot, I entered Protected Mode with a Dummy GDT and Moved the loaded kernel code from floppy at 0x8000 to 0x100000 using REP MOVSB. and before switching, I loaded Final GDT with proper Base and Limit.
It went fine...... BUT some part of code doesn't
work properly,... like.... if control enters those parts of code, then the system Hangs/ Prints some Junk on Screen and Hangs/ Are crahses.....
The Behaviour varies with the size of kernel when i compile it.....
BUT BUT.... I tried Loading (Moving) at address 0x100300 or Above (say
0x108000)..... Everything Went Fine......
Can some one give suggesstions regarding this problem please....
NOTE:- 1) Don't Move Kernel after Load..... FINE
2) Load at ADDRESS 0x100000..... PROBLEM
3) Load at ADDRESS 0x100300 and ABOVE(tried upto 0x200000).... FINE.
I'm working on SUSE Linux OS.
GCC compiler. Plan Binary Format Kernel....