source: svn/trunk/newcon3bcm2_21bu/rockford/bsp/bcm97552/common/exceptreport.c

Last change on this file was 2, checked in by jglee, 11 years ago

first commit

  • Property svn:executable set to *
File size: 2.4 KB
Line 
1/**********************************************************************
2**
3**    Broadcom Corp. Confidential
4**    Copyright 2000 Broadcom Corp.  All Rights Reserved.
5**
6**
7**   File:         cpuctrl.c
8**   Description:  MIPS CPU  Interface
9**   Created:     
10**
11**
12**   REVISION:
13**
14**      $Log: $
15**
16**
17**********************************************************************/
18
19#include <stdio.h>
20
21#include "cpuctrl.h"
22#include "board.h"
23
24#ifdef GHS
25unsigned long ExGenRegs[32];
26unsigned long ExCp0Regs[32];
27unsigned long ExCp1Regs[32];
28unsigned long ExCnt;
29#endif
30
31/****************************************************************
32 * ExceptReport() : print an Exception Context to console and hang
33 ****************************************************************/
34void ExceptReport(unsigned long *GenRegs,unsigned long *Cp0Regs,unsigned long *Cp1Regs)
35{
36        printf("\n\r\n\nMIPS Exception\n\r");
37        printf("*************************************************************\n\r");
38        printf("STATUS=%08x\tBEV=%x\tIMask=%x\tIEnable=%x\n\r",
39                        Cp0Regs[(12)],
40                        (Cp0Regs[(12)]>>22)&1,
41                        (Cp0Regs[(12)]>>8)&0xff,
42                        (Cp0Regs[(12)])&1);
43        printf("CAUSE=%08x ExcCode=%d\n\r",
44                        Cp0Regs[(13)],(Cp0Regs[(13)]>>2)&0x1f);
45       
46        printf("-------------------------------------------------------------\n\r");
47        printf(" $0=%08x\t%08x\t%08x\t%08x\n\r",
48                        GenRegs[0],GenRegs[1],GenRegs[2],GenRegs[3]);
49
50        printf(" $4=%08x\t%08x\t%08x\t%08x\n\r",
51                        GenRegs[4],GenRegs[5],GenRegs[6],GenRegs[7]);
52        printf(" $8=%08x\t%08x\t%08x\t%08x\n\r",
53                        GenRegs[8],GenRegs[9],GenRegs[10],GenRegs[11]);
54        printf("$12=%08x\t%08x\t%08x\t%08x\n\r",
55                        GenRegs[12],GenRegs[13],GenRegs[14],GenRegs[15]);
56        printf("$16=%08x\t%08x\t%08x\t%08x\n\r",
57                        GenRegs[16],GenRegs[17],GenRegs[18],GenRegs[19]);
58        printf("$20=%08x\t%08x\t%08x\t%08x\n\r",
59                        GenRegs[20],GenRegs[21],GenRegs[22],GenRegs[23]);
60        printf("$24=%08x\t%08x\t%08x\t%08x\n\r",
61                        GenRegs[24],GenRegs[25],GenRegs[26],GenRegs[27]);
62        printf("$28=%08x\t%08x\t%08x\t%08x\n\r",
63                        GenRegs[28],GenRegs[29],GenRegs[30],GenRegs[31]);
64
65        printf("-------------------------------------------------------------\n\r");
66        printf("EPC=0x%08x\t%08x\n\r\n\r",
67                        Cp0Regs[(14)],*(long*)Cp0Regs[(14)]);
68
69        printf("-------------------------------------------------------------\n\r");
70        printf("test : %08x\n\r", Cp1Regs[1]);
71//      printf("floating point CP1 FCR0 : %08x\n\r", Cp1Regs[0]);
72//      printf("floating point CP1 FCR31 : %08x\n\r\n\r\n\r", Cp1Regs[31]);
73
74}
75
Note: See TracBrowser for help on using the repository browser.