Re: Radxa Orion O6

From: Andrew Turner <andrew_at_fubar.geek.nz>
Date: Tue, 21 Jan 2025 15:40:11 UTC
On 2025-01-21 12:38, FUKAUMI Naoki wrote:
> Hi Andrew,
> 
> On 1/21/25 21:13, Andrew Turner wrote:
>>>>> Without seeing the ACPI tables, especially the SPCR, it is 
>>>>> difficult to know why it’s failing.
>>>> 
>>>>  From what I've seen so far, it seems there is no SPCR table, and I 
>>>> don't know how to display on the serial console in Linux.
>>> 
>>> In Linux I can use the serial console in "ACPI" mode. I don't know 
>>> how that is possible.
>> 
>> Having talked to a Linux developer my understanding is they store the 
>> message buffer and print it when the console is found. This could fail 
>> if the kernel was to panic before the uart device was found. I 
>> strongly suggest you add a SCPR table when booting in ACPI mode.
> 
> I checked mainline Linux dmesg (acpi),
> 
> | [    0.000000] ACPI: Use ACPI SPCR as default console: Yes
> 
> I don't understand what's going on...
> 
> Here is full dmesg:
> https://drive.google.com/file/d/1islmdKWJUOnFoJLP3lNv3hyMoVXhv6yl/view?usp=sharing

I had a look in the Linux source and found "ACPI: Use ACPI SPCR as 
default console: Yes" is just telling you that the option to ignore the 
SPCR wasn't set, i.e. it will use the SPCR if present. As there was no 
SPCR printed above that line it would appear Linux agrees there is none.

If you look further down there is the command line:
[    0.000000] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-6.13.0 
root=UUID=50cd9e1e-3d97-42d4-82fb-436278b16d79 ro 
earlycon=pl011,0x040d0000 efi=noruntime console=tty1 
console=ttyAMA2,115200n8 module_blacklist=amdgpu

The "earlycon=pl011,0x040d0000" tells Linux to use the pl011 driver with 
registers at 0x040d0000. As this is a Linux specific thing FreeBSD does 
nothing with it, and due to no SPCR doesn't know which uart to use as 
the boot console.

Andrew