Changeset 98a935e in mainline for kernel/arch/amd64/src/amd64.c


Ignore:
Timestamp:
2021-08-04T19:30:39Z (3 years ago)
Author:
jxsvoboda <5887334+jxsvoboda@…>
Branches:
master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8bb0af7f, f05edcb
Parents:
31e15be
git-author:
Marek Benc <dusxmt@…> (2021-06-23 20:56:38)
git-committer:
jxsvoboda <5887334+jxsvoboda@…> (2021-08-04 19:30:39)
Message:

Configure NS16550 transmission format settings on initialization on PCs.

Currently, the NS116550 serial line controller is left with its
settings as it was left by the boot firmware and/or bootloader.
On my computer, this was an invalid configuration, and it left me
with a really slow booting system, since each output character
had to go through the full timeout loop in ns16550_sendb().

This patch adds the necessary bit and register descriptions to configure
the baud rate and transmission settings, as well as configuring them on
post-SMP initialization on ia32 and amd64, currently with values matching
the ns8250 userspace character device driver (38400 baud, 8-bit words,
2 stop bits, no parity).

This could perhaps be changed to be adjustable with a kernel command-line
argument, or through the configuration system.

This change does not affect emulators, since those largely ignore these
settings.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/amd64/src/amd64.c

    r31e15be r98a935e  
    224224            ns16550_out_ptr);
    225225        if (ns16550_instance) {
     226                ns16550_format_set(ns16550_instance, 38400,
     227                    LCR_PARITY_NONE | LCR_STOP_BIT_TWO | LCR_WORD_LEN_8);
    226228#ifdef CONFIG_NS16550
    227229                srln_instance_t *srln_instance = srln_init();
Note: See TracChangeset for help on using the changeset viewer.