Re: [U-Boot] rk3288: 32KB SPL size restriction

2017-08-23 Thread Jagan Teki
On Thu, Aug 24, 2017 at 12:33 AM, Jagan Teki  wrote:
> On Thu, Aug 24, 2017 at 12:28 AM, Dr. Philipp Tomsich
>  wrote:
>>
>>> On 23 Aug 2017, at 20:44, Jagan Teki  wrote:
>>>
>>> On Wed, Aug 23, 2017 at 6:22 PM, Dr. Philipp Tomsich
>>>  wrote:

> On 23 Aug 2017, at 13:19, Jagan Teki  wrote:
>
> Hi Philipp,
>
> On Tue, Aug 22, 2017 at 5:41 PM, Dr. Philipp Tomsich
>  wrote:
>>
>>> On 22 Aug 2017, at 14:05, Jagan Teki  wrote:
>>>
>>> Philipp and Kever - Thanks for the response.
>>>
>>> Few comment below.
>>>
>>> On Thu, Aug 17, 2017 at 2:02 PM, Dr. Philipp Tomsich
>>>  wrote:
 Jagan,

> On 17 Aug 2017, at 08:39, Kever Yang  
> wrote:
>
> Hi Jagan,
>
>
> On 08/10/2017 05:07 PM, Jagan Teki wrote:
>> Hi Simon/Philipp or any,
>>
>> I believe rk3288 has 20KB BootRom and 100KB internal SRAM and current
>> u-boot can archive the maximum size of u-boot-spl-dtb.bin which the
>> boot ROM will read is 32KB, do we have any possibility to increase 
>> the
>> SPL size here.
>
> The limitation is decide by the boot rom design, so we are not able
> to change this. Most of Rockchip SoCs have this limitation except 
> RK3399.
>
> Thanks,
> - Kever
>>
>> # ./tools/mkimage -n rk3288 -T rksd -d ./spl/u-boot-spl-dtb.bin 
>> out.img
>> Warning: SPL image is too large (size 0x9000) and will not boot
>> Error: image verification failed
>>
>> I tried to increase the spl_size from spl_infos (on tools/rkcommon.c)
>> but not able to boot.

 I should have read this more carefully (I only parsed the 20KB and
 jumped to the conclusion that your had the error already when crossing
 the 20KB limit—even though 0x8000 bytes where allowed in mkimage)…
>>>
>>> Sorry I really didn't understand the size constraint here, because SPL
>>> can be boot file after ROM handoff. Can't this sit on 100KB of SRAM?
>>
>> The ROM usually has different size constraints for each stage.
>>
>> E.g. for the RK3368 (just been there, done that), the first stage has a
>> 0x7000 byte limit and the next stage (loaded to 0x0 in DRAM) has a
>> much larger limit. Note that the SRAM on the 3368 has a capacity of
>> 0x1 bytes, so the size limit is also quite pronounced.
>
> OK, by looking at your rk3368[1] patch I think the first stage runs
> under 0x7000 is TPL? and next stage(probably SPL) doesn't have limit
> since SPL running here in DDR since DDR initialized DDR in TPL itself.
> this is what the space distributed here?

 Yes, although there is some size limit even for SPL.
 If you are going for a falcon-mode implementation on the 3288, you will
 probably want to use TPL for DRAM setup and maybe clocking up the
 cores (I don’t know the constraints on what clocks the BROM needs
 untouched) and then have SPL w/ falcon mode loaded by the BROM.
>>>
>>> So, TPL should have DDR and MMC, and fit into 0x8000 bytes and SPL
>>> will load from MMC and launch u-boot. Do we need spl_bootrom in TPL
>>> instead of MMC? if so where we need to copy SPL?
>>
>> You probably just want DRAM-init and clocking and have everything else
>> in SPL (for the falcon use-case).  The BROM will magically load the SPL
>> stage for you, so no need for MMC support in TPL.
>
> How does BROM will load SPL here? with
> CONFIG_SPL_ROCKCHIP_BACK_TO_BROM=y ? because I will copy TPL at 64
> sector of MMC card and where should I copy SPL?

OK, TPL_ROCKCHIP_BACK_TO_BROM should have back_to_bootrom So we need
to append the mkimaged-TPL with SPL and copy to 64 so-that ROM loads
SPL by handoff from TPL.

thanks!
-- 
Jagan Teki
Free Software Engineer | www.openedev.com
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] rk3288: 32KB SPL size restriction

2017-08-23 Thread Jagan Teki
On Thu, Aug 24, 2017 at 12:28 AM, Dr. Philipp Tomsich
 wrote:
