public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: "Jernej Škrabec" <jernej.skrabec@gmail.com>
To: Jagan Teki <jagan@amarulasolutions.com>,
	Andre Przywara <andre.przywara@arm.com>
Cc: Icenowy Zheng <uwu@icenowy.me>,
	Jesse Taube <mr.bossman075@gmail.com>, Yifan Gu <me@yifangu.com>,
	Giulio Benetti <giulio.benetti@benettiengineering.com>,
	George Hilliard <thirtythreeforty@gmail.com>,
	Samuel Holland <samuel@sholland.org>,
	u-boot@lists.denx.de, linux-sunxi@lists.linux.dev
Subject: Re: [PATCH 2/6] sunxi: fix 32MB load address layout
Date: Wed, 12 Oct 2022 23:37:19 +0200	[thread overview]
Message-ID: <2387534.jE0xQCEvom@kista> (raw)
In-Reply-To: <20221012163458.1968900-3-andre.przywara@arm.com>

Hi Andre,

Dne sreda, 12. oktober 2022 ob 18:34:54 CEST je Andre Przywara napisal(a):
> The default load addresses for the various payloads (kernel, DT,
> ramdisk) on systems with just 32MB of DRAM have some issues:
> For a start the preceding comment doesn't match the actual values:
> apparently they were copied from the 64MB S3 layout, then halved, but
> since 0x5 is NOT the half of 0x10, they don't match up.
> Also those projected maximum sizes are quite restrictive: it's not easy
> to build a compressed kernel image with just 4MB. The only defconfig in
> mainline Linux that supports the F1C100s (the only 32MB user so far)
> creates a 6MB compressed / 15MB uncompressed kernel.
> Rearrange the default load addresses to accommodate such a kernel: we
> allow an 7MB/16MB kernel, and up to 5MB of ramdisk, stuffing the smaller
> binaries like the DTB towards the end, just before the relocated U-Boot.
> Shrink the size for DTB and scripts on the way, there is no need for
> allowing up to 512K for them.
> 
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> ---
>  include/configs/sunxi-common.h | 18 +++++++++---------
>  1 file changed, 9 insertions(+), 9 deletions(-)
> 
> diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
> index 416a0422861..fe90d55bd45 100644
> --- a/include/configs/sunxi-common.h
> +++ b/include/configs/sunxi-common.h
> @@ -165,17 +165,17 @@
> 
>  #elif (CONFIG_SUNXI_MINIMUM_DRAM_MB >= 32)
>  /*
> - * 32M RAM minus 1MB heap + 8MB for u-boot, stack, fb, etc.
> - * 8M uncompressed kernel, 4M compressed kernel, 512K fdt,
> - * 512K script, 512K pxe and the ramdisk at the end.
> + * 32M RAM minus 2.5MB for u-boot, heap, stack, etc.
> + * 16M uncompressed kernel, 7M compressed kernel, 128K fdt, 64K script,
> + * 128K DT overlay, 128K PXE and the ramdisk in the rest (max. 5MB)

DT overlays and PXE could be even much smaller, but I guess it doesn't make 
much of a difference.

Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>

Best regards,
Jernej

>   */
>  #define BOOTM_SIZE        __stringify(0x1700000)
> -#define KERNEL_ADDR_R     __stringify(SDRAM_OFFSET(0500000))
> -#define FDT_ADDR_R        __stringify(SDRAM_OFFSET(0C00000))
> -#define SCRIPT_ADDR_R     __stringify(SDRAM_OFFSET(0C50000))
> -#define PXEFILE_ADDR_R    __stringify(SDRAM_OFFSET(0D00000))
> -#define FDTOVERLAY_ADDR_R __stringify(SDRAM_OFFSET(0D50000))
> -#define RAMDISK_ADDR_R    __stringify(SDRAM_OFFSET(0D60000))
> +#define KERNEL_ADDR_R     __stringify(SDRAM_OFFSET(1000000))
> +#define FDT_ADDR_R        __stringify(SDRAM_OFFSET(1d50000))
> +#define SCRIPT_ADDR_R     __stringify(SDRAM_OFFSET(1d40000))
> +#define PXEFILE_ADDR_R    __stringify(SDRAM_OFFSET(1d00000))
> +#define FDTOVERLAY_ADDR_R __stringify(SDRAM_OFFSET(1d20000))
> +#define RAMDISK_ADDR_R    __stringify(SDRAM_OFFSET(1800000))
> 
>  #else
>  #error Need at least 32MB of DRAM. Please adjust load addresses.
> --
> 2.25.1



  reply	other threads:[~2022-10-12 21:37 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-12 16:34 [PATCH 0/6] sunxi: improve F1C200s support Andre Przywara
2022-10-12 16:34 ` [PATCH 1/6] sunxi: Kconfig: introduce SUNXI_MINIMUM_DRAM_MB Andre Przywara
2022-10-12 21:33   ` Jernej Škrabec
2022-10-12 16:34 ` [PATCH 2/6] sunxi: fix 32MB load address layout Andre Przywara
2022-10-12 21:37   ` Jernej Škrabec [this message]
2022-10-12 16:34 ` [PATCH 3/6] sunxi: f1c100: move SKIP_LOWLEVEL_INIT_ONLY into Kconfig Andre Przywara
2022-10-12 21:38   ` Jernej Škrabec
2022-10-13  8:51   ` Icenowy Zheng
2022-10-12 16:34 ` [PATCH 4/6] sunxi: f1c100: add UART1 support Andre Przywara
2022-10-12 21:42   ` Jernej Škrabec
2022-10-18  9:23     ` Andre Przywara
2022-10-19  3:55       ` Jernej Škrabec
2022-10-12 16:34 ` [PATCH 5/6] sunxi: f1c100: dtsi: add UART1 pins Andre Przywara
2022-10-12 21:43   ` Jernej Škrabec
2022-10-12 16:34 ` [PATCH 6/6] sunxi: add CherryPi-F1C200s support Andre Przywara
2022-10-13  8:33   ` Clément Péron
2022-10-13  9:53     ` Andre Przywara
2022-10-14  5:04       ` Jesse Taube
2022-10-18 14:01         ` Andre Przywara
2022-10-20 15:52           ` Giulio Benetti

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=2387534.jE0xQCEvom@kista \
    --to=jernej.skrabec@gmail.com \
    --cc=andre.przywara@arm.com \
    --cc=giulio.benetti@benettiengineering.com \
    --cc=jagan@amarulasolutions.com \
    --cc=linux-sunxi@lists.linux.dev \
    --cc=me@yifangu.com \
    --cc=mr.bossman075@gmail.com \
    --cc=samuel@sholland.org \
    --cc=thirtythreeforty@gmail.com \
    --cc=u-boot@lists.denx.de \
    --cc=uwu@icenowy.me \
    /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