From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Date: Thu, 08 Jan 2015 08:49:54 +0000 Subject: [U-Boot] [PATCH 2/2] sunxi: Enable pre-console buffer In-Reply-To: <1420700552-17474-2-git-send-email-siarhei.siamashka@gmail.com> References: <1420700552-17474-1-git-send-email-siarhei.siamashka@gmail.com> <1420700552-17474-2-git-send-email-siarhei.siamashka@gmail.com> Message-ID: <1420706994.11796.58.camel@hellion.org.uk> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 > --- > 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 > > +/* 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.