[rtems commit] bsps/powerpc: Fix PPC_EXC_CONFIG_USE_FIXED_HANDLER
Sebastian Huber
sebh at rtems.org
Wed Sep 20 07:35:39 UTC 2017
Module: rtems
Branch: master
Commit: d7ed684d7001bec95e881bc5622e156548dd8070
Changeset: http://git.rtems.org/rtems/commit/?id=d7ed684d7001bec95e881bc5622e156548dd8070
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Wed Sep 20 07:18:53 2017 +0200
bsps/powerpc: Fix PPC_EXC_CONFIG_USE_FIXED_HANDLER
Fix link-time error on BSPs not using PPC_EXC_CONFIG_USE_FIXED_HANDLER.
Update #3085.
---
c/src/lib/libbsp/powerpc/shared/src/ppc-exc-handler-table.c | 2 +-
.../libcpu/powerpc/new-exceptions/bspsupport/ppc_exc_async_normal.S | 4 ++++
.../lib/libcpu/powerpc/new-exceptions/bspsupport/ppc_exc_prologue.c | 6 ++----
3 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/c/src/lib/libbsp/powerpc/shared/src/ppc-exc-handler-table.c b/c/src/lib/libbsp/powerpc/shared/src/ppc-exc-handler-table.c
index e9f42bf..dbcfc0d 100644
--- a/c/src/lib/libbsp/powerpc/shared/src/ppc-exc-handler-table.c
+++ b/c/src/lib/libbsp/powerpc/shared/src/ppc-exc-handler-table.c
@@ -19,7 +19,7 @@
#ifndef PPC_EXC_CONFIG_BOOKE_ONLY
static int ppc_exc_interrupt_dispatch(BSP_Exception_frame *f, unsigned vector)
{
- bsp_interrupt_dispatch();
+ bsp_interrupt_dispatch(vector);
return 0;
}
diff --git a/c/src/lib/libcpu/powerpc/new-exceptions/bspsupport/ppc_exc_async_normal.S b/c/src/lib/libcpu/powerpc/new-exceptions/bspsupport/ppc_exc_async_normal.S
index 69ccb25..32b867b 100644
--- a/c/src/lib/libcpu/powerpc/new-exceptions/bspsupport/ppc_exc_async_normal.S
+++ b/c/src/lib/libcpu/powerpc/new-exceptions/bspsupport/ppc_exc_async_normal.S
@@ -16,6 +16,8 @@
#include <rtems/score/percpu.h>
#include <bsp/vectors.h>
+#ifdef PPC_EXC_CONFIG_USE_FIXED_HANDLER
+
#define SCRATCH_0_REGISTER r0
#define SCRATCH_1_REGISTER r3
#define SCRATCH_2_REGISTER r4
@@ -458,3 +460,5 @@ ppc_exc_interrupt:
/* Symbol provided for debugging and tracing */
ppc_exc_interrupt_end:
+
+#endif /* PPC_EXC_CONFIG_USE_FIXED_HANDLER */
diff --git a/c/src/lib/libcpu/powerpc/new-exceptions/bspsupport/ppc_exc_prologue.c b/c/src/lib/libcpu/powerpc/new-exceptions/bspsupport/ppc_exc_prologue.c
index 5f5cf9a..09307cd 100644
--- a/c/src/lib/libcpu/powerpc/new-exceptions/bspsupport/ppc_exc_prologue.c
+++ b/c/src/lib/libcpu/powerpc/new-exceptions/bspsupport/ppc_exc_prologue.c
@@ -132,17 +132,15 @@ rtems_status_code ppc_exc_make_prologue(
) {
prologue_template = ppc_exc_min_prolog_auto;
prologue_template_size = (size_t) ppc_exc_min_prolog_size;
+#ifdef PPC_EXC_CONFIG_USE_FIXED_HANDLER
} else if (
category == PPC_EXC_CLASSIC_ASYNC
&& ppc_cpu_is_bookE() == PPC_BOOKE_E500
&& (ppc_interrupt_get_disable_mask() & MSR_CE) == 0
) {
prologue_template = ppc_exc_min_prolog_async_tmpl_normal;
-#ifndef PPC_EXC_CONFIG_USE_FIXED_HANDLER
- prologue_template_size = (size_t) ppc_exc_min_prolog_size;
+ prologue_template_size = 16;
fixup_vector = true;
-#else /* PPC_EXC_CONFIG_USE_FIXED_HANDLER */
- prologue_template_size = 8;
#endif /* PPC_EXC_CONFIG_USE_FIXED_HANDLER */
} else {
prologue_template = ppc_exc_prologue_templates [category];
More information about the vc
mailing list