From: Tom Rini <trini@konsulko.com>
To: "Pali Rohár" <pali@kernel.org>,
"Heinrich Schuchardt" <xypron.glpk@gmx.de>
Cc: Simon Glass <sjg@chromium.org>, u-boot@lists.denx.de
Subject: Re: [PATCH v3 0/6] console: Implement flush() function
Date: Wed, 21 Sep 2022 09:56:01 -0400 [thread overview]
Message-ID: <20220921135601.GS3044094@bill-the-cat> (raw)
In-Reply-To: <20220921135413.lz6wzjrgabns5p7d@pali>
[-- Attachment #1: Type: text/plain, Size: 2631 bytes --]
On Wed, Sep 21, 2022 at 03:54:13PM +0200, Pali Rohár wrote:
> On Wednesday 21 September 2022 09:49:24 Tom Rini wrote:
> > On Mon, Sep 05, 2022 at 11:31:15AM +0200, Pali Rohár wrote:
> >
> > > On certain places it is required to flush output print buffers to ensure
> > > that text strings were sent to console or serial devices. For example when
> > > printing message that U-Boot is going to boot kernel or when U-Boot is
> > > going to change baudrate of terminal device.
> > >
> > > Some console devices, like UART, have putc/puts functions which just put
> > > characters into HW transmit queue and do not wait until all data are
> > > transmitted. Doing some sensitive operations (like changing baudrate or
> > > starting kernel which resets UART HW) cause that U-Boot messages are lost.
> > >
> > > Therefore introduce a new flush() function, implement it for all serial
> > > devices via pending(false) callback and use this new flush() function on
> > > sensitive places after which output device may go into reset state.
> > >
> > > This change fixes printing of U-Boot messages:
> > > "## Starting application at ..."
> > > "## Switch baudrate to ..."
> > >
> > > Changes in v3:
> > > * add macro STDIO_DEV_ASSIGN_FLUSH()
> > > * fix commit messages
> > > * remove changes from serial.c
> > >
> > > Changes in v2:
> > > * split one big patch into smaller 6 patches
> > > * add config option to allow disabling this new function
> > >
> > > Pali Rohár (6):
> > > sandbox: Add function os_flush()
> > > console: Implement flush() function
> > > serial: Implement flush callback
> > > serial: Implement serial_flush() function for console flush() fallback
> > > serial: Call flush() before changing baudrate
> > > boot: Call flush() before booting
> >
> > Including the change you suggested to 4/6 to fix that build issue,
> > there's at least one more large issue that prevents CI from getting too
> > far:
> > https://source.denx.de/u-boot/u-boot/-/pipelines/13534
> > and they all have a failure similar to:
> > https://source.denx.de/u-boot/u-boot/-/jobs/500794#L51
>
> It looks like that some efi stuff overloads u-boot functions, in this
> case newly added flush() function.
>
> Any idea how to handle this issue?
>
> The only option which I see how to address it is to revert those changes
> in source files which always calls flush() function and replace them by
> my first attempt which use guard #ifdef to ensure that flush() call is
> completely eliminated at preprocessor stage when efi is enabled.
Adding in Heinrich.
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
next prev parent reply other threads:[~2022-09-21 13:56 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-05 9:31 [PATCH v3 0/6] console: Implement flush() function Pali Rohár
2022-09-05 9:31 ` [PATCH v3 1/6] sandbox: Add function os_flush() Pali Rohár
2022-09-07 21:10 ` Simon Glass
2022-09-24 18:00 ` Tom Rini
2022-09-05 9:31 ` [PATCH v3 2/6] console: Implement flush() function Pali Rohár
2022-09-07 21:11 ` Simon Glass
2022-09-05 9:31 ` [PATCH v3 3/6] serial: Implement flush callback Pali Rohár
2022-09-05 17:24 ` Michael Nazzareno Trimarchi
2022-09-05 17:28 ` Pali Rohár
2022-09-07 21:11 ` Simon Glass
2022-09-05 9:31 ` [PATCH v3 4/6] serial: Implement serial_flush() function for console flush() fallback Pali Rohár
2022-09-07 21:10 ` Simon Glass
2022-09-20 21:40 ` Tom Rini
2022-09-20 22:18 ` Pali Rohár
2022-09-20 22:29 ` Tom Rini
2022-09-20 22:32 ` Pali Rohár
2022-09-20 22:46 ` Tom Rini
2022-09-05 9:31 ` [PATCH v3 5/6] serial: Call flush() before changing baudrate Pali Rohár
2022-09-07 21:10 ` Simon Glass
2022-09-05 9:31 ` [PATCH v3 6/6] boot: Call flush() before booting Pali Rohár
2022-09-07 21:10 ` Simon Glass
2022-09-07 21:14 ` Pali Rohár
2022-09-21 13:49 ` [PATCH v3 0/6] console: Implement flush() function Tom Rini
2022-09-21 13:54 ` Pali Rohár
2022-09-21 13:56 ` Tom Rini [this message]
2022-09-22 11:27 ` Simon Glass
2022-09-22 13:13 ` Heinrich Schuchardt
2022-09-22 13:14 ` Pali Rohár
2022-09-22 15:06 ` Heinrich Schuchardt
2022-09-23 15:45 ` Pali Rohár
2022-09-23 15:57 ` Tom Rini
2022-09-23 16:07 ` Pali Rohár
2022-09-23 16:19 ` Tom Rini
2022-09-24 14:01 ` Simon Glass
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=20220921135601.GS3044094@bill-the-cat \
--to=trini@konsulko.com \
--cc=pali@kernel.org \
--cc=sjg@chromium.org \
--cc=u-boot@lists.denx.de \
--cc=xypron.glpk@gmx.de \
/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