All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Jones <ajones@ventanamicro.com>
To: opensbi@lists.infradead.org
Subject: [PATCH 0/4] Initialize the console as early as possible
Date: Fri, 21 Jun 2024 16:02:50 +0200	[thread overview]
Message-ID: <20240621-334f59a4e3446a62fefecdbf@orel> (raw)
In-Reply-To: <CAAhSdy3b8-wzwPobWeLASX5jE77GWixYVhiOt7+NQ_kYtsHzYQ@mail.gmail.com>

On Fri, Jun 21, 2024 at 05:37:07PM GMT, Anup Patel wrote:
> On Thu, Jun 6, 2024 at 2:47?PM Xiang W <wxjstz@126.com> wrote:
> >
> > Initializing the console as early as possible can output more useful
> > information. This series of patches is used to initialize the console
> > as early as possible.
> >
> > This series of patches is based on a previous patch
> > http://lists.infradead.org/pipermail/opensbi/2024-May/006960.html
> >
> > Xiang W (4):
> >   include: sbi_utils: fixup fdt_get_address
> >   lib: sbi: Add domains_init to sbi_console_device
> >   lib: utils/serial: add domains_init for 8250
> >   lib: sbi: Initialize the console as early as possible
> 
> The problem with this series is that it is changing the order
> of platform callback in coldboot path because sbi_scratch_init,
> sbi_heap_init, and sbi_domain_init should always be the
> first things done in the coldboot path.
> 
> Instead, I suggest the following:
> 1) Update generic platform to call generic_console_init()
>      from generic_early_init() in coldboot path and don't
>      provide the console_init() callback.
> 2) Update all other platform to do similar thing as #1
> 3) Drop sbi_console_init(), sbi_platform_console_init() and
>     console_init() callback.
> 
> For prints before sbi_platform_early_init(), the sbi_console.c
> can implement a small circular buffer which is flushed whenever
> some driver sets a console device.

Almost two years ago I wrote an SBI console ring buffer patch. I never
polished and posted it, but I could maybe dig it back up.

Thanks,
drew

> 
> >
> >  include/sbi/sbi_console.h           |  3 +++
> >  include/sbi_utils/fdt/fdt_helper.h  |  4 +++-
> >  include/sbi_utils/serial/uart8250.h |  1 +
> >  lib/sbi/sbi_domain.c                | 10 ++++++++++
> >  lib/sbi/sbi_init.c                  |  8 ++++----
> >  lib/utils/serial/uart8250.c         | 28 +++++++++++++++++++---------
> >  6 files changed, 40 insertions(+), 14 deletions(-)
> >
> > --
> > 2.43.0
> >
> 
> Regards,
> Anup
> 
> -- 
> opensbi mailing list
> opensbi at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/opensbi


  reply	other threads:[~2024-06-21 14:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-06  9:17 [PATCH 0/4] Initialize the console as early as possible Xiang W
2024-06-06  9:17 ` [PATCH 1/4] include: sbi_utils: fixup fdt_get_address Xiang W
2024-06-06  9:17 ` [PATCH 2/4] lib: sbi: Add domains_init to sbi_console_device Xiang W
2024-06-06  9:17 ` [PATCH 3/4] lib: utils/serial: add domains_init for 8250 Xiang W
2024-06-06  9:17 ` [PATCH 4/4] lib: sbi: Initialize the console as early as possible Xiang W
2024-06-21 12:07 ` [PATCH 0/4] " Anup Patel
2024-06-21 14:02   ` Andrew Jones [this message]
2024-06-21 14:55     ` Xiang W
2024-06-21 14:52   ` Xiang W

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240621-334f59a4e3446a62fefecdbf@orel \
    --to=ajones@ventanamicro.com \
    --cc=opensbi@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.