merged individual exception handler code to a common one.

This commit is contained in:
Thomas Doerfler
2007-07-04 12:25:49 +00:00
parent 8bfffd9baf
commit 73cdeb6a51
20 changed files with 445 additions and 141 deletions

View File

@@ -1,3 +1,18 @@
2007-07-02 Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
* ppc403/clock/clock.c, ppc403/console/console405.c,
* ppc403/irq/ictrl.c, ppc403/irq/ictrl.h, ppc403/tty_drv/tty_drv.c:
Adapted from old to new exception handling to prepare the "virtex" BSP
2007-07-02 Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
* Makefile.am, preinstall.am, new-exceptions/asm_utils.S,
* new-exceptions/raw_exception.c, new-exceptions/raw_exception.h,
* rtems/powerpc/powerpc.h, shared/include/cpuIdent.c shared/include/cpuIdent.h:
Created a shared implementation of the PowerPC exception
code. These files are a "superset" version of the various
implementations that was available up to now.
2007-05-21 Joel Sherrill <joel.sherrill@oarcorp.com>
* mpc6xx/clock/c_clock.c: Tinker with math so it does not overflow on

View File

@@ -32,6 +32,15 @@ new_exceptions_rtems_cpu_rel_SOURCES = new-exceptions/cpu.c \
new-exceptions/cpu_asm.S
new_exceptions_rtems_cpu_rel_CPPFLAGS = $(AM_CPPFLAGS)
new_exceptions_rtems_cpu_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
include_libcpu_HEADERS += new-exceptions/raw_exception.h
noinst_PROGRAMS += new-exceptions/raw_exception.rel
new_exceptions_raw_exception_rel_SOURCES = new-exceptions/raw_exception.c \
new-exceptions/asm_utils.S
new_exceptions_raw_exception_rel_CPPFLAGS = $(AM_CPPFLAGS)
new_exceptions_raw_exception_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
endif
## shared/include
@@ -84,13 +93,27 @@ endif
ppc403_console_rel_CPPFLAGS = $(AM_CPPFLAGS)
ppc403_console_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
if OLD_EXCEPTIONS
## ppc403/ictrl
include_HEADERS = ppc403/ictrl/ictrl.h
else
include_HEADERS =
include_libcpu_HEADERS += shared/include/spr.h
noinst_PROGRAMS += shared/cpuIdent.rel
shared_cpuIdent_rel_SOURCES = shared/include/cpuIdent.c shared/include/cpuIdent.h
shared_cpuIdent_rel_CPPFLAGS = $(AM_CPPFLAGS)
shared_cpuIdent_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
include_libcpu_HEADERS += shared/include/cpuIdent.h
endif
if OLD_EXCEPTIONS
noinst_PROGRAMS += ppc403/ictrl.rel
ppc403_ictrl_rel_SOURCES = ppc403/ictrl/ictrl.c ppc403/ictrl/ictrl.h
ppc403_ictrl_rel_CPPFLAGS = $(AM_CPPFLAGS)
ppc403_ictrl_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
endif
## ppc403/timer
noinst_PROGRAMS += ppc403/timer.rel
@@ -108,12 +131,14 @@ ppc403_tty_drv_rel_CPPFLAGS = $(AM_CPPFLAGS)
ppc403_tty_drv_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
endif
if OLD_EXCEPTIONS
## ppc403/vectors
noinst_PROGRAMS += ppc403/vectors.rel
ppc403_vectors_rel_SOURCES = ppc403/vectors/vectors.S ppc403/vectors/align_h.S
ppc403_vectors_rel_CPPFLAGS = $(AM_CPPFLAGS)
ppc403_vectors_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
endif
endif
EXTRA_DIST += mpc5xx/README
if mpc5xx
@@ -189,14 +214,6 @@ mpc505_vectors_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
endif
if mpc6xx
include_libcpu_HEADERS += mpc6xx/exceptions/raw_exception.h
## mpc6xx/exceptions
noinst_PROGRAMS += mpc6xx/exceptions.rel
mpc6xx_exceptions_rel_SOURCES = mpc6xx/exceptions/raw_exception.c \
mpc6xx/exceptions/asm_utils.S
mpc6xx_exceptions_rel_CPPFLAGS = $(AM_CPPFLAGS)
mpc6xx_exceptions_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
## mpc6xx/mmu
include_libcpu_HEADERS += mpc6xx/mmu/bat.h mpc6xx/mmu/pte121.h
@@ -251,15 +268,6 @@ mpc8xx_cpm_rel_SOURCES = mpc8xx/cpm/cp.c mpc8xx/cpm/dpram.c
mpc8xx_cpm_rel_CPPFLAGS = $(AM_CPPFLAGS)
mpc8xx_cpm_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
## mpc8xx/exceptions
include_libcpu_HEADERS += mpc8xx/exceptions/raw_exception.h
noinst_PROGRAMS += mpc8xx/exceptions.rel
mpc8xx_exceptions_rel_SOURCES = mpc8xx/exceptions/raw_exception.c \
mpc8xx/exceptions/asm_utils.S
mpc8xx_exceptions_rel_CPPFLAGS = $(AM_CPPFLAGS)
mpc8xx_exceptions_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
## mpc8xx/mmu
include_mpc8xx_HEADERS += mpc8xx/include/mmu.h
@@ -305,16 +313,6 @@ mpc8260_cpm_rel_SOURCES = mpc8260/cpm/cp.c mpc8260/cpm/dpram.c mpc8260/cpm/brg.c
mpc8260_cpm_rel_CPPFLAGS = $(AM_CPPFLAGS)
mpc8260_cpm_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
## mpc8260/exceptions
include_libcpu_HEADERS += mpc8260/exceptions/raw_exception.h
noinst_PROGRAMS += mpc8260/exceptions.rel
mpc8260_exceptions_rel_SOURCES = mpc8260/exceptions/raw_exception.c \
mpc8260/exceptions/asm_utils.S \
mpc8260/exceptions/raw_exception.h
mpc8260_exceptions_rel_CPPFLAGS = $(AM_CPPFLAGS)
mpc8260_exceptions_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
## mpc8260/mmu
include_mpc8260_HEADERS += mpc8260/include/mmu.h

