I have a UART that is displayed in a Linux boot log as:
AMDI0020:01: ttyS5 at MMIO 0xfedca000 (irq = 4, base_baud = 3000000) is a 16550A
I want to enable Linux kernel boot log to this UART port. To do this I add kernel boot parameter:
console=uart,mmio32,0xfedca000,115200n8
In result for some reason the log is getting split in two parts (I've even checked this with the oscilloscope):
- first part of the boot log goes at the speed of 3000000
- second part of the boot log goes at the speed of 115200
Presumably the split is happening exactly at the point of ttyS5 initialization.
I thought that the whole point of writing
console=uart,mmio32,0xfedca000,115200n8
instead of
console=ttyS5,115200n8
is to get working UART before the actual driver initialization.
But for some reason the uart,mmio32,0xfedca000,115200n8
parameter doesn't set speed at the beginning.
Is it possible to set serial speed for an early kernel boot log to a MMIO UART?
Just in case my OS is:
~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.4 LTS
Release: 18.04
Codename: bionic
~$ uname -a
Linux ermak-Diesel 5.4.0-65-generic #73~18.04.1-Ubuntu SMP Tue Jan 19 09:02:24 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
earlyprintk
option - check it out in this. You might need to add arch support this.earlyprintk
should be supported. But it doesn't do anything for me. I've triedearlyprintk=serial,0xfedca000,115200
andearlyprintk=serial,ttyS5,115200
. Also, from the source code it seems like earlyprintk supports only legacy I/O Com ports (elixir.bootlin.com/linux/latest/source/arch/x86/kernel/…)GRUB_SERIAL_COMMAND
to set it, I will see the early boot console, otherwise I don't see it (perhaps it is being sent at a very high baud rate as you mentioned, but I can't monitor it).