[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Re: kernel



Sorry Arun, I did'nt get  how did u convert PAGE_OFFSET+ 1M Virtual = 1M
physical
PAGE_OFFSET + 1M virtual = 1M physical.

Arun Sharma wrote:

> On Mon, Apr 24, 2000 at 10:46:29AM +0530, Rakesh Agarwal wrote:
> > I am confused because  the document at
> > http://www.lunetix.de/docs/KHG/node57.html mentions that the kernel
> > code+data is at 0x006000 and 1M actually has page tables
>
> I don't know when this document was written. But I think this is
> conclusive:
>
> include/asm-i386/page.h:
>
> #define PAGE_OFFSET             ((unsigned long)__PAGE_OFFSET)
> #define __pa(x)                 ((unsigned long)(x)-PAGE_OFFSET)
> #define __va(x)                 ((void *)((unsigned long)(x)+PAGE_OFFSET))
>
> PAGE_OFFSET is defined to be 0xc0000000 in normal linux kernels.
> If you look at objdump -h vmlinux, you can figure out that the
> text starts at PAGE_OFFSET + 1M virtual = 1M physical.
>
> Also, see how page tables are initialized in
>
> arch/i386/mm/init.c:paging_init
>
>         -Arun
>
> -----------------------------------------------------------------------
> For more information on the LIP mailing list see:
> http://lists.linux-india.org/lists/LIP

--
Rakesh Agarwal
Systems Engineer
Wipro Tecnologies
72, Electronics City
Bangalore-561229
rakesh.agarwal@xxxxxxxxx
91-80-8520408 Extn-1158