From: Heiko Stübner <heiko@sntech.de>
To: opensbi@lists.infradead.org
Subject: console putchar/getchar ecalls and sbi v02
Date: Wed, 01 Jun 2022 16:55:33 +0200 [thread overview]
Message-ID: <1848033.eGJsNajkDb@diego> (raw)
In-Reply-To: <CAK9=C2XRBgtb--K8o7geFxWjvza6ztNX-oMObwVnsUYz28+0+Q@mail.gmail.com>
Hi Anup,
Am Mittwoch, 1. Juni 2022, 16:46:17 CEST schrieb Anup Patel:
> Hi Heiko,
>
> On Wed, Jun 1, 2022 at 8:00 PM Heiko St?bner <heiko@sntech.de> wrote:
> >
> > Hi,
> >
> > I just stumbled across the issue that the console_putchar and _getchar
> > ecalls are only part of the v0.1 specification and the spec states that
> > they "are expected to be deprecated; they have no replacement."
> >
> > As I was using that for their earlycon functionality for a bit and haven't
> > found the reasoning behind the deprecation so far, I guess I'm curious
> > why it is going away :-) .
> >
> > The commit adding the spec-note [0] also gives no explanation for it
> > and Google also wasn't helpful.
> >
> > Any hints?
>
> Almost all SBI v0.1 calls have been replaced by SBI v0.2 extensions,
> except console_putchar() and _getchar() calls.
>
> The console_putchar() was certainly quite useful for early prints but
> since it is going to be deprecated, we need something equivalent or
> better in the SBI spec.
>
> I do have a draft "SBI debug console" proposal which is based on
> shared memory and replaces the SBI v0.1 console_putchar(). I will
> send-out this proposal soon.
Hmm, that sounds great for the earlycon-portion, but could you maybe
also think about a really simple putchar option like the current one?
Background is that the current putchar works in all conditions, so even
in the earliest kernel startup code I could manually put in a
sbi_console_putchar() call to track down where a hang was.
That even worked in the early startup assembly when doing the ecall
manually.
This is extremely helpful when you are on "consumer-grade"
hardware were other debug options are somewhat limited.
Thanks
Heiko
> >
> >
> > Thanks
> > Heiko
> >
> >
> >
> > [0] https://github.com/riscv-non-isa/riscv-sbi-doc/commit/705e9556d25dc070926b99f8ccbcdc5073407447
> >
> >
>
next prev parent reply other threads:[~2022-06-01 14:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-01 14:30 console putchar/getchar ecalls and sbi v02 Heiko Stübner
2022-06-01 14:46 ` Anup Patel
2022-06-01 14:55 ` Heiko Stübner [this message]
2022-06-01 15:21 ` Anup Patel
2022-06-01 15:45 ` Jan Remeš
2022-06-01 16:10 ` Anup Patel
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=1848033.eGJsNajkDb@diego \
--to=heiko@sntech.de \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox