*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->Tru64 Unix man pages -> svatophys (9r)              



NAME    [Toc]    [Back]

       svatophys  - General: Converts a system virtual address to
       a physical address

SYNOPSIS    [Toc]    [Back]

       kern_return_t svatophys(
               vm_offset_t kern_addr,
               vm_offset_t *phys_addr );

ARGUMENTS    [Toc]    [Back]

       Specifies the kernel virtual address.  Specifies a pointer
       to the physical address to be filled in.

DESCRIPTION    [Toc]    [Back]

       The svatophys routine converts a system virtual address to
       the corresponding physical address. All address  and  data
       structure manipulation done within the kernel is performed
       using system virtual addresses.  Typically, system virtual
       addresses  are  a means of mapping physical memory and I/O
       space, which often consists of device  registers  and  DMA
       buffers.  In contrast to this, devices are usually unaware
       of any virtual addressing and for this reason use physical
       addresses.  You  use the svatophys routine to perform this
       address translation.

       As an example of where you can use this  address  translation,
 a disk device driver can use DMA buffers to transfer
       blocks of data to the disk (for the case of a write operation).
 The data to be written to disk is present in system
       memory at a system virtual address known to the driver. To
       initiate  the  DMA operation, the disk driver can set up a
       command packet to specify a write operation to the  underlying
  disk controller hardware. This write command packet
       contains (among other things)  the  location  of  the  DMA
       buffer as a physical address and the length of the buffer.
       Here, the driver calls the svatophys routine to  translate
       the system virtual address of the DMA buffer to a physical
       address in the command packet issued to the disk driver.

RETURN VALUES    [Toc]    [Back]

       The svatophys routine returns the following:  The  address
       translation  has  been  completed successfully.  Unable to
       perform address translation. This value indicates that the
       address specified by the kern_addr argument is not a valid
       kernel or system virtual address.

[ Back ]
 Similar pages
Name OS Title
KSEG_TO_PHYS Tru64 General: Converts a kernel-unmapped virtual address to a physical address
vtop Tru64 General: Converts any virtual address to a physical address
copy_to_phys Tru64 General: Copies data from a virtual address to a physical address
PHYS_TO_KSEG Tru64 General: Converts a physical address to a
pmap_extract FreeBSD map a virtual address to a physical page
pmap_extract_and_hold FreeBSD map a virtual address to a physical page
pmap_mincore FreeBSD determine if a virtual address is resident in physical memory
pmap_change_wiring FreeBSD change physical wiring for a map or virtual address pair
pmap_map FreeBSD map a physical memory range into kernel virtual address (KVA) space
pmap_extract Tru64 General: Extracts a physical page address
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service