#
267654 |
|
19-Jun-2014 |
gjb |
Copy stable/9 to releng/9.3 as part of the 9.3-RELEASE cycle.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation |
#
225736 |
|
22-Sep-2011 |
kensmith |
Copy head to stable/9 as part of 9.0-RELEASE release cycle.
Approved by: re (implicit)
|
#
148275 |
|
22-Jul-2005 |
obrien |
Fix $FreeBSD$.
|
#
143598 |
|
14-Mar-2005 |
scottl |
Refactor the bus_dma header files so that the interface is described in sys/bus_dma.h instead of being copied in every single arch. This slightly reorders a flag that was specific to AXP and thus changes the ABI there. The interface still relies on bus_space definitions found in <machine/bus.h> so it cannot be included on its own yet, but that will be fixed at a later date. Add an MD <machine/bus_dma.h> for ever arch for consistency and to allow for future MD augmentation of the API. sparc64 makes heavy use of this right now due to its different bus_dma implemenation.
|
#
140553 |
|
21-Jan-2005 |
peter |
MFi386: whitespace, copyright header, etc updates
|
#
139840 |
|
07-Jan-2005 |
scottl |
Introduce bus_dmamap_load_mbuf_sg(). Instead of taking a callback arg, this cuts to the chase and fills in a provided s/g list. This is meant to optimize out the cost of the callback since the callback doesn't serve much purpose for mbufs since mbuf loads will never be deferred. This is just for amd64 and i386 at the moment, other arches will be coming shortly.
|
#
122940 |
|
21-Nov-2003 |
peter |
Cosmetic and/or trivial sync up with i386.
Approved by: re (rwatson)
|
#
122266 |
|
07-Nov-2003 |
scottl |
Document the lockfunc and lockfuncarg arguments to bus_dma_tag_create() in the busdma headers.
|
#
118081 |
|
27-Jul-2003 |
mux |
- Introduce a new busdma flag BUS_DMA_ZERO to request for zero'ed memory in bus_dmamem_alloc(). This is possible now that contigmalloc() supports the M_ZERO flag. - Remove the locking of Giant around calls to contigmalloc() since contigmalloc() now grabs Giant itself.
|
#
117126 |
|
01-Jul-2003 |
scottl |
Mega busdma API commit.
Add two new arguments to bus_dma_tag_create(): lockfunc and lockfuncarg. Lockfunc allows a driver to provide a function for managing its locking semantics while using busdma. At the moment, this is used for the asynchronous busdma_swi and callback mechanism. Two lockfunc implementations are provided: busdma_lock_mutex() performs standard mutex operations on the mutex that is specified from lockfuncarg. dftl_lock() is a panic implementation and is defaulted to when NULL, NULL are passed to bus_dma_tag_create(). The only time that NULL, NULL should ever be used is when the driver ensures that bus_dmamap_load() will not be deferred. Drivers that do not provide their own locking can pass busdma_lock_mutex,&Giant args in order to preserve the former behaviour.
sparc64 and powerpc do not provide real busdma_swi functions, so this is largely a noop on those platforms. The busdma_swi on is64 is not properly locked yet, so warnings will be emitted on this platform when busdma callback deferrals happen.
If anyone gets panics or warnings from dflt_lock() being called, please let me know right away.
Reviewed by: tmm, gibbs
|
#
115416 |
|
30-May-2003 |
hmp |
Rename BUS_DMAMEM_NOSYNC to BUS_DMA_COHERENT.
The current name is confusing, because it indicates to the client that a bus_dmamap_sync() operation is not necessary when the flag is specified, which is wrong.
The main purpose of this flag is to hint the underlying architecture that DMA memory should be mapped in a coherent way, but the architecture can ignore it. But if the architecture does supports coherent mapping of memory, then it makes bus_dmamap_sync() calls cheap.
This flag is the same as the one in NetBSD's Bus DMA.
Reviewed by: gibbs, scottl, des (implicitly) Approved by: re@ (jhb)
|
#
115343 |
|
27-May-2003 |
scottl |
Bring back bus_dmasync_op_t. It is now a typedef to an int, though the BUS_DMASYNC_ definitions remain as before. The does not change the ABI, and reverts the API to be a bit more compatible and flexible. This has survived a full 'make universe'.
Approved by: re (bmah)
|
#
115316 |
|
26-May-2003 |
scottl |
De-orbit bus_dmamem_alloc_size(). It's a hack and was never used anyways. No need for it to pollute the 5.x API any further.
Approved by: re (bmah)
|
#
114930 |
|
12-May-2003 |
peter |
AMD64 physical space is much larger than i386, de-i386 the bus_space and bus_dma MD code for AMD64. (And a trivial ifdef update in dev/kbd because of this). More updates are needed here to take advantage of the 64 bit instructions.
Approved by: re (blanket amd64/*)
|
#
113347 |
|
10-Apr-2003 |
mux |
Change the operation parameter of bus_dmamap_sync() from an enum to an int and redefine the BUS_DMASYNC_* constants as flags. This allows us to specify several operations in one call to bus_dmamap_sync() as in NetBSD.
|
#
110030 |
|
29-Jan-2003 |
scottl |
Implement bus_dmamem_alloc_size() and bus_dmamem_free_size() as counterparts to bus_dmamem_alloc() and bus_dmamem_free(). This allows the caller to specify the size of the allocation instead of it defaulting to the max_size field of the busdma tag.
This is intended to aid in converting drivers to busdma. Lots of hardware cannot understand scatter/gather lists, which forces the driver to copy the i/o buffers to a single contiguous region before sending it to the hardware. Without these new methods, this would require a new busdma tag for each operation, or a complex internal allocator/cache for each driver.
Allocations greater than PAGE_SIZE are rounded up to the next PAGE_SIZE by contigmalloc(), so this is not suitable for multiple static allocations that would be better served by a single fixed-length subdivided allocation.
Reviewed by: jake (sparc64)
|
#
104486 |
|
04-Oct-2002 |
sam |
New bus_dma interfaces for use by crypto device drivers:
o bus_dmamap_load_mbuf o bus_dmamap_load_uio
Test on i386. Known to compile on alpha and sparc64, but not tested. Otherwise untried.
|
#
84593 |
|
06-Oct-2001 |
nyan |
- Moved the bus_dma declarations from bus_{at386,pc98}.h into bus_dma.h. (bus_dma.h is repo-copied from bus_at386.h) - Added '#include <machine/bus_dma.h>' into bus.h for backward compatibility.
|
#
78353 |
|
16-Jun-2001 |
alex |
Fix "alignemnt" typo.
|
#
73314 |
|
02-Mar-2001 |
mdodd |
version 1.7 made some changes to correct problems identifed by compiling with egcs-1.1.1. bus_space_write_multi_2() had an extra operation that should have been removed.
Remove it.
This fixes the panic when bus_space_write_multi_2() is used.
Obtained from: jake
|
#
67350 |
|
20-Oct-2000 |
jhb |
Axe the barrier_{read,write,rw}() helper functions as this method of doing memory barriers doesn't really scale well for the ia64. Also, memory barriers are more a property of the CPU than bus space.
Requested by: dfr
|
#
67285 |
|
18-Oct-2000 |
jhb |
Add in a simple API for memory barriers to machine/bus.h: - barrier_read() enforces a memory read barrier - barrier_write() enforces a memory write barrier - barrier_rw() enforces a memory read/write barrier
|
#
61692 |
|
14-Jun-2000 |
bde |
Fixed syntax errors and style bugs in previous commit. The syntax errors were normally harmless because they were in unreachable code and gcc apparently doesn't check the syntax inside asm statements that it optimizes away.
|
#
60672 |
|
17-May-2000 |
msmith |
Implement real read/write barriers for the i386. Despite the comment in previous versions of this file, some barrier functionality is required.
|
#
58762 |
|
29-Mar-2000 |
kato |
Added indirect pio into the bus space stuff for the NEC PC-98. bus.h includes one of bus_at386.h and bus_pc98.h. Becuase only bus_pc98.h supports indirect pio and bus_at386.h is identical to old bus.h, there is no functional change in PC-AT's kernels. That is, it cannot cause performance loss.
Submitted by: nyan Reviewed by: imp bde and luoqi provided useful comments for earlier version.
|
#
53139 |
|
14-Nov-1999 |
obrien |
Fix clobbers so that GENERIC may compile with GCC 2.95.2.
Historically, the documentation of extended asm was lacking, namely you should NOT specify the same register as an input, and a clobber. If the register is clobbered, it should be specified as an output as well, e.g., by linking input and output through the "number" notation. (Beware of lvalues, some local variables needed...)
URL:http://egcs.cygnus.com/faq.html
In versions up to egcs-1.1.1, the compiler did not even warn about it, but it was liable to output bad code. Newer egcs are pickier and simply refuse to swallow such code.
Note, since *addr changes, it needs to be an output operand. We might be excessive in saying that all memory has changed.
Obtained from: OpenBSD w/extra thanks to Marc Espie <Marc.Espie@liafa.jussieu.fr>
|
#
50477 |
|
27-Aug-1999 |
peter |
$Id$ -> $FreeBSD$
|
#
48527 |
|
03-Jul-1999 |
imp |
Improve compatibility with other systems by changing the default behavior slightly.
If machine/bus.h is included, but neither bus_memio.h nor bus_pio.h are included, then behave as if both were included.
This won't change existing drivers, all of which include one or more of bus_{p,mem}io.h, but will allow drivers from other systems to come over with fewer changes. I freely admit that this might not be optimal for some drivers, but those drivers can be optimized for FreeBSD after the initial bringup happens.
Without the change, there is a bug that preclude drivers from compiling with strange warning/errors.
I've been running this here for a while now w/o ill effects.
Reviewed by: gibbs Not objected to by: bde, arch@ list.
|
#
39755 |
|
29-Sep-1998 |
bde |
Don't pretend to support ix86's with 16-bit ints by using longs just to ensure 32-bit variables. Doing so broke ix86's with 64-bit longs.
|
#
35767 |
|
05-May-1998 |
gibbs |
Implement bus_dmamem_* functions and correct a few nits reported by Peter Wemm.
|
#
35300 |
|
19-Apr-1998 |
bde |
Support compiling with `gcc-pedantic' (don't use hard newlines in (asm) string constants or trailing commas in enum declarations).
|
#
32517 |
|
15-Jan-1998 |
gibbs |
Implementation of Bus Space for FreeBSD-x86.
Obtained From: NetBSD
|