|
PHYS_TO_KSEG(9r)
Contents
|
PHYS_TO_KSEG - General: Converts a physical address to a
kernel-unmapped virtual address
vm_offset_t PHYS_TO_KSEG(
vm_offset_t addr );
Specifies the physical address to convert to a kernelunmapped
virtual address.
The PHYS_TO_KSEG routine converts a kernel physical
address to a kernel-unmapped virtual address.
The following code fragment shows a call to PHYS_TO_KSEG:
. . .
caddr_t virt_addr; [1] unsigned phys_addr; [2]
. . .
virt_addr = PHYS_TO_KSEG(phys_addr); [3]
. . .
Declares a variable to store the virtual address returned
by PHYS_TO_KSEG. Declares a variable to store the physical
address. This address might have been obtained from a
call to KSEG_TO_PHYS. Calls PHYS_TO_KSEG to convert the
physical address to a corresponding virtual address.
Upon successful completion, PHYS_TO_KSEG returns the virtual
address associated with the specified physical
address.
Routines: IS_KSEG_VA(9r), KSEG_TO_PHYS(9r)
PHYS_TO_KSEG(9r)
[ Back ] |