Hi all,

The attached patch adds a "WARNING" note to MOTLoad-equipped BSPs'
READMEs [1] that a "waitProbe", "netShut" must be performed before RTEMS
boot.

If this isn't done, MOTLoad's installed interrupt handlers for network
interfaces will continue to be triggered and cause memory corruption.
The "waitProbe" will add a delay to ensure that devices have been
detected; otherwise the "netShut" may be performed before all the
interfaces are detected and there's a race between their detection +
interrupt handler installation and the user-image boot.

I've already added a note to the same effect to these boards' Wiki
pages.

Thanks to Sebastian Huber for helping me correct an earlier
mis-diagnosis of the issue and Till Straumann for checking it.

If there're no objections I'd like to send out a message to rtems-users@
pointing to the warnings once they're committed...?

[1] I modified those for the Beatnik, MVME3100 and MVME5500 BSPs. Did I
miss any?
-- 
Nick Withers

Embedded Systems Programmer
Room 2.26, Building 57
Department of Nuclear Physics
Research School of Physics and Engineering
The Australian National University (CRICOS: 00120C)

eMail: nick.with...@anu.edu.au
Phone: +61 2 6125 2091
Mobile: +61 414 397 446
>From 53839afe1b303304d3b3ef7f0a620b8037ab9f5d Mon Sep 17 00:00:00 2001
From: Nick Withers <nick.with...@anu.edu.au>
Date: Thu, 16 Jan 2014 14:21:10 +1100
Subject: [PATCH] Add warnings to MOTLoad-equipped BSPs' READMEs that a
 "waitProbe", "netShut" sequence must be executed in MOTLoad before booting
 RTEMS to remove its network interface interrupt handlers, lest memory
 corruption occur

---
 c/src/lib/libbsp/powerpc/beatnik/README          | 5 +++++
 c/src/lib/libbsp/powerpc/mvme3100/README         | 5 +++++
 c/src/lib/libbsp/powerpc/mvme5500/README.booting | 6 ++++++
 3 files changed, 16 insertions(+)

diff --git a/c/src/lib/libbsp/powerpc/beatnik/README b/c/src/lib/libbsp/powerpc/beatnik/README
index 699f9a5..7724cdc 100644
--- a/c/src/lib/libbsp/powerpc/beatnik/README
+++ b/c/src/lib/libbsp/powerpc/beatnik/README
@@ -67,6 +67,11 @@ detailed information)
 NOTE:  The BSP supports both, the mvme6100 and the mvme5500 boards.
        It detects relevant hardware at run-time.
 
+WARNING: It is extremely important that a MOTLoad "waitProbe", "netShut"
+         sequence be executed before booting RTEMS. Otherwise, network
+         interface interrupt handlers installed by MOTLoad may cause memory
+         corruption
+
 CONSOLE: 2 serial devices, UART driver from 'shared' - no surprises
        ("/dev/ttyS0", [="/dev/console"], "/dev/ttyS1"). (Only
        /dev/ttyS0 is accessible from the front panel.)
diff --git a/c/src/lib/libbsp/powerpc/mvme3100/README b/c/src/lib/libbsp/powerpc/mvme3100/README
index 5fff588..36fa28a 100644
--- a/c/src/lib/libbsp/powerpc/mvme3100/README
+++ b/c/src/lib/libbsp/powerpc/mvme3100/README
@@ -31,6 +31,11 @@ detailed information)
 
 NOTE:  The BSP supports the mvme3100 board.
 
+WARNING: It is extremely important that a MOTLoad "waitProbe", "netShut"
+         sequence be executed before booting RTEMS. Otherwise, network
+         interface interrupt handlers installed by MOTLoad may cause memory
+         corruption
+
 CONSOLE: 2 serial devices, UART driver from 'shared' - no surprises
        ("/dev/ttyS0", [="/dev/console"], "/dev/ttyS1"). (Only
        /dev/ttyS0 is accessible from the front panel.)
diff --git a/c/src/lib/libbsp/powerpc/mvme5500/README.booting b/c/src/lib/libbsp/powerpc/mvme5500/README.booting
index bf35053..fd33efe 100644
--- a/c/src/lib/libbsp/powerpc/mvme5500/README.booting
+++ b/c/src/lib/libbsp/powerpc/mvme5500/README.booting
@@ -21,6 +21,7 @@ Booting requirement :
 
 MVME5500> gevEdit mot-script-boot
 (Blank line terminates input.)
+waitProbe
 tftpGet -a4000000 -cxx.xx.xx.xx -sxx.xx.xx.xx -m255.255.254.0 -d/dev/enet0 -fepics/hostname/bin/rtems5500-cexp.bin
 netShut
 go -a4000000
@@ -32,6 +33,11 @@ MVME5500>
 Note : (cxx.xx.xx.xx is the client IP address and 
         sxx.xx.xx.xx is the server IP address)
 
+WARNING : It is extremely important that the MOTLoad "waitProbe", "netShut"
+          sequence be executed before booting RTEMS. Otherwise, network
+          interface interrupt handlers installed by MOTLoad may cause memory
+          corruption
+
 4) Other reference web sites for mvme5500 BSP:
 http://lansce.lanl.gov/EPICS/presentations/KateFeng%20RTEMS-mvme55001.ppt
 http://www.nsls.bnl.gov/facility/expsys/software/EPICS/
-- 
1.8.5.2

_______________________________________________
rtems-devel mailing list
rtems-devel@rtems.org
http://www.rtems.org/mailman/listinfo/rtems-devel

Reply via email to