summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libcpu/powerpc/new-exceptions/bspsupport/ppc_exc_print.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2014-12-23 14:18:06 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2015-01-13 11:37:28 +0100
commit3e2647a7146d4b972c6a0290e6657bab0de18afa (patch)
tree027f8a7d676d3ae80950344b3891072e2ca0a736 /c/src/lib/libcpu/powerpc/new-exceptions/bspsupport/ppc_exc_print.c
parentbsps/powerpc: Use e500 exc categories for e6500 (diff)
downloadrtems-3e2647a7146d4b972c6a0290e6657bab0de18afa.tar.bz2
powerpc: AltiVec and FPU context support
Add AltiVec and FPU support to the Context_Control in case we use the e6500 multilib. Add PPC_MULTILIB_ALTIVEC and PPC_MULTILIB_FPU multilib defines. Add non-volatile AltiVec and FPU context to Context_Control. Add save/restore of non-volatile AltiVec and FPU to _CPU_Context_switch(). Add save/restore of volatile AltiVec and FPU context to the exception code. Adjust data cache optimizations for the new context and cache line size.
Diffstat (limited to 'c/src/lib/libcpu/powerpc/new-exceptions/bspsupport/ppc_exc_print.c')
-rw-r--r--c/src/lib/libcpu/powerpc/new-exceptions/bspsupport/ppc_exc_print.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/c/src/lib/libcpu/powerpc/new-exceptions/bspsupport/ppc_exc_print.c b/c/src/lib/libcpu/powerpc/new-exceptions/bspsupport/ppc_exc_print.c
index cb95aba006..27b76a1934 100644
--- a/c/src/lib/libcpu/powerpc/new-exceptions/bspsupport/ppc_exc_print.c
+++ b/c/src/lib/libcpu/powerpc/new-exceptions/bspsupport/ppc_exc_print.c
@@ -179,6 +179,42 @@ void _CPU_Exception_frame_print(const CPU_Exception_frame *excPtr)
printk(" MCSR = 0x%08x\n", mcsr);
}
+#ifdef PPC_MULTILIB_ALTIVEC
+ {
+ unsigned char *v = (unsigned char *) &excPtr->V0;
+ int i;
+ int j;
+
+ printk(" VSCR = 0x%08x\n", excPtr->VSCR);
+ printk("VRSAVE = 0x%08x\n", excPtr->VRSAVE);
+
+ for (i = 0; i < 32; ++i) {
+ printk(" V%02i = 0x", i);
+
+ for (j = 0; j < 16; ++j) {
+ printk("%02x", v[j]);
+ }
+
+ printk("\n");
+
+ v += 16;
+ }
+ }
+#endif
+
+#ifdef PPC_MULTILIB_FPU
+ {
+ unsigned long long *f = (unsigned long long *) &excPtr->F0;
+ int i;
+
+ printk("FPSCR = 0x%08llx\n", excPtr->FPSCR);
+
+ for (i = 0; i < 32; ++i) {
+ printk(" F%02i = 0x%016llx\n", i, f[i]);
+ }
+ }
+#endif
+
if (executing != NULL) {
const char *name = (const char *) &executing->Object.name;