MCA(9)
π MCA β MicroChannel Architecture bus (kernel dev manual, section 9) π
π NAME π
Okay so this whole page is about MCA, plus mca_intr_establish, mca_intr_disestablish, mca_intr_evcnt, mca_conf_read, and mca_conf_write β literally the MicroChannel Architecture bus package, bestie. β¨
πΈ SYNOPSIS πΈ
#include <sys/bus.h>
#include <dev/mca/mcavar.h>
#include <dev/mca/mcadevs.h>
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);
π¦ DESCRIPTION π¦
The MCA device provides support for IBM's MicroChannel Architecture bus, which shows up on IBM PS/2 systems and selected workstations. It was designed as a replacement bus for the ISA bus found on IBM's older machines. But plot twist: the bus specifications were only available under license, so MCA did not achieve widespread acceptance in the industry. π
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 devices. Therefore, most MCA-specific devices should be coded with shared interrupts in mind. iykyk π
π§ DATA TYPES π§
Drivers for devices attached to the MCA bus will make use of these data types:
mca_chipset_tag_tβ chipset tag for the MCA bus.mca_intr_handle_tβ the opaque handle describing an established interrupt handler.struct mca_attach_argsβ a structure used to inform the driver of MCA bus properties. It contains the following members:
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 */
π₯ FUNCTIONS π₯
mca_intr_establish(mc, hdl, level, handler, arg)β establish a MCA interrupt handler on the MCA bus specified bymcfor the interrupt described completely byhdl. The priority of the interrupt is specified bylevel. When the interrupt occurs, the functionhandleris called with argumentarg.mca_intr_disestablish(mc, hdl)β dis-establish the interrupt handler on the MCA bus specified bymcfor the interrupt described completely byhdl.mca_intr_evcnt(mc, hdl)β do interrupt event counting on the MCA bus specified bymcfor the event described completely byhdl.mca_conf_read(mc, slot, reg)β read the POS registerregfor the device in slotsloton the MCA bus specified bymc.mca_conf_write(mc, slot, reg, data)β writedatato the POS registerregfor the device in slotsloton the MCA bus specified bymc.
π AUTOCONFIGURATION π
The MCA bus is a direct-connection bus. During autoconfiguration, the parent specifies the MCA device ID for the found device in the 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 includes the I/O base address, memory base address and interrupt number. The location of these configurable options within the POS registers is device-specific. π«Ά
π DMA SUPPORT π
The MCA bus supports 32-bit, bidirectional DMA transfers. Currently, no machine-independent support for MCA DMA is available. That's just how it is, bestie. β
π CODE REFERENCES π
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. obsessed with the lore tbh π
π SEE ALSO π
mca(4), autoconf(9), bus_dma(9), bus_space(9), driver(9), isa(9)
π BUGS π
β οΈ Real talk, bestie: the machine-independent MCA driver does not currently support DMA. MCA devices which require DMA operation currently access the DMA capabilities directly. No cap, that's the caveat. π«Ά
mwah π this page is from Debian, dated October 7, 2001. Go off, kernel dev icon. πβ¨
π¦ where this page comes from
- nixpkgs unstable: netbsd-source 11.0
- Copyright (c) 2001 The NetBSD Foundation, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms