summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2000-07-24 19:17:34 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2000-07-24 19:17:34 +0000
commitd7d1096c7864325c9c596bf3ef602a4aa868eea9 (patch)
tree99ae8ac7079fb291c159fd004c8fc4795821c2af
parentchanged version to 4.5.0 (diff)
downloadrtems-d7d1096c7864325c9c596bf3ef602a4aa868eea9.tar.bz2
Patch from Eric Valette <valette@crf.canon.fr> with debugging
by Till Straumann <strauman@SLAC.Stanford.EDU>. With this patch, the motorola_shared BSP should also support the MVME2303.
-rw-r--r--c/src/lib/libbsp/powerpc/shared/start/start.S22
1 files changed, 15 insertions, 7 deletions
diff --git a/c/src/lib/libbsp/powerpc/shared/start/start.S b/c/src/lib/libbsp/powerpc/shared/start/start.S
index 9f91cb7365..0206e3d67e 100644
--- a/c/src/lib/libbsp/powerpc/shared/start/start.S
+++ b/c/src/lib/libbsp/powerpc/shared/start/start.S
@@ -78,17 +78,16 @@ __rtems_entry_point:
isync
/*
- * we now have the 1st 64M of ram mapped with the bats.
+ * we now have the 1st 64M of ram mapped with the bats. We are still
+ * running on the bootloader stack and cannot switch to an RTEMS allocated
+ * init stack before copying the residual data that may have been set just after
+ * rtems_end address. This bug has been experienced on MVME2304. Thank to
+ * Till Straumann <strauman@SLAC.Stanford.EDU> for hunting it and suggesting
+ * the appropriate code.
*/
enter_C_code:
bl MMUon
- /*
- * stack = &__rtems_end + 4096
- */
- addis r9,r0, __rtems_end+(4096-CPU_MINIMUM_STACK_FRAME_SIZE)@ha
- addi r9,r9, __rtems_end+(4096-CPU_MINIMUM_STACK_FRAME_SIZE)@l
- mr r1, r9
bl zero_bss
/*
* restore prep boot params
@@ -99,6 +98,15 @@ enter_C_code:
mr r6,r28
mr r7,r27
bl save_boot_params
+ /*
+ * stack = &__rtems_end + 4096
+ */
+ addis r9,r0, __rtems_end+(4096-CPU_MINIMUM_STACK_FRAME_SIZE)@ha
+ addi r9,r9, __rtems_end+(4096-CPU_MINIMUM_STACK_FRAME_SIZE)@l
+ mr r1, r9
+ /*
+ * We are know in a environment that is totally independent from bootloader setup.
+ */
bl boot_card
bl _return_to_ppcbug