Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Feb 1998 04:37:24 -0800
From:      Mike Smith <mike@smith.net.au>
To:        Brian McGovern <bmcgover@cisco.com>
Cc:        hackers@FreeBSD.ORG
Subject:   Re: Mapping phyical memory in to the PCI address range... 
Message-ID:  <199802161237.EAA06311@dingo.cdrom.com>
In-Reply-To: Your message of "Thu, 12 Feb 1998 23:28:39 EST." <199802130428.XAA10774@bmcgover-pc.cisco.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
Sorry for the delay in following up here.

> >> The question at hand was whether it was 'faster' to have the board transfer
> >> the data to the HOST's memory, so that a bcopy or b_to_q() call would
> >> be moving data from HOST memory to HOST memory, or is the gain insufficient,
> >> and its more prudent to have the HOST CPU move the data from the board
> >> itself.
> >
> >It will definitely be faster to have the board push to host memory.  
> >
> Any idea on roughly "how much faster"? I realize this is dependant on a lot of
> things, but I'd hate to spend the time doing it if its going to have a minimal
> impact.

It depends entirely on lots of things.  8)  Without actually watching 
timing diagrams of the device on the bus, and considering how much of 
the driver's time is actually spent servicing I/O requests, it's 
impossible to give any sort of real estimate.

> Which brings me back to my initial issue. Whats the best way to allocate
> RAM in the kernel (I'm assuming a malloc call), and then lock the memory down,
> and determine the PCI address, so I can give it to the card to use?

If you can do it at boot time, use contigmalloc() and then kvtop() to 
get the base address of the region.
-- 
\\  Sometimes you're ahead,       \\  Mike Smith
\\  sometimes you're behind.      \\  mike@smith.net.au
\\  The race is long, and in the  \\  msmith@freebsd.org
\\  end it's only with yourself.  \\  msmith@cdrom.com



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199802161237.EAA06311>