TC(9)
π TC(9) β TURBOchannel bus: Kernel Developer's Manual edition π
π NAME π
okay so this page is the whole TURBOchannel bus situation, and the squad in the group chat is:
TCtc_intr_establishtc_intr_disestablishtc_intr_evcnttc_mbtc_wmbtc_syncbustc_badaddrTC_DENSE_TO_SPARSETC_PHYS_TO_UNCACHED
β all of these are the TURBOchannel bus, periodt. π
β¨ SYNOPSIS β¨
copy these includes and prototypes exactly, bestie, no cap:
#include <sys/bus.h>
#include <dev/tc/tcvar.h>
#include <dev/tc/tcdevs.h>
void
tc_intr_establish(struct device *dev, void *cookie, int level,
int (*handler)(void *), void *arg);
void
tc_intr_disestablish(struct device *dev, void *cookie);
const struct evcnt *
tc_intr_evcnt(struct device *dev, void *cookie);
void
tc_mb();
void
tc_wmb();
void
tc_syncbus();
int
tc_badaddr(tc_addr_t tcaddr);
tc_addr_t
TC_DENSE_TO_SPARSE(tc_addr_t addr);
tc_addr_t
TC_PHYS_TO_UNCACHED(tc_addr_t addr);
π¦ DESCRIPTION π¦
The TC device provides support for the DEC TURBOchannel bus found on all DEC TURBOchannel machines with MIPS (DECstation 5000 series, excluding the 5000/200) and Alpha (3000-series) systems. TURBOchannel is a 32-bit wide synchronous DMA-capable bus, running at 25 MHz on higher-end machines and at 12.5 MHz on lower-end machines.
πΈ DATA TYPES πΈ
Drivers for devices attached to the TURBOchannel bus will make use of the following data types:
struct tc_attach_args β a structure used to inform the driver of TURBOchannel bus properties. It contains the following members:
bus_space_tag_t ta_memt;
bus_dma_tag_t ta_dmat;
char ta_modname[TC_ROM_LLEN+1];
u_int ta_slot;
tc_offset_t ta_offset;
tc_addr_t ta_addr;
void *ta_cookie;
u_int ta_busspeed;
The ta_busspeed member specifies the TURBOchannel bus speed and is useful for time-related functions. The values are TC_SPEED_12_5_MHZ for the 12.5 MHz bus and TC_SPEED_25_MHZ for the 50 MHz bus.
bestie, yes: the page pairs TC_SPEED_25_MHZ with the 50 MHz bus. That's the lore we were given, and we report it with love. π
π FUNCTIONS π
tc_intr_establish(dev, cookie, level, handler, arg)β establish an interrupt handler with devicedevfor the interrupt described completely bycookie, the value passed to the driver in theta_cookiemember of thetc_attach_argsstructure. The priority of the interrupt is specified bylevel. When the interrupt occurs the functionhandleris called with argumentarg.tc_intr_disestablish(dev, cookie)β dis-establish the interrupt handler with devicedevfor the interrupt described completely bycookie.tc_intr_evcnt(dev, cookie)β do interrupt event counting with devicedevfor the event described completely bycookie; the synopsis gives its return type asconst struct evcnt *.tc_mb()β a read/write memory barrier. Any CPU-to-memory reads/writes before the barrier must complete before any CPU-to-memory reads/writes after it.tc_wmb()β a write memory barrier. Any CPU-to-memory writes before the barrier must complete before any CPU-to-memory writes after it.tc_syncbus()β synchronise writes on the TURBOchannel bus by ensuring CPU writes are propagated across the TURBOchannel bus.tc_badaddr(tcaddr)β returns non-zero if the given addresstcaddris invalid.TC_DENSE_TO_SPARSE(addr)β convert the given physical addressaddrin TURBOchannel dense space to the corresponding address in TURBOchannel sparse space.TC_PHYS_TO_UNCACHED(addr)β convert the given system memory physical addressaddrto the physical address of the corresponding region that is not cached.
π AUTOCONFIGURATION π
The TURBOchannel bus is a direct-connection bus. During autoconfiguration, the parent specifies the name of the found TURBOchannel module into the ta_modname member of the tc_attach_args structure. Drivers should match on this name.
β DMA SUPPORT β
The TURBOchannel bus supports 32-bit, bidirectional DMA transfers. Support is provided by the standard bus_dma(9) interface.
π CODE REFERENCES π
The TURBOchannel subsystem itself is implemented within the file sys/dev/tc/tc_subr.c. Machine-dependent portions can be found in sys/arch/<arch>/tc/tcbus.c.
π SEE ALSO π
go read these too, bestie:
π xoxo, bestie β this page is from Debian, dated October 7, 2001. Periodt. π«Ά
π¦ 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