From: Alex Bee <knaerzche@gmail.com>
To: Jonas Karlman <jonas@kwiboo.se>,
Kever Yang <kever.yang@rock-chips.com>,
Simon Glass <sjg@chromium.org>,
Philipp Tomsich <philipp.tomsich@vrull.eu>,
Tom Rini <trini@konsulko.com>
Cc: u-boot@lists.denx.de
Subject: Re: [PATCH 2/5] rockchip: Improve ARMv7 support for ROCKCHIP_COMMON_STACK_ADDR
Date: Mon, 27 Jan 2025 19:59:31 +0100 [thread overview]
Message-ID: <4e6629cf-9685-4b91-800e-82a9df30d5e3@gmail.com> (raw)
In-Reply-To: <20250126234838.561065-3-jonas@kwiboo.se>
Hi Jonas,
thanks for working on this. Please see one comment below.
Am 27.01.25 um 00:48 schrieb Jonas Karlman:
> A few Rockchip ARMv7 SoCs use 0x60000000 as DRAM base address instead of
> the more common 0x0 DRAM base address used on AArch64 SoCs.
>
> Add default options that should work for these ARMv7 SoCs. Same offsets
> as before are used, just below 64 MiB. Hex values have also been padded
> to improve alignment.
>
> Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
> ---
> arch/arm/mach-rockchip/Kconfig | 35 +++++++++++++++++++++++-----------
> 1 file changed, 24 insertions(+), 11 deletions(-)
>
> diff --git a/arch/arm/mach-rockchip/Kconfig b/arch/arm/mach-rockchip/Kconfig
> index 5aa9e0f1af3b..da20d3233fe3 100644
> --- a/arch/arm/mach-rockchip/Kconfig
> +++ b/arch/arm/mach-rockchip/Kconfig
> @@ -637,40 +637,53 @@ source "arch/arm/mach-rockchip/rv1126/Kconfig"
> if ROCKCHIP_COMMON_STACK_ADDR && SPL_SHARES_INIT_SP_ADDR
>
> config CUSTOM_SYS_INIT_SP_ADDR
> - default 0x3f00000
> + default 0x63f00000 if SPL_TEXT_BASE = 0x60000000
> + default 0x03f00000 if SPL_TEXT_BASE = 0x00000000
>
> config SYS_MALLOC_F_LEN
> - default 0x10000 if CUSTOM_SYS_INIT_SP_ADDR = 0x3f00000
> + default 0x10000 if CUSTOM_SYS_INIT_SP_ADDR = 0x63f00000
> + default 0x10000 if CUSTOM_SYS_INIT_SP_ADDR = 0x03f00000
>
> config SPL_SYS_MALLOC_F_LEN
> - default 0x8000 if CUSTOM_SYS_INIT_SP_ADDR = 0x3f00000
> + default 0x8000 if CUSTOM_SYS_INIT_SP_ADDR = 0x63f00000
> + default 0x8000 if CUSTOM_SYS_INIT_SP_ADDR = 0x03f00000
>
> config TPL_SYS_MALLOC_F_LEN
> - default 0x4000 if CUSTOM_SYS_INIT_SP_ADDR = 0x3f00000
> + default 0x0800 if CUSTOM_SYS_INIT_SP_ADDR = 0x63f00000
> + default 0x4000 if CUSTOM_SYS_INIT_SP_ADDR = 0x03f00000
>
> config TEXT_BASE
> - default 0x00200000 if ARM64
> + default 0x60200000 if SPL_TEXT_BASE = 0x60000000
> + default 0x00200000 if SPL_TEXT_BASE = 0x00000000
>
> config SPL_TEXT_BASE
> - default 0x0 if ARM64
> + default 0x60000000 if ROCKCHIP_RK3036 || ROCKCHIP_RK3066 || \
> + ROCKCHIP_RK3128 || ROCKCHIP_RK3188 || \
I'm not sure if adding RK3036 and RK3188 is correct at this point. Both use
SPL (without TPL) currently for DRAM initialization and thus need their
CFG_IRAM_BASE as SPL_TEXT_BASE.
Regards,
Alex
> + ROCKCHIP_RK322X || ROCKCHIP_RV1108
> + default 0x00000000
>
> config SPL_HAS_BSS_LINKER_SECTION
> default y if ARM64
>
> config SPL_BSS_START_ADDR
> - default 0x3f80000
> + default 0x63f80000 if SPL_TEXT_BASE = 0x60000000
> + default 0x03f80000 if SPL_TEXT_BASE = 0x00000000
>
> config SPL_BSS_MAX_SIZE
> - default 0x8000 if SPL_BSS_START_ADDR = 0x3f80000
> + default 0x8000 if SPL_BSS_START_ADDR = 0x63f80000
> + default 0x8000 if SPL_BSS_START_ADDR = 0x03f80000
>
> config SPL_STACK_R
> - default y if CUSTOM_SYS_INIT_SP_ADDR = 0x3f00000
> + default y if CUSTOM_SYS_INIT_SP_ADDR = 0x63f00000
> + default y if CUSTOM_SYS_INIT_SP_ADDR = 0x03f00000
>
> config SPL_STACK_R_ADDR
> - default 0x3e00000 if CUSTOM_SYS_INIT_SP_ADDR = 0x3f00000
> + default 0x63e00000 if CUSTOM_SYS_INIT_SP_ADDR = 0x63f00000
> + default 0x03e00000 if CUSTOM_SYS_INIT_SP_ADDR = 0x03f00000
>
> config SPL_STACK_R_MALLOC_SIMPLE_LEN
> - default 0x200000 if SPL_STACK_R_ADDR = 0x3e00000
> + default 0x200000 if SPL_STACK_R_ADDR = 0x63e00000
> + default 0x200000 if SPL_STACK_R_ADDR = 0x03e00000
>
> endif
> endif
next prev parent reply other threads:[~2025-01-27 18:59 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-26 23:48 [PATCH 0/5] rockchip: ROCKCHIP_COMMON_STACK_ADDR improvements Jonas Karlman
2025-01-26 23:48 ` [PATCH 1/5] rockchip: Move imply TPL_ROCKCHIP_COMMON_BOARD under SoC Kconfig symbol Jonas Karlman
2025-01-26 23:48 ` [PATCH 2/5] rockchip: Improve ARMv7 support for ROCKCHIP_COMMON_STACK_ADDR Jonas Karlman
2025-01-27 18:59 ` Alex Bee [this message]
2025-01-30 21:41 ` Jonas Karlman
2025-02-05 19:02 ` Alex Bee
2025-02-09 17:59 ` Jonas Karlman
2025-02-05 17:07 ` Quentin Schulz
2025-02-05 18:28 ` Jonas Karlman
2025-01-26 23:48 ` [PATCH 3/5] rockchip: Move imply ROCKCHIP_COMMON_STACK_ADDR under SoC Kconfig symbol Jonas Karlman
2025-01-26 23:48 ` [PATCH 4/5] rockchip: Move imply ROCKCHIP_EXTERNAL_TPL " Jonas Karlman
2025-01-26 23:48 ` [PATCH 5/5] rockchip: Add RK3576 support for ROCKCHIP_COMMON_STACK_ADDR Jonas Karlman
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=4e6629cf-9685-4b91-800e-82a9df30d5e3@gmail.com \
--to=knaerzche@gmail.com \
--cc=jonas@kwiboo.se \
--cc=kever.yang@rock-chips.com \
--cc=philipp.tomsich@vrull.eu \
--cc=sjg@chromium.org \
--cc=trini@konsulko.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox