diff --git a/en/projects/busdma/index.sgml b/en/projects/busdma/index.sgml index 79be2f323e71..3e4fe671772d 100644 --- a/en/projects/busdma/index.sgml +++ b/en/projects/busdma/index.sgml @@ -1,997 +1,1085 @@ %includes; Done"> In progress"> Not done"> Resolved"> Unresolved"> %developers; ]> &header;


Project Goal


The busdma interfaces permit hardware device drivers to operate on a variety of platforms avoiding the encoding of platform-specific access methods into drivers. This lowers the maintenance costs for drivers across platforms, and improves the chances that a driver will "just work" on a new platform. Modifying a driver to make use of busdma is relatively straight forward, but does require familiarity with both the device driver and busdma primitives. For busdma to be used in FreeBSD, two sets of changes are generally required: adaptation of the busdma implementation to run on all platforms, and adaptation of drivers to use the framework. As such, status information on this project is broken down into platform support, and driver support (sorted by category). Completing this work requires a thorough audit of the system device drivers, then prioritized conversion of drivers.


Hardware drivers register their interrupt handler with the bus_setup_intr() function. Setting the flag INTR_MPSAFE tells the system interrupt code to call the interrupt routine without holding the Giant mutex. This can give a significant performance gain on SMP systems.

Drivers can set this flag even if they are not fully locked down as long as their interrupt routine is careful about not touching other data structures in the driver. An easy way to do this is to check and clear the hardware interrupt status registers and then schedule the interrupt processing for a taskqueue or kernel thread.

SMPng locked

Drivers should employ mutexes and sx locks to protect their data structures and hardware registers from competing threads. Mutex operations are somewhat expensive, so a good strategy is combine as many atomic operations into a single mutex acquisition as possible.


p!=a safety


Intel PAE support requires that pointers and physical address + representations be of differing sizes. This means that drivers + must be written to use vm_paddr_t or bus_addr_t rather than + assuming that physical addresses can be represented using a + void *. In addition, format strings and casts must be + carefully handled.


The task list below is not intended to be complete, but does represent a set of relevant and/or important components of the overall work. The "Responsible" field identifies a developer who has expressed willingness to be responsible for completing the identified task; this doesn't preclude others working on it, but suggests that coordination with the responsible party might be appropriate so as to avoid unnecessary duplication of work, and to maximize forward progress. If beginning work on a new area of substantial size, or one that appears unclaimed, it may be worth dropping an e-mail to &a.mux; to see if any progress has been made.

The definition of the date field varies depending on the status of a task. For completed tasks, it refers to the date completed or reported completed. For in-progress tasks, it refers to the date of the last update of the entry. For stalled tasks, it refers to the date that the task was declared stalled. For new tasks, it refers to the date the task was added to the list.

Tasks are sorted first by status, then by date.

Platform Support Status

Task Responsible Last updated Status Details
alpha &a.gallatin; December 10, 2002 &status.wip; Support for mbuf and uio load routines present, but untested. Pending availability of mainstream network interface drivers to perform testing. In addition, there may be problems with large amounts of memory.
ia64 &a.marcel; December 10, 2002 &status.wip; All the primitives are in place, but network interface drivers are required for testing the mbuf and uio load routines. In addition, there may be problems for systems with large amounts of memory.
i386 &a.sam; December 9, 2002 &status.done; Fully supported.
powerpc Hiten Pandya <hiten@unixdaemons.com> January 15, 2003 &status.done; Fully supported.
sparc64 &a.tmm; January 6, 2003 &status.done; Fully supported.

Network Interface Driver Status

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Driver Responsible Last updated busdma INTR_MPSAFE SMPng locked a!=p Notes
if_ar     &status.new; &status.new; &status.new; &status.new; kvtop()
if_bge     &status.new; &status.new; &status.new; &status.new; vtophys()
if_cs     &status.new; &status.new; &status.new; &status.new;  
if_dc     &status.new; &status.new; &status.new; &status.new; vtophys()
if_de     &status.new; &status.new; &status.new; &status.new; vtophys()
if_ed     &status.new; &status.new; &status.new; &status.new;   kvtop()
if_em &a.pdeuskar; December 19, 2002 &status.wip; &status.new; &status.new; &status.new; vtophys()
if_en &a.harti; March 4, 2003 &status.wip; &status.new; &status.new; &status.new; vtophys()
if_fxp &a.mux; December 9, 2002 &status.wip; &status.new; &status.new; &status.new; vtophys()
if_fwe     &status.new; &status.new; &status.new; &status.new;  
if_gem &a.tmm; January 6, 2003 &status.done; &status.new; &status.new; &status.new;  
if_gx     &status.new; &status.new; &status.new; &status.new; vtophys()
if_hme &a.tmm; January 6, 2003 &status.done; &status.new; &status.new; &status.new;  
if_idt     &status.new; &status.new; &status.new; &status.new; vtophys()
if_lge     &status.new; &status.new; &status.new; &status.new; vtophys()
if_lmc     &status.new; &status.new; &status.new; &status.new; vtophys()
if_lnc     &status.new; &status.new; &status.new; &status.new; vtophys(). Please contact &a.phk; for info/hardware.
if_mn     &status.new; &status.new; &status.new; &status.new; vtophys(). Please contact &a.phk; for info/hardware.
if_my     &status.new; &status.new; &status.new; &status.new; vtophys()
if_nge     &status.new; &status.new; &status.new; &status.new; vtophys()
if_pcn     &status.new; &status.new; &status.new; &status.new; vtophys()
if_pdq     &status.new; &status.new; &status.new; &status.new; mostly busdma, except for vtophys()
if_rl &a.wpaul; December 9, 2002 &status.done; &status.new; &status.new; &status.new;  
if_sf     &status.new; &status.new; &status.new; &status.new; vtophys()
if_sis &a.wpaul; December 9, 2002 &status.done; &status.new; &status.new; &status.new;  
if_sk     &status.new; &status.new; &status.new; &status.new; vtophys()
if_sr     &status.new; &status.new; &status.new; &status.new; vtophys()
if_ste     &status.new; &status.new; &status.new; &status.new; vtophys()
if_ti     &status.new; &status.new; &status.new; &status.new;  
if_tl     &status.new; &status.new; &status.new; &status.new;  
if_tx     &status.new; &status.new; &status.new; &status.new;  
if_txp     &status.new; &status.new; &status.new; &status.new;  
if_vr Christian S.J. Peron <maneo@bsdpro.com> January 20, 2003 &status.wip; &status.new; &status.new; &status.new;  
if_wb     &status.new; &status.new; &status.new; &status.new;  
if_xl &a.mux; December 17, 2002 &status.done; &status.new; &status.new; &status.new;  

Storage Device Driver Status

+ + + + + + + + + + + + + + + + + + + + + + + + + +
Driver Responsible Last updated busdma INTR_MPSAFE SMPng locked a!=p Notes
aac &a.scottl; February 8, 2003 &status.done; &status.done; &status.done; &status.new; Not 64-bit capable yet
adv   December 9, 2002 &status.done; &status.new; &status.new; &status.new;  
aha   December 9, 2002 &status.done; &status.new; &status.new; &status.new;  
ahb   December 9, 2002 &status.done; &status.new; &status.new; &status.new;  
aic7xxx   December 9, 2002 &status.done; &status.new; &status.new; &status.new;  
amd   December 14, 2002 &status.done; &status.new; &status.new; &status.new;  
amr   December 9, 2002 &status.done; &status.new; &status.new; &status.new;  
asr &a.obrien; January 4, 2003 &status.new; &status.new; &status.new; &status.new; vtophys()
ata   December 9, 2002 &status.done; &status.new; &status.new; &status.new;  
buslogic     &status.new; &status.new; &status.new; &status.new; vtophys()
ciss   December 9, 2002 &status.done; &status.new; &status.new; &status.new;  
ct     &status.new; &status.new; &status.new; &status.new;  
dpt     &status.new; &status.new; &status.new; &status.new; vtophys()
ida   December 9, 2002 &status.done; &status.new; &status.new; &status.new;  
iir     &status.new; &status.new; &status.new; &status.new; vtophys()
isp   February 8, 2003 &status.done; &status.done; &status.new; &status.new;  
mlx &a.scottl; February 8, 2003 &status.done; &status.wip; &status.wip; &status.new;  
mly &a.scottl; February 8, 2003 &status.done; &status.wip; &status.wip; &status.new;  
mpt   December 9, 2002 &status.done; &status.done; &status.new; &status.new;  
ncr     &status.new; &status.new; &status.new; &status.new; vtophys(). Please contact &a.phk; for a possible source of hardware.
pst     &status.new; &status.new; &status.new; &status.new; vtophys()
stg   December 9, 2002 &status.done; &status.new; &status.new; &status.new; At least, it looks like it may well be.
sym   December 19, 2002 &status.done; &status.new; &status.new; &status.new;  
trm &a.cognet; December 9, 2002 &status.done; &status.new; &status.new; &status.new;  
twe   December 9, 2002 &status.done; &status.new; &status.new; &status.new;  

Miscellaneous Device Driver Status

+ + + + + + + + + + + + + + + + + +
Driver Responsible Last updated busdma INTR_MPSAFE SMPng locked a!=p Notes
agp &a.cognet; January 23, 2003 &status.wip; &status.new; &status.new; &status.new; vtophys()
bktr &a.cognet; January 15, 2003 &status.wip; &status.new; &status.new; &status.new; vtophys()
cs     &status.new; &status.new; &status.new; &status.new;  
digi     &status.new; &status.new; &status.new; &status.new; vtophys()
drm &a.anholt; February 17, 2003 &status.wip; &status.wip; &status.wip; &status.new; vtophys()
exca &a.imp; December 9, 2002 &status.done; &status.new; &status.new; &status.new;  
fb     &status.new; &status.new; &status.new; &status.new; vtophys()
firewire     &status.new; &status.new; &status.new; &status.new; vtophys()
hea     &status.new; &status.new; &status.new; &status.new; vtophys()
hfa     &status.new; &status.new; &status.new; &status.new; vtophys()
hifn &a.sam; December 9, 2002 &status.done; &status.new; &status.new; &status.new;  
meteor     &status.new; &status.new; &status.new; &status.new; vtophys()
musycc     &status.new; &status.new; &status.new; &status.new; vtophys(). Please contact &a.phk; for info/hardware.
pcm &a.cognet; February 20, 2003 &status.done; &status.done; &status.new; &status.new;  
ubsec &a.sam; December 9, 2002 &status.done; &status.new; &status.new; &status.new; vtophys() is used in debugging printf
usb &a.joe; December 10, 2002 &status.new; &status.new; &status.new; &status.new; vtophys()
wds   December 9, 2002 &status.done; &status.new; &status.new; &status.new;  

Documentation Status

Task Responsible Last updated Status Notes
manpages for the busdma API Hiten Pandya <hiten@unixdaemons.com> January 15, 2003 &status.wip;