lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8d2ba0d3-55eb-45cf-b88a-bafef35e96b9@linux.com>
Date:   Sun, 27 Aug 2023 11:31:35 +0100
From:   Lucas Tanure <tanure@...ux.com>
To:     Neil Armstrong <neil.armstrong@...aro.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Jiri Slaby <jirislaby@...nel.org>,
        Kevin Hilman <khilman@...libre.com>
Cc:     linux-kernel@...r.kernel.org, linux-serial@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org,
        linux-amlogic@...ts.infradead.org
Subject: Re: [PATCH v2] Revert "tty: serial: meson: Add a earlycon for the T7
 SoC"

On 27-08-2023 11:23, Neil Armstrong wrote:
> Hi Lucas,
> 
> Le 27/08/2023 à 12:04, Lucas Tanure a écrit :
>> On 27-08-2023 10:48, Neil Armstrong wrote:
>>> Hi Lucas,
>>>
>>> Le 27/08/2023 à 10:29, Lucas Tanure a écrit :
>>>> This reverts commit 6a4197f9763325043abf7690a21124a9facbf52e.
>>>> New SoC will use ttyS0 instead of ttyAML, so T7 SoC doesn't need a 
>>>> OF_EARLYCON_DECLARE.
>>>>
>>>> Signed-off-by: Lucas Tanure <tanure@...ux.com>
>>>> ---
>>>> Since V1:
>>>> - add Signed-off-by:
>>>>
>>>>   drivers/tty/serial/meson_uart.c | 2 --
>>>>   1 file changed, 2 deletions(-)
>>>>
>>>> diff --git a/drivers/tty/serial/meson_uart.c 
>>>> b/drivers/tty/serial/meson_uart.c
>>>> index c4f61d82fb727..790d910dafa5d 100644
>>>> --- a/drivers/tty/serial/meson_uart.c
>>>> +++ b/drivers/tty/serial/meson_uart.c
>>>> @@ -648,8 +648,6 @@ meson_serial_early_console_setup(struct 
>>>> earlycon_device *device, const char *opt
>>>>   OF_EARLYCON_DECLARE(meson, "amlogic,meson-ao-uart",
>>>>               meson_serial_early_console_setup);
>>>> -OF_EARLYCON_DECLARE(meson, "amlogic,t7-uart",
>>>> -            meson_serial_early_console_setup);
>>>>   #define MESON_SERIAL_CONSOLE_PTR(_devname) 
>>>> (&meson_serial_console_##_devname)
>>>>   #else
>>>
>>> How do you use earlycon with this removed ?
>>>
>>> Neil
>> This is my kernel cmdline:
>> console=ttyS0,921600 no_console_suspend earlycon=ttyS0,0xfe078000
>>
>> And I can see my log:
>> boot 64bit kernel
>> [    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd092]
>> [    0.000000] Linux version 6.5.0-rc7-next-20230825+ (tanureal@...en) 
>> (aarch64-none-linux-gnu-gcc (GNU Toolchain for the A-profile 
>> Architecture 10.3-2021.07 (arm-10.29)) 10.3.1 20210621, GNU ld (GNU 
>> Toolchain fo3
>> [    0.000000] KASLR disabled due to lack of seed
>> [    0.000000] Machine model: Khadas vim4
>> [    0.000000] OF: reserved mem: 
>> 0x0000000005000000..0x00000000052fffff (3072 KiB) nomap non-reusable 
>> secmon@...0000
>> [    0.000000] OF: reserved mem: 
>> 0x0000000005300000..0x00000000072fffff (32768 KiB) nomap non-reusable 
>> secmon@...0000
>> ...
>> [    0.079368] io scheduler mq-deadline registered
>> [    0.079374] io scheduler kyber registered
>> [    0.079549] io scheduler bfq registered
>> [    0.083373] fe078000.serial: ttyS0 at MMIO 0xfe078000 (irq = 14, 
>> base_baud = 1500000) is a meson_uart
>> [    0.083403] printk: console [ttyS0] enabled
>>
>> As the log is OK, and T7 for now is binding against S4 code we should 
>> drop this patch and add a S4 one if needed.
>>
>> But just having this log is not enough for testing earlycon?
>> I am assuming that by just having the log since 0.0000 is a good sign 
>> that earlycon is working.
>> Could you give further guidance?
> 
> First the kernel argument is simply "earlycon" with no other options,
> the earlycon code will fetch the first uart using the DT 
> /chosen/stdout-path property.
> 
> Then you should see something like right after "Machine model":
> [    0.000000] earlycon: meson0 at MMIO 0x00000000ff803000 (options 
> '115200n8')
> 
> The boot log you share doesn't use earlycon, it waits until all 
> depedency of the UART
> has been probed before probing the UART driver and prints the whole boot 
> log.
> 
> Earlycon is a mechanism to use the UART HW as configured by the 
> bootloader in
> a minimal way very early in the boot in order to detect very early lockups.
> 
> Keeping OF_EARLYCON_DECLARE for t7 would enable this.
> 
> Neil
> 
>>
>> Lucas Tanure
>>
> 
But then we would need to add Earlycon for S4 too.
How can we add one Earlycon for all future SoCs, like S4 and T7?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