This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Redboot exec command on ARM


Hi,
I'm using RedBoot (latest CVS trunk) on our ARM926 board.

When using exec command in RedBoot, it caused a prefetch abort at the
end of CYGARC_HAL_MMU_OFF in hal/arm/arch/current/src/redboot_linux_exec.c.

I've changed it to disable MMU in trampoline and change
address space before it, and it works.
I've tested only on our board, but I think it is more robust on any ARM
core, isn't it?

Patch is below:

--- redboot_linux_exec.c.orig   2004-07-05 14:43:11.000000000 +0900
+++ redboot_linux_exec.c        2004-07-02 21:01:26.000000000 +0900
@@ -100,14 +100,13 @@
 // address. Some ARM implementations may need special handling and define
 // their own version.
 #ifndef CYGARC_HAL_MMU_OFF
-#define CYGARC_HAL_MMU_OFF(__paddr__) \
+#define CYGARC_HAL_MMU_OFF() \
   "   mcr p15,0,r0,c7,c10,4\n"        \
   "   mcr p15,0,r0,c7,c7,0\n"         \
   "   mrc p15,0,r0,c1,c0,0\n"         \
   "   bic r0,r0,#0xd\n"               \
   "   bic r0,r0,#0x1000\n"            \
-  "   mcr p15,0,r0,c1,c0,0\n"         \
-  "   mov pc," #__paddr__ "\n"
+  "   mcr p15,0,r0,c1,c0,0\n"
 #endif
 
 //
@@ -410,8 +409,9 @@
           __tramp_end__ - __tramp_start__);
 
     asm volatile (
-        CYGARC_HAL_MMU_OFF(%5)
+        " mov pc,%5;\n" 
         "__tramp_start__:\n"
+        CYGARC_HAL_MMU_OFF()
         " cmp %1,%4;\n"       // Default kernel load address. Relocate
         " beq 2f;\n"          // kernel image there if necessary, and
         " cmp %2,#0;\n"       // if size is non-zero

--
ttera@sm.sony.co.jp


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]