12.07.2015 Views

INTRO (9) NetBSD Kernel Developer's Manual INTRO (9) NAME ...

INTRO (9) NetBSD Kernel Developer's Manual INTRO (9) NAME ...

INTRO (9) NetBSD Kernel Developer's Manual INTRO (9) NAME ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

MCA (9) <strong>NetBSD</strong> <strong>Kernel</strong> Developer’s <strong>Manual</strong> MCA (9)int ma_pos[8]; /∗ MCA POS values ∗/int ma_id; /∗ MCA device ∗/FUNCTIONSmca_intr_establish(mc , hdl , level , handler , arg)Establish a MCA interrupt handler on the MCA bus specified by mc for the interrupt describedcompletely by hdl. The priority of the interrupt is specified by level. When the interruptoccurs the function handler is called with argument arg.mca_intr_disestablish(mc , hdl)Dis-establish the interrupt handler on the MCA bus specified by mc for the interrupt describedcompletely hdl.mca_intr_evcnt(mc , hdl)Do interrupt event counting on the MCA bus specified by mc for the event described completelyby hdl.mca_conf_read(mc , slot , reg)Read the POS register reg for the device in slot slot on the MCA bus specified by mc.mca_conf_write(mc , slot , reg , data)Write data data to the POS register reg for the device in slot slot on the MCA bus specifiedby mc.AUTOCONFIGURATIONThe MCA bus is a direct-connection bus. During autoconfiguration, the parent specifies the MCA device IDfor the found device in the ma_id member of the mca_attach_args structure. Drivers should match on thedevice ID. Device capabilities and configuration information should be read from device POS registers usingmca_conf_read(). Some important configuration information found in the POS registers include the I/Obase address, memory base address and interrupt number. The location of these configurable options withthe POS registers are device specific.DMA SUPPORTThe MCA bus supports 32-bit, bidirectional DMA transfers. Currently, nomachine-independent support forMCA DMA is available.CODE REFERENCESThis section describes places within the <strong>NetBSD</strong> source tree where actual code implementing or using themachine-independent MCA subsystem can be found. All pathnames are relative to /usr/src.The MCA subsystem itself is implemented within the file sys/dev/mca/mca_subr.c. Machine-dependentportions can be found in sys/arch//mca/mca_machdep.c. The database of knowndevices exists within the file sys/dev/mca/mcadevs_data.h and is generated automatically from thefile sys/dev/mca/mcadevs. New vendor and product identifiers should be added to this file. The databasecan be regenerated using the Makefile sys/dev/mca/Makefile.mcadevs.Agood source of information about MCA devices is IBM’s system configuration disk. The disk contains.adf files which describe the location of device configuration options in the POS registers.SEE ALSOmca(4), autoconf(9), bus_dma(9), bus_space(9), driver(9), isa(9)<strong>NetBSD</strong> 3.0 October 7, 2001 2

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!