Page 1 of 1

enable paging from kernel???

Posted: Sat Jan 24, 2004 8:58 am
by guest
hi, i have to enable paging because i use gcc (gcc creates paged code or??). My question is what should i do after enable paging or can i do this with the kernel??

Re:enable paging from kernel???

Posted: Sat Jan 24, 2004 9:23 am
by Tim
guest wrote: hi, i have to enable paging because i use gcc (gcc creates paged code or??).
You don't need to. Paging is good, but not necessary. (gcc does, however, require a flat address space with 32-bit pointers.)
My question is what should i do after enable paging or can i do this with the kernel??
You can do it in the kernel. My paging setup code is part of the assembly-language startup code in the kernel and is run before any of the C code. It sets up a basic page directory with two page tables: one for the bottom 4MB (because the paging setup code itself is there) and one for C000_0000..C040_0000 (because the kernel is there).