Changeset View
Changeset View
Standalone View
Standalone View
sys/modules/ioat/README
FreeBSD Crystal Beach DMA driver | FreeBSD Crystal Beach DMA driver | ||||
========================================== | ========================================== | ||||
* Driver is named ioat(4) | * Driver is named ioat(4) | ||||
* Driver only supports copy and null operations. Null operations may be used | * Driver only supports copy and null operations. Null operations may be used | ||||
to insert descriptors which only trigger an interrupt. | to insert descriptors which only trigger an interrupt. | ||||
* Note that copy operation takes bus addresses as parameters, not virtual | * Note that copy operation takes bus addresses as parameters, not virtual | ||||
addresses. | addresses. | ||||
* Copies larger than max transfer size (1MB) are not supported, and will | * Copies larger than max transfer size (1MB) are not supported. Future | ||||
panic the system explicitly. Future versions will likely support this by | versions will likely support this by breaking up the transfer into smaller | ||||
breaking up the transfer into smaller sizes. | sizes. | ||||
* There are 8 CB-DMA channels per CPU package. Each channel will be | * There are 8 CB-DMA channels per CPU package. Each channel is represented by | ||||
represented by a struct ioat_softc data structure. | a struct ioat_softc. | ||||
* There is an ioat_test.c module in the driver, and an ioatcontrol.c | * There is an ioat_test.c module in the driver which exposes a simple device at | ||||
application that can be used to both test the driver as well as understand | /dev/ioat_test. The presense of the test device may be controlled with the | ||||
how to interface with the driver. App uses a /dev/ioat_test device node | hw.ioat.enable_ioat_test tunable. (The default is off.) There is an | ||||
to send IOCTLs which will cause the driver to: | ioatcontrol.c application in tools/tools/ioat | ||||
that can be used to test the driver. It sends IOCTLs which will cause the | |||||
driver to: | |||||
* run a loop a number of times as requested by the app | * run a loop a number of times as requested by the app | ||||
* each loop will allocate two chunks of memory, write data patterns | * each loop will allocate two chunks of memory, write data patterns | ||||
to each, submit a DMA request to copy one buffer to the other, | to each, submit a DMA request to copy one buffer to the other, | ||||
and compare the contents in the callback, reporting an error if one | and compare the contents in the callback, reporting an error if one | ||||
is found | is found | ||||
The ioat_test.c module needs to be enabled in the driver Makefile to use it. | To build the test program from tools/tools/ioat: make ioatcontrol | ||||
To build the app from /sys/modules/ioat directory: make ioatcontrol | To run it: ./ioatcontrol <channel #> <num_loops> | ||||
To run the app: ./ioatcontrol <channel #> <num_loops> | * Debug verbosity is 0 by default (only critical errors) but can be increased | ||||
* Debug prints are enabled by defining IOAT_LOGGING, which is currently the | by doing one of the following: | ||||
default in the Makefile. Verbosity is 0 by default (only critical errors) | |||||
but can be increased by doing one of the following: | |||||
* from command line, before driver is loaded: | * from command line, before driver is loaded: | ||||
kenv hw.ioat.debug_level=3 | kenv hw.ioat.debug_level=3 | ||||
* add the following to /boot/loader.conf | * add the following to /boot/loader.conf | ||||
hw.ioat.debug_level=3 | hw.ioat.debug_level=3 | ||||
* at runtime: sysctl hw.ioat.debug_level=3 | |||||