/[qemu]/qemu/target-ppc/cpu.h
ViewVC logotype

Diff of /qemu/target-ppc/cpu.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.19 by bellard, Sat Jul 2 20:59:33 2005 UTC revision 1.20 by bellard, Sat Jul 2 22:09:27 2005 UTC
# Line 924  enum { Line 924  enum {
924    
925  /*****************************************************************************/  /*****************************************************************************/
926  /* Exceptions */  /* Exceptions */
927  enum {  #define EXCP_NONE          -1
928      EXCP_NONE          = -1,  /* PowerPC hardware exceptions : exception vectors defined in PowerPC book 3 */
929      /* PowerPC hardware exceptions : exception vector / 0x100 */  #define EXCP_RESET         0x0100 /* System reset                            */
930      EXCP_RESET         = 0x01, /* System reset                     */  #define EXCP_MACHINE_CHECK 0x0200 /* Machine check exception                 */
931      EXCP_MACHINE_CHECK = 0x02, /* Machine check exception          */  #define EXCP_DSI           0x0300 /* Data storage exception                  */
932      EXCP_DSI           = 0x03, /* Impossible memory access         */  #define EXCP_DSEG          0x0380 /* Data segment exception                  */
933      EXCP_ISI           = 0x04, /* Impossible instruction fetch     */  #define EXCP_ISI           0x0400 /* Instruction storage exception           */
934      EXCP_EXTERNAL      = 0x05, /* External interruption            */  #define EXCP_ISEG          0x0480 /* Instruction segment exception           */
935      EXCP_ALIGN         = 0x06, /* Alignment exception              */  #define EXCP_EXTERNAL      0x0500 /* External interruption                   */
936      EXCP_PROGRAM       = 0x07, /* Program exception                */  #define EXCP_ALIGN         0x0600 /* Alignment exception                     */
937      EXCP_NO_FP         = 0x08, /* No floating point                */  #define EXCP_PROGRAM       0x0700 /* Program exception                       */
938      EXCP_DECR          = 0x09, /* Decrementer exception            */  #define EXCP_NO_FP         0x0800 /* Floating point unavailable exception    */
939      EXCP_RESA          = 0x0A, /* Implementation specific          */  #define EXCP_DECR          0x0900 /* Decrementer exception                   */
940      EXCP_RESB          = 0x0B, /* Implementation specific          */  #define EXCP_HDECR         0x0980 /* Hypervisor decrementer exception        */
941      EXCP_SYSCALL       = 0x0C, /* System call                      */  #define EXCP_SYSCALL       0x0C00 /* System call                             */
942      EXCP_TRACE         = 0x0D, /* Trace exception (optional)       */  #define EXCP_TRACE         0x0D00 /* Trace exception                         */
943      EXCP_FP_ASSIST     = 0x0E, /* Floating-point assist (optional) */  #define EXCP_PERF          0x0F00 /* Performance monitor exception           */
944      /* MPC740/745/750 & IBM 750 */  /* Exceptions defined in PowerPC 32 bits programming environment manual      */
945      EXCP_PERF          = 0x0F,  /* Performance monitor              */  #define EXCP_FP_ASSIST     0x0E00 /* Floating-point assist                   */
946      EXCP_IABR          = 0x13,  /* Instruction address breakpoint   */  /* Implementation specific exceptions                                        */
947      EXCP_SMI           = 0x14,  /* System management interrupt      */  /* 40x exceptions                                                            */
948      EXCP_THRM          = 0x15,  /* Thermal management interrupt     */  #define EXCP_40x_PIT       0x1000 /* Programmable interval timer interrupt   */
949      /* MPC755 */  #define EXCP_40x_FIT       0x1010 /* Fixed interval timer interrupt          */
950      EXCP_TLBMISS       = 0x10,  /* Instruction TLB miss             */  #define EXCP_40x_WATCHDOG  0x1020 /* Watchdog timer exception                */
951      EXCP_TLBMISS_DL    = 0x11,  /* Data TLB miss for load           */  #define EXCP_40x_DTLBMISS  0x1100 /* Data TLB miss exception                 */
952      EXCP_TLBMISS_DS    = 0x12,  /* Data TLB miss for store          */  #define EXCP_40x_ITLBMISS  0x1200 /* Instruction TLB miss exception          */
953      EXCP_PPC_MAX       = 0x16,  #define EXCP_40x_DEBUG     0x2000 /* Debug exception                         */
954      /* Qemu exception */  /* 405 specific exceptions                                                   */
955      EXCP_OFCALL        = 0x20,  /* Call open-firmware emulator      */  #define EXCP_405_APU       0x0F20 /* APU unavailable exception               */
956      EXCP_RTASCALL      = 0x21,  /* Call RTAS emulator               */  /* TLB assist exceptions (602/603)                                           */
957      /* Special cases where we want to stop translation */  #define EXCP_I_TLBMISS     0x1000 /* Instruction TLB miss                    */
958      EXCP_MTMSR         = 0x104, /* mtmsr instruction:               */  #define EXCP_DL_TLBMISS    0x1100 /* Data load TLB miss                      */
959    #define EXCP_DS_TLBMISS    0x1200 /* Data store TLB miss                     */
960    /* Breakpoint exceptions (602/603/604/620/740/745/750/755...)                */
961    #define EXCP_IABR          0x1300 /* Instruction address breakpoint          */
962    #define EXCP_SMI           0x1400 /* System management interrupt             */
963    /* Altivec related exceptions                                                */
964    #define EXCP_VPU           0x0F20 /* VPU unavailable exception               */
965    /* 601 specific exceptions                                                   */
966    #define EXCP_601_IO        0x0600 /* IO error exception                      */
967    #define EXCP_601_RUNM      0x2000 /* Run mode exception                      */
968    /* 602 specific exceptions                                                   */
969    #define EXCP_602_WATCHDOG  0x1500 /* Watchdog exception                      */
970    #define EXCP_602_EMUL      0x1600 /* Emulation trap exception                */
971    /* G2 specific exceptions                                                    */
972    #define EXCP_G2_CRIT       0x0A00 /* Critical interrupt                      */
973    /* MPC740/745/750 & IBM 750 specific exceptions                              */
974    #define EXCP_THRM          0x1700 /* Thermal management interrupt            */
975    /* 74xx specific exceptions                                                  */
976    #define EXCP_74xx_VPUA     0x1600 /* VPU assist exception                    */
977    /* 970FX specific exceptions                                                 */
978    #define EXCP_970_SOFTP     0x1500 /* Soft patch exception                    */
979    #define EXCP_970_MAINT     0x1600 /* Maintenance exception                   */
980    #define EXCP_970_THRM      0x1800 /* Thermal exception                       */
981    #define EXCP_970_VPUA      0x1700 /* VPU assist exception                    */
982    /* End of exception vectors area                                             */
983    #define EXCP_PPC_MAX       0x4000
984    /* Qemu exceptions: special cases we want to stop translation                */
985    #define EXCP_MTMSR         0x11000 /* mtmsr instruction:                     */
986                                  /* may change privilege level       */                                  /* may change privilege level       */
987      EXCP_BRANCH        = 0x108, /* branch instruction               */  #define EXCP_BRANCH        0x11001 /* branch instruction                     */
988      EXCP_RFI           = 0x10C, /* return from interrupt            */  #define EXCP_SYSCALL_USER  0x12000 /* System call in user mode only          */
989      EXCP_SYSCALL_USER  = 0x110, /* System call in user mode only    */  #define EXCP_INTERRUPT_CRITICAL 0x13000 /* critical IRQ                      */
990  };  
991  /* Error codes */  /* Error codes */
992  enum {  enum {
     /* Exception subtypes for EXCP_DSI                              */  
     EXCP_DSI_TRANSLATE = 0x01,  /* Data address can't be translated */  
     EXCP_DSI_NOTSUP    = 0x02,  /* Access type not supported        */  
     EXCP_DSI_PROT      = 0x03,  /* Memory protection violation      */  
     EXCP_DSI_EXTERNAL  = 0x04,  /* External access disabled         */  
     EXCP_DSI_DABR      = 0x05,  /* Data address breakpoint          */  
     /* flags for EXCP_DSI */  
     EXCP_DSI_DIRECT    = 0x10,  
     EXCP_DSI_STORE     = 0x20,  
     EXCP_DSI_ECXW      = 0x40,  
     /* Exception subtypes for EXCP_ISI                              */  
     EXCP_ISI_TRANSLATE = 0x01,  /* Code address can't be translated */  
     EXCP_ISI_NOEXEC    = 0x02,  /* Try to fetch from a data segment */  
     EXCP_ISI_GUARD     = 0x03,  /* Fetch from guarded memory        */  
     EXCP_ISI_PROT      = 0x04,  /* Memory protection violation      */  
     EXCP_ISI_DIRECT    = 0x05,  /* Trying to fetch from             *  
                                  * a direct store segment           */  
993      /* Exception subtypes for EXCP_ALIGN                            */      /* Exception subtypes for EXCP_ALIGN                            */
994      EXCP_ALIGN_FP      = 0x01,  /* FP alignment exception           */      EXCP_ALIGN_FP      = 0x01,  /* FP alignment exception           */
995      EXCP_ALIGN_LST     = 0x02,  /* Unaligned mult/extern load/store */      EXCP_ALIGN_LST     = 0x02,  /* Unaligned mult/extern load/store */

Legend:
Removed from v.1.19  
changed lines
  Added in v.1.20

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26