<p dir="ltr"><br>
On Jul 4, 2016 8:40 PM, "Alan Cudmore" <<a href="mailto:alan.cudmore@gmail.com">alan.cudmore@gmail.com</a>> wrote:<br>
><br>
> I figured out my problem with the RPI 2, it was a configuration problem with my build.<br>
><br>
> So the latest RTEMS Git builds and runs on Raspberry Pi 2, Raspberry Pi A+, and Raspberry Pi Zero, all with the latest firmware.</p>
<p dir="ltr">How are the drystones?</p>
<p dir="ltr">> Thanks,<br>
> Alan<br>
><br>
><br>
><br>
> > On Jul 4, 2016, at 6:29 PM, Alan Cudmore <<a href="mailto:alan.cudmore@gmail.com">alan.cudmore@gmail.com</a>> wrote:<br>
> ><br>
> > I updated my RTEMS git and rebuilt the Pi and Pi2 BSPs.<br>
> > Pi 1 works, but Pi 2 does not boot.<br>
> ><br>
> > Pi 1 has a speed up on the dhrystone command:<br>
> > I get 90000 dhrystones per second.<br>
> ><br>
> > When I run your github pi branch, the Pi2 works with both the new and old firmware.<br>
> > The new firmware Pi 2 dhrystone command is 26315 dhrystones per second<br>
> > The old firmware Pi 2 dhrystone command is 45454 dhrystones per second.<br>
> > So something in the firmware and caches is different, I can double check the configuration.<br>
> ><br>
> > But first, I will have to try to figure out the differences between the RTEMS git and your github and see why the Pi 2 is not booting for me.<br>
> ><br>
> > Thanks,<br>
> > Alan<br>
> ><br>
> ><br>
> >> On Jul 4, 2016, at 4:17 PM, Pavel Pisa <<a href="mailto:pisa@cmp.felk.cvut.cz">pisa@cmp.felk.cvut.cz</a>> wrote:<br>
> >><br>
> >> Hello Alan and Rohini Kulkarni,<br>
> >><br>
> >> On Monday 04 of July 2016 18:47:09 Alan Cudmore wrote:<br>
> >>> Hi Pavel,<br>
> >>> I can confirm that your rtems-rpi-devel branch from your github account<br>
> >>> works on the Raspberry Pi A+, Raspberry Pi Zero, and Raspberry Pi 2 with<br>
> >>> the latest firmware.<br>
> >>><br>
> >>> I did notice that the Dhrystone benchmark runs 3 times faster on the Pi 1<br>
> >>> than the Pi 2, but that could be the cache configuration.<br>
> >><br>
> >> Is this problem of the new firmware only?<br>
> >> If answer is yes, then it can be problem with providing<br>
> >> permission to control cache from SVC mode. Then some<br>
> >> register setup before switching from HYP mode could be required.<br>
> >><br>
> >> If it is not related to new hardware then I think that<br>
> >> there is no change in caching attributes introduced<br>
> >> by all my changes and experience of Rohini Kulkarni working<br>
> >> on RPi2 SMP project in frame of GSoC 2015 could help.<br>
> >> Code is on GitHub,<br>
> >><br>
> >> <a href="https://github.com/krohini1593/rtems">https://github.com/krohini1593/rtems</a><br>
> >><br>
> >> which is not merged to RTEMS mainline yet.<br>
> >><br>
> >> There are some changes to change cache configuration.<br>
> >><br>
> >> I have tried some changes in bsp_start_hook_1<br>
> >><br>
> >> +#include <bsp/arm-cp15-start.h><br>
> >><br>
> >><br>
> >> - bsp_memory_management_initialize();<br>
> >> + uint32_t ctrl;<br>
> >><br>
> >> + /* turn mmu off first in case it's on */<br>
> >> + ctrl = arm_cp15_start_setup_mmu_and_cache(<br>
> >> + ARM_CP15_CTRL_M | ARM_CP15_CTRL_A, /* clear - mmu off */<br>
> >> + ARM_CP15_CTRL_AFE<br>
> >> + );<br>
> >> +<br>
> >> + ctrl |= ARM_CP15_CTRL_Z;<br>
> >> +<br>
> >> + arm_cp15_start_setup_translation_table_and_enable_mmu_and_cache(<br>
> >> + ctrl,<br>
> >> + (uint32_t *) bsp_translation_table_base,<br>
> >> + ARM_MMU_DEFAULT_CLIENT_DOMAIN,<br>
> >> + &arm_cp15_start_mmu_config_table[0],<br>
> >> + arm_cp15_start_mmu_config_table_size<br>
> >> + );<br>
> >><br>
> >> to ensure that ARM_CP15_CTRL_Z is set for branch predictor.<br>
> >> But I have tried some modifications in BSP and I have observed<br>
> >> no changes. RPi1 seems to run about 4 times faster in my case.<br>
> >><br>
> >> So it is probable that at cache is not enabled. May be only L2???<br>
> >><br>
> >> There can be mitchmatch between configured MMU table format/bit use<br>
> >> and the way bits are filled. I have not time to recheck that<br>
> >> yet but RPi2 code matches Cyclone Cortex-A9 BSP in CPU setup<br>
> >> so it should be OK if there is not some Broadcom specific control<br>
> >> register.<br>
> >><br>
> >> Best wishes,<br>
> >><br>
> >> Pavel<br>
> ><br>
><br>
> _______________________________________________<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">http://lists.rtems.org/mailman/listinfo/devel</a><br>
</p>