loading flat binary 32bits application
Posted: Mon Dec 03, 2007 6:15 am
I´m trying to load and exec a flat binary file compiled in gcc with nasm
I link that file into 0x0000000
and at my kernel I load into a position physical e.g 0x131000
now I have that question. how do I setup my page_table and page_dir for
that new process ?
I need to setup the first page_entrie for page table right ?
but how do I get the right value and put on it ?
like page_table[0] = (((0x131000 >> 12) & 0x3ff) << 12);
?
that calc doesn´t works
and on ip value should I put " 0 " for starting ?
I link that file into 0x0000000
and at my kernel I load into a position physical e.g 0x131000
now I have that question. how do I setup my page_table and page_dir for
that new process ?
I need to setup the first page_entrie for page table right ?
but how do I get the right value and put on it ?
like page_table[0] = (((0x131000 >> 12) & 0x3ff) << 12);
?
that calc doesn´t works
and on ip value should I put " 0 " for starting ?