Changeset 1b20da0 in mainline for kernel/arch/sparc64/src
- Timestamp:
- 2018-02-28T17:52:03Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3061bc1
- Parents:
- df6ded8
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-28 17:26:03)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-28 17:52:03)
- Location:
- kernel/arch/sparc64/src
- Files:
-
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/sparc64/src/console.c
rdf6ded8 r1b20da0 56 56 * Called on UltraSPARC machines with standard keyboard and framebuffer. 57 57 * 58 * @param aliases the "/aliases" OBP node 58 * @param aliases the "/aliases" OBP node 59 59 */ 60 60 static void standard_console_init(ofw_tree_node_t *aliases) … … 89 89 /** 90 90 * Initialize input/output. Auto-detects the type of machine 91 * and calls the appropriate I/O init routine. 91 * and calls the appropriate I/O init routine. 92 92 */ 93 93 void standalone_sparc64_console_init(void) -
kernel/arch/sparc64/src/context.S
rdf6ded8 r1b20da0 32 32 #include <arch/regdef.h> 33 33 34 .text 34 .text 35 35 36 36 /* -
kernel/arch/sparc64/src/cpu/sun4u/cpu.c
rdf6ded8 r1b20da0 86 86 * Detect processor frequency. 87 87 */ 88 if (is_us() || is_us_iii()) { 88 if (is_us() || is_us_iii()) { 89 89 node = ofw_tree_find_child_by_device_type(cpus_parent(), "cpu"); 90 90 while (node) { 91 91 int f = find_cpu_frequency(node); 92 if (f != -1) 92 if (f != -1) 93 93 clock_frequency = (uint32_t) f; 94 94 node = ofw_tree_find_peer_by_device_type(node, "cpu"); … … 100 100 f = find_cpu_frequency( 101 101 ofw_tree_find_child(node, "cpu@0")); 102 if (f != -1) 102 if (f != -1) 103 103 clock_frequency = (uint32_t) f; 104 104 f = find_cpu_frequency( 105 105 ofw_tree_find_child(node, "cpu@1")); 106 if (f != -1) 106 if (f != -1) 107 107 clock_frequency = (uint32_t) f; 108 108 node = ofw_tree_find_peer_by_name(node, "cmp"); -
kernel/arch/sparc64/src/drivers/pci.c
rdf6ded8 r1b20da0 79 79 * 80 80 * @return Address of the initialized PCI structure. 81 */ 81 */ 82 82 pci_t *pci_sabre_init(ofw_tree_node_t *node) 83 83 { … … 121 121 * 122 122 * @return Address of the initialized PCI structure. 123 */ 123 */ 124 124 pci_t *pci_psycho_init(ofw_tree_node_t *node) 125 125 { -
kernel/arch/sparc64/src/drivers/scr.c
rdf6ded8 r1b20da0 27 27 */ 28 28 29 /** @addtogroup sparc64 29 /** @addtogroup sparc64 30 30 * @{ 31 31 */ … … 209 209 210 210 break; 211 case SCR_FFB: 211 case SCR_FFB: 212 212 fb_scanline = 8192; 213 213 visual = VISUAL_BGR_0_8_8_8; -
kernel/arch/sparc64/src/mm/sun4u/tlb.c
rdf6ded8 r1b20da0 322 322 * Forward the page fault to the address space page fault 323 323 * handler. 324 */ 324 */ 325 325 as_page_fault(page_16k, PF_ACCESS_WRITE, istate); 326 326 } … … 330 330 * 331 331 * The diag field has been left out in order to make this function more generic 332 * (there is no diag field in US3 architeture). 333 * 334 * @param i TLB entry number 332 * (there is no diag field in US3 architeture). 333 * 334 * @param i TLB entry number 335 335 * @param t TLB entry tag 336 * @param d TLB entry data 336 * @param d TLB entry data 337 337 */ 338 338 static void print_tlb_entry(int i, tlb_tag_read_reg_t t, tlb_data_t d) -
kernel/arch/sparc64/src/mm/sun4v/tlb.c
rdf6ded8 r1b20da0 282 282 * Forward the page fault to the address space page fault 283 283 * handler. 284 */ 284 */ 285 285 as_page_fault(va, PF_ACCESS_READ, istate); 286 286 } … … 323 323 * Forward the page fault to the address space page fault 324 324 * handler. 325 */ 325 */ 326 326 as_page_fault(va, PF_ACCESS_WRITE, istate); 327 327 } -
kernel/arch/sparc64/src/mm/sun4v/tsb.c
rdf6ded8 r1b20da0 28 28 */ 29 29 30 /** @addtogroup sparc64mm 30 /** @addtogroup sparc64mm 31 31 * @{ 32 32 */ … … 86 86 87 87 as = t->as; 88 index = (t->page >> MMU_PAGE_WIDTH) & TSB_ENTRY_MASK; 88 index = (t->page >> MMU_PAGE_WIDTH) & TSB_ENTRY_MASK; 89 89 90 90 tsb = (tsb_entry_t *) PA2KA(as->arch.tsb_description.tsb_base); -
kernel/arch/sparc64/src/smp/sun4u/ipi.c
rdf6ded8 r1b20da0 27 27 */ 28 28 29 /** @addtogroup sparc64 29 /** @addtogroup sparc64 30 30 * @{ 31 31 */ … … 122 122 /* 123 123 * Prevent deadlock. 124 */ 124 */ 125 125 (void) interrupts_enable(); 126 126 delay(20 + (tick_read() & 0xff)); … … 180 180 * Interrupts must be disabled. 181 181 * 182 * @param cpu_id Destination cpu id (index into cpus array). Must not 182 * @param cpu_id Destination cpu id (index into cpus array). Must not 183 183 * be the current cpu. 184 184 * @param ipi IPI number. -
kernel/arch/sparc64/src/smp/sun4u/smp.c
rdf6ded8 r1b20da0 27 27 */ 28 28 29 /** @addtogroup sparc64 29 /** @addtogroup sparc64 30 30 * @{ 31 31 */ … … 83 83 * Wakes up the CPU which is represented by the "node" OFW tree node. 84 84 * If "node" represents the current CPU, calling the function has 85 * no effect. 85 * no effect. 86 86 */ 87 87 static void wakeup_cpu(ofw_tree_node_t *node) -
kernel/arch/sparc64/src/smp/sun4u/smp_call.c
rdf6ded8 r1b20da0 42 42 void arch_smp_call_ipi(unsigned int cpu_id) 43 43 { 44 /* 44 /* 45 45 * Required by ipi_unicast_arch(). That functions resolves a potential 46 46 * deadlock should both the destination and source cpus be sending -
kernel/arch/sparc64/src/smp/sun4v/ipi.c
rdf6ded8 r1b20da0 27 27 */ 28 28 29 /** @addtogroup sparc64 29 /** @addtogroup sparc64 30 30 * @{ 31 31 */ -
kernel/arch/sparc64/src/smp/sun4v/smp.c
rdf6ded8 r1b20da0 254 254 exec_unit_assign_error = 1; 255 255 } 256 } 256 } 257 257 258 258 /* save the number of CPUs to a globally accessible variable */ -
kernel/arch/sparc64/src/sun4u/start.S
rdf6ded8 r1b20da0 88 88 ! l5 <= physmem_base[(PHYSMEM_ADDR_SIZE - 1):13] 89 89 sllx %l5, 13 + (63 - (PHYSMEM_ADDR_SIZE - 1)), %l5 90 srlx %l5, 63 - (PHYSMEM_ADDR_SIZE - 1), %l5 90 srlx %l5, 63 - (PHYSMEM_ADDR_SIZE - 1), %l5 91 91 92 92 /* … … 118 118 wrpr %g1, %lo(trap_table), %tba 119 119 120 /* 120 /* 121 121 * Take over the DMMU by installing locked TTE entry identically 122 122 * mapping the first 4M of memory. … … 135 135 ! demap context 0 136 136 SET_TLB_DEMAP_CMD(g1, TLB_DEMAP_NUCLEUS) 137 stxa %g0, [%g1] ASI_DMMU_DEMAP 137 stxa %g0, [%g1] ASI_DMMU_DEMAP 138 138 membar #Sync 139 139 … … 143 143 ! write DTLB tag 144 144 SET_TLB_TAG(g1, MEM_CONTEXT_KERNEL) 145 stxa %g1, [VA_DMMU_TAG_ACCESS] %asi 145 stxa %g1, [VA_DMMU_TAG_ACCESS] %asi 146 146 membar #Sync 147 147 … … 164 164 ! write DTLB data and install the kernel mapping 165 165 SET_TLB_DATA(g1, g2, TTE_L | TTE_W) ! use non-global mapping 166 stxa %g1, [%g0] ASI_DTLB_DATA_IN_REG 166 stxa %g1, [%g0] ASI_DTLB_DATA_IN_REG 167 167 membar #Sync 168 168 … … 175 175 ! write DTLB tag of context 1 (i.e. MEM_CONTEXT_TEMP) 176 176 SET_TLB_TAG(g1, MEM_CONTEXT_TEMP) 177 stxa %g1, [VA_DMMU_TAG_ACCESS] %asi 177 stxa %g1, [VA_DMMU_TAG_ACCESS] %asi 178 178 membar #Sync 179 179 180 180 ! write DTLB data and install the kernel mapping in context 1 181 181 SET_TLB_DATA(g1, g2, TTE_W) ! use non-global mapping 182 stxa %g1, [%g0] ASI_DTLB_DATA_IN_REG 182 stxa %g1, [%g0] ASI_DTLB_DATA_IN_REG 183 183 membar #Sync 184 184 … … 213 213 ! write ITLB data and install the temporary mapping in context 1 214 214 SET_TLB_DATA(g1, g2, 0) ! use non-global mapping 215 stxa %g1, [%g0] ASI_ITLB_DATA_IN_REG 215 stxa %g1, [%g0] ASI_ITLB_DATA_IN_REG 216 216 flush %g5 217 217 … … 223 223 ! demap context 0 224 224 SET_TLB_DEMAP_CMD(g1, TLB_DEMAP_NUCLEUS) 225 stxa %g0, [%g1] ASI_IMMU_DEMAP 225 stxa %g0, [%g1] ASI_IMMU_DEMAP 226 226 flush %g5 227 227 … … 234 234 ! write ITLB data and install the permanent kernel mapping in context 0 235 235 SET_TLB_DATA(g1, g2, TTE_L) ! use non-global mapping 236 stxa %g1, [%g0] ASI_ITLB_DATA_IN_REG 236 stxa %g1, [%g0] ASI_ITLB_DATA_IN_REG 237 237 flush %g5 238 238 … … 242 242 ! demap context 1 243 243 SET_TLB_DEMAP_CMD(g1, TLB_DEMAP_PRIMARY) 244 stxa %g0, [%g1] ASI_IMMU_DEMAP 244 stxa %g0, [%g1] ASI_IMMU_DEMAP 245 245 flush %g5 246 246 … … 406 406 */ 407 407 408 .align 32 408 .align 32 409 409 /* 410 410 * This label is used by the fast_data_access_MMU_miss trap handler. … … 417 417 */ 418 418 SYMBOL(end_of_identity) 419 .quad -1 419 .quad -1 420 420 /* 421 421 * This variable is used by the fast_data_access_MMU_miss trap handler. -
kernel/arch/sparc64/src/sun4v/md.c
rdf6ded8 r1b20da0 126 126 * Returns the value of the integer property of the given node. 127 127 * 128 * @param 128 * @param 129 129 */ 130 130 bool md_get_integer_property(md_node_t node, const char *key, 131 131 uint64_t *result) 132 132 { 133 element_idx_t idx = node; 133 element_idx_t idx = node; 134 134 135 135 while (get_element(idx)->tag != NODE_END) { … … 149 149 * Returns the value of the string property of the given node. 150 150 * 151 * @param 151 * @param 152 152 */ 153 153 bool md_get_string_property(md_node_t node, const char *key, … … 278 278 /** 279 279 * Moves "node" to the node following "node" in the list of all the existing 280 * nodes of the MD whose name is "name". 280 * nodes of the MD whose name is "name". 281 281 */ 282 282 bool md_next_node(md_node_t *node, const char *name) -
kernel/arch/sparc64/src/sun4v/start.S
rdf6ded8 r1b20da0 118 118 ! l5 <= physmem_base[(PHYSMEM_ADDR_SIZE - 1):13] 119 119 sllx %l5, 13 + (63 - (PHYSMEM_ADDR_SIZE - 1)), %l5 120 srlx %l5, 63 - (PHYSMEM_ADDR_SIZE - 1), %l5 120 srlx %l5, 63 - (PHYSMEM_ADDR_SIZE - 1), %l5 121 121 122 122 /* … … 225 225 * Save physmem_base for use by the mm subsystem. 226 226 * %l6 contains starting physical address 227 */ 227 */ 228 228 sethi %hi(physmem_base), %l4 229 229 stx %l6, [%l4 + %lo(physmem_base)] -
kernel/arch/sparc64/src/trap/interrupt.c
rdf6ded8 r1b20da0 112 112 exc_register(TT_TAG_OVERFLOW, 113 113 "tag_overflow", false, 114 tag_overflow); 114 tag_overflow); 115 115 exc_register(TT_DIVISION_BY_ZERO, 116 116 "division_by_zero", false, … … 145 145 tick_interrupt); 146 146 147 #ifdef SUN4U 147 #ifdef SUN4U 148 148 exc_register(TT_INTERRUPT_VECTOR_TRAP, 149 149 "interrupt_vector_trap", true, … … 159 159 exc_register(TT_FAST_DATA_ACCESS_PROTECTION, 160 160 "fast_data_access_protection", true, 161 fast_data_access_protection); 161 fast_data_access_protection); 162 162 163 163 #ifdef SUN4V -
kernel/arch/sparc64/src/trap/sun4u/trap_table.S
rdf6ded8 r1b20da0 64 64 mov TT_INSTRUCTION_ACCESS_EXCEPTION, %g2 65 65 clr %g5 66 PREEMPTIBLE_HANDLER exc_dispatch 66 PREEMPTIBLE_HANDLER exc_dispatch 67 67 68 68 /* TT = 0x0a, TL = 0, instruction_access_error */ … … 71 71 mov TT_INSTRUCTION_ACCESS_ERROR, %g2 72 72 clr %g5 73 PREEMPTIBLE_HANDLER exc_dispatch 73 PREEMPTIBLE_HANDLER exc_dispatch 74 74 75 75 /* TT = 0x10, TL = 0, illegal_instruction */ … … 78 78 mov TT_ILLEGAL_INSTRUCTION, %g2 79 79 clr %g5 80 PREEMPTIBLE_HANDLER exc_dispatch 80 PREEMPTIBLE_HANDLER exc_dispatch 81 81 82 82 /* TT = 0x11, TL = 0, privileged_opcode */ … … 85 85 mov TT_PRIVILEGED_OPCODE, %g2 86 86 clr %g5 87 PREEMPTIBLE_HANDLER exc_dispatch 87 PREEMPTIBLE_HANDLER exc_dispatch 88 88 89 89 /* TT = 0x12, TL = 0, unimplemented_LDD */ … … 92 92 mov TT_UNIMPLEMENTED_LDD, %g2 93 93 clr %g5 94 PREEMPTIBLE_HANDLER exc_dispatch 94 PREEMPTIBLE_HANDLER exc_dispatch 95 95 96 96 /* TT = 0x13, TL = 0, unimplemented_STD */ … … 106 106 mov TT_FP_DISABLED, %g2 107 107 clr %g5 108 PREEMPTIBLE_HANDLER exc_dispatch 108 PREEMPTIBLE_HANDLER exc_dispatch 109 109 110 110 /* TT = 0x21, TL = 0, fb_exception_ieee_754 handler */ … … 168 168 mov TT_LDDF_MEM_ADDRESS_NOT_ALIGNED, %g2 169 169 clr %g5 170 PREEMPTIBLE_HANDLER exc_dispatch 170 PREEMPTIBLE_HANDLER exc_dispatch 171 171 172 172 /* TT = 0x36, TL = 0, STDF_mem_address_not_aligned */ … … 382 382 mov TT_INSTRUCTION_ACCESS_EXCEPTION, %g2 383 383 clr %g5 384 PREEMPTIBLE_HANDLER exc_dispatch 384 PREEMPTIBLE_HANDLER exc_dispatch 385 385 386 386 /* TT = 0x0a, TL > 0, instruction_access_error */ … … 489 489 * TL1: preemptible trap handler started after a tick interrupt 490 490 * TL2: preemptible trap handler did SAVE 491 * TL3: spill handler touched the kernel stack 491 * TL3: spill handler touched the kernel stack 492 492 * TL4: hardware or software failure 493 493 * … … 510 510 * trap is resolved. However, because we are in the wrong window from the 511 511 * perspective of the MMU trap, we need to synchronize CWP with CWP from TL=0. 512 */ 512 */ 513 513 and %g3, TSTATE_CWP_MASK, %g4 514 514 wrpr %g4, 0, %cwp ! resynchronize CWP … … 566 566 567 567 /* 568 * At this moment, we are using the kernel stack 568 * At this moment, we are using the kernel stack 569 569 * and have successfully allocated a register window. 570 570 */ … … 585 585 .else 586 586 ! store the syscall number on the stack as 7th argument 587 stx %g2, [%sp + STACK_BIAS + ISTATE_OFFSET_ARG6] 587 stx %g2, [%sp + STACK_BIAS + ISTATE_OFFSET_ARG6] 588 588 .endif 589 589 -
kernel/arch/sparc64/src/trap/sun4v/trap_table.S
rdf6ded8 r1b20da0 67 67 mov TT_INSTRUCTION_ACCESS_EXCEPTION, %g2 68 68 clr %g5 69 PREEMPTIBLE_HANDLER exc_dispatch 69 PREEMPTIBLE_HANDLER exc_dispatch 70 70 71 71 /* TT = 0x09, TL = 0, instruction_access_mmu_miss */ … … 86 86 mov TT_IAE_UNAUTH_ACCESS, %g2 87 87 clr %g5 88 PREEMPTIBLE_HANDLER exc_dispatch 88 PREEMPTIBLE_HANDLER exc_dispatch 89 89 90 90 /* TT = 0x0c, TL = 0, IAE_nfo_page */ … … 93 93 mov TT_IAE_NFO_PAGE, %g2 94 94 clr %g5 95 PREEMPTIBLE_HANDLER exc_dispatch 95 PREEMPTIBLE_HANDLER exc_dispatch 96 96 97 97 /* TT = 0x10, TL = 0, illegal_instruction */ … … 100 100 mov TT_ILLEGAL_INSTRUCTION, %g2 101 101 clr %g5 102 PREEMPTIBLE_HANDLER exc_dispatch 102 PREEMPTIBLE_HANDLER exc_dispatch 103 103 104 104 /* TT = 0x11, TL = 0, privileged_opcode */ … … 107 107 mov TT_PRIVILEGED_OPCODE, %g2 108 108 clr %g5 109 PREEMPTIBLE_HANDLER exc_dispatch 109 PREEMPTIBLE_HANDLER exc_dispatch 110 110 111 111 /* TT = 0x12, TL = 0, unimplemented_LDD */ … … 114 114 mov TT_UNIMPLEMENTED_LDD, %g2 115 115 clr %g5 116 PREEMPTIBLE_HANDLER exc_dispatch 116 PREEMPTIBLE_HANDLER exc_dispatch 117 117 118 118 /* TT = 0x13, TL = 0, unimplemented_STD */ … … 121 121 mov TT_UNIMPLEMENTED_STD, %g2 122 122 clr %g5 123 PREEMPTIBLE_HANDLER exc_dispatch 123 PREEMPTIBLE_HANDLER exc_dispatch 124 124 125 125 /* TT = 0x14, TL = 0, DAE_invalid_asi */ … … 128 128 mov TT_DAE_INVALID_ASI, %g2 129 129 clr %g5 130 PREEMPTIBLE_HANDLER exc_dispatch 130 PREEMPTIBLE_HANDLER exc_dispatch 131 131 132 132 /* TT = 0x15, TL = 0, DAE_privilege_violation */ … … 135 135 mov TT_DAE_PRIVILEGE_VIOLATION, %g2 136 136 clr %g5 137 PREEMPTIBLE_HANDLER exc_dispatch 137 PREEMPTIBLE_HANDLER exc_dispatch 138 138 139 139 /* TT = 0x16, TL = 0, DAE_nc_page */ … … 142 142 mov TT_DAE_NC_PAGE, %g2 143 143 clr %g5 144 PREEMPTIBLE_HANDLER exc_dispatch 144 PREEMPTIBLE_HANDLER exc_dispatch 145 145 146 146 /* TT = 0x17, TL = 0, DAE_nfo_page */ … … 149 149 mov TT_DAE_NFO_PAGE, %g2 150 150 clr %g5 151 PREEMPTIBLE_HANDLER exc_dispatch 151 PREEMPTIBLE_HANDLER exc_dispatch 152 152 153 153 /* TT = 0x20, TL = 0, fb_disabled handler */ … … 156 156 mov TT_FP_DISABLED, %g2 157 157 clr %g5 158 PREEMPTIBLE_HANDLER exc_dispatch 158 PREEMPTIBLE_HANDLER exc_dispatch 159 159 160 160 /* TT = 0x21, TL = 0, fb_exception_ieee_754 handler */ … … 163 163 mov TT_FP_EXCEPTION_IEEE_754, %g2 164 164 clr %g5 165 PREEMPTIBLE_HANDLER exc_dispatch 165 PREEMPTIBLE_HANDLER exc_dispatch 166 166 167 167 /* TT = 0x22, TL = 0, fb_exception_other handler */ … … 170 170 mov TT_FP_EXCEPTION_OTHER, %g2 171 171 clr %g5 172 PREEMPTIBLE_HANDLER exc_dispatch 172 PREEMPTIBLE_HANDLER exc_dispatch 173 173 174 174 /* TT = 0x23, TL = 0, tag_overflow */ … … 177 177 mov TT_TAG_OVERFLOW, %g2 178 178 clr %g5 179 PREEMPTIBLE_HANDLER exc_dispatch 179 PREEMPTIBLE_HANDLER exc_dispatch 180 180 181 181 /* TT = 0x24, TL = 0, clean_window handler */ … … 189 189 mov TT_DIVISION_BY_ZERO, %g2 190 190 clr %g5 191 PREEMPTIBLE_HANDLER exc_dispatch 191 PREEMPTIBLE_HANDLER exc_dispatch 192 192 193 193 /* TT = 0x30, TL = 0, data_access_exception */ … … 197 197 mov TT_DATA_ACCESS_EXCEPTION, %g2 198 198 clr %g5 199 PREEMPTIBLE_HANDLER exc_dispatch 199 PREEMPTIBLE_HANDLER exc_dispatch 200 200 201 201 /* TT = 0x31, TL = 0, data_access_mmu_miss */ … … 209 209 mov TT_DATA_ACCESS_ERROR, %g2 210 210 clr %g5 211 PREEMPTIBLE_HANDLER exc_dispatch 211 PREEMPTIBLE_HANDLER exc_dispatch 212 212 213 213 /* TT = 0x34, TL = 0, mem_address_not_aligned */ … … 216 216 mov TT_MEM_ADDRESS_NOT_ALIGNED, %g2 217 217 clr %g5 218 PREEMPTIBLE_HANDLER exc_dispatch 218 PREEMPTIBLE_HANDLER exc_dispatch 219 219 220 220 /* TT = 0x35, TL = 0, LDDF_mem_address_not_aligned */ … … 223 223 mov TT_LDDF_MEM_ADDRESS_NOT_ALIGNED, %g2 224 224 clr %g5 225 PREEMPTIBLE_HANDLER exc_dispatch 225 PREEMPTIBLE_HANDLER exc_dispatch 226 226 227 227 /* TT = 0x36, TL = 0, STDF_mem_address_not_aligned */ … … 230 230 mov TT_STDF_MEM_ADDRESS_NOT_ALIGNED, %g2 231 231 clr %g5 232 PREEMPTIBLE_HANDLER exc_dispatch 232 PREEMPTIBLE_HANDLER exc_dispatch 233 233 234 234 /* TT = 0x37, TL = 0, privileged_action */ … … 237 237 mov TT_PRIVILEGED_ACTION, %g2 238 238 clr %g5 239 PREEMPTIBLE_HANDLER exc_dispatch 239 PREEMPTIBLE_HANDLER exc_dispatch 240 240 241 241 /* TT = 0x38, TL = 0, LDQF_mem_address_not_aligned */ … … 244 244 mov TT_LDQF_MEM_ADDRESS_NOT_ALIGNED, %g2 245 245 clr %g5 246 PREEMPTIBLE_HANDLER exc_dispatch 246 PREEMPTIBLE_HANDLER exc_dispatch 247 247 248 248 /* TT = 0x39, TL = 0, STQF_mem_address_not_aligned */ … … 251 251 mov TT_STQF_MEM_ADDRESS_NOT_ALIGNED, %g2 252 252 clr %g5 253 PREEMPTIBLE_HANDLER exc_dispatch 253 PREEMPTIBLE_HANDLER exc_dispatch 254 254 255 255 /* TT = 0x41, TL = 0, interrupt_level_1 handler */ … … 378 378 mov TT_CPU_MONDO, %g2 379 379 clr %g5 380 PREEMPTIBLE_HANDLER exc_dispatch 380 PREEMPTIBLE_HANDLER exc_dispatch 381 381 382 382 /* TT = 0x80, TL = 0, spill_0_normal handler */ … … 437 437 mov TT_INSTRUCTION_ACCESS_EXCEPTION, %g2 438 438 clr %g5 439 PREEMPTIBLE_HANDLER exc_dispatch 439 PREEMPTIBLE_HANDLER exc_dispatch 440 440 441 441 /* TT = 0x09, TL > 0, instruction_access_mmu_miss */ … … 451 451 mov TT_INSTRUCTION_ACCESS_ERROR, %g2 452 452 clr %g5 453 PREEMPTIBLE_HANDLER exc_dispatch 453 PREEMPTIBLE_HANDLER exc_dispatch 454 454 455 455 /* TT = 0x0b, TL > 0, IAE_unauth_access */ … … 459 459 mov TT_IAE_UNAUTH_ACCESS, %g2 460 460 clr %g5 461 PREEMPTIBLE_HANDLER exc_dispatch 461 PREEMPTIBLE_HANDLER exc_dispatch 462 462 463 463 /* TT = 0x0c, TL > 0, IAE_nfo_page */ … … 467 467 mov TT_IAE_NFO_PAGE, %g2 468 468 clr %g5 469 PREEMPTIBLE_HANDLER exc_dispatch 469 PREEMPTIBLE_HANDLER exc_dispatch 470 470 471 471 /* TT = 0x10, TL > 0, illegal_instruction */ … … 475 475 mov TT_ILLEGAL_INSTRUCTION, %g2 476 476 clr %g5 477 PREEMPTIBLE_HANDLER exc_dispatch 477 PREEMPTIBLE_HANDLER exc_dispatch 478 478 479 479 /* TT = 0x14, TL > 0, DAE_invalid_asi */ … … 483 483 mov TT_DAE_INVALID_ASI, %g2 484 484 clr %g5 485 PREEMPTIBLE_HANDLER exc_dispatch 485 PREEMPTIBLE_HANDLER exc_dispatch 486 486 487 487 /* TT = 0x15, TL > 0, DAE_privilege_violation */ … … 491 491 mov TT_DAE_PRIVILEGE_VIOLATION, %g2 492 492 clr %g5 493 PREEMPTIBLE_HANDLER exc_dispatch 493 PREEMPTIBLE_HANDLER exc_dispatch 494 494 495 495 /* TT = 0x16, TL > 0, DAE_nc_page */ … … 499 499 mov TT_DAE_NC_PAGE, %g2 500 500 clr %g5 501 PREEMPTIBLE_HANDLER exc_dispatch 501 PREEMPTIBLE_HANDLER exc_dispatch 502 502 503 503 /* TT = 0x17, TL > 0, DAE_nfo_page */ … … 507 507 mov TT_DAE_NFO_PAGE, %g2 508 508 clr %g5 509 PREEMPTIBLE_HANDLER exc_dispatch 509 PREEMPTIBLE_HANDLER exc_dispatch 510 510 511 511 /* TT = 0x24, TL > 0, clean_window handler */ … … 520 520 mov TT_DIVISION_BY_ZERO, %g2 521 521 clr %g5 522 PREEMPTIBLE_HANDLER exc_dispatch 522 PREEMPTIBLE_HANDLER exc_dispatch 523 523 524 524 /* TT = 0x30, TL > 0, data_access_exception */ … … 528 528 mov TT_DATA_ACCESS_EXCEPTION, %g2 529 529 clr %g5 530 PREEMPTIBLE_HANDLER exc_dispatch 530 PREEMPTIBLE_HANDLER exc_dispatch 531 531 532 532 /* TT = 0x31, TL > 0, data_access_mmu_miss */ … … 541 541 mov TT_DATA_ACCESS_ERROR, %g2 542 542 clr %g5 543 PREEMPTIBLE_HANDLER exc_dispatch 543 PREEMPTIBLE_HANDLER exc_dispatch 544 544 545 545 /* TT = 0x34, TL > 0, mem_address_not_aligned */ … … 549 549 mov TT_MEM_ADDRESS_NOT_ALIGNED, %g2 550 550 clr %g5 551 PREEMPTIBLE_HANDLER exc_dispatch 551 PREEMPTIBLE_HANDLER exc_dispatch 552 552 553 553 /* TT = 0x68, TL > 0, fast_data_access_MMU_miss */ … … 567 567 mov TT_CPU_MONDO, %g2 568 568 clr %g5 569 PREEMPTIBLE_HANDLER exc_dispatch 569 PREEMPTIBLE_HANDLER exc_dispatch 570 570 571 571 /* TT = 0x80, TL > 0, spill_0_normal handler */ … … 595 595 * Spills the window at CWP + 2 to the kernel stack. This macro is to be 596 596 * used before doing SAVE when the spill trap is undesirable. 597 * 597 * 598 598 * Parameters: 599 599 * tmpreg1 global register to be used for scratching purposes … … 608 608 609 609 ! spill to kernel stack 610 stx %l0, [%sp + STACK_BIAS + L0_OFFSET] 610 stx %l0, [%sp + STACK_BIAS + L0_OFFSET] 611 611 stx %l1, [%sp + STACK_BIAS + L1_OFFSET] 612 612 stx %l2, [%sp + STACK_BIAS + L2_OFFSET] … … 634 634 * Fill the window at CWP - 1 from the kernel stack. This macro is to be 635 635 * used before doing RESTORE when the fill trap is undesirable. 636 * 636 * 637 637 * Parameters: 638 638 * tmpreg1 global register to be used for scratching purposes … … 689 689 .else 690 690 ! store the syscall number on the stack as 7th argument 691 stx %g2, [%sp + STACK_BIAS + ISTATE_OFFSET_ARG6] 691 stx %g2, [%sp + STACK_BIAS + ISTATE_OFFSET_ARG6] 692 692 .endif 693 693 … … 859 859 * Spills the window at CWP + 2 to the userspace window buffer. This macro 860 860 * is to be used before doing SAVE when the spill trap is undesirable. 861 * 861 * 862 862 * Parameters: 863 863 * tmpreg1 global register to be used for scratching purposes … … 892 892 * trap is resolved. However, because we are in the wrong window from the 893 893 * perspective of the MMU trap, we need to synchronize CWP with CWP from TL=0. 894 */ 894 */ 895 895 .if NOT(\is_syscall) 896 896 rdpr %tstate, %g3 … … 927 927 .endif 928 928 929 mov VA_PRIMARY_CONTEXT_REG, %l0 929 mov VA_PRIMARY_CONTEXT_REG, %l0 930 930 stxa %g0, [%l0] ASI_PRIMARY_CONTEXT_REG 931 931 rd %pc, %l0
Note:
See TracChangeset
for help on using the changeset viewer.