CONFIG_DEBUG_UART_PHYS/VIRT for rpi-4

Laurentiu-Cristian Duca laurentiu.duca at gmail.com
Fri Feb 19 08:11:12 EST 2021


On 2/19/21, Nicolas Saenz Julienne <nsaenzjulienne at suse.de> wrote:
> Hi Laurentiu,
>
> On Thu, 2021-02-18 at 17:16 +0200, Laurentiu-Cristian Duca wrote:
>> Hello there,
>>
>>   Does anybody know the values of CONFIG_DEBUG_UART_PHYS
>> and CONFIG_DEBUG_UART_VIRT for rpi-4 on 64bits
>> that should be set in order to have access to earlyprintk and printascii
>> ?
>
> By adding this to the kernel command line you should have early access to
> the
> console logs:
>
> 	earlycon=uart8250,mmio32,0xfe215040
>
> This, as long as you're using the serial port exposed on pins 8 and 10 of
> the
> expansion port (see https://pinout.xyz/).
>
> Regards,
> Nicolas
>
>
>

Hi Nicolas,

  Quoting [1]
"you can use CONFIG_DEBUG_LL to add extra debug output routines to the
kernel. These are printascii, printch and printhex. These routines
print directly to the serial port, bypassing the console code, and are
available earlier in machine initialization."
  Quoting [2]
"The vanilla ARM kernel port already provides an UART-based raw output
routine called printascii() when CONFIG_DEBUG_LL is enabled, provided
the right debug UART channel is defined too (CONFIG_DEBUG_UART_xx)."
  So, I am looking for something like the following in order to use printascii:
CONFIG_DEBUG_LL=y
# under LL menu entry
CONFIG_DEBUG_UART_8250=y
CONFIG_DEBUG_UART_PHYS=0x?
CONFIG_DEBUG_UART_VIRT=0x?

Thank you very much,
L-C

[1] https://elinux.org/Debugging_by_printing#Using_CONFIG_DEBUG_LL_and_printascii.28.29_.28ARM_only.29
[2] https://evlproject.org/dovetail/porting/rawprintk/



More information about the linux-rpi-kernel mailing list