* [U-Boot] SPL binary too large for OMAP4460 OCM
@ 2013-09-04 7:09 André Schaller
0 siblings, 0 replies; 12+ messages in thread
From: André Schaller @ 2013-09-04 7:09 UTC (permalink / raw)
To: u-boot
Hi everybody,
I need to add functionality to the SPL code. I tried to implement in a
memory-saving way, however, the SPL is about 45 kB after compilation. To
get compilation working, I had to set CONFIG_SPL_MAX_SIZE to (45 *
1024). Now, the SPL as well as u-boot won't boot. After the device'
(PandaBoard ES - OMAP4460) reset, nothing happens regarding it's output
on terminal.
My question: is it theoretically possible to to establish a successfully
booting SPL with ~45 kB in size for this device? The device'
on-chip-memory is 56kB so it could fit in there. If so, what needs to be
configured / tuned to get it working? Are there any other features I
could omit from the binary to make it smaller?
Thanks a lot,
Andr?
^ permalink raw reply [flat|nested] 12+ messages in thread
* [U-Boot] SPL binary too large for OMAP4460 OCM
@ 2013-09-04 7:31 bin4ry
2013-09-04 8:44 ` Sricharan R
0 siblings, 1 reply; 12+ messages in thread
From: bin4ry @ 2013-09-04 7:31 UTC (permalink / raw)
To: u-boot
Hi everybody,
I need to add functionality to the SPL code. I tried to implement in a
memory-saving way, however, the SPL is about 45 kB after compilation. To
get compilation working, I had to set CONFIG_SPL_MAX_SIZE to (45 *
1024). Now, the SPL as well as u-boot won't boot. After the device'
(PandaBoard ES - OMAP4460) reset, nothing happens regarding it's output
on terminal.
My question: is it theoretically possible to to establish a successfully
booting SPL with ~45 kB in size for this device? The device'
on-chip-memory is 56kB so it could fit in there. If so, what needs to be
configured / tuned to get it working? Are there any other features I
could omit from the binary to make it smaller?
Thanks a lot,
-b
^ permalink raw reply [flat|nested] 12+ messages in thread
* [U-Boot] SPL binary too large for OMAP4460 OCM
@ 2013-09-04 8:43 Oleg Kosheliev
2013-09-04 13:18 ` Tom Rini
0 siblings, 1 reply; 12+ messages in thread
From: Oleg Kosheliev @ 2013-09-04 8:43 UTC (permalink / raw)
To: u-boot
Hi, Andr?
>________________________________________
From: u-boot-bounces@lists.denx.de [u-boot-bounces at lists.denx.de] on
behalf of Andr? >Schaller [an.schall at googlemail.com]
>Sent: Wednesday, September 04, 2013 10:09 AM
>To: u-boot at lists.denx.de
>Subject: [U-Boot] SPL binary too large for OMAP4460 OCM
>
>Hi everybody,
>
>I need to add functionality to the SPL code. I tried to implement in a
>memory-saving way, however, the SPL is about 45 kB after compilation. To
>get compilation working, I had to set CONFIG_SPL_MAX_SIZE to (45 *
>1024). Now, the SPL as well as u-boot won't boot. After the device'
>(PandaBoard ES - OMAP4460) reset, nothing happens regarding it's output
>on terminal.
>
>My question: is it theoretically possible to to establish a successfully
>booting SPL with ~45 kB in size for this device? The device'
>on-chip-memory is 56kB so it could fit in there. If so, what needs to be
>configured / tuned to get it working? Are there any other features I
>could omit from the binary to make it smaller?
>
>Thanks a lot,
>Andr?
>_______________________________________________
>U-Boot mailing list
>U-Boot at lists.denx.de
>http://lists.denx.de/mailman/listinfo/u-boot
We can use the area 0x40300000 - 0x4030bfff for downloading the SPL image.
If the image exceed this - it leads to corrupting the ROM code stack and
the device hangs up.
See my patch [U-Boot] [RFC PATCH] armv7:omap4-common: Correct check of the
SPL image size. (It's not in mainline. I'll do some corrections and send v2
soon.)
For HS devices the SPL image is loaded from the address 0x40304350. So we
have 0x4030bfff - 0x40304350 = 0x7CAF = 31,919 bytes for SPL.
The area from 0x40300000 till 0x40304350 in HS devices is used for security
data.
If you have GP device you can use the whole 0x40300000 - 0x4030bfff space
i.e. 49,152 bytes, just change #define CONFIG_SPL_TEXT_BASE from 0x40304350
to 0x40300000.
Best regards,
Oleg
<http://www.globallogic.com/email_disclaimer.txt>
<http://www.globallogic.com/email_disclaimer.txt>
^ permalink raw reply [flat|nested] 12+ messages in thread
* [U-Boot] SPL binary too large for OMAP4460 OCM
2013-09-04 7:31 bin4ry
@ 2013-09-04 8:44 ` Sricharan R
2013-09-04 8:48 ` Michael Trimarchi
0 siblings, 1 reply; 12+ messages in thread
From: Sricharan R @ 2013-09-04 8:44 UTC (permalink / raw)
To: u-boot
On Wednesday 04 September 2013 01:01 PM, bin4ry wrote:
> Hi everybody,
>
> I need to add functionality to the SPL code. I tried to implement in a
> memory-saving way, however, the SPL is about 45 kB after compilation. To
> get compilation working, I had to set CONFIG_SPL_MAX_SIZE to (45 *
> 1024). Now, the SPL as well as u-boot won't boot. After the device'
> (PandaBoard ES - OMAP4460) reset, nothing happens regarding it's output
> on terminal.
>
> My question: is it theoretically possible to to establish a successfully
> booting SPL with ~45 kB in size for this device? The device'
> on-chip-memory is 56kB so it could fit in there. If so, what needs to be
> configured / tuned to get it working? Are there any other features I
> could omit from the binary to make it smaller?
>
> Thanks a lot,
> -b
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>
Do you have a Secure device or GP ?
Regards,
Sricharan
^ permalink raw reply [flat|nested] 12+ messages in thread
* [U-Boot] SPL binary too large for OMAP4460 OCM
2013-09-04 8:44 ` Sricharan R
@ 2013-09-04 8:48 ` Michael Trimarchi
2013-09-04 8:56 ` Sricharan R
0 siblings, 1 reply; 12+ messages in thread
From: Michael Trimarchi @ 2013-09-04 8:48 UTC (permalink / raw)
To: u-boot
Hi
On Wed, Sep 4, 2013 at 10:44 AM, Sricharan R <r.sricharan@ti.com> wrote:
> On Wednesday 04 September 2013 01:01 PM, bin4ry wrote:
>> Hi everybody,
>>
>> I need to add functionality to the SPL code. I tried to implement in a
>> memory-saving way, however, the SPL is about 45 kB after compilation. To
>> get compilation working, I had to set CONFIG_SPL_MAX_SIZE to (45 *
>> 1024). Now, the SPL as well as u-boot won't boot. After the device'
>> (PandaBoard ES - OMAP4460) reset, nothing happens regarding it's output
>> on terminal.
>>
>> My question: is it theoretically possible to to establish a successfully
>> booting SPL with ~45 kB in size for this device? The device'
>> on-chip-memory is 56kB so it could fit in there. If so, what needs to be
>> configured / tuned to get it working? Are there any other features I
>> could omit from the binary to make it smaller?
>>
>> Thanks a lot,
>> -b
>> _______________________________________________
>> U-Boot mailing list
>> U-Boot at lists.denx.de
>> http://lists.denx.de/mailman/listinfo/u-boot
>>
> Do you have a Secure device or GP ?
>
if it is Pandaboard? No he has not. I have increased up to 40Kb and it
works with serial boot and
sdcard/emmc boot.
Michael
> Regards,
> Sricharan
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
^ permalink raw reply [flat|nested] 12+ messages in thread
* [U-Boot] SPL binary too large for OMAP4460 OCM
2013-09-04 8:48 ` Michael Trimarchi
@ 2013-09-04 8:56 ` Sricharan R
2013-09-04 9:04 ` bin4ry
0 siblings, 1 reply; 12+ messages in thread
From: Sricharan R @ 2013-09-04 8:56 UTC (permalink / raw)
To: u-boot
On Wednesday 04 September 2013 02:18 PM, Michael Trimarchi wrote:
> Hi
>
> On Wed, Sep 4, 2013 at 10:44 AM, Sricharan R <r.sricharan@ti.com> wrote:
>> On Wednesday 04 September 2013 01:01 PM, bin4ry wrote:
>>> Hi everybody,
>>>
>>> I need to add functionality to the SPL code. I tried to implement in a
>>> memory-saving way, however, the SPL is about 45 kB after compilation. To
>>> get compilation working, I had to set CONFIG_SPL_MAX_SIZE to (45 *
>>> 1024). Now, the SPL as well as u-boot won't boot. After the device'
>>> (PandaBoard ES - OMAP4460) reset, nothing happens regarding it's output
>>> on terminal.
>>>
>>> My question: is it theoretically possible to to establish a successfully
>>> booting SPL with ~45 kB in size for this device? The device'
>>> on-chip-memory is 56kB so it could fit in there. If so, what needs to be
>>> configured / tuned to get it working? Are there any other features I
>>> could omit from the binary to make it smaller?
>>>
>>> Thanks a lot,
>>> -b
>>> _______________________________________________
>>> U-Boot mailing list
>>> U-Boot at lists.denx.de
>>> http://lists.denx.de/mailman/listinfo/u-boot
>>>
>> Do you have a Secure device or GP ?
>>
> if it is Pandaboard? No he has not. I have increased up to 40Kb and it
> works with serial boot and
> sdcard/emmc boot.
Sorry i missed to read PANDA. So it is anyways GP.
and you changed the CONFIG_SPL_TEXT_BASE as well right ?
Regards,
Sricharan
^ permalink raw reply [flat|nested] 12+ messages in thread
* [U-Boot] SPL binary too large for OMAP4460 OCM
2013-09-04 8:56 ` Sricharan R
@ 2013-09-04 9:04 ` bin4ry
2013-09-04 9:07 ` Sricharan R
2013-09-04 9:13 ` Lokesh Vutla
0 siblings, 2 replies; 12+ messages in thread
From: bin4ry @ 2013-09-04 9:04 UTC (permalink / raw)
To: u-boot
Am 04.09.2013 10:56, schrieb Sricharan R:
> On Wednesday 04 September 2013 02:18 PM, Michael Trimarchi wrote:
>> Hi
>>
>> On Wed, Sep 4, 2013 at 10:44 AM, Sricharan R <r.sricharan@ti.com> wrote:
>>> On Wednesday 04 September 2013 01:01 PM, bin4ry wrote:
>>>> Hi everybody,
>>>>
>>>> I need to add functionality to the SPL code. I tried to implement in a
>>>> memory-saving way, however, the SPL is about 45 kB after compilation. To
>>>> get compilation working, I had to set CONFIG_SPL_MAX_SIZE to (45 *
>>>> 1024). Now, the SPL as well as u-boot won't boot. After the device'
>>>> (PandaBoard ES - OMAP4460) reset, nothing happens regarding it's output
>>>> on terminal.
>>>>
>>>> My question: is it theoretically possible to to establish a successfully
>>>> booting SPL with ~45 kB in size for this device? The device'
>>>> on-chip-memory is 56kB so it could fit in there. If so, what needs to be
>>>> configured / tuned to get it working? Are there any other features I
>>>> could omit from the binary to make it smaller?
>>>>
>>>> Thanks a lot,
>>>> -b
>>>> _______________________________________________
>>>> U-Boot mailing list
>>>> U-Boot at lists.denx.de
>>>> http://lists.denx.de/mailman/listinfo/u-boot
>>>>
>>> Do you have a Secure device or GP ?
>>>
>> if it is Pandaboard? No he has not. I have increased up to 40Kb and it
>> works with serial boot and
>> sdcard/emmc boot.
> Sorry i missed to read PANDA. So it is anyways GP.
> and you changed the CONFIG_SPL_TEXT_BASE as well right ?
>
> Regards,
> Sricharan
First off, sorry for double-posting to this list.
No, the PandaBoard is no HS but a GP device.
This is my configuration:
/* Defines for SPL */
#define CONFIG_SPL
#define CONFIG_SPL_TEXT_BASE 0x40303000
#define CONFIG_SPL_MAX_SIZE (45 * 1024)
#define CONFIG_SPL_STACK LOW_LEVEL_SRAM_STACK
The MLO binary has 46094 Bytes. Actually I should have enough space
(from 0x40300000 - 0x4030bfff -> ~49 kB). However, the device does not
start. Right now I am reviewing the code to check, whether it is because
of the code and not because of the size that makes u-boot does not start.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [U-Boot] SPL binary too large for OMAP4460 OCM
2013-09-04 9:04 ` bin4ry
@ 2013-09-04 9:07 ` Sricharan R
2013-09-05 9:00 ` bin4ry
2013-09-04 9:13 ` Lokesh Vutla
1 sibling, 1 reply; 12+ messages in thread
From: Sricharan R @ 2013-09-04 9:07 UTC (permalink / raw)
To: u-boot
On Wednesday 04 September 2013 02:34 PM, bin4ry wrote:
> Am 04.09.2013 10:56, schrieb Sricharan R:
>> On Wednesday 04 September 2013 02:18 PM, Michael Trimarchi wrote:
>>> Hi
>>>
>>> On Wed, Sep 4, 2013 at 10:44 AM, Sricharan R <r.sricharan@ti.com> wrote:
>>>> On Wednesday 04 September 2013 01:01 PM, bin4ry wrote:
>>>>> Hi everybody,
>>>>>
>>>>> I need to add functionality to the SPL code. I tried to implement in a
>>>>> memory-saving way, however, the SPL is about 45 kB after compilation. To
>>>>> get compilation working, I had to set CONFIG_SPL_MAX_SIZE to (45 *
>>>>> 1024). Now, the SPL as well as u-boot won't boot. After the device'
>>>>> (PandaBoard ES - OMAP4460) reset, nothing happens regarding it's output
>>>>> on terminal.
>>>>>
>>>>> My question: is it theoretically possible to to establish a successfully
>>>>> booting SPL with ~45 kB in size for this device? The device'
>>>>> on-chip-memory is 56kB so it could fit in there. If so, what needs to be
>>>>> configured / tuned to get it working? Are there any other features I
>>>>> could omit from the binary to make it smaller?
>>>>>
>>>>> Thanks a lot,
>>>>> -b
>>>>> _______________________________________________
>>>>> U-Boot mailing list
>>>>> U-Boot at lists.denx.de
>>>>> http://lists.denx.de/mailman/listinfo/u-boot
>>>>>
>>>> Do you have a Secure device or GP ?
>>>>
>>> if it is Pandaboard? No he has not. I have increased up to 40Kb and it
>>> works with serial boot and
>>> sdcard/emmc boot.
>> Sorry i missed to read PANDA. So it is anyways GP.
>> and you changed the CONFIG_SPL_TEXT_BASE as well right ?
>>
>> Regards,
>> Sricharan
> First off, sorry for double-posting to this list.
>
> No, the PandaBoard is no HS but a GP device.
>
> This is my configuration:
>
> /* Defines for SPL */
> #define CONFIG_SPL
> #define CONFIG_SPL_TEXT_BASE 0x40303000
> #define CONFIG_SPL_MAX_SIZE (45 * 1024)
> #define CONFIG_SPL_STACK LOW_LEVEL_SRAM_STACK
>
> The MLO binary has 46094 Bytes. Actually I should have enough space
> (from 0x40300000 - 0x4030bfff -> ~49 kB). However, the device does not
> start. Right now I am reviewing the code to check, whether it is because
> of the code and not because of the size that makes u-boot does not start.
Can you try by setting CONFIG_SPL_TEXT_BASE 0x40300350 ?
Regards,
Sricharan
^ permalink raw reply [flat|nested] 12+ messages in thread
* [U-Boot] SPL binary too large for OMAP4460 OCM
2013-09-04 9:04 ` bin4ry
2013-09-04 9:07 ` Sricharan R
@ 2013-09-04 9:13 ` Lokesh Vutla
1 sibling, 0 replies; 12+ messages in thread
From: Lokesh Vutla @ 2013-09-04 9:13 UTC (permalink / raw)
To: u-boot
Hi,
On Wednesday 04 September 2013 02:34 PM, bin4ry wrote:
> Am 04.09.2013 10:56, schrieb Sricharan R:
>> On Wednesday 04 September 2013 02:18 PM, Michael Trimarchi wrote:
>>> Hi
>>>
>>> On Wed, Sep 4, 2013 at 10:44 AM, Sricharan R <r.sricharan@ti.com> wrote:
>>>> On Wednesday 04 September 2013 01:01 PM, bin4ry wrote:
>>>>> Hi everybody,
>>>>>
>>>>> I need to add functionality to the SPL code. I tried to implement in a
>>>>> memory-saving way, however, the SPL is about 45 kB after compilation. To
>>>>> get compilation working, I had to set CONFIG_SPL_MAX_SIZE to (45 *
>>>>> 1024). Now, the SPL as well as u-boot won't boot. After the device'
>>>>> (PandaBoard ES - OMAP4460) reset, nothing happens regarding it's output
>>>>> on terminal.
>>>>>
>>>>> My question: is it theoretically possible to to establish a successfully
>>>>> booting SPL with ~45 kB in size for this device? The device'
>>>>> on-chip-memory is 56kB so it could fit in there. If so, what needs to be
>>>>> configured / tuned to get it working? Are there any other features I
>>>>> could omit from the binary to make it smaller?
>>>>>
>>>>> Thanks a lot,
>>>>> -b
>>>>> _______________________________________________
>>>>> U-Boot mailing list
>>>>> U-Boot at lists.denx.de
>>>>> http://lists.denx.de/mailman/listinfo/u-boot
>>>>>
>>>> Do you have a Secure device or GP ?
>>>>
>>> if it is Pandaboard? No he has not. I have increased up to 40Kb and it
>>> works with serial boot and
>>> sdcard/emmc boot.
>> Sorry i missed to read PANDA. So it is anyways GP.
>> and you changed the CONFIG_SPL_TEXT_BASE as well right ?
>>
>> Regards,
>> Sricharan
> First off, sorry for double-posting to this list.
>
> No, the PandaBoard is no HS but a GP device.
>
> This is my configuration:
>
> /* Defines for SPL */
> #define CONFIG_SPL
> #define CONFIG_SPL_TEXT_BASE 0x40303000
> #define CONFIG_SPL_MAX_SIZE (45 * 1024)
> #define CONFIG_SPL_STACK LOW_LEVEL_SRAM_STACK
>
> The MLO binary has 46094 Bytes. Actually I should have enough space
> (from 0x40300000 - 0x4030bfff -> ~49 kB). However, the device does not
> start. Right now I am reviewing the code to check, whether it is because
> of the code and not because of the size that makes u-boot does not start.
Just for testing you can try the following diff:
The start address where the Image is downloaded is changed
and now the max size is ~46KB.
diff --git a/arch/arm/include/asm/arch-omap4/omap.h b/arch/arm/include/asm/arch-omap4/omap.h
index 3823a37..7c98360 100644
--- a/arch/arm/include/asm/arch-omap4/omap.h
+++ b/arch/arm/include/asm/arch-omap4/omap.h
@@ -109,7 +109,7 @@ struct s32ktimer {
* Non-secure RAM starts at 0x40300000 for GP devices. But we keep SRAM_BASE
* at 0x40304000(EMU base) so that our code works for both EMU and GP
*/
-#define NON_SECURE_SRAM_START 0x40304000
+#define NON_SECURE_SRAM_START 0x40300000
#define NON_SECURE_SRAM_END 0x4030E000 /* Not inclusive */
#define SRAM_SCRATCH_SPACE_ADDR NON_SECURE_SRAM_START
/* base address for indirect vectors (internal boot mode) */
diff --git a/include/configs/omap4_common.h b/include/configs/omap4_common.h
index e9f2383..5177313 100644
--- a/include/configs/omap4_common.h
+++ b/include/configs/omap4_common.h
@@ -250,8 +250,8 @@
/* Defines for SPL */
#define CONFIG_SPL
#define CONFIG_SPL_FRAMEWORK
-#define CONFIG_SPL_TEXT_BASE 0x40304350
-#define CONFIG_SPL_MAX_SIZE (38 * 1024)
+#define CONFIG_SPL_TEXT_BASE 0x40300000
+#define CONFIG_SPL_MAX_SIZE 0x4030C000 - CONFIG_SPL_TEXT_BASE
#define CONFIG_SPL_STACK CONFIG_SYS_INIT_SP_ADDR
#define CONFIG_SPL_DISPLAY_PRINT
Thanks and regards,
Lokesh
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [U-Boot] SPL binary too large for OMAP4460 OCM
2013-09-04 8:43 Oleg Kosheliev
@ 2013-09-04 13:18 ` Tom Rini
2013-09-04 13:23 ` Sricharan R
0 siblings, 1 reply; 12+ messages in thread
From: Tom Rini @ 2013-09-04 13:18 UTC (permalink / raw)
To: u-boot
On Wed, Sep 04, 2013 at 11:43:01AM +0300, Oleg Kosheliev wrote:
> Hi, Andr?
>
> >________________________________________
> >From: u-boot-bounces at lists.denx.de [u-boot-bounces at lists.denx.de] on
> behalf of Andr? >Schaller [an.schall at googlemail.com]
> >Sent: Wednesday, September 04, 2013 10:09 AM
> >To: u-boot at lists.denx.de
> >Subject: [U-Boot] SPL binary too large for OMAP4460 OCM
> >
> >Hi everybody,
> >
> >I need to add functionality to the SPL code. I tried to implement in a
> >memory-saving way, however, the SPL is about 45 kB after compilation. To
> >get compilation working, I had to set CONFIG_SPL_MAX_SIZE to (45 *
> >1024). Now, the SPL as well as u-boot won't boot. After the device'
> >(PandaBoard ES - OMAP4460) reset, nothing happens regarding it's output
> >on terminal.
> >
> >My question: is it theoretically possible to to establish a successfully
> >booting SPL with ~45 kB in size for this device? The device'
> >on-chip-memory is 56kB so it could fit in there. If so, what needs to be
> >configured / tuned to get it working? Are there any other features I
> >could omit from the binary to make it smaller?
> >
> >Thanks a lot,
> >Andr?
> >_______________________________________________
> >U-Boot mailing list
> >U-Boot at lists.denx.de
> >http://lists.denx.de/mailman/listinfo/u-boot
>
> We can use the area 0x40300000 - 0x4030bfff for downloading the SPL image.
> If the image exceed this - it leads to corrupting the ROM code stack and
> the device hangs up.
> See my patch [U-Boot] [RFC PATCH] armv7:omap4-common: Correct check of the
> SPL image size. (It's not in mainline. I'll do some corrections and send v2
> soon.)
> For HS devices the SPL image is loaded from the address 0x40304350. So we
> have 0x4030bfff - 0x40304350 = 0x7CAF = 31,919 bytes for SPL.
> The area from 0x40300000 till 0x40304350 in HS devices is used for security
> data.
FWIW, this issue is one reason I think we need to stop trying to make GP
devices work kinda-sorta like the HS devices do and instead add a CONFIG
for HS devices that sets things correctly.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130904/607c38c5/attachment.pgp>
^ permalink raw reply [flat|nested] 12+ messages in thread
* [U-Boot] SPL binary too large for OMAP4460 OCM
2013-09-04 13:18 ` Tom Rini
@ 2013-09-04 13:23 ` Sricharan R
0 siblings, 0 replies; 12+ messages in thread
From: Sricharan R @ 2013-09-04 13:23 UTC (permalink / raw)
To: u-boot
On Wednesday 04 September 2013 06:48 PM, Tom Rini wrote:
> On Wed, Sep 04, 2013 at 11:43:01AM +0300, Oleg Kosheliev wrote:
>> Hi, Andr?
>>
>>> ________________________________________
>>> From: u-boot-bounces at lists.denx.de [u-boot-bounces at lists.denx.de] on
>> behalf of Andr? >Schaller [an.schall at googlemail.com]
>>> Sent: Wednesday, September 04, 2013 10:09 AM
>>> To: u-boot at lists.denx.de
>>> Subject: [U-Boot] SPL binary too large for OMAP4460 OCM
>>>
>>> Hi everybody,
>>>
>>> I need to add functionality to the SPL code. I tried to implement in a
>>> memory-saving way, however, the SPL is about 45 kB after compilation. To
>>> get compilation working, I had to set CONFIG_SPL_MAX_SIZE to (45 *
>>> 1024). Now, the SPL as well as u-boot won't boot. After the device'
>>> (PandaBoard ES - OMAP4460) reset, nothing happens regarding it's output
>>> on terminal.
>>>
>>> My question: is it theoretically possible to to establish a successfully
>>> booting SPL with ~45 kB in size for this device? The device'
>>> on-chip-memory is 56kB so it could fit in there. If so, what needs to be
>>> configured / tuned to get it working? Are there any other features I
>>> could omit from the binary to make it smaller?
>>>
>>> Thanks a lot,
>>> Andr?
>>> _______________________________________________
>>> U-Boot mailing list
>>> U-Boot at lists.denx.de
>>> http://lists.denx.de/mailman/listinfo/u-boot
>> We can use the area 0x40300000 - 0x4030bfff for downloading the SPL image.
>> If the image exceed this - it leads to corrupting the ROM code stack and
>> the device hangs up.
>> See my patch [U-Boot] [RFC PATCH] armv7:omap4-common: Correct check of the
>> SPL image size. (It's not in mainline. I'll do some corrections and send v2
>> soon.)
>> For HS devices the SPL image is loaded from the address 0x40304350. So we
>> have 0x4030bfff - 0x40304350 = 0x7CAF = 31,919 bytes for SPL.
>> The area from 0x40300000 till 0x40304350 in HS devices is used for security
>> data.
> FWIW, this issue is one reason I think we need to stop trying to make GP
> devices work kinda-sorta like the HS devices do and instead add a CONFIG
> for HS devices that sets things correctly.
>
>
Yes, correct for OMAP4.
Regards,
Sricharan
^ permalink raw reply [flat|nested] 12+ messages in thread
* [U-Boot] SPL binary too large for OMAP4460 OCM
2013-09-04 9:07 ` Sricharan R
@ 2013-09-05 9:00 ` bin4ry
0 siblings, 0 replies; 12+ messages in thread
From: bin4ry @ 2013-09-05 9:00 UTC (permalink / raw)
To: u-boot
Hi everyone,
I changed CONFIG_SPL_TEXT_BASE from 0x40300300 to 0x40300350 and
sufddenly it works. Do you know why this configuration works, even
though with this configuration there are 0x50 bytes less?
It even works with a MLO with 47519 bytes.
Here the summary of my config:
/* Defines for SPL */
#define CONFIG_SPL
#define CONFIG_SPL_TEXT_BASE 0x40300350
#define CONFIG_SPL_MAX_SIZE (46 * 1024)
#define CONFIG_SPL_STACK LOW_LEVEL_SRAM_STACK
Thanks again for the support!
-b
Am 04.09.2013 11:07, schrieb Sricharan R:
> On Wednesday 04 September 2013 02:34 PM, bin4ry wrote:
>> Am 04.09.2013 10:56, schrieb Sricharan R:
>>> On Wednesday 04 September 2013 02:18 PM, Michael Trimarchi wrote:
>>>> Hi
>>>>
>>>> On Wed, Sep 4, 2013 at 10:44 AM, Sricharan R <r.sricharan@ti.com> wrote:
>>>>> On Wednesday 04 September 2013 01:01 PM, bin4ry wrote:
>>>>>> Hi everybody,
>>>>>>
>>>>>> I need to add functionality to the SPL code. I tried to implement in a
>>>>>> memory-saving way, however, the SPL is about 45 kB after compilation. To
>>>>>> get compilation working, I had to set CONFIG_SPL_MAX_SIZE to (45 *
>>>>>> 1024). Now, the SPL as well as u-boot won't boot. After the device'
>>>>>> (PandaBoard ES - OMAP4460) reset, nothing happens regarding it's output
>>>>>> on terminal.
>>>>>>
>>>>>> My question: is it theoretically possible to to establish a successfully
>>>>>> booting SPL with ~45 kB in size for this device? The device'
>>>>>> on-chip-memory is 56kB so it could fit in there. If so, what needs to be
>>>>>> configured / tuned to get it working? Are there any other features I
>>>>>> could omit from the binary to make it smaller?
>>>>>>
>>>>>> Thanks a lot,
>>>>>> -b
>>>>>> _______________________________________________
>>>>>> U-Boot mailing list
>>>>>> U-Boot at lists.denx.de
>>>>>> http://lists.denx.de/mailman/listinfo/u-boot
>>>>>>
>>>>> Do you have a Secure device or GP ?
>>>>>
>>>> if it is Pandaboard? No he has not. I have increased up to 40Kb and it
>>>> works with serial boot and
>>>> sdcard/emmc boot.
>>> Sorry i missed to read PANDA. So it is anyways GP.
>>> and you changed the CONFIG_SPL_TEXT_BASE as well right ?
>>>
>>> Regards,
>>> Sricharan
>> First off, sorry for double-posting to this list.
>>
>> No, the PandaBoard is no HS but a GP device.
>>
>> This is my configuration:
>>
>> /* Defines for SPL */
>> #define CONFIG_SPL
>> #define CONFIG_SPL_TEXT_BASE 0x40303000
>> #define CONFIG_SPL_MAX_SIZE (45 * 1024)
>> #define CONFIG_SPL_STACK LOW_LEVEL_SRAM_STACK
>>
>> The MLO binary has 46094 Bytes. Actually I should have enough space
>> (from 0x40300000 - 0x4030bfff -> ~49 kB). However, the device does not
>> start. Right now I am reviewing the code to check, whether it is because
>> of the code and not because of the size that makes u-boot does not start.
> Can you try by setting CONFIG_SPL_TEXT_BASE 0x40300350 ?
>
> Regards,
> Sricharan
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2013-09-05 9:00 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-04 7:09 [U-Boot] SPL binary too large for OMAP4460 OCM André Schaller
-- strict thread matches above, loose matches on Subject: below --
2013-09-04 7:31 bin4ry
2013-09-04 8:44 ` Sricharan R
2013-09-04 8:48 ` Michael Trimarchi
2013-09-04 8:56 ` Sricharan R
2013-09-04 9:04 ` bin4ry
2013-09-04 9:07 ` Sricharan R
2013-09-05 9:00 ` bin4ry
2013-09-04 9:13 ` Lokesh Vutla
2013-09-04 8:43 Oleg Kosheliev
2013-09-04 13:18 ` Tom Rini
2013-09-04 13:23 ` Sricharan R
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox