rockchip: Improve ARMv7 support for ROCKCHIP_COMMON_STACK_ADDR

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>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
This commit is contained in:
Jonas Karlman 2025-02-20 21:56:57 +00:00 committed by Kever Yang
parent 74ca9ea564
commit 1330cd51c5

View File

@ -639,40 +639,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 || \
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