>
>> On 23 Aug 2017, at 20:44, Jagan Teki  wrote:
>>
>> On Wed, Aug 23, 2017 at 6:22 PM, Dr. Philipp Tomsich
>>  wrote:
>>>
 On 23 Aug 2017, at 13:19, Jagan Teki  wrote:

 Hi Philipp,

 On Tue, Aug 22, 2017 at 5:41 PM, Dr. Philipp Tomsich
  wrote:
>
>> On 22 Aug 2017, at 14:05, Jagan Teki  wrote:
>>
>> Philipp and Kever - Thanks for the response.
>>
>> Few comment below.
>>
>> On Thu, Aug 17, 2017 at 2:02 PM, Dr. Philipp Tomsich
>>  wrote:
>>> Jagan,
>>>
 On 17 Aug 2017, at 08:39, Kever Yang  wrote:

 Hi Jagan,


 On 08/10/2017 05:07 PM, Jagan Teki wrote:
> Hi Simon/Philipp or any,
>
> I believe rk3288 has 20KB BootRom and 100KB internal SRAM and current
> u-boot can archive the maximum size of u-boot-spl-dtb.bin which the
> boot ROM will read is 32KB, do we have any possibility to increase the
> SPL size here.

 The limitation is decide by the boot rom design, so we are not able
 to change this. Most of Rockchip SoCs have this limitation except 
 RK3399.

 Thanks,
 - Kever
>
> # ./tools/mkimage -n rk3288 -T rksd -d ./spl/u-boot-spl-dtb.bin 
> out.img
> Warning: SPL image is too large (size 0x9000) and will not boot
> Error: image verification failed
>
> I tried to increase the spl_size from spl_infos (on tools/rkcommon.c)
> but not able to boot.
>>>
>>> I should have read this more carefully (I only parsed the 20KB and
>>> jumped to the conclusion that your had the error already when crossing
>>> the 20KB limit—even though 0x8000 bytes where allowed in mkimage)…
>>
>> Sorry I really didn't understand the size constraint here, because SPL
>> can be boot file after ROM handoff. Can't this sit on 100KB of SRAM?
>
> The ROM usually has different size constraints for each stage.
>
> E.g. for the RK3368 (just been there, done that), the first stage has a
> 0x7000 byte limit and the next stage (loaded to 0x0 in DRAM) has a
> much larger limit. Note that the SRAM on the 3368 has a capacity of
> 0x1 bytes, so the size limit is also quite pronounced.

 OK, by looking at your rk3368[1] patch I think the first stage runs
 under 0x7000 is TPL? and next stage(probably SPL) doesn't have limit
 since SPL running here in DDR since DDR initialized DDR in TPL itself.
 this is what the space distributed here?
>>>
>>> Yes, although there is some size limit even for SPL.
>>> If you are going for a falcon-mode implementation on the 3288, you will
>>> probably want to use TPL for DRAM setup and maybe clocking up the
>>> cores (I don’t know the constraints on what clocks the BROM needs
>>> untouched) and then have SPL w/ falcon mode loaded by the BROM.
>>
>> So, TPL should have DDR and MMC, and fit into 0x8000 bytes and SPL
>> will load from MMC and launch u-boot. Do we need spl_bootrom in TPL
>> instead of MMC? if so where we need to copy SPL?
>
> You probably just want DRAM-init and clocking and have everything else
> in SPL (for the falcon use-case).  The BROM will magically load the SPL
> stage for you, so no need for MMC support in TPL.

How does BROM will load SPL here? with
CONFIG_SPL_ROCKCHIP_BACK_TO_BROM=y ? because I will copy TPL at 64
sector of MMC card and where should I copy SPL?

thanks!
-- 
Jagan Teki
Free Software Engineer | www.openedev.com
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] rk3288: 32KB SPL size restriction

2017-08-23 Thread Dr. Philipp Tomsich

> On 23 Aug 2017, at 20:44, Jagan Teki  wrote:
> 
> On Wed, Aug 23, 2017 at 6:22 PM, Dr. Philipp Tomsich
>  wrote:
>> 
>>> On 23 Aug 2017, at 13:19, Jagan Teki  wrote:
>>> 
>>> Hi Philipp,
>>> 
>>> On Tue, Aug 22, 2017 at 5:41 PM, Dr. Philipp Tomsich
>>>  wrote:
 
> On 22 Aug 2017, at 14:05, Jagan Teki  wrote:
> 
> Philipp and Kever - Thanks for the response.
> 
> Few comment below.
> 
> On Thu, Aug 17, 2017 at 2:02 PM, Dr. Philipp Tomsich
>  wrote:
>> Jagan,
>> 
>>> On 17 Aug 2017, at 08:39, Kever Yang  wrote:
>>> 
>>> Hi Jagan,
>>> 
>>> 
>>> On 08/10/2017 05:07 PM, Jagan Teki wrote:
 Hi Simon/Philipp or any,
 
 I believe rk3288 has 20KB BootRom and 100KB internal SRAM and current
 u-boot can archive the maximum size of u-boot-spl-dtb.bin which the
 boot ROM will read is 32KB, do we have any possibility to increase the
 SPL size here.
