diff --git a/en/projects/busdma/index.sgml b/en/projects/busdma/index.sgml index 1026a6d129..656d905660 100644 --- a/en/projects/busdma/index.sgml +++ b/en/projects/busdma/index.sgml @@ -1,1185 +1,1185 @@ - + %navincludes; %includes; N/A"> Done"> In progress"> Needs testing"> Not done"> Unknown"> %developers; ]> &header;

Contents

Project Goal

busdma

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.

INTR_MPSAFE

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.

Resources and Links

A series of manual pages related to this project can be found here:

Platform Support Status

Task Responsible Last updated Status Details
alpha &a.ticso; November 14, 2005 &status.done; There are problems for systems with large amounts of memory.
amd64 &a.peter; July 1, 2003 &status.done; Fully supported.
ia64 &a.marcel; December 10, 2002 &status.done; There may be problems for systems with large amounts of memory.
i386 &a.sam; December 9, 2002 &status.done; Fully supported.
powerpc &a.hmp; 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 &a.wpaul; April 13, 2004 &status.done; &status.done; &status.done; &status.done;  
if_cp &a.rik; October 31, 2005 &status.done; &status.done; &status.done; &status.new;  
if_cs     &status.new; &status.new; &status.new; &status.new;  
if_ct &a.rik; October 31, 2005 &status.done; &status.done; &status.done; &status.new;  
if_cx &a.rik; June 24, 2004 &status.done; &status.wip; &status.wip; &status.new;  
if_dc &a.mux; August 19, 2005 &status.done; &status.done; &status.done; &status.done;  
if_de &a.mux; August 17, 2005 &status.done; &status.done; &status.done; &status.new;  
if_ed   August 31, 2005 &status.new; &status.done; &status.done; &status.new; kvtop()
if_em &a.pdeuskar; April 13, 2004 &status.done; &status.done; &status.done; &status.done;  
if_en &a.harti; November 2, 2005 &status.done; &status.new; &status.new; &status.done; Locking present; not yet marked INTR_MPSAFE?
if_ep &a.imp; April 13, 2004 &status.na; &status.done; &status.done; &status.done; Mutex marked MTX_RECURSE.
if_ex &a.imp; April 13, 2004 &status.na; &status.new; &status.new; &status.new; Not fully evaluated.
if_fatm &a.harti; November 2, 2005 &status.done; &status.done; &status.done; &status.done;  
if_fwe     &status.new; &status.new; &status.new; &status.new;  
if_fxp &a.mux; April 13, 2004 &status.done; &status.done; &status.done; &status.done;  
if_gem &a.tmm; July 31, 2005 &status.done; &status.done; &status.done; &status.new;  
if_hatm &a.harti; November 2, 2005 &status.done; &status.done; &status.done; &status.done;  
if_hme &a.tmm; January 30, 2005 &status.done; &status.done; &status.done; &status.done;  
if_idt     &status.new; &status.new; &status.new; &status.new; vtophys()
if_lge   November 23, 2005 &status.new; &status.done; &status.done; &status.new; vtophys()
if_lnc &a.obrien;   &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   August 17, 2005 &status.new; &status.done; &status.done; &status.new; vtophys()
if_nge   August 17, 2005 &status.new; &status.done; &status.done; &status.new; vtophys()
if_nve   November 23, 2005 &status.new; &status.done; &status.done; &status.new; vtophys()
if_pcn &a.obrien; August 19, 2005 &status.new; &status.done; &status.done; &status.new; vtophys()
if_pdq     &status.new; &status.new; &status.new; &status.new; Mostly busdma, except for vtophys().
if_re     May 30, 2005 &status.done; &status.done; &status.done; &status.done;  
if_rl &a.wpaul; April 13, 2004 &status.done; &status.done; &status.done; &status.new;  
if_sf   August 19, 2005 &status.new; &status.done; &status.done; &status.new; vtophys()
if_sis &a.wpaul; April 13, 2004 &status.done; &status.done; &status.done; &status.new;  
if_sk     May 30, 2005 &status.new; &status.done; &status.done; &status.new; vtophys()
if_sr     &status.new; &status.new; &status.new; &status.new; vtophys()
if_ste   August 31, 2005 &status.new; &status.done; &status.done; &status.new; vtophys()
if_ti     &status.new; &status.new; &status.new; &status.new;  
if_tl   September 15, 2005 &status.new; &status.done; &status.done; &status.new;  
if_tx &a.mux; April 19, 2003 &status.done; &status.new; &status.new; &status.untested;  
if_txp   September 22, 2005 &status.wip; &status.done; &status.done; &status.new;  
if_vr   April 23, 2004 &status.new; &status.done; &status.done; &status.new;  
if_vx   September 22, 2005 &status.na; &status.done; &status.done; &status.new; Uses PIO to copy mbufs to and from hardware.
if_wb   September 22, 2005 &status.new; &status.done; &status.done; &status.new;  
if_wi &a.sam;, &a.imp; November 4, 2003 &status.unknown; &status.done; &status.unknown; &status.unknown;  
if_xl &a.mux; April 13, 2004 &status.done; &status.done; &status.done; &status.done;  

