All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] Linker error when using CONFIG_SPL_SYS_MALLOC_SIMPLE=y
       [not found] <58CC2801.9040109@ti.com>
@ 2017-03-17 18:24 ` Simon Glass
  2017-03-17 18:33   ` Dan Murphy
  0 siblings, 1 reply; 8+ messages in thread
From: Simon Glass @ 2017-03-17 18:24 UTC (permalink / raw)
  To: u-boot

+ML

Hi Dan,

On 17 March 2017 at 12:16, Dan Murphy <dmurphy@ti.com> wrote:
> Simon
>
> I wanted to drop you a note to see if you have any advice on how to fix this issue.
>
> In the attached .config file we enable
>
> CONFIG_SPL_SYS_MALLOC_SIMPLE and CONFIG_SPL_DFU_SUPPORT which we need CONFIG_SPL_DFU_RAM
>
> When doing this we find that there is a build error
>
> common/built-in.o: In function `xrealloc':
> common/cli_hush.c:3349: undefined reference to `realloc_simple'
> common/built-in.o: In function `done_word':
> common/cli_hush.c:2494: undefined reference to `realloc_simple'
> cli_hush.c:2499: undefined reference to `realloc_simple'
> common/built-in.o: In function `b_check_space':
> common/cli_hush.c:876: undefined reference to `realloc_simple'
> make[1]: *** [spl/u-boot-spl] Error 1
> make: *** [spl/u-boot-spl] Error 2
>
> In digging into this I am finding that realloc_simple is not defined anywhere in uboot.  malloc_simple.c seems
> to be missing the implementation.
>
> I am looking to see if you have a patch that fixes this issue or if you can guide us to a resolution.
>
> Right now our only work around is to disable the HUSH_PARSER or turn off the MALLOC simple.  Which according to
> Lokesh, CC'd, is needed for DM support.

So SPL is using hush? Is there a description somewhere of what it does
with that?

If you have enough space for hush I wonder whether you can just use
full malloc() in SPL? You could implement realloc_simple() by just
calling malloc_simple() and copying the old data over, but it is
inefficient.

Regards,
Simon

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] Linker error when using CONFIG_SPL_SYS_MALLOC_SIMPLE=y
  2017-03-17 18:24 ` [U-Boot] Linker error when using CONFIG_SPL_SYS_MALLOC_SIMPLE=y Simon Glass
@ 2017-03-17 18:33   ` Dan Murphy
  2017-03-17 18:46     ` Simon Glass
  2017-03-20  3:31     ` Lokesh Vutla
  0 siblings, 2 replies; 8+ messages in thread
From: Dan Murphy @ 2017-03-17 18:33 UTC (permalink / raw)
  To: u-boot

Simon

On 03/17/2017 01:24 PM, Simon Glass wrote:
> +ML
>
> Hi Dan,
>
> On 17 March 2017 at 12:16, Dan Murphy <dmurphy@ti.com> wrote:
>> Simon
>>
>> I wanted to drop you a note to see if you have any advice on how to fix this issue.
>>
>> In the attached .config file we enable
>>
>> CONFIG_SPL_SYS_MALLOC_SIMPLE and CONFIG_SPL_DFU_SUPPORT which we need CONFIG_SPL_DFU_RAM
>>
>> When doing this we find that there is a build error
>>
>> common/built-in.o: In function `xrealloc':
>> common/cli_hush.c:3349: undefined reference to `realloc_simple'
>> common/built-in.o: In function `done_word':
>> common/cli_hush.c:2494: undefined reference to `realloc_simple'
>> cli_hush.c:2499: undefined reference to `realloc_simple'
>> common/built-in.o: In function `b_check_space':
>> common/cli_hush.c:876: undefined reference to `realloc_simple'
>> make[1]: *** [spl/u-boot-spl] Error 1
>> make: *** [spl/u-boot-spl] Error 2
>>
>> In digging into this I am finding that realloc_simple is not defined anywhere in uboot.  malloc_simple.c seems
>> to be missing the implementation.
>>
>> I am looking to see if you have a patch that fixes this issue or if you can guide us to a resolution.
>>
>> Right now our only work around is to disable the HUSH_PARSER or turn off the MALLOC simple.  Which according to
>> Lokesh, CC'd, is needed for DM support.
> So SPL is using hush? Is there a description somewhere of what it does
> with that?

HUSH_PARSER was added to the TI config in commit adad96e60 configs: Re-sync HUSH options.

HUSH calls realloc in the builtin functions.  I am not sure what SPL would do with the HUSH.

> If you have enough space for hush I wonder whether you can just use
> full malloc() in SPL? You could implement realloc_simple() by just
> calling malloc_simple() and copying the old data over, but it is
> inefficient.
We could work around it but the undef reference will still exist for other code that would need realloc.

Lokesh

Do we run out of room using full malloc support in the SPL with the DM code added?

Dan

> Regards,
> Simon


-- 
------------------
Dan Murphy

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] Linker error when using CONFIG_SPL_SYS_MALLOC_SIMPLE=y
  2017-03-17 18:33   ` Dan Murphy
@ 2017-03-17 18:46     ` Simon Glass
  2017-03-17 18:58       ` Dan Murphy
  2017-03-20  3:31     ` Lokesh Vutla
  1 sibling, 1 reply; 8+ messages in thread
From: Simon Glass @ 2017-03-17 18:46 UTC (permalink / raw)
  To: u-boot

Hi Dan,

On 17 March 2017 at 12:33, Dan Murphy <dmurphy@ti.com> wrote:
> Simon
>
> On 03/17/2017 01:24 PM, Simon Glass wrote:
>> +ML
>>
>> Hi Dan,
>>
>> On 17 March 2017 at 12:16, Dan Murphy <dmurphy@ti.com> wrote:
>>> Simon
>>>
>>> I wanted to drop you a note to see if you have any advice on how to fix this issue.
>>>
>>> In the attached .config file we enable
>>>
>>> CONFIG_SPL_SYS_MALLOC_SIMPLE and CONFIG_SPL_DFU_SUPPORT which we need CONFIG_SPL_DFU_RAM
>>>
>>> When doing this we find that there is a build error
>>>
>>> common/built-in.o: In function `xrealloc':
>>> common/cli_hush.c:3349: undefined reference to `realloc_simple'
>>> common/built-in.o: In function `done_word':
>>> common/cli_hush.c:2494: undefined reference to `realloc_simple'
>>> cli_hush.c:2499: undefined reference to `realloc_simple'
>>> common/built-in.o: In function `b_check_space':
>>> common/cli_hush.c:876: undefined reference to `realloc_simple'
>>> make[1]: *** [spl/u-boot-spl] Error 1
>>> make: *** [spl/u-boot-spl] Error 2
>>>
>>> In digging into this I am finding that realloc_simple is not defined anywhere in uboot.  malloc_simple.c seems
>>> to be missing the implementation.
>>>
>>> I am looking to see if you have a patch that fixes this issue or if you can guide us to a resolution.
>>>
>>> Right now our only work around is to disable the HUSH_PARSER or turn off the MALLOC simple.  Which according to
>>> Lokesh, CC'd, is needed for DM support.
>> So SPL is using hush? Is there a description somewhere of what it does
>> with that?
>
> HUSH_PARSER was added to the TI config in commit adad96e60 configs: Re-sync HUSH options.
>
> HUSH calls realloc in the builtin functions.  I am not sure what SPL would do with the HUSH.
>
>> If you have enough space for hush I wonder whether you can just use
>> full malloc() in SPL? You could implement realloc_simple() by just
>> calling malloc_simple() and copying the old data over, but it is
>> inefficient.
> We could work around it but the undef reference will still exist for other code that would need realloc.

Right, but the point of simple malloc() is to be simple, and realloc()
is assumed not to be needed until you have a proper malloc().

>
> Lokesh
>
> Do we run out of room using full malloc support in the SPL with the DM code added?
>
> Dan

Regards,
Simon

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] Linker error when using CONFIG_SPL_SYS_MALLOC_SIMPLE=y
  2017-03-17 18:46     ` Simon Glass
@ 2017-03-17 18:58       ` Dan Murphy
  2017-03-20  2:29         ` Simon Glass
  0 siblings, 1 reply; 8+ messages in thread
From: Dan Murphy @ 2017-03-17 18:58 UTC (permalink / raw)
  To: u-boot

Simon

On 03/17/2017 01:46 PM, Simon Glass wrote:
> Hi Dan,
>
> On 17 March 2017 at 12:33, Dan Murphy <dmurphy@ti.com> wrote:
>> Simon
>>
>> On 03/17/2017 01:24 PM, Simon Glass wrote:
>>> +ML
>>>
>>> Hi Dan,
>>>
>>> On 17 March 2017 at 12:16, Dan Murphy <dmurphy@ti.com> wrote:
>>>> Simon
>>>>
>>>> I wanted to drop you a note to see if you have any advice on how to fix this issue.
>>>>
>>>> In the attached .config file we enable
>>>>
>>>> CONFIG_SPL_SYS_MALLOC_SIMPLE and CONFIG_SPL_DFU_SUPPORT which we need CONFIG_SPL_DFU_RAM
>>>>
>>>> When doing this we find that there is a build error
>>>>
>>>> common/built-in.o: In function `xrealloc':
>>>> common/cli_hush.c:3349: undefined reference to `realloc_simple'
>>>> common/built-in.o: In function `done_word':
>>>> common/cli_hush.c:2494: undefined reference to `realloc_simple'
>>>> cli_hush.c:2499: undefined reference to `realloc_simple'
>>>> common/built-in.o: In function `b_check_space':
>>>> common/cli_hush.c:876: undefined reference to `realloc_simple'
>>>> make[1]: *** [spl/u-boot-spl] Error 1
>>>> make: *** [spl/u-boot-spl] Error 2
>>>>
>>>> In digging into this I am finding that realloc_simple is not defined anywhere in uboot.  malloc_simple.c seems
>>>> to be missing the implementation.
>>>>
>>>> I am looking to see if you have a patch that fixes this issue or if you can guide us to a resolution.
>>>>
>>>> Right now our only work around is to disable the HUSH_PARSER or turn off the MALLOC simple.  Which according to
>>>> Lokesh, CC'd, is needed for DM support.
>>> So SPL is using hush? Is there a description somewhere of what it does
>>> with that?
>> HUSH_PARSER was added to the TI config in commit adad96e60 configs: Re-sync HUSH options.
>>
>> HUSH calls realloc in the builtin functions.  I am not sure what SPL would do with the HUSH.
>>
>>> If you have enough space for hush I wonder whether you can just use
>>> full malloc() in SPL? You could implement realloc_simple() by just
>>> calling malloc_simple() and copying the old data over, but it is
>>> inefficient.
>> We could work around it but the undef reference will still exist for other code that would need realloc.
> Right, but the point of simple malloc() is to be simple, and realloc()
> is assumed not to be needed until you have a proper malloc().

By proper malloc you mean the dlmalloc code?

If thats true then why is realloc even defined in the simple malloc case?

Dan

>> Lokesh
>>
>> Do we run out of room using full malloc support in the SPL with the DM code added?
>>
>> Dan
> Regards,
> Simon


-- 
------------------
Dan Murphy

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] Linker error when using CONFIG_SPL_SYS_MALLOC_SIMPLE=y
  2017-03-17 18:58       ` Dan Murphy
@ 2017-03-20  2:29         ` Simon Glass
  0 siblings, 0 replies; 8+ messages in thread
From: Simon Glass @ 2017-03-20  2:29 UTC (permalink / raw)
  To: u-boot

Hi Dan,

On 17 March 2017 at 12:58, Dan Murphy <dmurphy@ti.com> wrote:
> Simon
>
> On 03/17/2017 01:46 PM, Simon Glass wrote:
>> Hi Dan,
>>
>> On 17 March 2017 at 12:33, Dan Murphy <dmurphy@ti.com> wrote:
>>> Simon
>>>
>>> On 03/17/2017 01:24 PM, Simon Glass wrote:
>>>> +ML
>>>>
>>>> Hi Dan,
>>>>
>>>> On 17 March 2017 at 12:16, Dan Murphy <dmurphy@ti.com> wrote:
>>>>> Simon
>>>>>
>>>>> I wanted to drop you a note to see if you have any advice on how to fix this issue.
>>>>>
>>>>> In the attached .config file we enable
>>>>>
>>>>> CONFIG_SPL_SYS_MALLOC_SIMPLE and CONFIG_SPL_DFU_SUPPORT which we need CONFIG_SPL_DFU_RAM
>>>>>
>>>>> When doing this we find that there is a build error
>>>>>
>>>>> common/built-in.o: In function `xrealloc':
>>>>> common/cli_hush.c:3349: undefined reference to `realloc_simple'
>>>>> common/built-in.o: In function `done_word':
>>>>> common/cli_hush.c:2494: undefined reference to `realloc_simple'
>>>>> cli_hush.c:2499: undefined reference to `realloc_simple'
>>>>> common/built-in.o: In function `b_check_space':
>>>>> common/cli_hush.c:876: undefined reference to `realloc_simple'
>>>>> make[1]: *** [spl/u-boot-spl] Error 1
>>>>> make: *** [spl/u-boot-spl] Error 2
>>>>>
>>>>> In digging into this I am finding that realloc_simple is not defined anywhere in uboot.  malloc_simple.c seems
>>>>> to be missing the implementation.
>>>>>
>>>>> I am looking to see if you have a patch that fixes this issue or if you can guide us to a resolution.
>>>>>
>>>>> Right now our only work around is to disable the HUSH_PARSER or turn off the MALLOC simple.  Which according to
>>>>> Lokesh, CC'd, is needed for DM support.
>>>> So SPL is using hush? Is there a description somewhere of what it does
>>>> with that?
>>> HUSH_PARSER was added to the TI config in commit adad96e60 configs: Re-sync HUSH options.
>>>
>>> HUSH calls realloc in the builtin functions.  I am not sure what SPL would do with the HUSH.
>>>
>>>> If you have enough space for hush I wonder whether you can just use
>>>> full malloc() in SPL? You could implement realloc_simple() by just
>>>> calling malloc_simple() and copying the old data over, but it is
>>>> inefficient.
>>> We could work around it but the undef reference will still exist for other code that would need realloc.
>> Right, but the point of simple malloc() is to be simple, and realloc()
>> is assumed not to be needed until you have a proper malloc().
>
> By proper malloc you mean the dlmalloc code?
>
> If thats true then why is realloc even defined in the simple malloc case?

To avoid it trying to use realloc(). Perhaps instead of a link error
it should be defined to some sort of error message?

Regards,
Simon

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] Linker error when using CONFIG_SPL_SYS_MALLOC_SIMPLE=y
  2017-03-17 18:33   ` Dan Murphy
  2017-03-17 18:46     ` Simon Glass
@ 2017-03-20  3:31     ` Lokesh Vutla
  2017-03-20  8:36       ` Lukasz Majewski
  1 sibling, 1 reply; 8+ messages in thread
From: Lokesh Vutla @ 2017-03-20  3:31 UTC (permalink / raw)
  To: u-boot



On Saturday 18 March 2017 12:03 AM, Dan Murphy wrote:
> Simon
> 
> On 03/17/2017 01:24 PM, Simon Glass wrote:
>> +ML
>>
>> Hi Dan,
>>
>> On 17 March 2017 at 12:16, Dan Murphy <dmurphy@ti.com> wrote:
>>> Simon
>>>
>>> I wanted to drop you a note to see if you have any advice on how to fix this issue.
>>>
>>> In the attached .config file we enable
>>>
>>> CONFIG_SPL_SYS_MALLOC_SIMPLE and CONFIG_SPL_DFU_SUPPORT which we need CONFIG_SPL_DFU_RAM
>>>
>>> When doing this we find that there is a build error
>>>
>>> common/built-in.o: In function `xrealloc':
>>> common/cli_hush.c:3349: undefined reference to `realloc_simple'
>>> common/built-in.o: In function `done_word':
>>> common/cli_hush.c:2494: undefined reference to `realloc_simple'
>>> cli_hush.c:2499: undefined reference to `realloc_simple'
>>> common/built-in.o: In function `b_check_space':
>>> common/cli_hush.c:876: undefined reference to `realloc_simple'
>>> make[1]: *** [spl/u-boot-spl] Error 1
>>> make: *** [spl/u-boot-spl] Error 2
>>>
>>> In digging into this I am finding that realloc_simple is not defined anywhere in uboot.  malloc_simple.c seems
>>> to be missing the implementation.
>>>
>>> I am looking to see if you have a patch that fixes this issue or if you can guide us to a resolution.
>>>
>>> Right now our only work around is to disable the HUSH_PARSER or turn off the MALLOC simple.  Which according to
>>> Lokesh, CC'd, is needed for DM support.
>> So SPL is using hush? Is there a description somewhere of what it does
>> with that?
> 
> HUSH_PARSER was added to the TI config in commit adad96e60 configs: Re-sync HUSH options.
> 
> HUSH calls realloc in the builtin functions.  I am not sure what SPL would do with the HUSH.
> 
>> If you have enough space for hush I wonder whether you can just use
>> full malloc() in SPL? You could implement realloc_simple() by just
>> calling malloc_simple() and copying the old data over, but it is
>> inefficient.
> We could work around it but the undef reference will still exist for other code that would need realloc.
> 
> Lokesh
> 
> Do we run out of room using full malloc support in the SPL with the DM code added?

No, we should be able to use full malloc support in SPL in case of
DRA7xx/AM57xx. But it is unnecessary overhead ti size of SPL. I still
did not understand why HUSH_PARSER is needed for SPL.

Thanks and regards,
Lokesh

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] Linker error when using CONFIG_SPL_SYS_MALLOC_SIMPLE=y
  2017-03-20  3:31     ` Lokesh Vutla
@ 2017-03-20  8:36       ` Lukasz Majewski
  2017-03-21  2:56         ` Lokesh Vutla
  0 siblings, 1 reply; 8+ messages in thread
From: Lukasz Majewski @ 2017-03-20  8:36 UTC (permalink / raw)
  To: u-boot

Hi Lokesh,

> 
> 
> On Saturday 18 March 2017 12:03 AM, Dan Murphy wrote:
> > Simon
> > 
> > On 03/17/2017 01:24 PM, Simon Glass wrote:
> >> +ML
> >>
> >> Hi Dan,
> >>
> >> On 17 March 2017 at 12:16, Dan Murphy <dmurphy@ti.com> wrote:
> >>> Simon
> >>>
> >>> I wanted to drop you a note to see if you have any advice on how
> >>> to fix this issue.
> >>>
> >>> In the attached .config file we enable
> >>>
> >>> CONFIG_SPL_SYS_MALLOC_SIMPLE and CONFIG_SPL_DFU_SUPPORT which we
> >>> need CONFIG_SPL_DFU_RAM
> >>>
> >>> When doing this we find that there is a build error
> >>>
> >>> common/built-in.o: In function `xrealloc':
> >>> common/cli_hush.c:3349: undefined reference to `realloc_simple'
> >>> common/built-in.o: In function `done_word':
> >>> common/cli_hush.c:2494: undefined reference to `realloc_simple'
> >>> cli_hush.c:2499: undefined reference to `realloc_simple'
> >>> common/built-in.o: In function `b_check_space':
> >>> common/cli_hush.c:876: undefined reference to `realloc_simple'
> >>> make[1]: *** [spl/u-boot-spl] Error 1
> >>> make: *** [spl/u-boot-spl] Error 2
> >>>
> >>> In digging into this I am finding that realloc_simple is not
> >>> defined anywhere in uboot.  malloc_simple.c seems to be missing
> >>> the implementation.
> >>>
> >>> I am looking to see if you have a patch that fixes this issue or
> >>> if you can guide us to a resolution.
> >>>
> >>> Right now our only work around is to disable the HUSH_PARSER or
> >>> turn off the MALLOC simple.  Which according to Lokesh, CC'd, is
> >>> needed for DM support.
> >> So SPL is using hush? Is there a description somewhere of what it
> >> does with that?
> > 
> > HUSH_PARSER was added to the TI config in commit adad96e60 configs:
> > Re-sync HUSH options.
> > 
> > HUSH calls realloc in the builtin functions.  I am not sure what
> > SPL would do with the HUSH.
> > 
> >> If you have enough space for hush I wonder whether you can just use
> >> full malloc() in SPL? You could implement realloc_simple() by just
> >> calling malloc_simple() and copying the old data over, but it is
> >> inefficient.
> > We could work around it but the undef reference will still exist
> > for other code that would need realloc.
> > 
> > Lokesh
> > 
> > Do we run out of room using full malloc support in the SPL with the
> > DM code added?
> 
> No, we should be able to use full malloc support in SPL in case of
> DRA7xx/AM57xx.

It depends if you plan to use SPI before SDRAM is initialized. The .bss
section (and dlmalloc.c pool) starts from 0x80a0 0000. Only the .data
section is allocated in SRAM.

I2C (which is used to read EEPROM config data) on the other hand do not
require malloc to be operational.

> But it is unnecessary overhead ti size of SPL. I still
> did not understand why HUSH_PARSER is needed for SPL.

I might probably answer to this question. IIRC, the SPL_DFU support
uses HUSH to work.

> 
> Thanks and regards,
> Lokesh
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> https://lists.denx.de/listinfo/u-boot




Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] Linker error when using CONFIG_SPL_SYS_MALLOC_SIMPLE=y
  2017-03-20  8:36       ` Lukasz Majewski
