Commit Graph

14 Commits

Author SHA1 Message Date
marcel
77dc282d69 Add support for Python 3 and make it the default.
Python 2.7 will retire on Januari 1, 2020.
2019-06-30 02:29:12 +00:00
marcel
3e1c95104e Add an example program (in Python) for the AMD Am79c900 (ILACC)
ethernet controller. The ethernet controller is emulated by VMware
Fusion (for example) and is a good device to demonstrate how to use
the bus space and busdma functions due to its simple programming.

The program sets up the DMA structures, sends a DHCP discover packet,
waits 2 seconds, and iterates over the receive ring for an offer.
2015-08-02 21:24:03 +00:00
marcel
da99969eb7 Rename busdma_sync() to busdma_sync_range() and rename the
base and size parameters to ofs and len (resp). Add a new
busdma_sync() that makes the entire MD coherent.
2015-08-02 01:09:30 +00:00
marcel
a1823ab55e Change the dev argument from a full path to just the device
identification (e.g. isa:0x3f0 or pci0:2:1:0). In libbus,
the device is turned into a path name. For bus_space_map(),
the resource is now specified in a second argument.
Before:
	bus.map('/dev/proto/pci0:2:1:0/pcicfg')
	busdma.tag_create('/dev/proto/pci0:2:1:0/busdma', ...)
Now:
	bus.map('pci0:2:1:0', 'pcicfg')
	busdma.tag_create('pci0:2:1:0', ...)
2015-07-26 21:37:31 +00:00
marcel
a0aa8866a7 Remove debugging output. We should have tracing instead. 2015-07-26 16:40:51 +00:00
marcel
fac325d351 Implement busdma_md_unload() and busdma_sync().
While here:
1.  have the Python bindings contain constants for the space
    identifiers and the sync operation.
2.  change the segment iterators to return None when done,
    not ENXIO.
2015-07-03 05:47:56 +00:00
marcel
c9fadd2c5d Add busdma_md_create, busdma_md_destroy and busdma_md_load. 2015-07-03 02:06:47 +00:00
marcel
71bc1e1d8b Free the segment objects properly. 2015-06-12 14:53:56 +00:00
marcel
7e7e822da1 Add accessor functions for iterating over segments. A segment
can be in bus address space, physical memory space or virtual
memory space.
2015-06-11 03:02:40 +00:00
marcel
4559857c8e Rename bus_space to bus (i.e. drop _space). This makes the
API match the convenience macros in <sys/bus.h>. Bus space
can now reference both bus and busdma.
2015-06-10 16:00:09 +00:00
marcel
81fc71b090 Map the allocated DMA memory into the address space. 2015-06-08 22:01:34 +00:00
marcel
440bb64889 Add busdma_mem_alloc & busdma_mem_free. 2015-06-08 03:23:20 +00:00
marcel
9d7393a25c Add DMA tag management to the C library and Python binding. 2015-06-06 16:14:03 +00:00
marcel
1bcd32c4c5 Add a C libary and a Python module that implements an API similar
to bus_space(9) and that uses the proto(4) driver for talking to
hardware. If the I/O resource is a memory mapped I/O resource,
then mmap(2) will be attempted to avoid read(2)/write(2) overhead.

Sponsored by:	Juniper Networks, Inc.
2014-04-28 18:06:11 +00:00