[U-Boot] [PATCH V5] console: Implement pre-console buffer

Simon Glass sjg at chromium.org
Tue Oct 4 07:30:41 CEST 2011


Hi Graeme,

On Wed, Sep 21, 2011 at 4:18 PM, Simon Glass <sjg at chromium.org> wrote:

> Hi Graeme,
>
> On Thu, Sep 1, 2011 at 3:52 AM, Graeme Russ <graeme.russ at gmail.com> wrote:
> > Allow redirection of console output prior to console initialisation to a
> > temporary buffer.
> >
> > To enable this functionality, the board (or arch) must define:
> >  - CONFIG_PRE_CONSOLE_BUFFER - Enable pre-console buffer
> >  - CONFIG_PRE_CON_BUF_ADDR - Base address of pre-console buffer
> >  - CONFIG_PRE_CON_BUF_SZ - Size of pre-console buffer (in bytes)
> >
> > The pre-console buffer will buffer the last CONFIG_PRE_CON_BUF_SZ bytes
> > Any earlier characters are silently dropped.
> >
> > Signed-off-by: Graeme Russ <graeme.russ at gmail.com>
>
> I tested this on a Tegra2 Seaboard.
>
> Tested-by: Simon Glass <sjg at chromium.org>
>

Further to this, I pushed it a little further and managed to get early
console output from the AVP (an ARM7) before the Cortex-A9s are fired up on
a Tegra20/30. That's pretty early!

This is a great patch and very useful for early bring-up I think. I hope it
will be merged this window. Any other comments?

Regards,
Simon


>
> Regards,
> Simon
>
> > ---
> > Grrrr - Repost of V5 with an SoB. There has to be a better way of
> > automating patch updates ;)
> >
> > Changes since V4
> >  - Fixed typo in README
> >  - Made *pre_console* functions in console.c static
> >  - Slight tweak to commit message - Some may choose to set the
> >   configuration defines at the arch level
> >
> > Changes since V3
> >  - Fixed  blank subject caused by gap between the Cc: list and Date:
> >
> > Changes since V2
> >  - Cast buffer size to unsigned long to help compilers produce tighter
> >   code
> >  - Use inline stub functions to reduce #ifdef clutter
> >  - Add documentation to README
> >
> > Changes Since V1
> >  - Implemented circular buffer
> >  - Trivial code styl corrections
> >
> > ---
> >  README                                    |   14 +++++++++
> >  arch/arm/include/asm/global_data.h        |    3 ++
> >  arch/avr32/include/asm/global_data.h      |    3 ++
> >  arch/blackfin/include/asm/global_data.h   |    3 ++
> >  arch/m68k/include/asm/global_data.h       |    3 ++
> >  arch/microblaze/include/asm/global_data.h |    3 ++
> >  arch/mips/include/asm/global_data.h       |    3 ++
> >  arch/nios2/include/asm/global_data.h      |    3 ++
> >  arch/powerpc/include/asm/global_data.h    |    3 ++
> >  arch/sh/include/asm/global_data.h         |    3 ++
> >  arch/sparc/include/asm/global_data.h      |    3 ++
> >  arch/x86/include/asm/global_data.h        |    3 ++
> >  common/console.c                          |   43
> +++++++++++++++++++++++++++-
> >  13 files changed, 88 insertions(+), 2 deletions(-)
> >
> > diff --git a/README b/README
> > index 0886987..cf6c01f 100644
> [snip]
>


More information about the U-Boot mailing list