\f
/* Register definitions for the 16550A UART used in PCs.
The 16550A has a lot more going on than shown here, but this
- is all we need. */
+ is all we need.
+
+ Refer to [PC16650D] for hardware information. */
/* I/O port base address for the first serial port. */
#define IO_BASE 0x3f8
int baud_base = 1843200 / 16; /* Base rate of 16550A. */
uint16_t divisor = baud_base / bps; /* Clock rate divisor. */
+ ASSERT (bps >= 300 && bps <= 115200);
+
/* Enable DLAB. */
outb (LCR_REG, LCR_N81 | LCR_DLAB);