Minimum.exe Text Size Outliers

Sebastian Huber sebastian.huber at embedded-brains.de
Wed May 26 11:02:37 UTC 2021


On 25/05/2021 20:33, Christian Mauderer wrote:
> 
>>
>> I thought Sebastian added a "malloc" for the BSP to use before the 
>> heap was initialized. But I don't remember the name. Am I remembering 
>> correctly?
> 
> I don't really know that malloc. But I doubt that it works that early. 
> Again: Copying the FDT is one of the first things that these BSPs do. If 
> you want to know the exact location: For ARM it's here:
> 
> https://git.rtems.org/rtems/tree/bsps/arm/shared/start/start.S#n325
> 
> So it's really basic setup before that. It's interrupt stack, switching 
> modes, setup stack pointer and then it's already copy FDT.

Yes, there is an early "malloc". This is _Memory_Allocate() using 
_Memory_Get(). However, for the device tree copy this is not early 
enough. We don't know the device tree location provided by the boot 
loader. It could be somewhere in the memory area used by the 
application. So, it is important to copy this very early into a fixed 
location. Also, the device tree may be used to get the size of the 
memory provided by _Memory_Get().

-- 
embedded brains GmbH
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.huber at embedded-brains.de
phone: +49-89-18 94 741 - 16
fax:   +49-89-18 94 741 - 08

Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/


More information about the devel mailing list