Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* $Id: pstate.h,v 1.6 1997/06/25 07:39:45 jj Exp $ */ |
| 2 | #ifndef _SPARC64_PSTATE_H |
| 3 | #define _SPARC64_PSTATE_H |
| 4 | |
| 5 | #include <asm/const.h> |
| 6 | |
| 7 | /* The V9 PSTATE Register (with SpitFire extensions). |
| 8 | * |
| 9 | * ----------------------------------------------------------------------- |
| 10 | * | Resv | IG | MG | CLE | TLE | MM | RED | PEF | AM | PRIV | IE | AG | |
| 11 | * ----------------------------------------------------------------------- |
| 12 | * 63 12 11 10 9 8 7 6 5 4 3 2 1 0 |
| 13 | */ |
| 14 | #define PSTATE_IG _AC(0x0000000000000800,UL) /* Interrupt Globals. */ |
| 15 | #define PSTATE_MG _AC(0x0000000000000400,UL) /* MMU Globals. */ |
| 16 | #define PSTATE_CLE _AC(0x0000000000000200,UL) /* Current Little Endian.*/ |
| 17 | #define PSTATE_TLE _AC(0x0000000000000100,UL) /* Trap Little Endian. */ |
| 18 | #define PSTATE_MM _AC(0x00000000000000c0,UL) /* Memory Model. */ |
| 19 | #define PSTATE_TSO _AC(0x0000000000000000,UL) /* MM: TotalStoreOrder */ |
| 20 | #define PSTATE_PSO _AC(0x0000000000000040,UL) /* MM: PartialStoreOrder */ |
| 21 | #define PSTATE_RMO _AC(0x0000000000000080,UL) /* MM: RelaxedMemoryOrder*/ |
| 22 | #define PSTATE_RED _AC(0x0000000000000020,UL) /* Reset Error Debug. */ |
| 23 | #define PSTATE_PEF _AC(0x0000000000000010,UL) /* Floating Point Enable.*/ |
| 24 | #define PSTATE_AM _AC(0x0000000000000008,UL) /* Address Mask. */ |
| 25 | #define PSTATE_PRIV _AC(0x0000000000000004,UL) /* Privilege. */ |
| 26 | #define PSTATE_IE _AC(0x0000000000000002,UL) /* Interrupt Enable. */ |
| 27 | #define PSTATE_AG _AC(0x0000000000000001,UL) /* Alternate Globals. */ |
| 28 | |
| 29 | /* The V9 TSTATE Register (with SpitFire and Linux extensions). |
| 30 | * |
| 31 | * --------------------------------------------------------------- |
| 32 | * | Resv | CCR | ASI | %pil | PSTATE | Resv | CWP | |
| 33 | * --------------------------------------------------------------- |
| 34 | * 63 40 39 32 31 24 23 20 19 8 7 5 4 0 |
| 35 | */ |
| 36 | #define TSTATE_CCR _AC(0x000000ff00000000,UL) /* Condition Codes. */ |
| 37 | #define TSTATE_XCC _AC(0x000000f000000000,UL) /* Condition Codes. */ |
| 38 | #define TSTATE_XNEG _AC(0x0000008000000000,UL) /* %xcc Negative. */ |
| 39 | #define TSTATE_XZERO _AC(0x0000004000000000,UL) /* %xcc Zero. */ |
| 40 | #define TSTATE_XOVFL _AC(0x0000002000000000,UL) /* %xcc Overflow. */ |
| 41 | #define TSTATE_XCARRY _AC(0x0000001000000000,UL) /* %xcc Carry. */ |
| 42 | #define TSTATE_ICC _AC(0x0000000f00000000,UL) /* Condition Codes. */ |
| 43 | #define TSTATE_INEG _AC(0x0000000800000000,UL) /* %icc Negative. */ |
| 44 | #define TSTATE_IZERO _AC(0x0000000400000000,UL) /* %icc Zero. */ |
| 45 | #define TSTATE_IOVFL _AC(0x0000000200000000,UL) /* %icc Overflow. */ |
| 46 | #define TSTATE_ICARRY _AC(0x0000000100000000,UL) /* %icc Carry. */ |
| 47 | #define TSTATE_ASI _AC(0x00000000ff000000,UL) /* AddrSpace ID. */ |
| 48 | #define TSTATE_PIL _AC(0x0000000000f00000,UL) /* %pil (Linux traps)*/ |
| 49 | #define TSTATE_PSTATE _AC(0x00000000000fff00,UL) /* PSTATE. */ |
| 50 | #define TSTATE_IG _AC(0x0000000000080000,UL) /* Interrupt Globals.*/ |
| 51 | #define TSTATE_MG _AC(0x0000000000040000,UL) /* MMU Globals. */ |
| 52 | #define TSTATE_CLE _AC(0x0000000000020000,UL) /* CurrLittleEndian. */ |
| 53 | #define TSTATE_TLE _AC(0x0000000000010000,UL) /* TrapLittleEndian. */ |
| 54 | #define TSTATE_MM _AC(0x000000000000c000,UL) /* Memory Model. */ |
| 55 | #define TSTATE_TSO _AC(0x0000000000000000,UL) /* MM: TSO */ |
| 56 | #define TSTATE_PSO _AC(0x0000000000004000,UL) /* MM: PSO */ |
| 57 | #define TSTATE_RMO _AC(0x0000000000008000,UL) /* MM: RMO */ |
| 58 | #define TSTATE_RED _AC(0x0000000000002000,UL) /* Reset Error Debug.*/ |
| 59 | #define TSTATE_PEF _AC(0x0000000000001000,UL) /* FPU Enable. */ |
| 60 | #define TSTATE_AM _AC(0x0000000000000800,UL) /* Address Mask. */ |
| 61 | #define TSTATE_PRIV _AC(0x0000000000000400,UL) /* Privilege. */ |
| 62 | #define TSTATE_IE _AC(0x0000000000000200,UL) /* Interrupt Enable. */ |
| 63 | #define TSTATE_AG _AC(0x0000000000000100,UL) /* Alternate Globals.*/ |
| 64 | #define TSTATE_CWP _AC(0x000000000000001f,UL) /* Curr Win-Pointer. */ |
| 65 | |
| 66 | /* Floating-Point Registers State Register. |
| 67 | * |
| 68 | * -------------------------------- |
| 69 | * | Resv | FEF | DU | DL | |
| 70 | * -------------------------------- |
| 71 | * 63 3 2 1 0 |
| 72 | */ |
| 73 | #define FPRS_FEF _AC(0x0000000000000004,UL) /* FPU Enable. */ |
| 74 | #define FPRS_DU _AC(0x0000000000000002,UL) /* Dirty Upper. */ |
| 75 | #define FPRS_DL _AC(0x0000000000000001,UL) /* Dirty Lower. */ |
| 76 | |
| 77 | /* Version Register. |
| 78 | * |
| 79 | * ------------------------------------------------------ |
| 80 | * | MANUF | IMPL | MASK | Resv | MAXTL | Resv | MAXWIN | |
| 81 | * ------------------------------------------------------ |
| 82 | * 63 48 47 32 31 24 23 16 15 8 7 5 4 0 |
| 83 | */ |
| 84 | #define VERS_MANUF _AC(0xffff000000000000,UL) /* Manufacturer. */ |
| 85 | #define VERS_IMPL _AC(0x0000ffff00000000,UL) /* Implementation. */ |
| 86 | #define VERS_MASK _AC(0x00000000ff000000,UL) /* Mask Set Revision.*/ |
| 87 | #define VERS_MAXTL _AC(0x000000000000ff00,UL) /* Max Trap Level. */ |
| 88 | #define VERS_MAXWIN _AC(0x000000000000001f,UL) /* Max RegWindow Idx.*/ |
| 89 | |
| 90 | #endif /* !(_SPARC64_PSTATE_H) */ |