@ 2017-03-21  2:56         ` Lokesh Vutla
  0 siblings, 0 replies; 8+ messages in thread
From: Lokesh Vutla @ 2017-03-21  2:56 UTC (permalink / raw)
  To: u-boot



On Monday 20 March 2017 02:06 PM, Lukasz Majewski wrote:
> Hi Lokesh,
> 
>>
>>
>> On Saturday 18 March 2017 12:03 AM, Dan Murphy wrote:
>>> Simon
>>>
>>> On 03/17/2017 01:24 PM, Simon Glass wrote:
>>>> +ML
>>>>
>>>> Hi Dan,
>>>>
>>>> On 17 March 2017 at 12:16, Dan Murphy <dmurphy@ti.com> wrote:
>>>>> Simon
>>>>>
>>>>> I wanted to drop you a note to see if you have any advice on how
>>>>> to fix this issue.
>>>>>
>>>>> In the attached .config file we enable
>>>>>
>>>>> CONFIG_SPL_SYS_MALLOC_SIMPLE and CONFIG_SPL_DFU_SUPPORT which we
>>>>> need CONFIG_SPL_DFU_RAM
>>>>>
>>>>> When doing this we find that there is a build error
>>>>>
>>>>> common/built-in.o: In function `xrealloc':
>>>>> common/cli_hush.c:3349: undefined reference to `realloc_simple'
>>>>> common/built-in.o: In function `done_word':
>>>>> common/cli_hush.c:2494: undefined reference to `realloc_simple'
>>>>> cli_hush.c:2499: undefined reference to `realloc_simple'
>>>>> common/built-in.o: In function `b_check_space':
>>>>> common/cli_hush.c:876: undefined reference to `realloc_simple'
>>>>> make[1]: *** [spl/u-boot-spl] Error 1
>>>>> make: *** [spl/u-boot-spl] Error 2
>>>>>
>>>>> In digging into this I am finding that realloc_simple is not
>>>>> defined anywhere in uboot.  malloc_simple.c seems to be missing
>>>>> the implementation.
>>>>>
>>>>> I am looking to see if you have a patch that fixes this issue or
>>>>> if you can guide us to a resolution.
>>>>>
>>>>> Right now our only work around is to disable the HUSH_PARSER or
>>>>> turn off the MALLOC simple.  Which according to Lokesh, CC'd, is
>>>>> needed for DM support.
>>>> So SPL is using hush? Is there a description somewhere of what it
>>>> does with that?
>>>
>>> HUSH_PARSER was added to the TI config in commit adad96e60 configs:
>>> Re-sync HUSH options.
>>>
>>> HUSH calls realloc in the builtin functions.  I am not sure what
>>> SPL would do with the HUSH.
>>>
>>>> If you have enough space for hush I wonder whether you can just use
>>>> full malloc() in SPL? You could implement realloc_simple() by just
>>>> calling malloc_simple() and copying the old data over, but it is
>>>> inefficient.
>>> We could work around it but the undef reference will still exist
>>> for other code that would need realloc.
>>>
>>> Lokesh
>>>
>>> Do we run out of room using full malloc support in the SPL with the
>>> DM code added?
>>
>> No, we should be able to use full malloc support in SPL in case of
>> DRA7xx/AM57xx.
> 
> It depends if you plan to use SPI before SDRAM is initialized. The .bss
> section (and dlmalloc.c pool) starts from 0x80a0 0000. Only the .data
> section is allocated in SRAM.

That's right and in case of DRA7xx SPI is not being used before SDRAM is
initialized. I verified that it works boots fine if MALLOC simple is
disabled.

Thanks and regards,
Lokesh

> 
> I2C (which is used to read EEPROM config data) on the other hand do not
> require malloc to be operational.
> 
>> But it is unnecessary overhead ti size of SPL. I still
>> did not understand why HUSH_PARSER is needed for SPL.
> 
> I might probably answer to this question. IIRC, the SPL_DFU support
> uses HUSH to work.
> 
>>
>> Thanks and regards,
>> Lokesh
>> _______________________________________________
>> U-Boot mailing list
>> U-Boot at lists.denx.de
>> https://lists.denx.de/listinfo/u-boot
> 
> 
> 
> 
> Best regards,
> 
> Lukasz Majewski
> 
> --
> 
> DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-03-21  2:56 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <58CC2801.9040109@ti.com>
2017-03-17 18:24 ` [U-Boot] Linker error when using CONFIG_SPL_SYS_MALLOC_SIMPLE=y Simon Glass
2017-03-17 18:33   ` Dan Murphy
2017-03-17 18:46     ` Simon Glass
2017-03-17 18:58       ` Dan Murphy
2017-03-20  2:29         ` Simon Glass
2017-03-20  3:31     ` Lokesh Vutla
2017-03-20  8:36       ` Lukasz Majewski
2017-03-21  2:56         ` Lokesh Vutla

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.