[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]
Re: kernel
On Mon, Apr 24, 2000 at 03:53:55PM +0530, Rakesh Agarwal wrote:
> Sorry Arun, I did'nt get how did u convert PAGE_OFFSET+ 1M Virtual = 1M
> physical
> PAGE_OFFSET + 1M virtual = 1M physical.
__pa(PAGE_OFFSET + 1M) = PAGE_OFFSET + 1M - PAGE_OFFSET = 1M (physical)
> > #define PAGE_OFFSET ((unsigned long)__PAGE_OFFSET)
> > #define __pa(x) ((unsigned long)(x)-PAGE_OFFSET)
> > #define __va(x) ((void *)((unsigned long)(x)+PAGE_OFFSET))
-Arun
PS: __pa = physical address, __va = virtual address
PS1: Note: this kind of a linear relationship between pa and va is specific
to linux.