2006-03-17 Ralf Corsépius <ralf.corsepius@rtems.org>

* shared/interrupts/vectorexceptions.c: Merger with submission from
	Bruce Robinson <brucer@pmccorp.com>.
	Make some arrays static const.
This commit is contained in:
Ralf Corsepius
2006-03-17 15:31:13 +00:00
parent 900ae6fd27
commit 26d61ce4d3
2 changed files with 17 additions and 6 deletions

View File

@@ -1,3 +1,9 @@
2006-03-17 Ralf Corsépius <ralf.corsepius@rtems.org>
* shared/interrupts/vectorexceptions.c: Merger with submission from
Bruce Robinson <brucer@pmccorp.com>.
Make some arrays static const.
2006-03-16 Ralf Corsépius <ralf.corsepius@rtems.org> 2006-03-16 Ralf Corsépius <ralf.corsepius@rtems.org>
* Makefile.am, configure.ac: Reflect addition of rm52xx, tx49. * Makefile.am, configure.ac: Reflect addition of rm52xx, tx49.

View File

@@ -14,7 +14,7 @@
#include <rtems/mips/idtcpu.h> #include <rtems/mips/idtcpu.h>
#include <rtems/bspIo.h> #include <rtems/bspIo.h>
char *cause_strings[32] = static const char *cause_strings[32] =
{ {
/* 0 */ "Int", /* 0 */ "Int",
/* 1 */ "TLB Mods", /* 1 */ "TLB Mods",
@@ -55,7 +55,7 @@ struct regdef
char *name; char *name;
}; };
struct regdef dumpregs[]= { static const struct regdef dumpregs[]= {
{ R_RA, "R_RA" }, { R_V0, "R_V0" }, { R_V1, "R_V1" }, { R_RA, "R_RA" }, { R_V0, "R_V0" }, { R_V1, "R_V1" },
{ R_A0, "R_A0" }, { R_A1, "R_A1" }, { R_A2, "R_A2" }, { R_A0, "R_A0" }, { R_A1, "R_A1" }, { R_A2, "R_A2" },
{ R_A3, "R_A3" }, { R_T0, "R_T0" }, { R_T1, "R_T1" }, { R_A3, "R_A3" }, { R_T0, "R_T0" }, { R_T1, "R_T1" },
@@ -68,23 +68,28 @@ struct regdef dumpregs[]= {
void mips_dump_exception_frame( CPU_Interrupt_frame *frame ) void mips_dump_exception_frame( CPU_Interrupt_frame *frame )
{ {
unsigned int *frame_u32; uint32_t *frame_u32;
int i, j; int i, j;
frame_u32 = (uint32_t*)frame; frame_u32 = (uint32_t *)frame;
for(i=0; dumpregs[i].offset > -1; i++) for(i=0; dumpregs[i].offset > -1; i++)
{ {
printk(" %s", dumpregs[i].name); printk(" %s", dumpregs[i].name);
for(j=0; j< 7-strlen(dumpregs[i].name); j++) printk(" "); for(j=0; j< 7-strlen(dumpregs[i].name); j++) printk(" ");
#if (__mips == 1 ) || (__mips == 32)
printk(" %08X%c", frame_u32[dumpregs[i].offset], (i%3) ? '\t' : '\n' ); printk(" %08X%c", frame_u32[dumpregs[i].offset], (i%3) ? '\t' : '\n' );
#elif __mips == 3
printk(" %08X", frame_u32[2 * dumpregs[i].offset + 1] );
printk("%08X%c", frame_u32[2 * dumpregs[i].offset], (i%2) ? '\t' : '\n' );
#endif
} }
printk( "\n" ); printk( "\n" );
} }
void mips_default_exception_code_handler( int exc, CPU_Interrupt_frame *frame ) void mips_default_exception_code_handler( int exc, CPU_Interrupt_frame *frame )
{ {
unsigned int sr; uint32_t sr;
unsigned int cause; uint32_t cause;
mips_get_sr( sr ); mips_get_sr( sr );
mips_get_cause( cause ); mips_get_cause( cause );