[U-Boot] [U-Boot, v3, 1/2] fs: fat: dynamically allocate memory for temporary buffer

Chee, Tien Fong tien.fong.chee at intel.com
Thu Feb 21 08:23:07 UTC 2019


On Thu, 2019-02-21 at 08:45 +0100, Michal Simek wrote:
> Hi Tom,
> 
> On 20. 02. 19 2:58, Tom Rini wrote:
> > 
> > On Mon, Feb 11, 2019 at 02:56:19PM +0800, tien.fong.chee at intel.com
> > wrote:
> > 
> > > 
> > > From: Tien Fong Chee <tien.fong.chee at intel.com>
> > > 
> > > Drop the statically allocated get_contents_vfatname_block and
> > > dynamically allocate a buffer only if required. This saves
> > > 64KiB of memory.
> > > 
> > > Signed-off-by: Stefan Agner <stefan.ag... at toradex.com>
> > > Signed-off-by: Tien Fong Chee <tien.fong.chee at intel.com>
> > Applied to u-boot/master, thanks!
> please remove this patch (better both of them because they were in
> series)
I think patch 2/2 should be safe, because no memory size is changed.
Basically, it just to release the allocated memory immediately when
it's not required, so other can re-use it.

> because they are breaking at least ZynqMP SPL. It is also too
> late in cycle to create random fix.
> 
> You can't simply move 64KB from code to malloc without reflecting
> this
> by changing MALLOC space size.
> 
> Other boards with SPL fat could be also affected by this if they
> don't
> allocate big malloc space.
So, any suggestion to get the patch 1/2 accepted? inform all board
maintainers to test it out?
> 
> Thanks,
> Michal
> 

Thanks,
Tien Fong.


More information about the U-Boot mailing list