summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2000-07-24 19:18:42 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2000-07-24 19:18:42 +0000
commit7d5077c1f4f7268224341200963049399fa01f55 (patch)
tree369fc6e1737c29cbf454ae256bf63bc7b2cbb9d7 /c/src/lib/libbsp
parentchanged version to ss-20000717 (diff)
downloadrtems-7d5077c1f4f7268224341200963049399fa01f55.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.
Diffstat (limited to 'c/src/lib/libbsp')
-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 8f31fc40ef..e0b1d0e3c4 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