[rtems commit] bsps/powerpc: Fix AltiVec enable

Sebastian Huber sebh at rtems.org
Tue Jul 19 05:40:53 UTC 2016


Module:    rtems
Branch:    4.11
Commit:    c6c4fce942d52a9ea21069ef71a7ef0b454b91f2
Changeset: http://git.rtems.org/rtems/commit/?id=c6c4fce942d52a9ea21069ef71a7ef0b454b91f2

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Tue Jul 12 10:02:40 2016 +0200

bsps/powerpc: Fix AltiVec enable

There must be an isync after the mtmsr to ensure that the AltiVec is
enabled for subsequent instructions.

Close #2760.

---

 c/src/lib/libbsp/powerpc/mvme5500/start/start.S | 1 +
 c/src/lib/libbsp/powerpc/psim/start/start.S     | 1 +
 c/src/lib/libbsp/powerpc/shared/start/start.S   | 1 +
 3 files changed, 3 insertions(+)

diff --git a/c/src/lib/libbsp/powerpc/mvme5500/start/start.S b/c/src/lib/libbsp/powerpc/mvme5500/start/start.S
index e46731c..5990c7e 100644
--- a/c/src/lib/libbsp/powerpc/mvme5500/start/start.S
+++ b/c/src/lib/libbsp/powerpc/mvme5500/start/start.S
@@ -68,6 +68,7 @@ __rtems_entry_point:
 	mfmsr r0
 	oris  r0, r0, (1<<(31-16-6))
 	mtmsr r0
+	isync
 	/*
 	 * set vscr and vrsave to known values
 	 */
diff --git a/c/src/lib/libbsp/powerpc/psim/start/start.S b/c/src/lib/libbsp/powerpc/psim/start/start.S
index 9163226..918321a 100644
--- a/c/src/lib/libbsp/powerpc/psim/start/start.S
+++ b/c/src/lib/libbsp/powerpc/psim/start/start.S
@@ -103,6 +103,7 @@ _start:
 	mfmsr r0
 	oris  r0, r0, (1<<(31-16-6))
 	mtmsr r0
+	isync
 	/*
 	 * set vscr and vrsave to known values
 	 */
diff --git a/c/src/lib/libbsp/powerpc/shared/start/start.S b/c/src/lib/libbsp/powerpc/shared/start/start.S
index 0c68a80..729c89c 100644
--- a/c/src/lib/libbsp/powerpc/shared/start/start.S
+++ b/c/src/lib/libbsp/powerpc/shared/start/start.S
@@ -64,6 +64,7 @@ __rtems_entry_point:
 	mfmsr r0
 	oris  r0, r0, (1<<(31-16-6))
 	mtmsr r0
+	isync
 	/*
 	 * set vscr and vrsave to known values
 	 */



More information about the vc mailing list