>>> 
>>> The limitation is decide by the boot rom design, so we are not able
>>> to change this. Most of Rockchip SoCs have this limitation except 
>>> RK3399.
>>> 
>>> Thanks,
>>> - Kever
 
 # ./tools/mkimage -n rk3288 -T rksd -d ./spl/u-boot-spl-dtb.bin out.img
 Warning: SPL image is too large (size 0x9000) and will not boot
 Error: image verification failed
 
 I tried to increase the spl_size from spl_infos (on tools/rkcommon.c)
 but not able to boot.
>> 
>> I should have read this more carefully (I only parsed the 20KB and
>> jumped to the conclusion that your had the error already when crossing
>> the 20KB limit—even though 0x8000 bytes where allowed in mkimage)…
> 
> Sorry I really didn't understand the size constraint here, because SPL
> can be boot file after ROM handoff. Can't this sit on 100KB of SRAM?
 
 The ROM usually has different size constraints for each stage.
 
 E.g. for the RK3368 (just been there, done that), the first stage has a
 0x7000 byte limit and the next stage (loaded to 0x0 in DRAM) has a
 much larger limit. Note that the SRAM on the 3368 has a capacity of
 0x1 bytes, so the size limit is also quite pronounced.
>>> 
>>> OK, by looking at your rk3368[1] patch I think the first stage runs
>>> under 0x7000 is TPL? and next stage(probably SPL) doesn't have limit
>>> since SPL running here in DDR since DDR initialized DDR in TPL itself.
>>> this is what the space distributed here?
>> 
>> Yes, although there is some size limit even for SPL.
>> If you are going for a falcon-mode implementation on the 3288, you will
>> probably want to use TPL for DRAM setup and maybe clocking up the
>> cores (I don’t know the constraints on what clocks the BROM needs
>> untouched) and then have SPL w/ falcon mode loaded by the BROM.
> 
> So, TPL should have DDR and MMC, and fit into 0x8000 bytes and SPL
> will load from MMC and launch u-boot. Do we need spl_bootrom in TPL
> instead of MMC? if so where we need to copy SPL?

You probably just want DRAM-init and clocking and have everything else
in SPL (for the falcon use-case).  The BROM will magically load the SPL
stage for you, so no need for MMC support in TPL.

I don’t know the constraints on the RK3288, so I can’t comment on whether
it’s 0x8000 or some other number…

> My understanding is that TPL should have DDR and MMC and create
> mkimage (that anyway fits within 0x8000) and SPL should have all +
> falcon support and copy the SPL in 128KB. So-that TPL will load SPL
> from MMC same way as how SPL loads U-Boot in current code.

In this configuration, the TPL would be rather small and SPL will do
almost all of the heavy lifting.
TPL:DRAM init (and possibly some of the clocking)
SPL:clocks, MMC, falcon-loader

> 
> thanks!
> -- 
> Jagan Teki
> Free Software Engineer | www.openedev.com
> U-Boot, Linux | Upstream Maintainer
> Hyderabad, India.

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] rk3288: 32KB SPL size restriction

2017-08-23 Thread Jagan Teki
On Wed, Aug 23, 2017 at 6:22 PM, Dr. Philipp Tomsich
 wrote:
>
>> On 23 Aug 2017, at 13:19, Jagan Teki  wrote:
>>
>> Hi Philipp,
>>
>> On Tue, Aug 22, 2017 at 5:41 PM, Dr. Philipp Tomsich
>>  wrote:
>>>
 On 22 Aug 2017, at 14:05, Jagan Teki  wrote:

 Philipp and Kever - Thanks for the response.

 Few comment below.

 On Thu, Aug 17, 2017 at 2:02 PM, Dr. Philipp Tomsich
  wrote:
> Jagan,
>
>> On 17 Aug 2017, at 08:39, Kever Yang  wrote:
>>
>> Hi Jagan,
>>
>>
>> On 08/10/2017 05:07 PM, Jagan Teki wrote:
>>> Hi Simon/Philipp or any,
>>>
>>> I believe rk3288 has 20KB BootRom and 100KB internal SRAM and current
>>> u-boot can archive the maximum size of u-boot-spl-dtb.bin which the
>>> boot ROM will read is 32KB, do we have any possibility to increase the
>>> SPL size here.
>>
>> The limitation is decide by the boot rom design, so we are not able
>> to change this. Most of Rockchip SoCs have this limitation except RK3399.
>>
>> Thanks,
>> - Kever
>>>
>>> # ./tools/mkimage -n rk3288 -T rksd -d ./spl/u-boot-spl-dtb.bin out.img
>>> Warning: SPL image is too large (size 0x9000) and will not boot
>>> Error: image verification failed
>>>
>>> I tried to increase the spl_size from spl_infos (on tools/rkcommon.c)
>>> but not able to boot.
>
> I should have read this more carefully (I only parsed the 20KB and
> jumped to the conclusion that your had the error already when crossing
> the 20KB limit—even though 0x8000 bytes where allowed in mkimage)…

 Sorry I really didn't understand the size constraint here, because SPL
 can be boot file after ROM handoff. Can't this sit on 100KB of SRAM?
>>>
>>> The ROM usually has different size constraints for each stage.
>>>
>>> E.g. for the RK3368 (just been there, done that), the first stage has a
>>> 0x7000 byte limit and the next stage (loaded to 0x0 in DRAM) has a
>>> much larger limit. Note that the SRAM on the 3368 has a capacity of
>>> 0x1 bytes, so the size limit is also quite pronounced.
>>
>> OK, by looking at your rk3368[1] patch I think the first stage runs
>> under 0x7000 is TPL? and next stage(probably SPL) doesn't have limit
>> since SPL running here in DDR since DDR initialized DDR in TPL itself.
>> this is what the space distributed here?
>
> Yes, although there is some size limit even for SPL.
> If you are going for a falcon-mode implementation on the 3288, you will
> probably want to use TPL for DRAM setup and maybe clocking up the
> cores (I don’t know the constraints on what clocks the BROM needs
> untouched) and then have SPL w/ falcon mode loaded by the BROM.

So, TPL should have DDR and MMC, and fit into 0x8000 bytes and SPL
will load from MMC and launch u-boot. Do we need spl_bootrom in TPL
instead of MMC? if so where we need to copy SPL?

My understanding is that TPL should have DDR and MMC and create
mkimage (that anyway fits within 0x8000) and SPL should have all +
falcon support and copy the SPL in 128KB. So-that TPL will load SPL
from MMC same way as how SPL loads U-Boot in current code.

thanks!
-- 
Jagan Teki
Free Software Engineer | www.openedev.com
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] rk3288: 32KB SPL size restriction

2017-08-23 Thread Dr. Philipp Tomsich

> On 23 Aug 2017, at 13:19, Jagan Teki  wrote:
> 
> Hi Philipp,
> 
> On Tue, Aug 22, 2017 at 5:41 PM, Dr. Philipp Tomsich
>  wrote:
>> 
>>> On 22 Aug 2017, at 14:05, Jagan Teki  wrote:
>>> 
>>> Philipp and Kever - Thanks for the response.
>>> 
>>> Few comment below.
>>> 
>>> On Thu, Aug 17, 2017 at 2:02 PM, Dr. Philipp Tomsich
>>>  wrote:
 Jagan,
 
> On 17 Aug 2017, at 08:39, Kever Yang  wrote:
> 
> Hi Jagan,
> 
> 
> On 08/10/2017 05:07 PM, Jagan Teki wrote:
>> Hi Simon/Philipp or any,
>> 
>> I believe rk3288 has 20KB BootRom and 100KB internal SRAM and current
>> u-boot can archive the maximum size of u-boot-spl-dtb.bin which the
>> boot ROM will read is 32KB, do we have any possibility to increase the
>> SPL size here.
> 
> The limitation is decide by the boot rom design, so we are not able
> to change this. Most of Rockchip SoCs have this limitation except RK3399.
> 
> Thanks,
> - Kever
>> 
>> # ./tools/mkimage -n rk3288 -T rksd -d ./spl/u-boot-spl-dtb.bin out.img
>> Warning: SPL image is too large (size 0x9000) and will not boot
>> Error: image verification failed
>> 
>> I tried to increase the spl_size from spl_infos (on tools/rkcommon.c)
>> but not able to boot.
 
 I should have read this more carefully (I only parsed the 20KB and
 jumped to the conclusion that your had the error already when crossing
 the 20KB limit—even though 0x8000 bytes where allowed in mkimage)…
>>> 
>>> Sorry I really didn't understand the size constraint here, because SPL
>>> can be boot file after ROM handoff. Can't this sit on 100KB of SRAM?
>> 
>> The ROM usually has different size constraints for each stage.
>> 
>> E.g. for the RK3368 (just been there, done that), the first stage has a
>> 0x7000 byte limit and the next stage (loaded to 0x0 in DRAM) has a
>> much larger limit. Note that the SRAM on the 3368 has a capacity of
>> 0x1 bytes, so the size limit is also quite pronounced.
> 
> OK, by looking at your rk3368[1] patch I think the first stage runs
> under 0x7000 is TPL? and next stage(probably SPL) doesn't have limit
> since SPL running here in DDR since DDR initialized DDR in TPL itself.
> this is what the space distributed here?

