Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

virt_to_phys(9) [centos man page]

VIRT_TO_PHYS(9) 					     Public Functions Provided						   VIRT_TO_PHYS(9)

virt_to_phys - map virtual addresses to physical SYNOPSIS
phys_addr_t virt_to_phys(volatile void * address); ARGUMENTS
address address to remap DESCRIPTION
The returned physical address is the physical (CPU) mapping for the memory address given. It is only valid to use this function on addresses directly mapped or allocated via kmalloc. This function does not give bus mappings for DMA transfers. In almost all conceivable cases a device driver should not be using this function AUTHORS
Matthew Wilcox <> Author. Alan Cox <> Author. COPYRIGHT
Kernel Hackers Manual 3.10 June 2014 VIRT_TO_PHYS(9)

Check Out this Related Man Page

PHYS(2) 							System Calls Manual							   PHYS(2)

phys - allow a process to access physical addresses SYNOPSIS
phys(segreg, size, physadr) DESCRIPTION
The argument segreg specifies a process virtual (data-space) address range of 8K bytes starting at virtual address segregx8K bytes. This address range is mapped into physical address physadrx64 bytes. Only the first sizex64 bytes of this mapping is addressable. If size is zero, any previous mapping of this virtual address range is nullified. For example, the call phys(6, 1, 0177775); will map virtual addresses 0160000-0160077 into physical addresses 017777500-017777577. In particular, virtual address 0160060 is the PDP-11 console located at physical address 017777560. This call may only be executed by the super-user. SEE ALSO
PDP-11 segmentation hardware DIAGNOSTICS
The function value zero is returned if the physical mapping is in effect. The value -1 is returned if not super-user, if segreg is not in the range 0-7, if size is not in the range 0-127, or if the specified segreg is already used for other than a previous call to phys. BUGS
This system call is obviously very machine dependent and very dangerous. This system call is not considered a permanent part of the sys- tem. ASSEMBLER
(phys = 52.) sys phys; segreg; size; physadr PDP11 PHYS(2)
Man Page