 |
Index for Section 9r |
|
 |
Alphabetical listing for P |
|
 |
Bottom of page |
|
PHYS_TO_KSEG(9r)
NAME
PHYS_TO_KSEG - General: Converts a physical address to a kernel-unmapped
virtual address
SYNOPSIS
vm_offset_t PHYS_TO_KSEG(
vm_offset_t addr );
ARGUMENTS
addr
Specifies the physical address to convert to a kernel-unmapped virtual
address.
DESCRIPTION
The PHYS_TO_KSEG routine converts a kernel physical address to a kernel-
unmapped virtual address.
EXAMPLE
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]
.
.
.
1. Declares a variable to store the virtual address returned by
PHYS_TO_KSEG.
2. Declares a variable to store the physical address. This address might
have been obtained from a call to KSEG_TO_PHYS.
3. Calls PHYS_TO_KSEG to convert the physical address to a corresponding
virtual address.
RETURN VALUES
Upon successful completion, PHYS_TO_KSEG returns the virtual address
associated with the specified physical address.
SEE ALSO
Routines: IS_KSEG_VA(9r), KSEG_TO_PHYS(9r)
 |
Index for Section 9r |
|
 |
Alphabetical listing for P |
|
 |
Top of page |
|