Yes, although there is some size limit even for SPL.
If you are going for a falcon-mode implementation on the 3288, you will
probably want to use TPL for DRAM setup and maybe clocking up the
cores (I don’t know the constraints on what clocks the BROM needs
untouched) and then have SPL w/ falcon mode loaded by the BROM.


> 
> [1] 
> http://git.denx.de/?p=u-boot-rockchip.git;a=commitdiff;h=a55e4971569d2aa0150a1521876c928927e18471
> 
> thanks!
> -- 
> Jagan Teki
> Free Software Engineer | www.openedev.com
> U-Boot, Linux | Upstream Maintainer
> Hyderabad, India.

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] rk3288: 32KB SPL size restriction

2017-08-23 Thread Jagan Teki
Hi Philipp,

On Tue, Aug 22, 2017 at 5:41 PM, Dr. Philipp Tomsich
 wrote:
>
>> On 22 Aug 2017, at 14:05, Jagan Teki  wrote:
>>
>> Philipp and Kever - Thanks for the response.
>>
>> Few comment below.
>>
>> On Thu, Aug 17, 2017 at 2:02 PM, Dr. Philipp Tomsich
>>  wrote:
>>> Jagan,
>>>
 On 17 Aug 2017, at 08:39, Kever Yang  wrote:

 Hi Jagan,


 On 08/10/2017 05:07 PM, Jagan Teki wrote:
> Hi Simon/Philipp or any,
>
> I believe rk3288 has 20KB BootRom and 100KB internal SRAM and current
> u-boot can archive the maximum size of u-boot-spl-dtb.bin which the
> boot ROM will read is 32KB, do we have any possibility to increase the
> SPL size here.

 The limitation is decide by the boot rom design, so we are not able
 to change this. Most of Rockchip SoCs have this limitation except RK3399.

 Thanks,
 - Kever
>
> # ./tools/mkimage -n rk3288 -T rksd -d ./spl/u-boot-spl-dtb.bin out.img
> Warning: SPL image is too large (size 0x9000) and will not boot
> Error: image verification failed
>
> I tried to increase the spl_size from spl_infos (on tools/rkcommon.c)
> but not able to boot.
>>>
>>> I should have read this more carefully (I only parsed the 20KB and
>>> jumped to the conclusion that your had the error already when crossing
>>> the 20KB limit—even though 0x8000 bytes where allowed in mkimage)…
>>
>> Sorry I really didn't understand the size constraint here, because SPL
>> can be boot file after ROM handoff. Can't this sit on 100KB of SRAM?
>
> The ROM usually has different size constraints for each stage.
>
> E.g. for the RK3368 (just been there, done that), the first stage has a
> 0x7000 byte limit and the next stage (loaded to 0x0 in DRAM) has a
> much larger limit. Note that the SRAM on the 3368 has a capacity of
> 0x1 bytes, so the size limit is also quite pronounced.

OK, by looking at your rk3368[1] patch I think the first stage runs
under 0x7000 is TPL? and next stage(probably SPL) doesn't have limit
since SPL running here in DDR since DDR initialized DDR in TPL itself.
this is what the space distributed here?

[1] 
http://git.denx.de/?p=u-boot-rockchip.git;a=commitdiff;h=a55e4971569d2aa0150a1521876c928927e18471

thanks!
-- 
Jagan Teki
Free Software Engineer | www.openedev.com
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] rk3288: 32KB SPL size restriction

2017-08-22 Thread Dr. Philipp Tomsich

> On 22 Aug 2017, at 14:05, Jagan Teki  wrote:
> 
> Philipp and Kever - Thanks for the response.
> 
> Few comment below.
> 
> On Thu, Aug 17, 2017 at 2:02 PM, Dr. Philipp Tomsich
>  wrote:
>> Jagan,
>> 
>>> On 17 Aug 2017, at 08:39, Kever Yang  wrote:
>>> 
>>> Hi Jagan,
>>> 
>>> 
>>> On 08/10/2017 05:07 PM, Jagan Teki wrote:
 Hi Simon/Philipp or any,
 
 I believe rk3288 has 20KB BootRom and 100KB internal SRAM and current
 u-boot can archive the maximum size of u-boot-spl-dtb.bin which the
 boot ROM will read is 32KB, do we have any possibility to increase the
 SPL size here.
>>> 
>>> The limitation is decide by the boot rom design, so we are not able
>>> to change this. Most of Rockchip SoCs have this limitation except RK3399.
>>> 
>>> Thanks,
>>> - Kever
 
 # ./tools/mkimage -n rk3288 -T rksd -d ./spl/u-boot-spl-dtb.bin out.img
 Warning: SPL image is too large (size 0x9000) and will not boot
 Error: image verification failed
 
 I tried to increase the spl_size from spl_infos (on tools/rkcommon.c)
 but not able to boot.
