forked from Imagelibrary/rtems
2007-12-05 Till Straumann <strauman@slac.stanford.edu>
* Makefile.am, configure.ac, preinstall.am, new-exceptions/e500_raw_exc_init.c: Started adding support for e500 CPU. Most stuff is borrowed from mpc6xx.
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
2007-12-05 Till Straumann <strauman@slac.stanford.edu>
|
||||
|
||||
* Makefile.am, configure.ac, preinstall.am,
|
||||
new-exceptions/e500_raw_exc_init.c: Started adding
|
||||
support for e500 CPU. Most stuff is borrowed from mpc6xx.
|
||||
|
||||
2007-12-05 Till Straumann <strauman@slac.stanford.edu>
|
||||
|
||||
* rtems/powerpc/powerpc.h: added a #ifdef __ppc_generic
|
||||
|
||||
@@ -29,7 +29,8 @@ old_exceptions_rtems_cpu_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
|
||||
else
|
||||
noinst_PROGRAMS = new-exceptions/rtems-cpu.rel
|
||||
new_exceptions_rtems_cpu_rel_SOURCES = new-exceptions/cpu.c \
|
||||
new-exceptions/cpu_asm.S
|
||||
new-exceptions/cpu_asm.S \
|
||||
new-exceptions/e500_raw_exc_init.c
|
||||
new_exceptions_rtems_cpu_rel_CPPFLAGS = $(AM_CPPFLAGS)
|
||||
new_exceptions_rtems_cpu_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
|
||||
|
||||
@@ -238,6 +239,22 @@ mpc6xx_timer_rel_CPPFLAGS = $(AM_CPPFLAGS)
|
||||
mpc6xx_timer_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
|
||||
endif
|
||||
|
||||
if e500
|
||||
## mpc6xx/clock
|
||||
include_libcpu_HEADERS += mpc6xx/clock/c_clock.h
|
||||
|
||||
noinst_PROGRAMS += e500/clock.rel
|
||||
e500_clock_rel_SOURCES = mpc6xx/clock/c_clock.c mpc6xx/clock/c_clock.h
|
||||
e500_clock_rel_CPPFLAGS = $(AM_CPPFLAGS)
|
||||
e500_clock_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
|
||||
|
||||
## mpc6xx/timer
|
||||
noinst_PROGRAMS += e500/timer.rel
|
||||
e500_timer_rel_SOURCES = mpc6xx/timer/timer.c
|
||||
e500_timer_rel_CPPFLAGS = $(AM_CPPFLAGS)
|
||||
e500_timer_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
|
||||
endif
|
||||
|
||||
EXTRA_DIST += mpc8xx/README
|
||||
if mpc8xx
|
||||
include_mpc8xxdir = $(includedir)/mpc8xx
|
||||
|
||||
@@ -51,7 +51,8 @@ AM_CONDITIONAL(shared, \
|
||||
|| test "$RTEMS_CPU_MODEL" = "mpc8240" \
|
||||
|| test "$RTEMS_CPU_MODEL" = "mpc8245" \
|
||||
|| test "$RTEMS_CPU_MODEL" = "mpc8260" \
|
||||
|| test "$RTEMS_CPU_MODEL" = "mpc83xx" )
|
||||
|| test "$RTEMS_CPU_MODEL" = "mpc83xx" \
|
||||
|| test "$RTEMS_CPU_MODEL" = "e500")
|
||||
|
||||
## test on CPU type
|
||||
AM_CONDITIONAL(mpc505, test "$RTEMS_CPU_MODEL" = "mpc505")
|
||||
@@ -77,6 +78,8 @@ AM_CONDITIONAL(ppc403,[test "$RTEMS_CPU_MODEL" = "ppc403" \
|
||||
|| test "$RTEMS_CPU_MODEL" = "ppc405"])
|
||||
AM_CONDITIONAL(ppc405, test "$RTEMS_CPU_MODEL" = "ppc405")
|
||||
|
||||
AM_CONDITIONAL(e500, test "$RTEMS_CPU_MODEL" = "e500")
|
||||
|
||||
RTEMS_CHECK_NETWORKING
|
||||
AM_CONDITIONAL(HAS_NETWORKING,test "$HAS_NETWORKING" = "yes")
|
||||
|
||||
|
||||
34
c/src/lib/libcpu/powerpc/new-exceptions/e500_raw_exc_init.c
Normal file
34
c/src/lib/libcpu/powerpc/new-exceptions/e500_raw_exc_init.c
Normal file
@@ -0,0 +1,34 @@
|
||||
#include <libcpu/cpuIdent.h>
|
||||
#include <libcpu/raw_exception.h>
|
||||
|
||||
#define MTIVOR(x, vec) asm volatile("mtivor"#x" %0"::"r"(vec));
|
||||
|
||||
/* Use during early init for initializing the e500 IVOR/IVPR registers */
|
||||
void
|
||||
e500_setup_raw_exceptions()
|
||||
{
|
||||
if ( !ppc_cpu_is_bookE() )
|
||||
return;
|
||||
asm volatile("mtivpr %0"::"r"(0));
|
||||
/* setup vectors to be compatible with classic PPC */
|
||||
MTIVOR(0, ppc_get_vector_addr(ASM_BOOKE_CRIT_VECTOR)); /* Critical input not (yet) supported; use reset vector */
|
||||
MTIVOR(1, ppc_get_vector_addr(ASM_MACH_VECTOR));
|
||||
MTIVOR(2, ppc_get_vector_addr(ASM_PROT_VECTOR));
|
||||
MTIVOR(3, ppc_get_vector_addr(ASM_ISI_VECTOR));
|
||||
MTIVOR(4, ppc_get_vector_addr(ASM_EXT_VECTOR));
|
||||
MTIVOR(5, ppc_get_vector_addr(ASM_ALIGN_VECTOR));
|
||||
MTIVOR(6, ppc_get_vector_addr(ASM_PROG_VECTOR));
|
||||
MTIVOR(7, ppc_get_vector_addr(ASM_FLOAT_VECTOR));
|
||||
MTIVOR(8, ppc_get_vector_addr(ASM_SYS_VECTOR));
|
||||
MTIVOR(9, ppc_get_vector_addr(0x0b));
|
||||
MTIVOR(10, ppc_get_vector_addr(ASM_DEC_VECTOR));
|
||||
MTIVOR(11, ppc_get_vector_addr(ASM_BOOKE_PIT_VECTOR));
|
||||
MTIVOR(12, ppc_get_vector_addr(ASM_BOOKE_WDOG_VECTOR));
|
||||
MTIVOR(13, ppc_get_vector_addr(ASM_60X_DSMISS_VECTOR));
|
||||
MTIVOR(14, ppc_get_vector_addr(ASM_60X_DLMISS_VECTOR));
|
||||
MTIVOR(15, ppc_get_vector_addr(ASM_TRACE_VECTOR));
|
||||
MTIVOR(32, ppc_get_vector_addr(ASM_60X_VEC_VECTOR));
|
||||
MTIVOR(33, ppc_get_vector_addr(0x16));
|
||||
MTIVOR(34, ppc_get_vector_addr(0x15));
|
||||
MTIVOR(35, ppc_get_vector_addr(ASM_60X_PERFMON_VECTOR));
|
||||
}
|
||||
@@ -146,6 +146,11 @@ $(PROJECT_INCLUDE)/libcpu/pte121.h: mpc6xx/mmu/pte121.h $(PROJECT_INCLUDE)/libcp
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/libcpu/pte121.h
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/libcpu/pte121.h
|
||||
|
||||
$(PROJECT_INCLUDE)/libcpu/c_clock.h: mpc6xx/clock/c_clock.h $(PROJECT_INCLUDE)/libcpu/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/libcpu/c_clock.h
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/libcpu/c_clock.h
|
||||
endif
|
||||
if e500
|
||||
$(PROJECT_INCLUDE)/libcpu/c_clock.h: mpc6xx/clock/c_clock.h $(PROJECT_INCLUDE)/libcpu/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/libcpu/c_clock.h
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/libcpu/c_clock.h
|
||||
|
||||
Reference in New Issue
Block a user