void *
mca_intr_establish(mca_chipset_tag_t mc, mca_intr_handle_t hdl, int level, int (*handler)(void *), void *arg)
void
mca_intr_disestablish(mca_chipset_tag_t mc, mca_intr_handle_t hdl)
const struct evcnt *
mca_intr_evcnt(mca_chipset_tag_t mc, mca_intr_handle_t hdl)
int
mca_conf_read(mca_chipset_tag_t mc, int slot, int reg)
void
mca_conf_write(mca_chipset_tag_t mc, int slot, int reg, int data)
Being a replacement for the ISA bus, the MCA bus does share some similar aspects with the ISA bus. Some MCA devices can be detected via the usual ISA-style probing. However, most device detection is done through the Programmable Option Select (POS) registers. These registers provide a window into a device to determine device-specific properties and configuration. The configuration of devices and their POS registers is performed using IBM's system configuration software.
The MCA bus uses level-triggered interrupts while the ISA bus uses edge-triggered interrupts. Level triggered interrupts have the advantage that they can be shared among multiple device. Therefore, most MCA-specific devices should be coded with shared interrupts in mind.
mca_chipset_tag_tmca_intr_handle_tstruct mca_attach_args
bus_space_tag_t ma_iot; /* MCA I/O space tag */
bus_space_tag_t ma_memt; /* MCA mem space tag */
bus_dma_tag_t ma_dmat; /* MCA DMA tag */
int ma_slot; /* MCA slot number */
int ma_pos[8]; /* MCA POS values */
int ma_id; /* MCA device */
mc, hdl, level, handler, arg)mc
for the interrupt described completely by
hdl.
The priority of the interrupt is specified by
level.
When the interrupt occurs the function
handler
is called with argument
arg.
mc, hdl)mc
for the interrupt described completely
hdl.
mc, hdl)mc
for the event described completely by
hdl.
mc, slot, reg)reg
for the device in slot
slot
on the MCA bus specified by
mc.
mc, slot, reg, data)data
to the POS register
reg
for the device in slot
slot
on the MCA bus specified by
mc.
ma_id
member of the
mca_attach_args
structure.
Drivers should match on the device ID.
Device capabilities and configuration information should be read from
device POS registers using
mca_conf_read().
Some important configuration information found in the POS registers
include the I/O base address, memory base address and interrupt
number.
The location of these configurable options with the POS registers are
device specific.
/usr/src.
The MCA subsystem itself is implemented within the file
sys/dev/mca/mca_subr.c.
Machine-dependent portions can be found in
sys/arch/<arch>/mca/mca_machdep.c.
The database of known devices exists within the file
sys/dev/mca/mcadevs_data.h
and is generated automatically from the file
sys/dev/mca/mcadevs.
New vendor and product identifiers should be added to this file.
The database can be regenerated using the Makefile
sys/dev/mca/Makefile.mcadevs.
A good 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.