<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, May 26, 2021 at 6:02 AM Sebastian Huber <<a href="mailto:sebastian.huber@embedded-brains.de">sebastian.huber@embedded-brains.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 25/05/2021 20:33, Christian Mauderer wrote:<br>
> <br>
>><br>
>> I thought Sebastian added a "malloc" for the BSP to use before the <br>
>> heap was initialized. But I don't remember the name. Am I remembering <br>
>> correctly?<br>
> <br>
> I don't really know that malloc. But I doubt that it works that early. <br>
> Again: Copying the FDT is one of the first things that these BSPs do. If <br>
> you want to know the exact location: For ARM it's here:<br>
> <br>
> <a href="https://git.rtems.org/rtems/tree/bsps/arm/shared/start/start.S#n325" rel="noreferrer" target="_blank">https://git.rtems.org/rtems/tree/bsps/arm/shared/start/start.S#n325</a><br>
> <br>
> So it's really basic setup before that. It's interrupt stack, switching <br>
> modes, setup stack pointer and then it's already copy FDT.<br>
<br>
Yes, there is an early "malloc". This is _Memory_Allocate() using <br>
_Memory_Get(). However, for the device tree copy this is not early <br>
enough. We don't know the device tree location provided by the boot <br>
loader. It could be somewhere in the memory area used by the <br>
application. So, it is important to copy this very early into a fixed <br>
location. Also, the device tree may be used to get the size of the <br>
memory provided by _Memory_Get().<br></blockquote><div><br></div><div>I assume read-only is only from the perspective of higher level</div><div>language code. Is it possible that being read-only it could be</div><div>mapped to Flash?</div><div><br></div><div>For the purposes of minimum size analysis, I will subtract the</div><div>size of the FDT block from the minimum .text size and if it</div><div>is still over 64, flag it.</div><div><br></div><div>--joel </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
-- <br>
embedded brains GmbH<br>
Herr Sebastian HUBER<br>
Dornierstr. 4<br>
82178 Puchheim<br>
Germany<br>
email: <a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-brains.de</a><br>
phone: +49-89-18 94 741 - 16<br>
fax: +49-89-18 94 741 - 08<br>
<br>
Registergericht: Amtsgericht München<br>
Registernummer: HRB 157899<br>
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler<br>
Unsere Datenschutzerklärung finden Sie hier:<br>
<a href="https://embedded-brains.de/datenschutzerklaerung/" rel="noreferrer" target="_blank">https://embedded-brains.de/datenschutzerklaerung/</a><br>
</blockquote></div></div>