Does anyone know the simplest way to map a kernel virtual address (like
a pointer to an m_blk buffer), to a physical address (suitable for use
by a DMA controller)?
Jim
Jim
The *right* way is to use the (2.5) DMA setup routines:Quote:>Does anyone know the simplest way to map a kernel virtual address (like
>a pointer to an m_blk buffer), to a physical address (suitable for use
>by a DMA controller)?
>Jim
ddi_dma_alloc_handle
ddi_dma_buf_bind_handle
ddi_dma_addr_bind_handle
ddi_dma_nextcookie
ddi_dma_numwin
ddi_dma_getwin
ddi_dma_unbind_handle
ddi_dma_free_handle
ddi_dma_[buf,addr]_bind_handle will return you the first DMA cookie.
In it you'll find the physical address for the *first* portion of
your object.
You'll need to read up on DMA in the DDK to make this all work right. (-:
- Eric..................................//^oo^\\
==========================================================================
* I speak for no one but myself. *
--
- Eric.................................//^oo^\\
1. Map physical address to virtual address
Hi there,
Can any one help me how do i map a physical address under
1 MB (e.g. 0xD0000) to virtual address in my device driver?
Because the driver use dual port memory to communicate with hardware.
It works well in x86 machine but Alpha machine when driver acess the
address without mapping.Actually the driver got page fault when
run in a Alpha machine.
Thanks in advance.
3. YDL 1.2 Synergy VGM5 Virtual Address, Physical Address, Bus Address and remap_page_range (HELP!)
5. User virtual address to physical address translation -- how?
7. virtual address to physical address
8. Has anyone implemented pushd & popd in ksh?
9. physical address from virtual address
10. Getting the physical address of a user virtual address.
11. MIPS32 VM/ioremap question mapping 32 bit virtual address to 36 bit physical
12. Mapping virtual to physical addresses in Solaris 2.8
13. Virtual to physical address mapping