lkml.org 
[lkml]   [1999]   [Nov]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: locking user memory and kiobuf
Date
Jeff Garzik [mailto:jgarzik@mandrakesoft.com] wrote:
> Bret Indrelee wrote:
> > Does page_address() return a virtual or physical address?
> > To me it looks
> > like it may be a physical address, in which case you would
> > have to do:
> > memcpy (foo, phys_to_virt(phys), PAGE_SIZE *4);
>
> Not true. The above code example was in kernel space, and
> the memcpy is
> definitely in kernel (physical) address space as well.

Kernel address space is different than physical address space.

Kernel address space is a virtual address that goes through the MMU (page
tables) in order to create the physical address. Virtual address space is as
seen from the CPU, physical address space is as seen with a logic analyzer
hooked up to the board traces.

It may be that some of the kernel address space is mapped to the identical
physical address space, I don't know if Linux does this or not. The MIPS
chip has a section of its address space that is direct mapped.

-Bret

-------------------------------------------------------------
SBS Technologies, Connectivity Products
... solutions for real-time connectivity
Bret Indrelee, Engineer
SBS Technologies, Inc., Connectivity Products
1284 Corporate Center Drive, St. Paul MN 55121
Direct: (651) 905-4731
Main: (651) 905-4700 Fax: (651) 905-4701
E-mail: bindrelee@sbs-cp.com http://www.sbs.com
-------------------------------------------------------------
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:54    [W:0.040 / U:0.276 seconds]
©2003-2014 Jasper Spaans. Advertise on this site