summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/powerpc/mvme3100/start/start.S
diff options
context:
space:
mode:
authorTill Straumann <strauman@slac.stanford.edu>2008-03-06 01:13:43 +0000
committerTill Straumann <strauman@slac.stanford.edu>2008-03-06 01:13:43 +0000
commit02d2330fccee15ed70f994b72324f11e43a19c2e (patch)
tree88440555868b7309da924e56a918773efa01af98 /c/src/lib/libbsp/powerpc/mvme3100/start/start.S
parent2007-03-05 Till Straumann <strauman@slac.stanford.edu> (diff)
downloadrtems-02d2330fccee15ed70f994b72324f11e43a19c2e.tar.bz2
2007-03-05 Till Straumann <strauman@slac.stanford.edu>
* start/start.S, startup/bspstart.c: disable memory-select errors early (in start.S) to avoid hangs due to speculative memory access (motload maps absent memory in TLBs). Remove TLB mappings for which no physical memory is installed (bspstart). Enable HID1[RFXE] so that 'core_fault_in' errors result in a machine-check rather than stalling the machine. Re-enable memory-select errors at this point.
Diffstat (limited to 'c/src/lib/libbsp/powerpc/mvme3100/start/start.S')
-rw-r--r--c/src/lib/libbsp/powerpc/mvme3100/start/start.S26
1 files changed, 26 insertions, 0 deletions
diff --git a/c/src/lib/libbsp/powerpc/mvme3100/start/start.S b/c/src/lib/libbsp/powerpc/mvme3100/start/start.S
index cab9261c0a..485a00483d 100644
--- a/c/src/lib/libbsp/powerpc/mvme3100/start/start.S
+++ b/c/src/lib/libbsp/powerpc/mvme3100/start/start.S
@@ -25,6 +25,13 @@
#define KERNELBASE 0x0
+/* cannot include <bsp.h> from assembly :-( */
+#ifndef BSP_8540_CCSR_BASE
+#define BSP_8540_CCSR_BASE 0xe1000000
+#endif
+
+#define ERR_DISABLE_REG (BSP_8540_CCSR_BASE + 0x2e44)
+
.text
.globl __rtems_entry_point
.type __rtems_entry_point,@function
@@ -34,6 +41,25 @@ __rtems_entry_point:
mr r29,r5
mr r28,r6
mr r27,r7
+ /* disable checking for memory-select errors; motload has all TLBs
+ * mapping a possible larger area as memory (not-guarded, caching-enabled)
+ * than actual physical memory is available.
+ * In case of speculative loads this may cause 'memory-select' errors
+ * which seem to raise 'core_fault_in' (found no description in
+ * the manual but I experienced this problem).
+ * Such errors (if HID1[RFXE] is clear) may *stall* execution
+ * leading to mysterious 'hangs'.
+ * Note: enabling HID1[RFXE] at this point makes no sense since
+ * exceptions are not configured yet. Therefore we disable
+ * memory-select errors.
+ * Eventually (bspstart.c) we want to delete TLB entries for
+ * which no physical memory is present.
+ */
+ lis r3, ERR_DISABLE_REG@ha
+ lwz r4, ERR_DISABLE_REG@l(r3)
+ /* disable memory-select errors */
+ ori r4, r4, 1
+ stw r4, ERR_DISABLE_REG@l(r3)
/* Use MotLoad's TLB setup for now; caches are on already */
bl __eabi /* setup EABI and SYSV environment */