>> 
>> I should have read this more carefully (I only parsed the 20KB and
>> jumped to the conclusion that your had the error already when crossing
>> the 20KB limit—even though 0x8000 bytes where allowed in mkimage)…
> 
> Sorry I really didn't understand the size constraint here, because SPL
> can be boot file after ROM handoff. Can't this sit on 100KB of SRAM?

The ROM usually has different size constraints for each stage.

E.g. for the RK3368 (just been there, done that), the first stage has a
0x7000 byte limit and the next stage (loaded to 0x0 in DRAM) has a
much larger limit. Note that the SRAM on the 3368 has a capacity of
0x1 bytes, so the size limit is also quite pronounced.

My educate guess (I haven’t looked at the disassembly, though) is that
the BROM code needs some of the SRAM for scratch space while reading
the various memories.

Cheers,
Philipp.


___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] rk3288: 32KB SPL size restriction

2017-08-22 Thread Jagan Teki
Philipp and Kever - Thanks for the response.

Few comment below.

On Thu, Aug 17, 2017 at 2:02 PM, Dr. Philipp Tomsich
 wrote:
> Jagan,
>
>> On 17 Aug 2017, at 08:39, Kever Yang  wrote:
>>
>> Hi Jagan,
>>
>>
>> On 08/10/2017 05:07 PM, Jagan Teki wrote:
>>> Hi Simon/Philipp or any,
>>>
>>> I believe rk3288 has 20KB BootRom and 100KB internal SRAM and current
>>> u-boot can archive the maximum size of u-boot-spl-dtb.bin which the
>>> boot ROM will read is 32KB, do we have any possibility to increase the
>>> SPL size here.
>>
>> The limitation is decide by the boot rom design, so we are not able
>> to change this. Most of Rockchip SoCs have this limitation except RK3399.
>>
>> Thanks,
>> - Kever
>>>
>>> # ./tools/mkimage -n rk3288 -T rksd -d ./spl/u-boot-spl-dtb.bin out.img
>>> Warning: SPL image is too large (size 0x9000) and will not boot
>>> Error: image verification failed
>>>
>>> I tried to increase the spl_size from spl_infos (on tools/rkcommon.c)
>>> but not able to boot.
>
> I should have read this more carefully (I only parsed the 20KB and
> jumped to the conclusion that your had the error already when crossing
> the 20KB limit—even though 0x8000 bytes where allowed in mkimage)…

Sorry I really didn't understand the size constraint here, because SPL
can be boot file after ROM handoff. Can't this sit on 100KB of SRAM?

thanks!
-- 
Jagan Teki
Free Software Engineer | www.openedev.com
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] rk3288: 32KB SPL size restriction

2017-08-17 Thread Dr. Philipp Tomsich
Jagan,

> On 17 Aug 2017, at 08:39, Kever Yang  wrote:
> 
> Hi Jagan,
> 
> 
> On 08/10/2017 05:07 PM, Jagan Teki wrote:
>> Hi Simon/Philipp or any,
>> 
>> I believe rk3288 has 20KB BootRom and 100KB internal SRAM and current
>> u-boot can archive the maximum size of u-boot-spl-dtb.bin which the
>> boot ROM will read is 32KB, do we have any possibility to increase the
>> SPL size here.
> 
> The limitation is decide by the boot rom design, so we are not able
> to change this. Most of Rockchip SoCs have this limitation except RK3399.
> 
> Thanks,
> - Kever
>> 
>> # ./tools/mkimage -n rk3288 -T rksd -d ./spl/u-boot-spl-dtb.bin out.img
>> Warning: SPL image is too large (size 0x9000) and will not boot
>> Error: image verification failed
>> 
>> I tried to increase the spl_size from spl_infos (on tools/rkcommon.c)
>> but not able to boot.

I should have read this more carefully (I only parsed the 20KB and
jumped to the conclusion that your had the error already when crossing
the 20KB limit—even though 0x8000 bytes where allowed in mkimage)…

The size limits in mkimage are the ROM imposed limits (or in the case of
the RK3399 the size of the SRAM), so those are hard limits.

Best,
Philipp.
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] rk3288: 32KB SPL size restriction

2017-08-17 Thread Kever Yang

Hi Jagan,


On 08/10/2017 05:07 PM, Jagan Teki wrote:

Hi Simon/Philipp or any,

I believe rk3288 has 20KB BootRom and 100KB internal SRAM and current
u-boot can archive the maximum size of u-boot-spl-dtb.bin which the
boot ROM will read is 32KB, do we have any possibility to increase the
SPL size here.


The limitation is decide by the boot rom design, so we are not able
to change this. Most of Rockchip SoCs have this limitation except RK3399.

Thanks,
- Kever


# ./tools/mkimage -n rk3288 -T rksd -d ./spl/u-boot-spl-dtb.bin out.img
Warning: SPL image is too large (size 0x9000) and will not boot
Error: image verification failed

I tried to increase the spl_size from spl_infos (on tools/rkcommon.c)
but not able to boot.

thanks!



___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] rk3288: 32KB SPL size restriction

2017-08-16 Thread Dr. Philipp Tomsich
Jagan,

> On 16 Aug 2017, at 15:12, Jagan Teki  wrote:
> 
> Hi Simon,
> 
> On Mon, Aug 14, 2017 at 11:01 PM, Jagan Teki  wrote:
>> On Mon, Aug 14, 2017 at 10:03 AM, Jagan Teki  
>> wrote:
>>> Hi Simon,
>>> 
>>> On Mon, Aug 14, 2017 at 3:06 AM, Simon Glass  wrote:
 Hi Jagan,
 
 On 10 August 2017 at 03:07, Jagan Teki  wrote:
> Hi Simon/Philipp or any,
> 
> I believe rk3288 has 20KB BootRom and 100KB internal SRAM and current
> u-boot can archive the maximum size of u-boot-spl-dtb.bin which the
> boot ROM will read is 32KB, do we have any possibility to increase the
> SPL size here.
> 
> # ./tools/mkimage -n rk3288 -T rksd -d ./spl/u-boot-spl-dtb.bin out.img
> Warning: SPL image is too large (size 0x9000) and will not boot
> Error: image verification failed
> 
> I tried to increase the spl_size from spl_infos (on tools/rkcommon.c)
> but not able to boot.
 
 I thought all boards were OK at present. Which board is this? Also
 which toolchain are you using? There was a bug that bloating the
 static data a bit.
>>> 
>>> Board similar to firefly-rk3288 and not using
>>> ROCKCHIP_SPL_BACK_TO_BROM. Observed this when I try to add falcon mode
>>> support which eventually increased the SPL size.
>>> 
>>> toolchain: arm-linux-gnueabi-gcc with version 6.3.1 20170109 (Linaro
>>> GCC 6.3-2017.02)
>> 
>> And it is increasing further with gcc-4.7
> 
> Any comments?

I don’t really know too much about the RK3288’s BROM, but I would expect a limit
on the loadable size for the initial stage (this is what the ‘back-to-bootrom’ 
is for).

You can easily check if that is the case (and it 20KB is the limited for this) 
by
padding the unmodified SPL with zeros… if things break once crossing the 20KB
boundary, the BROM’s size-limitation is most likely blame.

> thanks!
> -- 
> Jagan Teki
> Free Software Engineer | www.openedev.com
> U-Boot, Linux | Upstream Maintainer
> Hyderabad, India.

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] rk3288: 32KB SPL size restriction

2017-08-16 Thread Jagan Teki
Hi Simon,

On Mon, Aug 14, 2017 at 11:01 PM, Jagan Teki  wrote:
> On Mon, Aug 14, 2017 at 10:03 AM, Jagan Teki  wrote:
>> Hi Simon,
>>
>> On Mon, Aug 14, 2017 at 3:06 AM, Simon Glass  wrote:
>>> Hi Jagan,
>>>
>>> On 10 August 2017 at 03:07, Jagan Teki  wrote:
 Hi Simon/Philipp or any,

 I believe rk3288 has 20KB BootRom and 100KB internal SRAM and current
 u-boot can archive the maximum size of u-boot-spl-dtb.bin which the
 boot ROM will read is 32KB, do we have any possibility to increase the
 SPL size here.

 # ./tools/mkimage -n rk3288 -T rksd -d ./spl/u-boot-spl-dtb.bin out.img
 Warning: SPL image is too large (size 0x9000) and will not boot
 Error: image verification failed

 I tried to increase the spl_size from spl_infos (on tools/rkcommon.c)
 but not able to boot.
>>>
>>> I thought all boards were OK at present. Which board is this? Also
>>> which toolchain are you using? There was a bug that bloating the
>>> static data a bit.
>>
>> Board similar to firefly-rk3288 and not using
>> ROCKCHIP_SPL_BACK_TO_BROM. Observed this when I try to add falcon mode
>> support which eventually increased the SPL size.
>>
>> toolchain: arm-linux-gnueabi-gcc with version 6.3.1 20170109 (Linaro
>> GCC 6.3-2017.02)
>
> And it is increasing further with gcc-4.7

Any comments?

thanks!
-- 
Jagan Teki
Free Software Engineer | www.openedev.com
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] rk3288: 32KB SPL size restriction

2017-08-14 Thread Jagan Teki
On Mon, Aug 14, 2017 at 10:03 AM, Jagan Teki  wrote:
> Hi Simon,
>
> On Mon, Aug 14, 2017 at 3:06 AM, Simon Glass  wrote:
>> Hi Jagan,
>>
>> On 10 August 2017 at 03:07, Jagan Teki  wrote:
>>> Hi Simon/Philipp or any,
>>>
>>> I believe rk3288 has 20KB BootRom and 100KB internal SRAM and current
>>> u-boot can archive the maximum size of u-boot-spl-dtb.bin which the
>>> boot ROM will read is 32KB, do we have any possibility to increase the
>>> SPL size here.
>>>
>>> # ./tools/mkimage -n rk3288 -T rksd -d ./spl/u-boot-spl-dtb.bin out.img
>>> Warning: SPL image is too large (size 0x9000) and will not boot
>>> Error: image verification failed
>>>
>>> I tried to increase the spl_size from spl_infos (on tools/rkcommon.c)
>>> but not able to boot.
>>
>> I thought all boards were OK at present. Which board is this? Also
>> which toolchain are you using? There was a bug that bloating the
>> static data a bit.
>
> Board similar to firefly-rk3288 and not using
> ROCKCHIP_SPL_BACK_TO_BROM. Observed this when I try to add falcon mode
> support which eventually increased the SPL size.
>
> toolchain: arm-linux-gnueabi-gcc with version 6.3.1 20170109 (Linaro
> GCC 6.3-2017.02)

And it is increasing further with gcc-4.7

thanks!
-- 
Jagan Teki
Free Software Engineer | www.openedev.com
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] rk3288: 32KB SPL size restriction

2017-08-13 Thread Jagan Teki
Hi Simon,

On Mon, Aug 14, 2017 at 3:06 AM, Simon Glass  wrote:
> Hi Jagan,
>
> On 10 August 2017 at 03:07, Jagan Teki  wrote:
>> Hi Simon/Philipp or any,
>>
>> I believe rk3288 has 20KB BootRom and 100KB internal SRAM and current
>> u-boot can archive the maximum size of u-boot-spl-dtb.bin which the
>> boot ROM will read is 32KB, do we have any possibility to increase the
>> SPL size here.
>>
>> # ./tools/mkimage -n rk3288 -T rksd -d ./spl/u-boot-spl-dtb.bin out.img
>> Warning: SPL image is too large (size 0x9000) and will not boot
>> Error: image verification failed
>>
>> I tried to increase the spl_size from spl_infos (on tools/rkcommon.c)
>> but not able to boot.
>
> I thought all boards were OK at present. Which board is this? Also
> which toolchain are you using? There was a bug that bloating the
> static data a bit.

Board similar to firefly-rk3288 and not using
ROCKCHIP_SPL_BACK_TO_BROM. Observed this when I try to add falcon mode
support which eventually increased the SPL size.

toolchain: arm-linux-gnueabi-gcc with version 6.3.1 20170109 (Linaro
GCC 6.3-2017.02)

thanks!
-- 
Jagan Teki
Free Software Engineer | www.openedev.com
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] rk3288: 32KB SPL size restriction

2017-08-13 Thread Simon Glass
Hi Jagan,

On 10 August 2017 at 03:07, Jagan Teki  wrote:
> Hi Simon/Philipp or any,
>
> I believe rk3288 has 20KB BootRom and 100KB internal SRAM and current
> u-boot can archive the maximum size of u-boot-spl-dtb.bin which the
> boot ROM will read is 32KB, do we have any possibility to increase the
> SPL size here.
>
> # ./tools/mkimage -n rk3288 -T rksd -d ./spl/u-boot-spl-dtb.bin out.img
> Warning: SPL image is too large (size 0x9000) and will not boot
> Error: image verification failed
>
> I tried to increase the spl_size from spl_infos (on tools/rkcommon.c)
> but not able to boot.

I thought all boards were OK at present. Which board is this? Also
which toolchain are you using? There was a bug that bloating the
static data a bit.

Regards,
Simon
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] rk3288: 32KB SPL size restriction

2017-08-10 Thread Jagan Teki
Hi Simon/Philipp or any,

I believe rk3288 has 20KB BootRom and 100KB internal SRAM and current
u-boot can archive the maximum size of u-boot-spl-dtb.bin which the
boot ROM will read is 32KB, do we have any possibility to increase the
SPL size here.

# ./tools/mkimage -n rk3288 -T rksd -d ./spl/u-boot-spl-dtb.bin out.img
Warning: SPL image is too large (size 0x9000) and will not boot
Error: image verification failed

I tried to increase the spl_size from spl_infos (on tools/rkcommon.c)
but not able to boot.

thanks!
-- 
Jagan Teki
Free Software Engineer | www.openedev.com
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot