Re: How did you move your kernel to above 3GB area?
Posted: Thu Jul 23, 2009 8:10 am
Thank you for helping me(=newbies)
Now I will add one more step to the booting sequence for enabling paging.
Simple bootloader (512bytes : 0x7c00)
loading a kernel image from the FAT filesystem.
Jump to the loaded kernel
Kernel (now, this image is composite with 2 parts : one for enabling paging(0x7e00) and some initialization for the real kernel and the other for the real kernel(?) in the virtual memory space(0xC0000000)
when I try to write new image (has 2 parts mentioned above), one more things make me crazy,.
I think I should to write ld script to build it. one for setup stage, its base address will be the 0x7e00 and the other for kernel on virtual memory, so its base address will be the 0xC0000000
Am I right? do I need to write ld script?
ps. I try to avoid using the GRUB(or other bootloader which support virtual memory for the kernel) because this is for studying how OS works and understands how it can be implementing.
ps. of course, kernel image is only one, it just built with two parts. so I will make page table for second part in an image to map them to the 3GB area after enabling the paging.
Now I will add one more step to the booting sequence for enabling paging.
Simple bootloader (512bytes : 0x7c00)
loading a kernel image from the FAT filesystem.
Jump to the loaded kernel
Kernel (now, this image is composite with 2 parts : one for enabling paging(0x7e00) and some initialization for the real kernel and the other for the real kernel(?) in the virtual memory space(0xC0000000)
when I try to write new image (has 2 parts mentioned above), one more things make me crazy,.
I think I should to write ld script to build it. one for setup stage, its base address will be the 0x7e00 and the other for kernel on virtual memory, so its base address will be the 0xC0000000
Am I right? do I need to write ld script?
ps. I try to avoid using the GRUB(or other bootloader which support virtual memory for the kernel) because this is for studying how OS works and understands how it can be implementing.
ps. of course, kernel image is only one, it just built with two parts. so I will make page table for second part in an image to map them to the 3GB area after enabling the paging.