View File

@@ -40,8 +40,17 @@
#include <rtems.h>
#include <rtems/clockdrv.h>
#include <rtems/libio.h>
#include <stdlib.h> /* for atexit() */
#include <rtems/bspIo.h>
/*
* check, which exception handling code is present
*/
#if !defined(ppc405)
#define PPC_HAS_CLASSIC_EXCEPTIONS TRUE
#else
#define PPC_HAS_CLASSIC_EXCEPTIONS FALSE
#include <bsp/irq.h>
#endif
volatile uint32_t Clock_driver_ticks;
static uint32_t pit_value, tick_time;
@@ -78,11 +87,14 @@ static inline uint32_t get_itimer(void)
/*
* ISR Handler
*/
rtems_isr
Clock_isr(rtems_vector_number vector)
#if PPC_HAS_CLASSIC_EXCEPTIONS
rtems_isr Clock_isr(rtems_vector_number vector)
#else
void Clock_isr(void* handle)
#endif
{
uint32_t clicks_til_next_interrupt;
uint32_t clicks_til_next_interrupt;
if (!auto_restart)
{
uint32_t itimer_value;
@@ -138,9 +150,42 @@ Clock_isr(rtems_vector_number vector)
rtems_clock_tick();
}
void Install_clock(rtems_isr_entry clock_isr)
#if !PPC_HAS_CLASSIC_EXCEPTIONS
int ClockIsOn(const rtems_irq_connect_data* unused)
{
register uint32_t tcr;
asm volatile ("mfspr %0, 0x3da" : "=r" ((tcr))); /* TCR */
return (tcr & 0x04000000) != 0;
}
#endif
void ClockOff(
#if PPC_HAS_CLASSIC_EXCEPTIONS
void
#else
const rtems_irq_connect_data* unused
#endif
)
{
register uint32_t tcr;
asm volatile ("mfspr %0, 0x3da" : "=r" ((tcr))); /* TCR */
tcr &= ~ 0x04400000;
asm volatile ("mtspr 0x3da, %0" : "=r" ((tcr)) : "0" ((tcr))); /* TCR */
}
void ClockOn(
#if PPC_HAS_CLASSIC_EXCEPTIONS
void
#else
const rtems_irq_connect_data* unused
#endif
)
{
rtems_isr_entry previous_isr;
uint32_t iocr;
register uint32_t tcr;
#ifdef ppc403
@@ -193,16 +238,6 @@ void Install_clock(rtems_isr_entry clock_isr)
pit_value = rtems_configuration_get_microseconds_per_tick() *
rtems_cpu_configuration_get_clicks_per_usec();
/*
* initialize the interval here
* First tick is set to right amount of time in the future
* Future ticks will be incremented over last value set
* in order to provide consistent clicks in the face of
* interrupt overhead
*/
rtems_interrupt_catch(clock_isr, PPC_IRQ_PIT, &previous_isr);
/*
* Set PIT value
*/
@@ -214,24 +249,107 @@ void Install_clock(rtems_isr_entry clock_isr)
* Enable PIT interrupt, bit TCR->PIE = 1 0x4000000
*/
tick_time = get_itimer() + pit_value;
asm volatile ("mfspr %0, 0x3da" : "=r" ((tcr))); /* TCR */
tcr = (tcr & ~0x04400000) | (auto_restart ? 0x04400000 : 0x04000000);
#if 1
asm volatile ("mtspr 0x3da, %0" : "=r" ((tcr)) : "0" ((tcr))); /* TCR */
#endif
}
void Install_clock(
#if PPC_HAS_CLASSIC_EXCEPTIONS
rtems_isr_entry clock_isr
#else
void (*clock_isr)(void *)
#endif
)
{
#ifdef ppc403
uint32_t pvr;
#endif /* ppc403 */
Clock_driver_ticks = 0;
/*
* initialize the interval here
* First tick is set to right amount of time in the future
* Future ticks will be incremented over last value set
* in order to provide consistent clicks in the face of
* interrupt overhead
*/
#if PPC_HAS_CLASSIC_EXCEPTIONS
{
rtems_isr_entry previous_isr;
rtems_interrupt_catch(clock_isr, PPC_IRQ_PIT, &previous_isr);
ClockOn();
}
#else
{
rtems_irq_connect_data clockIrqConnData;
clockIrqConnData.on = ClockOn;
clockIrqConnData.off = ClockOff;
clockIrqConnData.isOn = ClockIsOn;
clockIrqConnData.name = BSP_PIT;
clockIrqConnData.hdl = clock_isr;
if (!BSP_install_rtems_irq_handler (&clockIrqConnData)) {
printk("Unable to connect Clock Irq handler\n");
rtems_fatal_error_occurred(1);
}
}
#endif
atexit(Clock_exit);
}
void
ReInstall_clock(rtems_isr_entry new_clock_isr)
ReInstall_clock(
#if PPC_HAS_CLASSIC_EXCEPTIONS
rtems_isr_entry new_clock_isr
#else
void (*new_clock_isr)(void *)
#endif
)
{
rtems_isr_entry previous_isr;
uint32_t isrlevel = 0;
rtems_interrupt_disable(isrlevel);
uint32_t isrlevel = 0;
rtems_interrupt_disable(isrlevel);
#if PPC_HAS_CLASSIC_EXCEPTIONS
{
rtems_isr_entry previous_isr;
rtems_interrupt_catch(new_clock_isr, PPC_IRQ_PIT, &previous_isr);
ClockOn();
}
#else
{
rtems_irq_connect_data clockIrqConnData;
rtems_interrupt_catch(new_clock_isr, PPC_IRQ_PIT, &previous_isr);
clockIrqConnData.name = BSP_PIT;
if (!BSP_get_current_rtems_irq_handler(&clockIrqConnData)) {
printk("Unable to stop system clock\n");
rtems_fatal_error_occurred(1);
}
BSP_remove_rtems_irq_handler (&clockIrqConnData);
clockIrqConnData.on = ClockOn;
clockIrqConnData.off = ClockOff;
clockIrqConnData.isOn = ClockIsOn;
clockIrqConnData.name = BSP_PIT;
clockIrqConnData.hdl = new_clock_isr;
rtems_interrupt_enable(isrlevel);
if (!BSP_install_rtems_irq_handler (&clockIrqConnData)) {
printk("Unable to connect Clock Irq handler\n");
rtems_fatal_error_occurred(1);
}
}
#endif
rtems_interrupt_enable(isrlevel);
}
@@ -243,18 +361,25 @@ ReInstall_clock(rtems_isr_entry new_clock_isr)
* when bit's are set in TCR they can only be unset by a reset
*/
void
Clock_exit(void)
void Clock_exit(void)
{
register uint32_t tcr;
#if PPC_HAS_CLASSIC_EXCEPTIONS
ClockOff();
asm volatile ("mfspr %0, 0x3da" : "=r" ((tcr))); /* TCR */
tcr &= ~ 0x04400000;
asm volatile ("mtspr 0x3da, %0" : "=r" ((tcr)) : "0" ((tcr))); /* TCR */
(void) set_vector(0, PPC_IRQ_PIT, 1);
(void) set_vector(0, PPC_IRQ_PIT, 1);
#else
{
rtems_irq_connect_data clockIrqConnData;
clockIrqConnData.name = BSP_PIT;
if (!BSP_get_current_rtems_irq_handler(&clockIrqConnData)) {
printk("Unable to stop system clock\n");
rtems_fatal_error_occurred(1);
}
BSP_remove_rtems_irq_handler (&clockIrqConnData);
}
#endif
}
rtems_device_driver Clock_initialize(
@@ -293,7 +418,11 @@ rtems_device_driver Clock_control(
if (args->command == rtems_build_name('I', 'S', 'R', ' '))
{
#if PPC_HAS_CLASSIC_EXCEPTIONS
Clock_isr(PPC_IRQ_PIT);
#else
Clock_isr(NULL);
#endif
}
else if (args->command == rtems_build_name('N', 'E', 'W', ' '))
{

View File

@@ -159,14 +159,14 @@ struct async {
| Modem status Register.
+---------------------------------------------------------------------------*/
unsigned char MSR; /* 0x06 */
#define MSR_DCTS 0x01
#define MSR_DDSR 0x02
#define MSR_TERI 0x04
#define MSR_DDCD 0x08
#define MSR_CTS 0x10
#define MSR_DSR 0x20
#define MSR_RI 0x40
#define MSR_CD 0x80
#define UART_MSR_DCTS 0x01
#define UART_MSR_DDSR 0x02
#define UART_MSR_TERI 0x04
#define UART_MSR_DDCD 0x08
#define UART_MSR_CTS 0x10
#define UART_MSR_DSR 0x20
#define UART_MSR_RI 0x40
#define UART_MSR_CD 0x80
/*---------------------------------------------------------------------------+
| Scratch pad Register.

View File

@@ -117,14 +117,14 @@ struct ttyasync {
| Modem status Register.
+---------------------------------------------------------------------------*/
unsigned char MSR; /* 0x06 */
#define MSR_DCTS 0x01
#define MSR_DDSR 0x02
#define MSR_TERI 0x04
#define MSR_DDCD 0x08
#define MSR_CTS 0x10
#define MSR_DSR 0x20
#define MSR_RI 0x40
#define MSR_CD 0x80
#define UART_MSR_DCTS 0x01
#define UART_MSR_DDSR 0x02
#define UART_MSR_TERI 0x04
#define UART_MSR_DDCD 0x08
#define UART_MSR_CTS 0x10
#define UART_MSR_DSR 0x20
#define UART_MSR_RI 0x40
#define UART_MSR_CD 0x80
/*---------------------------------------------------------------------------+
| Scratch pad Register.

View File

@@ -49,6 +49,11 @@ if OLD_EXCEPTIONS
$(PROJECT_INCLUDE)/rtems/score/ppc_offs.h: old-exceptions/rtems/score/ppc_offs.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/ppc_offs.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/ppc_offs.h
else
$(PROJECT_INCLUDE)/libcpu/raw_exception.h: new-exceptions/raw_exception.h $(PROJECT_INCLUDE)/libcpu/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/libcpu/raw_exception.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/libcpu/raw_exception.h
endif
if shared
$(PROJECT_INCLUDE)/libcpu/io.h: shared/include/io.h $(PROJECT_INCLUDE)/libcpu/$(dirstamp)
@@ -88,10 +93,20 @@ $(PROJECT_INCLUDE)/libcpu/stackTrace.h: shared/src/stackTrace.h $(PROJECT_INCLUD
PREINSTALL_FILES += $(PROJECT_INCLUDE)/libcpu/stackTrace.h
endif
if ppc403
if OLD_EXCEPTIONS
$(PROJECT_INCLUDE)/ictrl.h: ppc403/ictrl/ictrl.h $(PROJECT_INCLUDE)/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/ictrl.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/ictrl.h
else
$(PROJECT_INCLUDE)/libcpu/spr.h: shared/include/spr.h $(PROJECT_INCLUDE)/libcpu/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/libcpu/spr.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/libcpu/spr.h
$(PROJECT_INCLUDE)/libcpu/cpuIdent.h: shared/include/cpuIdent.h $(PROJECT_INCLUDE)/libcpu/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/libcpu/cpuIdent.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/libcpu/cpuIdent.h
endif
if ppc405
$(PROJECT_INCLUDE)/tty_drv.h: ppc403/tty_drv/tty_drv.h $(PROJECT_INCLUDE)/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/tty_drv.h
@@ -130,10 +145,6 @@ $(PROJECT_INCLUDE)/ictrl.h: mpc505/ictrl/ictrl.h $(PROJECT_INCLUDE)/$(dirstamp)
PREINSTALL_FILES += $(PROJECT_INCLUDE)/ictrl.h
endif
if mpc6xx
$(PROJECT_INCLUDE)/libcpu/raw_exception.h: mpc6xx/exceptions/raw_exception.h $(PROJECT_INCLUDE)/libcpu/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/libcpu/raw_exception.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/libcpu/raw_exception.h
$(PROJECT_INCLUDE)/libcpu/bat.h: mpc6xx/mmu/bat.h $(PROJECT_INCLUDE)/libcpu/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/libcpu/bat.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/libcpu/bat.h
@@ -164,10 +175,6 @@ $(PROJECT_INCLUDE)/mpc8xx/cpm.h: mpc8xx/include/cpm.h $(PROJECT_INCLUDE)/mpc8xx/
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/mpc8xx/cpm.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/mpc8xx/cpm.h
$(PROJECT_INCLUDE)/libcpu/raw_exception.h: mpc8xx/exceptions/raw_exception.h $(PROJECT_INCLUDE)/libcpu/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/libcpu/raw_exception.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/libcpu/raw_exception.h
$(PROJECT_INCLUDE)/mpc8xx/mmu.h: mpc8xx/include/mmu.h $(PROJECT_INCLUDE)/mpc8xx/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/mpc8xx/mmu.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/mpc8xx/mmu.h
@@ -190,10 +197,6 @@ $(PROJECT_INCLUDE)/mpc8260/cpm.h: mpc8260/include/cpm.h $(PROJECT_INCLUDE)/mpc82
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/mpc8260/cpm.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/mpc8260/cpm.h
$(PROJECT_INCLUDE)/libcpu/raw_exception.h: mpc8260/exceptions/raw_exception.h $(PROJECT_INCLUDE)/libcpu/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/libcpu/raw_exception.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/libcpu/raw_exception.h
$(PROJECT_INCLUDE)/mpc8260/mmu.h: mpc8260/include/mmu.h $(PROJECT_INCLUDE)/mpc8260/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/mpc8260/mmu.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/mpc8260/mmu.h

View File

@@ -108,6 +108,7 @@ extern "C" {
#define CPU_MODEL_NAME "PowerPC 405"
#endif
#define PPC_CACHE_ALIGNMENT 16
#define PPC_HAS_RI 0
#define PPC_HAS_RFCI 1
#define PPC_USE_MULTIPLE 1
#define PPC_I_CACHE 2048
@@ -362,6 +363,14 @@ extern "C" {
#ifndef PPC_HAS_EXCEPTION_PREFIX
#define PPC_HAS_EXCEPTION_PREFIX 1
#endif
/*
* Unless otherwise specified, assume the model has an RI bit to
* identify non-recoverable interrupts
*/
#ifndef PPC_HAS_RI
#define PPC_HAS_RI 1
#endif
/*
* Unless otherwise specified, assume the model does NOT have
@@ -657,15 +666,17 @@ extern "C" {
* Machine Status Register (MSR) Constants Used by RTEMS
*/
#if PPC_HAS_RI
#define PPC_MSR_RI 0x000000002 /* bit 30 - recoverable exception */
#endif
#define PPC_MSR_DR 0x000000010 /* bit 27 - data address translation */
#define PPC_MSR_IR 0x000000020 /* bit 26 - instruction addr translation*/
/*
* Some PPC model manuals refer to the Exception Prefix (EP) bit as
* IP for no apparent reason.
*/
#define PPC_MSR_RI 0x000000002 /* bit 30 - recoverable exception */
#define PPC_MSR_DR 0x000000010 /* bit 27 - data address translation */
#define PPC_MSR_IR 0x000000020 /* bit 26 - instruction addr translation*/
#if (PPC_HAS_EXCEPTION_PREFIX)
#define PPC_MSR_EP 0x000000040 /* bit 25 - exception prefix */
#else
@@ -708,4 +719,4 @@ extern "C" {
}
#endif
#endif /* _RTEMS_SCORE_POWERPC_H */
#endif /* _RTEMS_POWERPC_POWERPC_H */

View File

@@ -29,6 +29,7 @@ ppc_cpu_revision_t current_ppc_revision = 0xff;
char *get_ppc_cpu_type_name(ppc_cpu_id_t cpu)
{
switch (cpu) {
case PPC_405: return "PPC405";
case PPC_601: return "MPC601";
case PPC_5XX: return "MPC5XX";
case PPC_603: return "MPC603";
@@ -37,7 +38,7 @@ char *get_ppc_cpu_type_name(ppc_cpu_id_t cpu)
case PPC_750: return "MPC750";
case PPC_7400: return "MPC7400";
case PPC_7455: return "MPC7455";
case PPC_7457: return "MPC7457";
case PPC_7457: return "MPC7457";
case PPC_603le: return "MPC603le";
case PPC_604e: return "MPC604e";
case PPC_604r: return "MPC604r";
@@ -58,6 +59,7 @@ ppc_cpu_id_t get_ppc_cpu_type()
unsigned int pvr = (_read_PVR() >> 16);
current_ppc_cpu = (ppc_cpu_id_t) pvr;
switch (pvr) {
case PPC_405:
case PPC_601:
case PPC_5XX:
case PPC_603:
@@ -68,7 +70,7 @@ ppc_cpu_id_t get_ppc_cpu_type()
case PPC_750:
case PPC_7400:
case PPC_7455:
case PPC_7457:
case PPC_7457:
case PPC_604e:
case PPC_620:
case PPC_860:

View File

@@ -29,6 +29,7 @@ typedef enum
PPC_604e = 0x9,
PPC_604r = 0xA,
PPC_7400 = 0xC,
PPC_405 = 0x2001,
PPC_7455 = 0x8001, /* Kate Feng */
PPC_7457 = 0x8002,
PPC_620 = 0x16,