[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]
Re: kernel
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