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:
Till Straumann
2007-12-08 22:46:59 +00:00
parent a9e62c242f
commit 4be2812f5b
5 changed files with 20 additions and 6 deletions

View File

@@ -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>
* Makefile.am: must not add e500_raw_exc_init.c to

View File

@@ -7,7 +7,8 @@
void
e500_setup_raw_exceptions()
{
if ( !ppc_cpu_is_bookE() )
unsigned c;
if ( ! (c = ppc_cpu_is_bookE()) || PPC_BOOKE_405 == c )
return;
asm volatile("mtivpr %0"::"r"(0));
/* setup vectors to be compatible with classic PPC */

View File

@@ -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)
{
rtems_interrupt_level k;
int i;
int i;
unsigned c;
/*
* store various accelerators
@@ -454,7 +455,7 @@ int ppc_init_exceptions (rtems_raw_except_global_settings* config)
rtems_interrupt_disable(k);
if ( ppc_cpu_is_bookE() ) {
if ( (c = ppc_cpu_is_bookE()) && PPC_BOOKE_405 != c ) {
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
*/
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);
}

View File

@@ -123,8 +123,10 @@ ppc_cpu_id_t get_ppc_cpu_type()
switch ( current_ppc_cpu ) {
case PPC_405:
current_ppc_features.is_bookE = PPC_BOOKE_405;
break;
case PPC_8540:
current_ppc_features.is_bookE = 1;
current_ppc_features.is_bookE = PPC_BOOKE_E500;
default:
break;
}

View File

@@ -58,7 +58,10 @@ typedef struct {
unsigned has_altivec : 1;
unsigned has_fpu : 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 is_60x : 1;
unsigned has_8_bats : 1;