Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

copy_to_phys(9r) [osf1 man page]

copy_to_phys(9r)														  copy_to_phys(9r)

NAME
copy_to_phys - General: Copies data from a virtual address to a physical address SYNOPSIS
void copy_to_phys( vm_offset_t virt_src, vm_offset_t phys_dest, unsigned int bcount ); ARGUMENTS
Specifies the virtual address of the data to be copied. Specifies the physical address to copy the data to. Specifies the number of bytes to copy. DESCRIPTION
The copy_to_phys routine copies a specified amount of virtually addressed memory to physically addressed memory. The addresses reside only in system memory space and not in the memory space on I/O buses. CAUTIONS
If any overlap exists between virt_src and phys_dest, the copy_to_phys routine panics. RETURN VALUES
None SEE ALSO
Routines: copyin(9r), copyout(9r), io_copyin(9r), io_copyio(9r), io_copyout(9r) copy_to_phys(9r)

Check Out this Related Man Page

IS_KSEG_VA(9r)															    IS_KSEG_VA(9r)

NAME
IS_KSEG_VA, IS_SEG0_VA, IS_SEG1_VA - General: Determine if the specified address is located in the kernel-unmapped address space, the user- mapped address space, and the kernel-mapped address space. SYNOPSIS
void IS_KSEG_VA( unsigned long addr ); void IS_SEG0_VA( unsigned long addr ); void IS_SEG1_VA( unsigned long addr ); ARGUMENTS
Specifies the virtual address. DESCRIPTION
The IS_KSEG_VA routine determines if the specified address is located in the kernel-unmapped address space. The IS_SEG0_VA routine deter- mines if the specified address is located in the user-mapped address space. The IS_SEG1_VA routine determines if the specified address is located in the kernel-mapped address space. RETURN VALUES
None EXAMPLE
The following code fragment shows a call to IS_KSEG_VA: . . . caddr_t virt_addr; [1] unsigned phys_addr; [2] . . . if(IS_KSEG_VA(virt_addr)) { [3] phys_addr = KSEG_TO_PHYS(virt_addr); [4] . . . Declares a variable to store the user buffer's virtual address. Declares a variable to store the physical address returned by KSEG_TO_PHYS. Before calling KSEG_TO_PHYS, calls IS_KSEG_VA to determine if the virtual address is from the kernel-unmapped address space. If the virtual address is from the kernel-unmapped address space, then calls KSEG_TO_PHYS to convert the address to a corresponding physi- cal address. SEE ALSO
Routines: KSEG_TO_PHYS(9r), PHYS_TO_KSEG(9r) IS_KSEG_VA(9r)
Man Page

We Also Found This Discussion For You

1. What is on Your Mind?

Throw my Toys out of the Pram!

Hi Folks, Today hasn't been the best one of my career in IT. I've been a contractor for a major utility company for a number of years, on a number of seperate IT contracts mostly Unix. The company had 10 different flavours of unix and multiple different varsions of most of them. At the... (3 Replies)
Discussion started by: gull04
3 Replies