![]() |
![]()
| ![]() |
![]()
NAME
SYNOPSIS
In /boot/device.hints:
With flags encoded as:
DESCRIPTIONThe The CORE COMPONENTAt the heart of the HARDWARE DRIVERSThe core component and the kernel interfaces talk to the hardware through the hardware interface. This interface serves as an abstraction of the hardware and allows varying UARTs to be used for serial communications. SYSTEM DEVICESSystem devices are UARTs that have a special purpose by way of hardware design or software setup. For example, Sun UltraSparc machines use UARTs as their keyboard interface. Such an UART cannot be used for general purpose communications. Likewise, when the kernel is configured for a serial console, the corresponding UART will in turn be a system device so that the kernel can output boot messages early on in the boot process. KERNEL INTERFACESThe last but not least of the components is the kernel interface. This component ultimately determines how the UART is made visible to the kernel in particular and to users in general. The default kernel interface is the TTY interface. This allows the UART to be used for terminals, modems and serial line IP applications. System devices, with the notable exception of serial consoles, generally have specialized kernel interfaces. HARDWAREThe
Pulse Per Second (PPS) Timing InterfaceThe The hw.uart.pps_mode tunable configures the PPS capture mode for all uart devices; it can be set in loader.conf(5). The dev.uart.0.pps_mode sysctl configures the PPS capture mode for a specific uart device; it can be set in loader.conf(5) or sysctl.conf(5). The following capture modes are available:
The following values may be ORed with the capture mode to configure capture processing options:
Add the narrow pulse option when the incoming PPS pulse width is small enough to prevent reliable capture in normal mode. In narrow mode the driver uses the hardware's ability to latch a line state change; not all hardware has this capability. The hardware latch provides a reliable indication that a pulse occurred, but prevents distinguishing between the CLEAR and ASSERT edges of the pulse. For each detected pulse, the driver synthesizes both an ASSERT and a CLEAR event, using the same timestamp for each. To prevent spurious events when the hardware is intermittently able to see both edges of a pulse, the driver will not generate a new pair of events within a half second of the prior pair. Both normal and narrow pulse modes work with ntpd(8). Add the invert option when the connection to the uart device uses TTL level signals, or when the PPS source emits inverted pulses. RFC 2783 defines an ASSERT event as a higher-voltage line level, and a CLEAR event as a lower-voltage line level, in the context of the RS-232 protocol. The modem control signals on a TTL-level connection are typically inverted from the RS-232 levels. For example, carrier presence is indicated by a high signal on an RS-232 DCD line, and by a low signal on a TTL DCD line. This is due to the use of inverting line driver buffers to convert between TTL and RS-232 line levels in most hardware designs. Generally speaking, a connection to a DB-9 style connector is an RS-232 level signal at up to 12 volts. A connection to header pins or an edge-connector on an embedded board is typically a TTL signal at 3.3 or 5 volts. Special DevicesThe The lock termios state acts as flags to disable changing
the termios state. E.g., to lock a flag variable such as CRTSCTS, use
stty crtscts on the
lock-state device. Speeds and special characters may be locked by setting
the corresponding value in the lock-state device to any nonzero value. E.g.,
to lock a speed to 115200, use “ Correct programs talking to correctly wired external devices work with almost arbitrary initial states and almost no locking, but other setups may benefit from changing some of the default initial state and locking the state. In particular, the initial states for non (POSIX) standard flags should be set to suit the devices attached and may need to be locked to prevent buggy programs from changing them. E.g., CRTSCTS should be locked on for devices that support RTS/CTS handshaking at all times and off for devices that do not support it at all. CLOCAL should be locked on for devices that do not support carrier. HUPCL may be locked off if you do not want to hang up for some reason. In general, very bad things happen if something is locked to the wrong state, and things should not be locked for devices that support more than one setting. The CLOCAL flag on callin ports should be locked off for logins to avoid certain security holes, but this needs to be done by getty if the callin port is used for anything else. FILES
SEE ALSOHISTORYThe AUTHORSThe
|