KSEG_TO_PHYS(9r)KSEG_TO_PHYS(9r)NAME
KSEG_TO_PHYS - General: Converts a kernel-unmapped virtual address to a physical address
SYNOPSIS
vm_offset_t KSEG_TO_PHYS(
vm_offset_t addr );
ARGUMENTS
Specifies the buffer virtual address to convert to a physical address.
DESCRIPTION
The 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 VALUES
Upon successful completion, KSEG_TO_PHYS returns the physical address.
EXAMPLE
The 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 ALSO
Routines: IS_KSEG_VA(9r), PHYS_TO_KSEG(9r)KSEG_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)
Hi,
I am going to shift my Unix workstation to another lab. So I need to change the IP address.
Please tell me how to change the Network IP address, what is the commands, what to take care?
Thank you very much and have a very nice day. (4 Replies)
Not sure whether this is an appropriate request, however,
Using C++ code I'm running a unix command from the pc that needs the IP address of the PC in order to set the DISPLAY variable. The code is written using Builder C++ (Borland) but I'm having difficulty finding what functions / header... (3 Replies)
I run - telnet adl001 (where adl001 is a box name) and it works Ok
/etc/hosts file does not have resolution of the ip address for this name
where it can be found ?
Thanks (5 Replies)
Hi
i want to know the Ip address of the machine from where i logged into the unix server and made some changes to a file.
Can I know the last changes made to a unix file ? (3 Replies)
Hi,
I am looking to work on unix systems which include (hp-ux, ibm aix, solaris and linux). I want to get the total virtual address space of a process, the used virtual memory i am able to get without any problem. I have tried using getrlimit and getrlimit64, but that gives only ... (4 Replies)
I am new to HACMP V5.4 in AIX5.3.Please let me know how to get the virtual IP address configured for a HACMP cluster.
Is this the correct way to identify it?
If i give ifconfig -a the first ip address displayed is the real address of the host.So the other one can be VIP.
Thanks in Advance (3 Replies)
Hello
How do I deternine the physical location of an ethernet port, based on the hardware address?
I have 4 ports on a 9133-55A
ent0 05-08
ent1 05-09
ent2 07-08
ent3 07-09
Two of these are internal, and two are on a card. I need to single out ent0 and ent2, but I cannot find any... (4 Replies)
Hi everybody, im trying to store a path "address" of a file in a variable, then IF the Address that the user entered INSIDE the variable is exist, do something, else echo invalid file address.
here's my code, but it's not working i dunno why:
$variable
cat > variable
#variable will contain... (4 Replies)
Suppose I have 3 gb of ram and 250 gb hard disk in my pc.
Now I wrote a simple C program having only one statement malloc() to allocate 4 gb of memory as 32 bit os can address 4gb address space then will the malloc succeed?
If yes then how it will get extra 1 gb of memory?
Does the process gets... (3 Replies)
hi all
i want to set ip address to a vitrual machine i am using following command.
but it is not ifconfig -a command output.
what is wrong i dont know
bash# ifconfig interfacename plumb
bash# ifconfig interfacename auto-dhcp
Please use code tags next time for your code and data. (4 Replies)
Well, I thought I would share this code, which I normally do not share.
The logs show this site is currently experiencing some "new hack" maybe attempting a buffer overflow or something similar.
So, not really having any patience for this kind of criminal or childish behavior (have a touch... (7 Replies)