forked from Imagelibrary/rtems
2007-12-08 Till Straumann <strauman@slac.stanford.edu>
* new-exceptions/e500_raw_exc_init.c, new-exceptions/raw_exception.c, shared/include/cpuIdent.c, shared/include/cpuIdent.h: Added different kinds of 'bookE' to the ppc_cpu_is_bookE feature check; unfortunately...
This commit is contained in:
@@ -1,3 +1,10 @@
|
|||||||
|
2007-12-08 Till Straumann <strauman@slac.stanford.edu>
|
||||||
|
|
||||||
|
* new-exceptions/e500_raw_exc_init.c, new-exceptions/raw_exception.c,
|
||||||
|
shared/include/cpuIdent.c, shared/include/cpuIdent.h:
|
||||||
|
Added different kinds of 'bookE' to the ppc_cpu_is_bookE feature
|
||||||
|
check; unfortunately...
|
||||||
|
|
||||||
2007-12-07 Till Straumann <strauman@slac.stanford.edu>
|
2007-12-07 Till Straumann <strauman@slac.stanford.edu>
|
||||||
|
|
||||||
* Makefile.am: must not add e500_raw_exc_init.c to
|
* Makefile.am: must not add e500_raw_exc_init.c to
|
||||||
|
|||||||
@@ -7,7 +7,8 @@
|
|||||||
void
|
void
|
||||||
e500_setup_raw_exceptions()
|
e500_setup_raw_exceptions()
|
||||||
{
|
{
|
||||||
if ( !ppc_cpu_is_bookE() )
|
unsigned c;
|
||||||
|
if ( ! (c = ppc_cpu_is_bookE()) || PPC_BOOKE_405 == c )
|
||||||
return;
|
return;
|
||||||
asm volatile("mtivpr %0"::"r"(0));
|
asm volatile("mtivpr %0"::"r"(0));
|
||||||
/* setup vectors to be compatible with classic PPC */
|
/* setup vectors to be compatible with classic PPC */
|
||||||
|
|||||||
@@ -443,7 +443,8 @@ int ppc_delete_exception (const rtems_raw_except_connect_data* except)
|
|||||||
int ppc_init_exceptions (rtems_raw_except_global_settings* config)
|
int ppc_init_exceptions (rtems_raw_except_global_settings* config)
|
||||||
{
|
{
|
||||||
rtems_interrupt_level k;
|
rtems_interrupt_level k;
|
||||||
int i;
|
int i;
|
||||||
|
unsigned c;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* store various accelerators
|
* store various accelerators
|
||||||
@@ -454,7 +455,7 @@ int ppc_init_exceptions (rtems_raw_except_global_settings* config)
|
|||||||
|
|
||||||
rtems_interrupt_disable(k);
|
rtems_interrupt_disable(k);
|
||||||
|
|
||||||
if ( ppc_cpu_is_bookE() ) {
|
if ( (c = ppc_cpu_is_bookE()) && PPC_BOOKE_405 != c ) {
|
||||||
e500_setup_raw_exceptions();
|
e500_setup_raw_exceptions();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -463,7 +464,7 @@ int ppc_init_exceptions (rtems_raw_except_global_settings* config)
|
|||||||
* We also rely on LAST_VALID_EXC < 32
|
* We also rely on LAST_VALID_EXC < 32
|
||||||
*/
|
*/
|
||||||
for ( i=0; i <= LAST_VALID_EXC; i++ ) {
|
for ( i=0; i <= LAST_VALID_EXC; i++ ) {
|
||||||
if ( PPC_EXC_405_CRITICAL == ppc_vector_is_valid( i ) )
|
if ( PPC_EXC_405_CRITICAL == (ppc_vector_is_valid( i ) & ~PPC_EXC_ASYNC) )
|
||||||
bsp_raw_vector_is_405_critical |= (1<<i);
|
bsp_raw_vector_is_405_critical |= (1<<i);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -123,8 +123,10 @@ ppc_cpu_id_t get_ppc_cpu_type()
|
|||||||
|
|
||||||
switch ( current_ppc_cpu ) {
|
switch ( current_ppc_cpu ) {
|
||||||
case PPC_405:
|
case PPC_405:
|
||||||
|
current_ppc_features.is_bookE = PPC_BOOKE_405;
|
||||||
|
break;
|
||||||
case PPC_8540:
|
case PPC_8540:
|
||||||
current_ppc_features.is_bookE = 1;
|
current_ppc_features.is_bookE = PPC_BOOKE_E500;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,7 +58,10 @@ typedef struct {
|
|||||||
unsigned has_altivec : 1;
|
unsigned has_altivec : 1;
|
||||||
unsigned has_fpu : 1;
|
unsigned has_fpu : 1;
|
||||||
unsigned has_hw_ptbl_lkup : 1;
|
unsigned has_hw_ptbl_lkup : 1;
|
||||||
unsigned is_bookE : 1;
|
#define PPC_BOOKE_405 1 /* almost like booke but with some significant differences */
|
||||||
|
#define PPC_BOOKE_STD 2
|
||||||
|
#define PPC_BOOKE_E500 3 /* bookE with extensions */
|
||||||
|
unsigned is_bookE : 2;
|
||||||
unsigned has_16byte_clne : 1;
|
unsigned has_16byte_clne : 1;
|
||||||
unsigned is_60x : 1;
|
unsigned is_60x : 1;
|
||||||
unsigned has_8_bats : 1;
|
unsigned has_8_bats : 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user