<div dir="ltr"><div>Hi,<br><br></div>I have attached the report containing outputs of arm-rtems4.11-size and arm-rtems4.11-nm -S.<br><br>From arm-rtems4.11-nm -S I don't see how memset() is accessing .text section. The start and end values for both are not overlapping. <br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 24, 2015 at 7:03 PM, Gedare Bloom <span dir="ltr"><<a href="mailto:gedare@gwu.edu" target="_blank">gedare@gwu.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Fri, Jul 24, 2015 at 3:30 AM, Rohini Kulkarni <<a href="mailto:krohini1593@gmail.com">krohini1593@gmail.com</a>> wrote:<br>
> On 24 Jul 2015 12:35, "Sebastian Huber" <<a href="mailto:sebastian.huber@embedded-brains.de">sebastian.huber@embedded-brains.de</a>><br>
<span class="">> wrote:<br>
>><br>
>><br>
>><br>
>> On 23/07/15 23:24, Rohini Kulkarni wrote:<br>
>>><br>
>>> I could finally get back to this issue. I used Pi 1 for debugging, but<br>
>>> the reason for this problem will apply to Pi 2 also.<br>
>>> With text section set to ARMV7_MMU_CODE_CACHED ( which implies read only)<br>
>>> , a data abort exception occurs with memset() inside bsp_start_clear_bss()<br>
>>> function. An illegal write access to an address according to me.<br>
>><br>
>><br>
>> Which exception and which address? Something is not working here.<br>
><br>
><br>
> This is a part of the debugging output. When I used ARMV7_MMU_CODE_CACHED.<br>
> (gdb) s<br>
> bsp_start_clear_bss ()<br>
> at ../../../../../.././raspberrypi/lib/include/bsp/start.h:126<br>
> 126 memset(bsp_section_bss_begin, 0, (size_t) bsp_section_bss_size);<br>
</span>What are the values of bsp_section_bss_begin, and bsp_section_bss_size?<br>
<br>
Apparently, the memset is trying to write into the .text (code)<br>
section, which is a very bad thing to do indeed.<br>
<span class=""><br>
> (gdb) s<br>
> memset (m=0x1157e0, c=0, n=64176)<br>
> at ../../../../../gcc-4.9.2/newlib/libc/string/memset.c:59<br>
> 59 ../../../../../gcc-4.9.2/newlib/libc/string/memset.c: No such file or<br>
> directory.<br>
> (gdb) s<br>
> 49 in ../../../../../gcc-4.9.2/newlib/libc/string/memset.c<br>
> (gdb) s<br>
> _ARMV4_Exception_data_abort_default ()<br>
> at<br>
> ../../../../../../../../rtems-local/rtems/c/src/../../cpukit/score/cpu/arm/armv4-exception-default.S:71<br>
> 71 sub sp, #MORE_CONTEXT_SIZE<br>
><br>
> When I set text section flag to ARMV7_MMU_READ_WRITE, the system starts<br>
> successfully.<br>
>><br>
>><br>
>> --<br>
>> Sebastian Huber, embedded brains GmbH<br>
>><br>
>> Address : Dornierstr. 4, D-82178 Puchheim, Germany<br>
>> Phone : +49 89 189 47 41-16<br>
>> Fax : +49 89 189 47 41-09<br>
</span>>> E-Mail : <a href="mailto:sebastian.huber@embedded-brains.de">sebastian.huber@embedded-brains.de</a><br>
<span class="">>> PGP : Public key available on request.<br>
>><br>
>> Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.<br>
>><br>
><br>
</span>> _______________________________________________<br>
> devel mailing list<br>
> <a href="mailto:devel@rtems.org">devel@rtems.org</a><br>
> <a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/devel</a><br>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr">Rohini Kulkarni</div></div>
</div>