
Hi Tom
In uboot 2022.01 we had tpl max size for px30 to 10240 but now after some conversion I can see TPL_MAX_SIZE 0x20000 for the same CPU. Now I think that internal memory is 16Kb for this cpu. Do you have any explanation?
Michael

On Fri, Sep 23, 2022 at 07:10:03PM +0200, Michael Nazzareno Trimarchi wrote:
Hi Tom
In uboot 2022.01 we had tpl max size for px30 to 10240 but now after some conversion I can see TPL_MAX_SIZE 0x20000 for the same CPU. Now I think that internal memory is 16Kb for this cpu. Do you have any explanation?
Yes. So, the commit is ca8a329a1b7f ("Convert CONFIG_SPL_PAD_TO et al to Kconfig"). What likely happened is the logic to ensure that we got the right value calculated in the end on PowerPC (where TPL is after SPL) meant that on these platforms (where TPL is before SPL), we have the correct default in Kconfig, but then the defconfigs override it.

Hi
On Fri, Sep 23, 2022 at 7:23 PM Tom Rini trini@konsulko.com wrote:
On Fri, Sep 23, 2022 at 07:10:03PM +0200, Michael Nazzareno Trimarchi wrote:
Hi Tom
In uboot 2022.01 we had tpl max size for px30 to 10240 but now after some conversion I can see TPL_MAX_SIZE 0x20000 for the same CPU. Now I think that internal memory is 16Kb for this cpu. Do you have any explanation?
Yes. So, the commit is ca8a329a1b7f ("Convert CONFIG_SPL_PAD_TO et al to Kconfig"). What likely happened is the logic to ensure that we got the right value calculated in the end on PowerPC (where TPL is after SPL) meant that on these platforms (where TPL is before SPL), we have the correct default in Kconfig, but then the defconfigs override it.
Yes I have
config TPL_MAX_SIZE - int "Maximum size (in bytes) for the TPL stage" - default 0 - depends on TPL + hex "Maximum size (in bytes) for the TPL stage" + default 0x2e000 if ROCKCHIP_RK3399 + default 0x8000 if ROCKCHIP_RK3288 + default 0x7000 if ROCKCHIP_RK322X || ROCKCHIP_RK3328 || ROCKCHIP_RK3368 + default 0x2800 if ROCKCHIP_PX30 + default 0x0
but then
+++ b/configs/evb-px30_defconfig @@ -28,12 +28,15 @@ CONFIG_DEFAULT_FDT_FILE="rockchip/px30-evb.dtb" # CONFIG_DISPLAY_CPUINFO is not set CONFIG_DISPLAY_BOARDINFO_LATE=y CONFIG_MISC_INIT_R=y +CONFIG_SPL_MAX_SIZE=0x20000 +CONFIG_SPL_PAD_TO=0x7f8000 CONFIG_SPL_BOOTROM_SUPPORT=y # CONFIG_SPL_RAW_IMAGE_SUPPORT is not set CONFIG_SPL_STACK_R=y # CONFIG_TPL_BANNER_PRINT is not set CONFIG_SPL_ATF=y # CONFIG_TPL_FRAMEWORK is not set +CONFIG_TPL_MAX_SIZE=0x20000
I point out this value here.
-- Tom

On Fri, Sep 23, 2022 at 07:32:47PM +0200, Michael Nazzareno Trimarchi wrote:
Hi
On Fri, Sep 23, 2022 at 7:23 PM Tom Rini trini@konsulko.com wrote:
On Fri, Sep 23, 2022 at 07:10:03PM +0200, Michael Nazzareno Trimarchi wrote:
Hi Tom
In uboot 2022.01 we had tpl max size for px30 to 10240 but now after some conversion I can see TPL_MAX_SIZE 0x20000 for the same CPU. Now I think that internal memory is 16Kb for this cpu. Do you have any explanation?
Yes. So, the commit is ca8a329a1b7f ("Convert CONFIG_SPL_PAD_TO et al to Kconfig"). What likely happened is the logic to ensure that we got the right value calculated in the end on PowerPC (where TPL is after SPL) meant that on these platforms (where TPL is before SPL), we have the correct default in Kconfig, but then the defconfigs override it.
Yes I have
config TPL_MAX_SIZE
int "Maximum size (in bytes) for the TPL stage"
default 0
depends on TPL
hex "Maximum size (in bytes) for the TPL stage"
default 0x2e000 if ROCKCHIP_RK3399
default 0x8000 if ROCKCHIP_RK3288
default 0x7000 if ROCKCHIP_RK322X || ROCKCHIP_RK3328 || ROCKCHIP_RK3368
default 0x2800 if ROCKCHIP_PX30
default 0x0
but then
+++ b/configs/evb-px30_defconfig @@ -28,12 +28,15 @@ CONFIG_DEFAULT_FDT_FILE="rockchip/px30-evb.dtb" # CONFIG_DISPLAY_CPUINFO is not set CONFIG_DISPLAY_BOARDINFO_LATE=y CONFIG_MISC_INIT_R=y +CONFIG_SPL_MAX_SIZE=0x20000 +CONFIG_SPL_PAD_TO=0x7f8000 CONFIG_SPL_BOOTROM_SUPPORT=y # CONFIG_SPL_RAW_IMAGE_SUPPORT is not set CONFIG_SPL_STACK_R=y # CONFIG_TPL_BANNER_PRINT is not set CONFIG_SPL_ATF=y # CONFIG_TPL_FRAMEWORK is not set +CONFIG_TPL_MAX_SIZE=0x20000
I point out this value here.
Yes, the defconfig files are overriding the default values because of the conversion issue I noted. Which is why I'm glad all of the SPL/TPL symbols have been migrated finally as these were the most error prone ones to do.
participants (2)
-
Michael Nazzareno Trimarchi
-
Tom Rini