All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Campbell <ijc@hellion.org.uk>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/2] sunxi: Enable pre-console buffer
Date: Thu, 08 Jan 2015 08:49:54 +0000	[thread overview]
Message-ID: <1420706994.11796.58.camel@hellion.org.uk> (raw)
In-Reply-To: <1420700552-17474-2-git-send-email-siarhei.siamashka@gmail.com>

On Thu, 2015-01-08 at 09:02 +0200, Siarhei Siamashka wrote:
> This allows to always have a complete log on the VGA/HDMI/LCD console.
> 
> Signed-off-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
> ---
>  include/configs/sunxi-common.h | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
> index b4324ee..5ddcc42 100644
> --- a/include/configs/sunxi-common.h
> +++ b/include/configs/sunxi-common.h
> @@ -272,10 +272,15 @@
>  #ifndef CONFIG_SPL_BUILD
>  #include <config_distro_defaults.h>
>  
> +/* Enable pre-console buffer to get complete log on the VGA console */
> +#define CONFIG_PRE_CONSOLE_BUFFER
> +#define CONFIG_PRE_CON_BUF_SZ		(1024 * 1024)
> +#define CONFIG_PRE_CON_BUF_ADDR		(0x43000000 - CONFIG_PRE_CON_BUF_SZ)
> +
>  /*
>   * 240M RAM (256M minimum minus space for the framebuffer),
> - * 32M uncompressed kernel, 16M compressed kernel, 1M fdt,
> - * 1M script, 1M pxe and the ramdisk at the end.
> + * 32M uncompressed kernel, 15M compressed kernel, 1M pre-console
> + * buffer, 1M fdt, 1M script, 1M pxe and the ramdisk at the end.

Am I correct in thinking that the pre-console buffer is long gone
(replaced by the actual console) by the time any of these mem layout
choices come into play (i.e. long before anything might load a kernel,
initrd or fdt)?

If yes then I think it is confusing to modify this comment, and the
comment before the pre-console #defines should mention that the buffer
is boottime only/short lived etc.

If no then I'm not sure putting a "u-boot managed" buffer in the middle
of the "user managed" load space is a good idea, since it could lead to
odd/hard to debug corruptions etc if the kernel was >15M.

Either way I think it would be better to put this buffer somewhere else
entirely since it isn't really the same as these things.

>   */
>  #define MEM_LAYOUT_ENV_SETTINGS \
>  	"bootm_size=0xf000000\0" \

Both u-boot-sunxi#master and #next still have 0x10000000 here, which
tree is this patch on? Some branch of Hans' tree (with "sunxi:
sunxi-common.h: Reduce bootm_size to take the framebuffer into account"
in it) I suppose?

Perhaps a better place for the pre-console buffer would be right before
the framebuffer (or at the top of RAM if no video on the board), with
modifications to bootm_size or not depending on the answer to the
original question above.

Ian.

  reply	other threads:[~2015-01-08  8:49 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-08  7:02 [U-Boot] [PATCH 1/2] console: Use pre-console buffer to get complete log on all consoles Siarhei Siamashka
2015-01-08  7:02 ` [U-Boot] [PATCH 2/2] sunxi: Enable pre-console buffer Siarhei Siamashka
2015-01-08  8:49   ` Ian Campbell [this message]
2015-01-09 11:13     ` Siarhei Siamashka
2015-01-10 10:50       ` Ian Campbell
2015-01-10 15:24         ` Simon Glass
2015-01-11 23:28           ` Siarhei Siamashka
2015-01-12  2:04             ` Simon Glass
2015-01-13  1:17               ` Simon Glass
2015-01-11 23:16         ` Siarhei Siamashka
2015-01-12 10:50         ` Hans de Goede
2015-01-12 11:05 ` [U-Boot] [U-Boot, 1/2] console: Use pre-console buffer to get complete log on all consoles Hans de Goede
2015-01-12 13:30   ` Tom Rini
2015-01-12 15:45     ` Hans de Goede
2015-01-13 10:59   ` Hans de Goede
2015-01-13 12:36     ` Siarhei Siamashka

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=1420706994.11796.58.camel@hellion.org.uk \
    --to=ijc@hellion.org.uk \
    --cc=u-boot@lists.denx.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 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.