CONFIG_DEBUG_UART_PHYS/VIRT for rpi-4
Nicolas Saenz Julienne
nsaenzjulienne at suse.de
Mon Feb 22 05:13:27 EST 2021
On Fri, 2021-02-19 at 15:11 +0200, Laurentiu-Cristian Duca wrote:
> 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?
As you can see in [1], this is ARM only. This excludes arm64 builds. If what
you're trying to achieve is having early access to the console I suggest you
look into earlycon and the specific example I provided above.
> 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/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/linux-rpi-kernel/attachments/20210222/fc840e32/attachment.sig>
More information about the linux-rpi-kernel
mailing list