<div dir="ltr"><div><div><div>Hi,<br><br></div>I have made the suggested changes. <br><br></div>git send-email is failing to send the patch, need to settle it. Please review the attached file.<br><br></div>Thanks.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 8, 2015 at 7:04 PM, 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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
<br>
On 08/07/15 15:10, Rohini Kulkarni wrote:<br>
</span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
<br>
<br>
On Wed, Jul 8, 2015 at 6:29 PM, Sebastian Huber<br>
<<a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-brains.de</a><br></span><span class="">
<mailto:<a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-brains.de</a>>> wrote:<br>
<br>
Hello Rohini,<br>
<br>
please use git format-patch to generate the patches.<br>
<br>
Actually,that is what I have used. I pasted the patch here from the<br>
resulting file.<br>
</span></blockquote>
<br><span class="">
Better use git send-email, or send the file as is since this will preserve the commit message and author.<br>
<br>
</span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br><div><div class="h5">
On 08/07/15 14:44, Rohini Kulkarni wrote:<br>
<br>
+++ b/c/src/lib/libbsp/arm/raspberrypi/startup/bspstartmmu.c<br>
@@ -0,0 +1,30 @@<br>
+#define ARM_CP15_TEXT_SECTION BSP_START_TEXT_SECTION<br>
+<br>
+#include <bsp/start.h><br>
+#include <bsp/arm-cp15-start.h><br>
+#include <bsp/linker-symbols.h><br>
+#include <libcpu/arm-cp15.h><br>
+#include <bsp/mm.h><br>
+#include <bsp.h><br>
+<br>
+uint32_t bsp_initial_mmu_ctrl_set;<br>
+uint32_t bsp_initial_mmu_ctrl_clear;<br>
+uint32_t domain_set;<br>
+<br>
+void raspberrypi_setup_mmu_and_cache(void)<br>
+{<br>
+#if (BSP_IS_RPI2 == 1)<br>
+ /* Enable SMP in auxiliary control */<br>
+ uint32_t actlr = arm_cp15_get_auxiliary_control();<br>
+ actlr |= ARM_CORTEX_A9_ACTL_SMP;<br>
+ arm_cp15_set_auxiliary_control(actlr);<br>
+ bsp_initial_mmu_ctrl_clear = ARM_CP15_CTRL_A;<br>
+ bsp_initial_mmu_ctrl_set = ARM_CP15_CTRL_AFE | ARM_CP15_CTRL_Z;<br>
+#else<br>
+ bsp_initial_mmu_ctrl_clear = 0;<br>
+ bsp_initial_mmu_ctrl_set = ARM_CP15_CTRL_AFE |<br>
ARM_CP15_CTRL_S | ARM_CP15_CTRL_XP;<br>
+#endif<br>
+ domain_set = ARM_MMU_DEFAULT_CLIENT_DOMAIN;<br>
+<br>
+ bsp_memory_management_initialize();<br>
+}<br>
<br>
<br>
Is there a reason, why you use global variables instead of<br>
function parameters?<br>
<br>
I have set them as extern in mm.h and are directly used in mminit.c<br>
instead of being passed to bsp_memory_management_initialize. They will<br>
be set by the bsp the source is being compiled for.<br>
</div></div></blockquote>
<br><span class="">
You should avoid global variables and functions in general. I don't see a necessity for them here.<br>
<br></span><span class="">
-- <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-brains.de</a><br>
PGP : Public key available on request.<br>
<br>
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.<br>
<br></span>
_______________________________________________<br>
devel mailing list<br>
<a href="mailto:devel@rtems.org" target="_blank">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></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr">Rohini Kulkarni</div></div>
</div>