Changeset d70ebffe in mainline for kernel/arch/sparc64/include
- Timestamp:
- 2014-10-27T15:10:14Z (11 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- aef669b
- Parents:
- ec443d5
- Location:
- kernel/arch/sparc64/include/arch
- Files:
-
- 4 edited
-
istate_struct.ag (modified) (2 diffs)
-
mm/sun4u/tlb.h (modified) (1 diff)
-
trap/sun4u/mmu.h (modified) (4 diffs)
-
trap/trap_table.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/sparc64/include/arch/istate_struct.ag
rec443d5 rd70ebffe 41 41 42 42 members : [ 43 44 # 45 # Window save area for locals and inputs. Required by ABI. 46 # Before using these, make sure that the corresponding register 47 # window has been spilled into memory, otherwise l0-l7 and 48 # i0-i7 will have undefined values. 49 # 50 { 51 name : l0, 52 type : uint64_t, 53 }, 54 { 55 name : l1, 56 type : uint64_t, 57 }, 58 { 59 name : l2, 60 type : uint64_t, 61 }, 62 { 63 name : l3, 64 type : uint64_t, 65 }, 66 { 67 name : l4, 68 type : uint64_t, 69 }, 70 { 71 name : l5, 72 type : uint64_t, 73 }, 74 { 75 name : l6, 76 type : uint64_t, 77 }, 78 { 79 name : l7, 80 type : uint64_t, 81 }, 82 { 83 name : i0, 84 type : uint64_t, 85 }, 86 { 87 name : i1, 88 type : uint64_t, 89 }, 90 { 91 name : i2, 92 type : uint64_t, 93 }, 94 { 95 name : i3, 96 type : uint64_t, 97 }, 98 { 99 name : i4, 100 type : uint64_t, 101 }, 102 { 103 name : i5, 104 type : uint64_t, 105 }, 106 { 107 name : i6, 108 type : uint64_t, 109 }, 110 { 111 name : i7, 112 type : uint64_t, 113 }, 114 115 # 116 # Six mandatory argument slots, required by the ABI, plus an 117 # optional argument slot for the 7th argument used by our 118 # syscalls. Since the preemptible handler is always passing 119 # integral arguments, undef_arg[0] - undef_arg[5] are always 120 # undefined. 121 # 122 { 123 name : undef_arg, 124 type : uint64_t, 125 elements : 6, 126 }, 127 { 128 name : arg6, 129 type : uint64_t, 130 }, 131 132 # 133 # From this point onwards, the istate layout is not dicated by 134 # the ABI. The only requirement is the stack alignment. 135 # 136 43 137 { 44 138 name : tnpc, … … 51 145 { 52 146 name : tstate, 147 type : uint64_t 148 }, 149 { 150 name : y, 151 type : uint64_t, 152 }, 153 154 # 155 # At the moment, these are defined only when needed by the 156 # preemptible handler, so consider them undefined for now. 157 # 158 { 159 name : o0, 160 type : uint64_t, 161 }, 162 { 163 name : o1, 164 type : uint64_t, 165 }, 166 { 167 name : o2, 168 type : uint64_t, 169 }, 170 { 171 name : o3, 172 type : uint64_t, 173 }, 174 { 175 name : o4, 176 type : uint64_t, 177 }, 178 { 179 name : o5, 180 type : uint64_t, 181 }, 182 { 183 name : o6, 184 type : uint64_t, 185 }, 186 { 187 name : o7, 188 type : uint64_t, 189 }, 190 191 # 192 # I/DTLB Tag Access register or zero for non-MMU traps. 193 # 194 { 195 name : tlb_tag_access, 53 196 type : uint64_t 54 197 } -
kernel/arch/sparc64/include/arch/mm/sun4u/tlb.h
rec443d5 rd70ebffe 678 678 } 679 679 680 extern void fast_instruction_access_mmu_miss( sysarg_t, istate_t *);681 extern void fast_data_access_mmu_miss( tlb_tag_access_reg_t, istate_t *);682 extern void fast_data_access_protection( tlb_tag_access_reg_t, istate_t *);680 extern void fast_instruction_access_mmu_miss(unsigned int, istate_t *); 681 extern void fast_data_access_mmu_miss(unsigned int, istate_t *); 682 extern void fast_data_access_protection(unsigned int, istate_t *); 683 683 684 684 extern void dtlb_insert_mapping(uintptr_t, uintptr_t, int, bool, bool); -
kernel/arch/sparc64/include/arch/trap/sun4u/mmu.h
rec443d5 rd70ebffe 74 74 0: 75 75 wrpr %g0, PSTATE_PRIV_BIT | PSTATE_AG_BIT, %pstate 76 PREEMPTIBLE_HANDLER fast_instruction_access_mmu_miss 76 mov TT_FAST_INSTRUCTION_ACCESS_MMU_MISS, %g2 77 mov VA_IMMU_TAG_ACCESS, %g5 78 ldxa [%g5] ASI_IMMU, %g5 ! read the faulting Context and VPN 79 PREEMPTIBLE_HANDLER exc_dispatch 77 80 .endm 78 81 … … 107 110 wr %g0, ASI_DMMU, %asi 108 111 ldxa [VA_DMMU_TAG_ACCESS] %asi, %g1 ! read the faulting Context and VPN 109 set TLB_TAG_ACCESS_CONTEXT_MASK, %g2112 ldx [%g7 + %lo(tlb_tag_access_context_mask)], %g2 110 113 andcc %g1, %g2, %g3 ! get Context 111 114 bnz %xcc, 0f ! Context is non-zero … … 138 141 wrpr %g0, PSTATE_PRIV_BIT | PSTATE_AG_BIT, %pstate 139 142 140 /* 141 * Read the Tag Access register for the higher-level handler. 142 * This is necessary to survive nested DTLB misses. 143 */ 144 ldxa [VA_DMMU_TAG_ACCESS] %asi, %g2 145 146 /* 147 * g2 will be passed as an argument to fast_data_access_mmu_miss(). 148 */ 149 PREEMPTIBLE_HANDLER fast_data_access_mmu_miss 143 mov TT_FAST_DATA_ACCESS_MMU_MISS, %g2 144 ldxa [VA_DMMU_TAG_ACCESS] %asi, %g5 ! read the faulting Context and VPN 145 PREEMPTIBLE_HANDLER exc_dispatch 150 146 .endm 151 147 … … 164 160 wrpr %g0, PSTATE_PRIV_BIT | PSTATE_AG_BIT, %pstate 165 161 166 /* 167 * Read the Tag Access register for the higher-level handler. 168 * This is necessary to survive nested DTLB misses. 169 */ 170 mov VA_DMMU_TAG_ACCESS, %g2 171 ldxa [%g2] ASI_DMMU, %g2 172 173 /* 174 * g2 will be passed as an argument to fast_data_access_mmu_miss(). 175 */ 176 PREEMPTIBLE_HANDLER fast_data_access_protection 162 mov TT_FAST_DATA_ACCESS_PROTECTION, %g2 163 mov VA_DMMU_TAG_ACCESS, %g5 164 ldxa [%g5] ASI_DMMU, %g5 ! read the faulting Context and VPN 165 PREEMPTIBLE_HANDLER exc_dispatch 177 166 .endm 178 167 -
kernel/arch/sparc64/include/arch/trap/trap_table.h
rec443d5 rd70ebffe 43 43 #define TRAP_TABLE_SIZE (TRAP_TABLE_ENTRY_COUNT * TRAP_TABLE_ENTRY_SIZE) 44 44 45 #define ISTATE_END_OFFSET(o) ((o) - ISTATE_SIZE)46 47 /*48 * The one STACK_ITEM_SIZE is counted for space holding the 7th49 * argument to syscall_handler (i.e. syscall number) and the other50 * STACK_ITEM_SIZE is counted because of the required alignment.51 */52 #define PREEMPTIBLE_HANDLER_STACK_FRAME_SIZE \53 (STACK_WINDOW_SAVE_AREA_SIZE + STACK_ARG_SAVE_AREA_SIZE + \54 (2 * STACK_ITEM_SIZE) + (ISTATE_SIZE + 9 * 8))55 /* <-- istate_t ends here */56 #define SAVED_TSTATE ISTATE_END_OFFSET(ISTATE_OFFSET_TSTATE)57 #define SAVED_TPC ISTATE_END_OFFSET(ISTATE_OFFSET_TPC)58 #define SAVED_TNPC ISTATE_END_OFFSET(ISTATE_OFFSET_TNPC)59 /* <-- istate_t begins here */60 #define SAVED_Y -(1 * 8 + ISTATE_SIZE)61 #define SAVED_I0 -(2 * 8 + ISTATE_SIZE)62 #define SAVED_I1 -(3 * 8 + ISTATE_SIZE)63 #define SAVED_I2 -(4 * 8 + ISTATE_SIZE)64 #define SAVED_I3 -(5 * 8 + ISTATE_SIZE)65 #define SAVED_I4 -(6 * 8 + ISTATE_SIZE)66 #define SAVED_I5 -(7 * 8 + ISTATE_SIZE)67 #define SAVED_I6 -(8 * 8 + ISTATE_SIZE)68 #define SAVED_I7 -(9 * 8 + ISTATE_SIZE)69 70 45 #ifndef __ASM__ 71 46 … … 80 55 extern trap_table_entry_t trap_table[TRAP_TABLE_ENTRY_COUNT]; 81 56 extern trap_table_entry_t trap_table_save[TRAP_TABLE_ENTRY_COUNT]; 57 82 58 #endif /* !__ASM__ */ 83 59
Note:
See TracChangeset
for help on using the changeset viewer.
