<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Oct 15, 2013 at 8:59 AM, Sebastian Huber <span dir="ltr"><<a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-brains.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="im">On 2013-10-14 18:16, Hesham Moustafa wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="im">
<br>
On Mon, Oct 14, 2013 at 6:03 PM, Gedare Bloom <<a href="mailto:gedare@rtems.org" target="_blank">gedare@rtems.org</a><br></div><div class="im">
<mailto:<a href="mailto:gedare@rtems.org" target="_blank">gedare@rtems.org</a>>> wrote:<br>
<br>
On Mon, Oct 14, 2013 at 11:54 AM, Hesham Moustafa<br></div><div class="im">
<<a href="mailto:heshamelmatary@gmail.com" target="_blank">heshamelmatary@gmail.com</a> <mailto:<a href="mailto:heshamelmatary@gmail.com" target="_blank">heshamelmatary@gmail.<u></u>com</a>>> wrote:<br>
><br>
><br>
><br>
> On Mon, Oct 14, 2013 at 4:02 PM, Sebastian Huber<br>
> <<a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-<u></u>brains.de</a><br></div><div><div class="h5">
<mailto:<a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@<u></u>embedded-brains.de</a>>> wrote:<br>
>><br>
>> On 2013-10-14 15:34, Hesham AL-Matary wrote:<br>
>>><br>
>>> diff --git a/c/src/lib/libbsp/arm/<u></u>raspberrypi/startup/mm_config_<u></u>table.c<br>
>>> b/c/src/lib/libbsp/arm/<u></u>raspberrypi/startup/mm_config_<u></u>table.c<br>
>>> index 5436a76..2b748b2 100644<br>
>>> --- a/c/src/lib/libbsp/arm/<u></u>raspberrypi/startup/mm_config_<u></u>table.c<br>
>>> +++ b/c/src/lib/libbsp/arm/<u></u>raspberrypi/startup/mm_config_<u></u>table.c<br>
>>> @@ -42,7 +42,7 @@ bsp_mm_config_table[] = {<br>
>>> }, {<br>
>>> .begin = (uint32_t) bsp_section_text_begin,<br>
>>> .end = (uint32_t) bsp_section_text_end,<br>
>>> - .flags = ARMV7_MMU_CODE_CACHED<br>
>>> + .flags = ARMV7_MMU_READ_WRITE<br>
>><br>
>><br>
>> What is the problem with the cache? Did the cache previously work?<br>
><br>
> There is a problem with applying a Read-Only permissions in general to this<br>
> area for RaspberryPi BSP.<br>
Any idea why? Letting the text region be read-write is overly<br>
permissive, as RTEMS does not generally use self-modifying code.<br>
<br>
Not sure about the reason, I had to test (i.e., change attributes) every entry in<br>
the table and finally found that this section causes the problem. I could not use<br>
other debugging methods because the BSP is new and lacks a driver to remotely<br>
debug, and I could not also use printf as it's a startup code. Maybe this section<br>
overlaps other section (as its minimum size is 1 MB and it's aligned)<br>
which is written later (e.g., vector table area). ticker.exe only works with this<br>
modification.<br>
</div></div></blockquote>
<br>
You can add a gap between the read-only and read-write sections with the<br>
<br>
bsp_section_rwbarrier_align = DEFINED (bsp_section_rwbarrier_align) ? bsp_section_rwbarrier_align : 1M;<br>
<br></blockquote><div><span style="font-family:arial,sans-serif;font-size:13px">I tried out this solution but unfortunately there is no effect. </span></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
symbol which may be provided by the BSP specific linker command file.<br>
<br>
You can also use Qemu to debug this problem.<div class="im"><br></div></blockquote><div style="font-family:arial,sans-serif;font-size:13px">Qemu did not work for me for RaspberryPi BSP. I checked out the repo here [1] and built </div>
<div style="font-family:arial,sans-serif;font-size:13px">it successfully. I ran ticker.exe with the following command line but the GUI window shows </div><div style="font-family:arial,sans-serif;font-size:13px">blank black screen.</div>
<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">"qemu-system-arm -kernel kernel.img -cpu arm1176 -m 128 -M raspi -serial stdio -append "rw dma.dmachans=0x7f35 bcm2708_fb.fbwidth=1024 bcm2708_fb.fbheight=768 bcm2708.boardrev=0xf bcm2708.serial=0xcad0eedf smsc95xx.macaddr=B8:27:EB:D0:EE:DF sdhci-bcm2708.emmc_clock_freq=100000000 vc_mem.mem_base=0x1c000000 vc_mem.mem_size=0x20000000 dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait" -snapshot -sd /home/hesham/ISOs/2013-07-26-wheezy-raspbian.img -d guest_errors"</div>
<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div><span style="font-family:arial,sans-serif;font-size:13px">[1] </span><a href="https://github.com/Torlus/qemu-rpi" target="_blank" style="font-family:arial,sans-serif;font-size:13px">https://github.com/Torlus/qemu-rpi</a> </div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="im">
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
>><br>
>><br>
>><br>
>>> }, {<br>
>>> .begin = (uint32_t) bsp_section_rodata_begin,<br>
>>> .end = (uint32_t) bsp_section_rodata_end,<br>
>>> @@ -63,8 +63,12 @@ bsp_mm_config_table[] = {<br>
>>> .begin = (uint32_t) bsp_section_stack_begin,<br>
>>> .end = (uint32_t) bsp_section_stack_end,<br>
>>> .flags = MMU_DATA_READ_WRITE<br>
>>> + }, {<br>
>>> + .begin = 0x20000000,<br>
>>> + .end = 0x20FFFFFF,<br>
>>> + .flags = ARMV7_MMU_DATA_READ_WRITE<br>
>><br>
>><br>
>> What is this for an area?<br>
><br>
> It's for Raspberry GPIO pins and other registers (defined at<br>
> raspbberrypi.h).<br>
</blockquote>
<br></div>
Is this the correct setting for devices?<div class=""><div class="h5"><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>
E-Mail : <a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-<u></u>brains.de</a><br>
PGP : Public key available on request.<br>
<br>
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.<br>
______________________________<u></u>_________________<br>
rtems-devel mailing list<br>
<a href="mailto:rtems-devel@rtems.org" target="_blank">rtems-devel@rtems.org</a><br>
<a href="http://www.rtems.org/mailman/listinfo/rtems-devel" target="_blank">http://www.rtems.org/mailman/<u></u>listinfo/rtems-devel</a><br>
</div></div></blockquote></div><br></div></div>