freebsd-dev/sys/dev/uart
Marcel Moolenaar ca83142fc3 Make the Z8530 more reliable as low-level console by making use of the
fact that access to RR0 does not need a prior write to the register
index because the index always reverts to 0 after the indexed register
has been accessed.

Typically when a RR or WR is to accessed, one programs the index (which
is a write to the control register), followed by a read or write to the
actual indexed register (a read pr write to the same control register).
When this non-atomic sequence is interrupted after having written the
index and low-level console I/O is done in that situation, the write to
program the index will actually write to the indexed register and nuke
state. This almost always yields a wedge.

By not programming the index register and instead just reading from RR0,
the worst case scenario is non-fatal. For if we don't actually read from
RR0 but some other register we get an invalid status, which may lead us
to conclude that the transit data register is empty when it's not or that
the receive data register contains data when it doesn't. Hence, we may
lose an output character or get a sporadic input character, but given
the situation this is a non-issue.

Full serialization is not possible due to the fact that this code needs
to work from DDB and before mutex initialization has happened.

In collaboration with: kris@, marius@
Tested by: kris@
MFC after: 1 day
X-MFC: 5.4-RELEASE candidate
2005-04-27 21:57:51 +00:00
..
uart_bus_acpi.c Start each of the license/copyright comments with /*-, minor shuffle of lines 2005-01-06 01:43:34 +00:00
uart_bus_ebus.c - Introduce an ofw_bus kobj-interface for retrieving the OFW node and a 2004-08-12 17:41:33 +00:00
uart_bus_isa.c Start each of the license/copyright comments with /*-, minor shuffle of lines 2005-01-06 01:43:34 +00:00
uart_bus_pccard.c Start each of the license/copyright comments with /*-, minor shuffle of lines 2005-01-06 01:43:34 +00:00
uart_bus_pci.c Start each of the license/copyright comments with /*-, minor shuffle of lines 2005-01-06 01:43:34 +00:00
uart_bus_puc.c
uart_bus.h Start each of the license/copyright comments with /*-, minor shuffle of lines 2005-01-06 01:43:34 +00:00
uart_core.c - Allocate the interrupt resource as RF_SHAREABLE allowing uart(4) to work 2005-03-02 11:30:14 +00:00
uart_cpu_alpha.c Start each of the license/copyright comments with /*-, minor shuffle of lines 2005-01-06 01:43:34 +00:00
uart_cpu_amd64.c Start each of the license/copyright comments with /*-, minor shuffle of lines 2005-01-06 01:43:34 +00:00
uart_cpu_i386.c Start each of the license/copyright comments with /*-, minor shuffle of lines 2005-01-06 01:43:34 +00:00
uart_cpu_ia64.c Start each of the license/copyright comments with /*-, minor shuffle of lines 2005-01-06 01:43:34 +00:00
uart_cpu_pc98.c Start each of the license/copyright comments with /*-, minor shuffle of lines 2005-01-06 01:43:34 +00:00
uart_cpu_sparc64.c In uart_cpu_getdev_console() when determinig whether we should use 2005-03-12 17:06:03 +00:00
uart_cpu.h Start each of the license/copyright comments with /*-, minor shuffle of lines 2005-01-06 01:43:34 +00:00
uart_dbg.c Start each of the license/copyright comments with /*-, minor shuffle of lines 2005-01-06 01:43:34 +00:00
uart_dev_ns8250.c Start each of the license/copyright comments with /*-, minor shuffle of lines 2005-01-06 01:43:34 +00:00
uart_dev_sab82532.c Fix a logic bug that caused DSR to never be deasserted. 2005-01-30 22:14:30 +00:00
uart_dev_z8530.c Make the Z8530 more reliable as low-level console by making use of the 2005-04-27 21:57:51 +00:00
uart_if.m Start each of the license/copyright comments with /*-, minor shuffle of lines 2005-01-06 01:43:34 +00:00
uart_kbd_sun_tables.h
uart_kbd_sun.c Add the keyboard system device before we probe for the keyboard. 2005-01-31 04:31:22 +00:00
uart_kbd_sun.h Start each of the license/copyright comments with /*-, minor shuffle of lines 2005-01-06 01:43:34 +00:00
uart_subr.c Start each of the license/copyright comments with /*-, minor shuffle of lines 2005-01-06 01:43:34 +00:00
uart_tty.c Start each of the license/copyright comments with /*-, minor shuffle of lines 2005-01-06 01:43:34 +00:00
uart.h Start each of the license/copyright comments with /*-, minor shuffle of lines 2005-01-06 01:43:34 +00:00