trying to understand paging
Posted: Thu May 31, 2007 9:36 am
guys, in a trying to understand a paging I have this situation:
my O.S, I have a load_program funcion
so I´m trying to implement paging. example.
I create a simple flat 32bits program, written in gcc like my kernel, now I don´t know how to setup a paging for that new application to be loaded.
on link.ld for that program is right to be:
OUTPUT_FORMAT("binary")
ENTRY(start)
SECTIONS
{
.text 0x000000 : {
code = .; _code = .; __code = .;
*(.text)
*(.rodata*)
. = ALIGN(4096);
}
.data : {
data = .; _data = .; __data = .;
*(.data)
. = ALIGN(4096);
}
.bss :
{
bss = .; _bss = .; __bss = .;
*(.bss)
. = ALIGN(4096);
}
. = ALIGN(4096);
end = .; _end = .; __end = .;
}
do I have to put at load.asm something like ORG 0?
and I have to setup the paging table for the virtual addres 0 with the physical addres that I load the application ?
how to create a user application, how to create a link.ld for that program and how to setup a paging.
guys please anyone could help me.
my O.S, I have a load_program funcion
so I´m trying to implement paging. example.
I create a simple flat 32bits program, written in gcc like my kernel, now I don´t know how to setup a paging for that new application to be loaded.
on link.ld for that program is right to be:
OUTPUT_FORMAT("binary")
ENTRY(start)
SECTIONS
{
.text 0x000000 : {
code = .; _code = .; __code = .;
*(.text)
*(.rodata*)
. = ALIGN(4096);
}
.data : {
data = .; _data = .; __data = .;
*(.data)
. = ALIGN(4096);
}
.bss :
{
bss = .; _bss = .; __bss = .;
*(.bss)
. = ALIGN(4096);
}
. = ALIGN(4096);
end = .; _end = .; __end = .;
}
do I have to put at load.asm something like ORG 0?
and I have to setup the paging table for the virtual addres 0 with the physical addres that I load the application ?
how to create a user application, how to create a link.ld for that program and how to setup a paging.
guys please anyone could help me.