summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libcpu/powerpc/new-exceptions/bspsupport/ppc_exc_address.c
diff options
context:
space:
mode:
Diffstat (limited to 'c/src/lib/libcpu/powerpc/new-exceptions/bspsupport/ppc_exc_address.c')
-rw-r--r--c/src/lib/libcpu/powerpc/new-exceptions/bspsupport/ppc_exc_address.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/c/src/lib/libcpu/powerpc/new-exceptions/bspsupport/ppc_exc_address.c b/c/src/lib/libcpu/powerpc/new-exceptions/bspsupport/ppc_exc_address.c
index e061f5bb7c..6b8b64f3f9 100644
--- a/c/src/lib/libcpu/powerpc/new-exceptions/bspsupport/ppc_exc_address.c
+++ b/c/src/lib/libcpu/powerpc/new-exceptions/bspsupport/ppc_exc_address.c
@@ -30,10 +30,6 @@
#include <bsp/vectors.h>
-bool bsp_exceptions_in_RAM = true;
-
-uint32_t ppc_exc_vector_base = 0;
-
/*
* XXX: These values are choosen to directly generate the vector offsets for an
* e200z1 which has hard wired IVORs (IVOR0=0x00, IVOR1=0x10, IVOR2=0x20, ...).
@@ -61,9 +57,8 @@ static const uint8_t ivor_values [] = {
[ASM_E500_PERFMON_VECTOR] = 19
};
-void *ppc_exc_vector_address(unsigned vector)
+void *ppc_exc_vector_address(unsigned vector, void *vector_base)
{
- uintptr_t vector_base = 0xfff00000;
uintptr_t vector_offset = vector << 8;
if (ppc_cpu_has_altivec()) {
@@ -101,9 +96,5 @@ void *ppc_exc_vector_address(unsigned vector)
}
}
- if (bsp_exceptions_in_RAM) {
- vector_base = ppc_exc_vector_base;
- }
-
- return (void *) (vector_base + vector_offset);
+ return (void *) ((uintptr_t) vector_base + vector_offset);
}