Subject: Re: contiguous memory allocation
To: Jason Thorpe <thorpej@wasabisystems.com>
From: Anil Gopinath <anil_public@yahoo.com>
List: port-i386
Date: 05/19/2003 10:50:44
--0-1019170904-1053366644=:37592
Content-Type: text/plain; charset=us-ascii

 
Thanks for all the responses.
 
Let me answer all the questions together:
 
1. The memory allocated in the pseudo device driver will eventually be given to an actual device driver(s). 
 
2. I looked at the i386 implementation of the bus_dma API and I can certainly use it. What concerned me earlier was the definition of bus_dma_tag_t and if I could use the API (for memory allocation) without any meaningful values in the tag.
 
thanks,
 
Anil

Jason Thorpe <thorpej@wasabisystems.com> wrote:

On Wednesday, May 14, 2003, at 06:01 PM, Anil Gopinath wrote:

> I am trying to allocate a large chunk of contiguous non-swappable 
> memory from a pseudo device driver. How would you do this without 
> using the bus_dma api?

You'd have to call the low-level VM interfaces directly. Look at the 
bus_dmamem_alloc() and bus_dmamem_map() implementations for i386.

But I strongly suggest you use the bus_dma API ... any reason why you 
don't want to do so?

-- Jason R. Thorpe 


---------------------------------
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
--0-1019170904-1053366644=:37592
Content-Type: text/html; charset=us-ascii

<DIV>&nbsp;</DIV>
<DIV>Thanks for all the responses.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Let me answer all the questions together:</DIV>
<DIV>&nbsp;</DIV>
<DIV>1. The memory allocated in the pseudo device driver will eventually be given to an actual device driver(s). </DIV>
<DIV>&nbsp;</DIV>
<DIV>2. I looked at the i386 implementation of the bus_dma API and I can certainly use it. What concerned me earlier was the definition of bus_dma_tag_t and if I could use the API (for memory allocation) without any meaningful values in the tag.</DIV>
<DIV>&nbsp;</DIV>
<DIV>thanks,</DIV>
<DIV>&nbsp;</DIV>
<DIV>Anil<BR><BR><B><I>Jason Thorpe &lt;thorpej@wasabisystems.com&gt;</I></B> wrote:</DIV>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid"><BR>On Wednesday, May 14, 2003, at 06:01 PM, Anil Gopinath wrote:<BR><BR>&gt; I am trying to allocate a large chunk of contiguous non-swappable <BR>&gt; memory from a pseudo device driver. How would&nbsp;you do this without <BR>&gt; using the bus_dma api?<BR><BR>You'd have to call the low-level VM interfaces directly. Look at the <BR>bus_dmamem_alloc() and bus_dmamem_map() implementations for i386.<BR><BR>But I strongly suggest you use the bus_dma API ... any reason why you <BR>don't want to do so?<BR><BR>-- Jason R. Thorpe <THORPEJ@WASABISYSTEMS.COM><BR></BLOCKQUOTE><p><hr SIZE=1>
Do you Yahoo!?<br>
<a href="http://us.rd.yahoo.com/search/mailsig/*http://search.yahoo.com">The New Yahoo! Search</a> - Faster. Easier. Bingo.
--0-1019170904-1053366644=:37592--