Query: kseg_to_phys
OS: osf1
Section: 9r
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
KSEG_TO_PHYS(9r) KSEG_TO_PHYS(9r)NAMEKSEG_TO_PHYS - General: Converts a kernel-unmapped virtual address to a physical addressSYNOPSISvm_offset_t KSEG_TO_PHYS( vm_offset_t addr );ARGUMENTSSpecifies the buffer virtual address to convert to a physical address.DESCRIPTIONThe KSEG_TO_PHYS routine converts a kernel-unmapped virtual address to a kernel physical address. Device drivers can use this physical address in DMA operations. Prior to calling KSEG_TO_PHYS, device driver writers often call one of the following routines to determine whether the address passed is a virtual address in the addressed kernel segment: IS_KSEG_VA Determines if the specified address is located in the kernel-unmapped address space. IS_SEG0_VA Determines if the specified address is located in the user-mapped address space. IS_SEG1_VA Determines if the specified address is located in the kernel-mapped address space.RETURN VALUESUpon successful completion, KSEG_TO_PHYS returns the physical address.EXAMPLEThe following code fragment shows a call to KSEG_TO_PHYS: . . . 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 ALSORoutines: IS_KSEG_VA(9r), PHYS_TO_KSEG(9r) KSEG_TO_PHYS(9r)
Related Man Pages |
---|
pmap_extract(9) - debian |
pmap_extract_and_hold(9) - debian |
phys(2) - v7 |
badaddr(9r) - osf1 |
svatophys(9r) - osf1 |
Similar Topics in the Unix Linux Community |
---|
where is Ip address stored |
Hardware address to physical location |
Question about Variables in If? |
PC RAM and process address space |
i want to set ip address to a virtual machine |