SPIF(4)

πŸ“¦ version 11.0, in nixpkgs unstable

πŸ’… SPIF(4) β€” like, the SBus (spiffy) Serial/Parallel Interface, bestie ✨

okay so welcome to the spif manual page, which lives in the Kernel Interfaces Manual section of the docs. yes the "(spiffy)" is literally the official vibe. no cap, it's in the name. πŸŽ€


🌸 SYNOPSIS 🌸

spif* at sbus? slot ? offset ?                 (sun4c/sun4m/sun4u)
stty* at spif?                                 (sun4c/sun4m/sun4u)
sbpp* at spif?                                 (sun4c/sun4m/sun4u)

so the spif device attaches at sbus? with slot ? and offset ? (on sun4c/sun4m/sun4u), and then stty* and sbpp* attach right on top of spif? β€” also on sun4c/sun4m/sun4u. it's giving nesting doll energy πŸ¦‹


✨ DESCRIPTION ✨

the spif driver is the support system for the Sun Serial/Parallel Interface card β€” Sun part number 501-1931, iykyk β€” and that card is built on two Cirrus Logic chips: the Cirrus Logic CD180 octal serial controller and the Cirrus Logic PPC2 parallel port controller. iconic hardware lineage honestly.

πŸŽ€ the minor number situation

the device minor numbers for this driver are encoded like this, and yes we're reading the bits together:

+---+---+---+---+---+---+---+---+
| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
+---+---+---+---+---+---+---+---+
  |   |   |   |   |   |   |   |
  |   |   |   |   |   +---+---+---> port number
  |   |   |   |   |
  |   |   |   |   +---------------> unused
  |   |   |   |
  |   |   |   +-------------------> dial-out (on tty ports)
  |   |   |
  |   |   +-----------------------> unused
  |   |
  +---+---------------------------> card number

so bits 0–2 are the port number, bit 3 is unused, bit 4 is the dial-out flag (only on tty ports, bestie), bit 5 is unused again, and bits 6–7 are the card number. little bitfield buffet. πŸ“

Up to four cards are supported in the system. four. that's the whole limit, periodt.

each of the serial ports comes with an 8 byte FIFO for receive and transmit, plus automatic hardware (RTS/CTS) flow control. she's got buffers AND manners. πŸ’…


πŸ¦‹ FILES πŸ¦‹

  • /dev/ttyS[0123][0-7] β€” the serial ports ✨
  • /dev/bppS[0-3] β€” the parallel ports ✨

πŸ’€ DIAGNOSTICS πŸ’€

  • spif%d: ccr timeout β€” a timeout occurred while writing to one of the CD180 registers. 😭 something stalled on the wire, ngl.
  • stty%d-%d: ring overflow β€” incoming characters were discarded because the application in control of the device did not read the input fast enough. the app literally wasn't keeping up and the characters got dropped, no cap. πŸ™ˆ

πŸ”₯ SEE ALSO πŸ”₯

intro(4), sbus(4), tty(4)

go read those if you want the full lore, iykyk πŸ“š


🌈 HISTORY 🌈

the spif adapter was first supported in OpenBSD 2.5 β€” vintage queen behaviour β€” and the driver was ported to NetBSD 3.0. glow-up across BSDs. πŸ‘‘


🫢 AUTHORS 🫢

the driver was written by Jason Wright <jason@thought.net>, and it's heavily based on the magma(4) driver written by Iain Hibbert. credit where credit is due, always. πŸ’–


⭐ TODO ⭐

heads up bestie, these are the things that are not done yet:
  • the parallel port is not supported yet. 🫠
  • dial-out (cua) devices are not yet supported. 🫠

so like, don't come for her for the missing pieces, she's a work in progress. πŸ’œ


🧚 sign-off 🧚

this cutie of a page comes from the Debian source, dated February 4, 1999, and it's filed under SPIF(4). mwah, go forth and spif responsibly. πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from