Storage Device Driver Status

- +
Driver Responsible Last updated busdma INTR_MPSAFE SMPng locked a!=p Notes
aac &a.scottl; January 31, 2005 &status.done; &status.done; &status.done; &status.done; Not endian clean.
adv   December 9, 2002 &status.done; &status.new; &status.new; &status.new;  
aha   April 13, 2004 &status.done; &status.wip; &status.wip; &status.new; Uses BUSDMA, but may pun bus address with host address.
ahb   December 9, 2002 &status.done; &status.new; &status.new; &status.new;  
ahc &a.gibbs; January 31, 2005 &status.done; &status.new; &status.new; &status.done;  
ahd &a.gibbs; January 31, 2005 &status.done; &status.new; &status.new; &status.done;  
amd   December 14, 2002 &status.done; &status.new; &status.new; &status.new;  
amr &a.scottl; January 30, 2005 &status.done; &status.done; &status.done; &status.done;  
asr   January 4, 2003 &status.new; &status.new; &status.new; &status.new; vtophys(). Requires major work. A new I2O framework would be desirable.
ata &a.sos; December 9, 2002 &status.done; &status.done; &status.done; &status.done;  
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   January 30, 2005 &status.done; &status.new; &status.new; &status.new; Requires major work to be compliant with the busdma API.
isp   February 8, 2003 &status.done; &status.done; &status.new; &status.new;  
ips &a.scottl; January 30, 2005 &status.done; &status.done; &status.done; &status.done;  
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     April 11, 2003 &status.new; &status.done; &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;  
wds   February 2, 2005 &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   October 31, 2005 &status.new; &status.new; &status.new; &status.new; vtophys()
bktr &a.cognet; January 15, 2003 &status.wip; &status.new; &status.new; &status.new; vtophys()
digi     &status.new; &status.new; &status.new; &status.new; vtophys()
drm &a.anholt; October 27, 2003 &status.wip; &status.done; &status.done; &status.wip; vtophys(). The locking could use some review.
fb     &status.new; &status.new; &status.new; &status.new; vtophys()
firewire &a.simokawa; April 17, 2003 &status.done; &status.new; &status.new; &status.done; vtophys()
hfa     &status.new; &status.new; &status.new; &status.new; vtophys()
hifn &a.sam; April 13, 2004 &status.done; &status.done; &status.done; &status.new;  
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; April 13, 2004 &status.done; &status.done; &status.done; &status.new; vtophys() is used in debugging printf.
usb &a.jmg; July 24, 2003 &status.done; &status.new; &status.new; &status.untested; a!=p should be clean, but requires further testing.

Documentation Status

Task Responsible Last updated Status Notes
Manual pages for the busdma API &a.hmp; January 15, 2003 &status.done;  
&footer;