/* break.S: Break interrupt handling (kept separate from entry.S)1*2* Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.3* Written by David Howells ([email protected])4*5* This program is free software; you can redistribute it and/or6* modify it under the terms of the GNU General Public License7* as published by the Free Software Foundation; either version8* 2 of the License, or (at your option) any later version.9*/1011#include <linux/linkage.h>12#include <asm/setup.h>13#include <asm/segment.h>14#include <asm/ptrace.h>15#include <asm/thread_info.h>16#include <asm/spr-regs.h>1718#include <asm/errno.h>1920#21# the break handler has its own stack22#23.section .bss..stack24.globl __break_user_context25.balign THREAD_SIZE26__break_stack:27.space THREAD_SIZE - FRV_FRAME0_SIZE28__break_frame_0:29.space FRV_FRAME0_SIZE3031#32# miscellaneous variables33#34.section .bss35#ifdef CONFIG_MMU36.globl __break_tlb_miss_real_return_info37__break_tlb_miss_real_return_info:38.balign 839.space 2*4 /* saved PCSR, PSR for TLB-miss handler fixup */40#endif4142__break_trace_through_exceptions:43.space 44445#define CS2_ECS1 0xe120000046#define CS2_USERLED 0x44748.macro LEDS val,reg49# sethi.p %hi(CS2_ECS1+CS2_USERLED),gr3050# setlo %lo(CS2_ECS1+CS2_USERLED),gr3051# setlos #~\val,\reg52# st \reg,@(gr30,gr0)53# setlos #0x5555,\reg54# sethi.p %hi(0xffc00100),gr3055# setlo %lo(0xffc00100),gr3056# sth \reg,@(gr30,gr0)57# membar58.endm5960###############################################################################61#62# entry point for Break Exceptions/Interrupts63#64###############################################################################65.section .text..break66.balign 467.globl __entry_break68__entry_break:69#ifdef CONFIG_MMU70movgs gr31,scr371#endif72LEDS 0x1001,gr317374sethi.p %hi(__break_frame_0),gr3175setlo %lo(__break_frame_0),gr317677stdi gr2,@(gr31,#REG_GR(2))78movsg ccr,gr379sti gr3,@(gr31,#REG_CCR)8081# catch the return from a TLB-miss handler that had single-step disabled82# traps will be enabled, so we have to do this now83#ifdef CONFIG_MMU84movsg bpcsr,gr385sethi.p %hi(__break_tlb_miss_return_breaks_here),gr286setlo %lo(__break_tlb_miss_return_breaks_here),gr287subcc gr2,gr3,gr0,icc088beq icc0,#2,__break_return_singlestep_tlbmiss89#endif9091# determine whether we have stepped through into an exception92# - we need to take special action to suspend h/w single stepping if we've done93# that, so that the gdbstub doesn't get bogged down endlessly stepping through94# external interrupt handling95movsg bpsr,gr396andicc gr3,#BPSR_BET,gr0,icc097bne icc0,#2,__break_maybe_userspace /* jump if PSR.ET was 1 */9899LEDS 0x1003,gr2100101movsg brr,gr3102andicc gr3,#BRR_ST,gr0,icc0103andicc.p gr3,#BRR_SB,gr0,icc1104bne icc0,#2,__break_step /* jump if single-step caused break */105beq icc1,#2,__break_continue /* jump if BREAK didn't cause break */106107LEDS 0x1007,gr2108109# handle special breaks110movsg bpcsr,gr3111112sethi.p %hi(__entry_return_singlestep_breaks_here),gr2113setlo %lo(__entry_return_singlestep_breaks_here),gr2114subcc gr2,gr3,gr0,icc0115beq icc0,#2,__break_return_singlestep116117bra __break_continue118119120###############################################################################121#122# handle BREAK instruction in kernel-mode exception epilogue123#124###############################################################################125__break_return_singlestep:126LEDS 0x100f,gr2127128# special break insn requests single-stepping to be turned back on129# HERE RETT130# PSR.ET 0 0131# PSR.PS old PSR.S ?132# PSR.S 1 1133# BPSR.ET 0 1 (can't have caused orig excep otherwise)134# BPSR.BS 1 old PSR.S135movsg dcr,gr2136sethi.p %hi(DCR_SE),gr3137setlo %lo(DCR_SE),gr3138or gr2,gr3,gr2139movgs gr2,dcr140141movsg psr,gr2142andi gr2,#PSR_PS,gr2143slli gr2,#11,gr2 /* PSR.PS -> BPSR.BS */144ori gr2,#BPSR_BET,gr2 /* 1 -> BPSR.BET */145movgs gr2,bpsr146147# return to the invoker of the original kernel exception148movsg pcsr,gr2149movgs gr2,bpcsr150151LEDS 0x101f,gr2152153ldi @(gr31,#REG_CCR),gr3154movgs gr3,ccr155lddi.p @(gr31,#REG_GR(2)),gr2156xor gr31,gr31,gr31157movgs gr0,brr158#ifdef CONFIG_MMU159movsg scr3,gr31160#endif161rett #1162163###############################################################################164#165# handle BREAK instruction in TLB-miss handler return path166#167###############################################################################168#ifdef CONFIG_MMU169__break_return_singlestep_tlbmiss:170LEDS 0x1100,gr2171172sethi.p %hi(__break_tlb_miss_real_return_info),gr3173setlo %lo(__break_tlb_miss_real_return_info),gr3174lddi @(gr3,#0),gr2175movgs gr2,pcsr176movgs gr3,psr177178bra __break_return_singlestep179#endif180181182###############################################################################183#184# handle single stepping into an exception prologue from kernel mode185# - we try and catch it whilst it is still in the main vector table186# - if we catch it there, we have to jump to the fixup handler187# - there is a fixup table that has a pointer for every 16b slot in the trap188# table189#190###############################################################################191__break_step:192LEDS 0x2003,gr2193194# external interrupts seem to escape from the trap table before single195# step catches up with them196movsg bpcsr,gr2197sethi.p %hi(__entry_kernel_external_interrupt),gr3198setlo %lo(__entry_kernel_external_interrupt),gr3199subcc.p gr2,gr3,gr0,icc0200sethi %hi(__entry_uspace_external_interrupt),gr3201setlo.p %lo(__entry_uspace_external_interrupt),gr3202beq icc0,#2,__break_step_kernel_external_interrupt203subcc.p gr2,gr3,gr0,icc0204sethi %hi(__entry_kernel_external_interrupt_virtually_disabled),gr3205setlo.p %lo(__entry_kernel_external_interrupt_virtually_disabled),gr3206beq icc0,#2,__break_step_uspace_external_interrupt207subcc.p gr2,gr3,gr0,icc0208sethi %hi(__entry_kernel_external_interrupt_virtual_reenable),gr3209setlo.p %lo(__entry_kernel_external_interrupt_virtual_reenable),gr3210beq icc0,#2,__break_step_kernel_external_interrupt_virtually_disabled211subcc gr2,gr3,gr0,icc0212beq icc0,#2,__break_step_kernel_external_interrupt_virtual_reenable213214LEDS 0x2007,gr2215216# the two main vector tables are adjacent on one 8Kb slab217movsg bpcsr,gr2218setlos #0xffffe000,gr3219and gr2,gr3,gr2220sethi.p %hi(__trap_tables),gr3221setlo %lo(__trap_tables),gr3222subcc gr2,gr3,gr0,icc0223bne icc0,#2,__break_continue224225LEDS 0x200f,gr2226227# skip workaround if so requested by GDB228sethi.p %hi(__break_trace_through_exceptions),gr3229setlo %lo(__break_trace_through_exceptions),gr3230ld @(gr3,gr0),gr3231subcc gr3,gr0,gr0,icc0232bne icc0,#0,__break_continue233234LEDS 0x201f,gr2235236# access the fixup table - there's a 1:1 mapping between the slots in the trap tables and237# the slots in the trap fixup tables allowing us to simply divide the offset into the238# former by 4 to access the latter239sethi.p %hi(__trap_tables),gr3240setlo %lo(__trap_tables),gr3241movsg bpcsr,gr2242sub gr2,gr3,gr2243srli.p gr2,#2,gr2244245sethi %hi(__trap_fixup_tables),gr3246setlo.p %lo(__trap_fixup_tables),gr3247andi gr2,#~3,gr2248ld @(gr2,gr3),gr2249jmpil @(gr2,#0)250251# step through an internal exception from kernel mode252.globl __break_step_kernel_softprog_interrupt253__break_step_kernel_softprog_interrupt:254sethi.p %hi(__entry_kernel_softprog_interrupt_reentry),gr3255setlo %lo(__entry_kernel_softprog_interrupt_reentry),gr3256bra __break_return_as_kernel_prologue257258# step through an external interrupt from kernel mode259.globl __break_step_kernel_external_interrupt260__break_step_kernel_external_interrupt:261# deal with virtual interrupt disablement262beq icc2,#0,__break_step_kernel_external_interrupt_virtually_disabled263264sethi.p %hi(__entry_kernel_external_interrupt_reentry),gr3265setlo %lo(__entry_kernel_external_interrupt_reentry),gr3266267__break_return_as_kernel_prologue:268LEDS 0x203f,gr2269270movgs gr3,bpcsr271272# do the bit we had to skip273#ifdef CONFIG_MMU274movsg ear0,gr2 /* EAR0 can get clobbered by gdb-stub (ICI/ICEI) */275movgs gr2,scr2276#endif277278or.p sp,gr0,gr2 /* set up the stack pointer */279subi sp,#REG__END,sp280sti.p gr2,@(sp,#REG_SP)281282setlos #REG__STATUS_STEP,gr2283sti gr2,@(sp,#REG__STATUS) /* record single step status */284285# cancel single-stepping mode286movsg dcr,gr2287sethi.p %hi(~DCR_SE),gr3288setlo %lo(~DCR_SE),gr3289and gr2,gr3,gr2290movgs gr2,dcr291292LEDS 0x207f,gr2293294ldi @(gr31,#REG_CCR),gr3295movgs gr3,ccr296lddi.p @(gr31,#REG_GR(2)),gr2297xor gr31,gr31,gr31298movgs gr0,brr299#ifdef CONFIG_MMU300movsg scr3,gr31301#endif302rett #1303304# we single-stepped into an interrupt handler whilst interrupts were merely virtually disabled305# need to really disable interrupts, set flag, fix up and return306__break_step_kernel_external_interrupt_virtually_disabled:307movsg psr,gr2308andi gr2,#~PSR_PIL,gr2309ori gr2,#PSR_PIL_14,gr2 /* debugging interrupts only */310movgs gr2,psr311312ldi @(gr31,#REG_CCR),gr3313movgs gr3,ccr314subcc.p gr0,gr0,gr0,icc2 /* leave Z set, clear C */315316# exceptions must've been enabled and we must've been in supervisor mode317setlos BPSR_BET|BPSR_BS,gr3318movgs gr3,bpsr319320# return to where the interrupt happened321movsg pcsr,gr2322movgs gr2,bpcsr323324lddi.p @(gr31,#REG_GR(2)),gr2325326xor gr31,gr31,gr31327movgs gr0,brr328#ifdef CONFIG_MMU329movsg scr3,gr31330#endif331rett #1332333# we stepped through into the virtual interrupt reenablement trap334#335# we also want to single step anyway, but after fixing up so that we get an event on the336# instruction after the broken-into exception returns337.globl __break_step_kernel_external_interrupt_virtual_reenable338__break_step_kernel_external_interrupt_virtual_reenable:339movsg psr,gr2340andi gr2,#~PSR_PIL,gr2341movgs gr2,psr342343ldi @(gr31,#REG_CCR),gr3344movgs gr3,ccr345subicc gr0,#1,gr0,icc2 /* clear Z, set C */346347# save the adjusted ICC2348movsg ccr,gr3349sti gr3,@(gr31,#REG_CCR)350351# exceptions must've been enabled and we must've been in supervisor mode352setlos BPSR_BET|BPSR_BS,gr3353movgs gr3,bpsr354355# return to where the trap happened356movsg pcsr,gr2357movgs gr2,bpcsr358359# and then process the single step360bra __break_continue361362# step through an internal exception from uspace mode363.globl __break_step_uspace_softprog_interrupt364__break_step_uspace_softprog_interrupt:365sethi.p %hi(__entry_uspace_softprog_interrupt_reentry),gr3366setlo %lo(__entry_uspace_softprog_interrupt_reentry),gr3367bra __break_return_as_uspace_prologue368369# step through an external interrupt from kernel mode370.globl __break_step_uspace_external_interrupt371__break_step_uspace_external_interrupt:372sethi.p %hi(__entry_uspace_external_interrupt_reentry),gr3373setlo %lo(__entry_uspace_external_interrupt_reentry),gr3374375__break_return_as_uspace_prologue:376LEDS 0x20ff,gr2377378movgs gr3,bpcsr379380# do the bit we had to skip381sethi.p %hi(__kernel_frame0_ptr),gr28382setlo %lo(__kernel_frame0_ptr),gr28383ldi.p @(gr28,#0),gr28384385setlos #REG__STATUS_STEP,gr2386sti gr2,@(gr28,#REG__STATUS) /* record single step status */387388# cancel single-stepping mode389movsg dcr,gr2390sethi.p %hi(~DCR_SE),gr3391setlo %lo(~DCR_SE),gr3392and gr2,gr3,gr2393movgs gr2,dcr394395LEDS 0x20fe,gr2396397ldi @(gr31,#REG_CCR),gr3398movgs gr3,ccr399lddi.p @(gr31,#REG_GR(2)),gr2400xor gr31,gr31,gr31401movgs gr0,brr402#ifdef CONFIG_MMU403movsg scr3,gr31404#endif405rett #1406407#ifdef CONFIG_MMU408# step through an ITLB-miss handler from user mode409.globl __break_user_insn_tlb_miss410__break_user_insn_tlb_miss:411# we'll want to try the trap stub again412sethi.p %hi(__trap_user_insn_tlb_miss),gr2413setlo %lo(__trap_user_insn_tlb_miss),gr2414movgs gr2,bpcsr415416__break_tlb_miss_common:417LEDS 0x2101,gr2418419# cancel single-stepping mode420movsg dcr,gr2421sethi.p %hi(~DCR_SE),gr3422setlo %lo(~DCR_SE),gr3423and gr2,gr3,gr2424movgs gr2,dcr425426# we'll swap the real return address for one with a BREAK insn so that we can re-enable427# single stepping on return428movsg pcsr,gr2429sethi.p %hi(__break_tlb_miss_real_return_info),gr3430setlo %lo(__break_tlb_miss_real_return_info),gr3431sti gr2,@(gr3,#0)432433sethi.p %hi(__break_tlb_miss_return_break),gr2434setlo %lo(__break_tlb_miss_return_break),gr2435movgs gr2,pcsr436437# we also have to fudge PSR because the return BREAK is in kernel space and we want438# to get a BREAK fault not an access violation should the return be to userspace439movsg psr,gr2440sti.p gr2,@(gr3,#4)441ori gr2,#PSR_PS,gr2442movgs gr2,psr443444LEDS 0x2102,gr2445446ldi @(gr31,#REG_CCR),gr3447movgs gr3,ccr448lddi @(gr31,#REG_GR(2)),gr2449movsg scr3,gr31450movgs gr0,brr451rett #1452453# step through a DTLB-miss handler from user mode454.globl __break_user_data_tlb_miss455__break_user_data_tlb_miss:456# we'll want to try the trap stub again457sethi.p %hi(__trap_user_data_tlb_miss),gr2458setlo %lo(__trap_user_data_tlb_miss),gr2459movgs gr2,bpcsr460bra __break_tlb_miss_common461462# step through an ITLB-miss handler from kernel mode463.globl __break_kernel_insn_tlb_miss464__break_kernel_insn_tlb_miss:465# we'll want to try the trap stub again466sethi.p %hi(__trap_kernel_insn_tlb_miss),gr2467setlo %lo(__trap_kernel_insn_tlb_miss),gr2468movgs gr2,bpcsr469bra __break_tlb_miss_common470471# step through a DTLB-miss handler from kernel mode472.globl __break_kernel_data_tlb_miss473__break_kernel_data_tlb_miss:474# we'll want to try the trap stub again475sethi.p %hi(__trap_kernel_data_tlb_miss),gr2476setlo %lo(__trap_kernel_data_tlb_miss),gr2477movgs gr2,bpcsr478bra __break_tlb_miss_common479#endif480481###############################################################################482#483# handle debug events originating with userspace484#485###############################################################################486__break_maybe_userspace:487LEDS 0x3003,gr2488489setlos #BPSR_BS,gr2490andcc gr3,gr2,gr0,icc0491bne icc0,#0,__break_continue /* skip if PSR.S was 1 */492493movsg brr,gr2494andicc gr2,#BRR_ST|BRR_SB,gr0,icc0495beq icc0,#0,__break_continue /* jump if not BREAK or single-step */496497LEDS 0x3007,gr2498499# do the first part of the exception prologue here500sethi.p %hi(__kernel_frame0_ptr),gr28501setlo %lo(__kernel_frame0_ptr),gr28502ldi @(gr28,#0),gr28503andi gr28,#~7,gr28504505# set up the kernel stack pointer506sti sp ,@(gr28,#REG_SP)507ori gr28,0,sp508sti gr0 ,@(gr28,#REG_GR(28))509510stdi gr20,@(gr28,#REG_GR(20))511stdi gr22,@(gr28,#REG_GR(22))512513movsg tbr,gr20514movsg bpcsr,gr21515movsg psr,gr22516517# determine the exception type and cancel single-stepping mode518or gr0,gr0,gr23519520movsg dcr,gr2521sethi.p %hi(DCR_SE),gr3522setlo %lo(DCR_SE),gr3523andcc gr2,gr3,gr0,icc0524beq icc0,#0,__break_no_user_sstep /* must have been a BREAK insn */525526not gr3,gr3527and gr2,gr3,gr2528movgs gr2,dcr529ori gr23,#REG__STATUS_STEP,gr23530531__break_no_user_sstep:532LEDS 0x300f,gr2533534movsg brr,gr2535andi gr2,#BRR_ST|BRR_SB,gr2536slli gr2,#1,gr2537or gr23,gr2,gr23538sti.p gr23,@(gr28,#REG__STATUS) /* record single step status */539540# adjust the value acquired from TBR - this indicates the exception541setlos #~TBR_TT,gr2542and.p gr20,gr2,gr20543setlos #TBR_TT_BREAK,gr2544or.p gr20,gr2,gr20545546# fudge PSR.PS and BPSR.BS to return to kernel mode through the trap547# table as trap 126548andi gr22,#~PSR_PS,gr22 /* PSR.PS should be 0 */549movgs gr22,psr550551setlos #BPSR_BS,gr2 /* BPSR.BS should be 1 and BPSR.BET 0 */552movgs gr2,bpsr553554# return through remainder of the exception prologue555# - need to load gr23 with return handler address556sethi.p %hi(__entry_return_from_user_exception),gr23557setlo %lo(__entry_return_from_user_exception),gr23558sethi.p %hi(__entry_common),gr3559setlo %lo(__entry_common),gr3560movgs gr3,bpcsr561562LEDS 0x301f,gr2563564ldi @(gr31,#REG_CCR),gr3565movgs gr3,ccr566lddi.p @(gr31,#REG_GR(2)),gr2567xor gr31,gr31,gr31568movgs gr0,brr569#ifdef CONFIG_MMU570movsg scr3,gr31571#endif572rett #1573574###############################################################################575#576# resume normal debug-mode entry577#578###############################################################################579__break_continue:580LEDS 0x4003,gr2581582# set up the kernel stack pointer583sti sp,@(gr31,#REG_SP)584585sethi.p %hi(__break_frame_0),sp586setlo %lo(__break_frame_0),sp587588# finish building the exception frame589stdi gr4 ,@(gr31,#REG_GR(4))590stdi gr6 ,@(gr31,#REG_GR(6))591stdi gr8 ,@(gr31,#REG_GR(8))592stdi gr10,@(gr31,#REG_GR(10))593stdi gr12,@(gr31,#REG_GR(12))594stdi gr14,@(gr31,#REG_GR(14))595stdi gr16,@(gr31,#REG_GR(16))596stdi gr18,@(gr31,#REG_GR(18))597stdi gr20,@(gr31,#REG_GR(20))598stdi gr22,@(gr31,#REG_GR(22))599stdi gr24,@(gr31,#REG_GR(24))600stdi gr26,@(gr31,#REG_GR(26))601sti gr0 ,@(gr31,#REG_GR(28)) /* NULL frame pointer */602sti gr29,@(gr31,#REG_GR(29))603sti gr30,@(gr31,#REG_GR(30))604sti gr8 ,@(gr31,#REG_ORIG_GR8)605606#ifdef CONFIG_MMU607movsg scr3,gr19608sti gr19,@(gr31,#REG_GR(31))609#endif610611movsg bpsr ,gr19612movsg tbr ,gr20613movsg bpcsr,gr21614movsg psr ,gr22615movsg isr ,gr23616movsg cccr ,gr25617movsg lr ,gr26618movsg lcr ,gr27619620andi.p gr22,#~(PSR_S|PSR_ET),gr5 /* rebuild PSR */621andi gr19,#PSR_ET,gr4622or.p gr4,gr5,gr5623srli gr19,#10,gr4624andi gr4,#PSR_S,gr4625or.p gr4,gr5,gr5626627setlos #-1,gr6628sti gr20,@(gr31,#REG_TBR)629sti gr21,@(gr31,#REG_PC)630sti gr5 ,@(gr31,#REG_PSR)631sti gr23,@(gr31,#REG_ISR)632sti gr25,@(gr31,#REG_CCCR)633stdi gr26,@(gr31,#REG_LR)634sti gr6 ,@(gr31,#REG_SYSCALLNO)635636# store CPU-specific regs637movsg iacc0h,gr4638movsg iacc0l,gr5639stdi gr4,@(gr31,#REG_IACC0)640641movsg gner0,gr4642movsg gner1,gr5643stdi gr4,@(gr31,#REG_GNER0)644645# build the debug register frame646movsg brr,gr4647movgs gr0,brr648movsg nmar,gr5649movsg dcr,gr6650651sethi.p %hi(__debug_status),gr7652setlo %lo(__debug_status),gr7653654stdi gr4 ,@(gr7,#DEBUG_BRR)655sti gr19,@(gr7,#DEBUG_BPSR)656sti.p gr6 ,@(gr7,#DEBUG_DCR)657658# trap exceptions during break handling and disable h/w breakpoints/watchpoints659sethi %hi(DCR_EBE),gr5660setlo.p %lo(DCR_EBE),gr5661sethi %hi(__entry_breaktrap_table),gr4662setlo %lo(__entry_breaktrap_table),gr4663movgs gr5,dcr664movgs gr4,tbr665666# set up kernel global registers667sethi.p %hi(__kernel_current_task),gr5668setlo %lo(__kernel_current_task),gr5669ld @(gr5,gr0),gr29670ldi.p @(gr29,#4),gr15 ; __current_thread_info = current->thread_info671672sethi %hi(_gp),gr16673setlo.p %lo(_gp),gr16674675# make sure we (the kernel) get div-zero and misalignment exceptions676setlos #ISR_EDE|ISR_DTT_DIVBYZERO|ISR_EMAM_EXCEPTION,gr5677movgs gr5,isr678679# enter the GDB stub680LEDS 0x4007,gr2681682or.p gr0,gr0,fp683call debug_stub684685LEDS 0x403f,gr2686687# return from break688lddi @(gr31,#REG_IACC0),gr4689movgs gr4,iacc0h690movgs gr5,iacc0l691692lddi @(gr31,#REG_GNER0),gr4693movgs gr4,gner0694movgs gr5,gner1695696lddi @(gr31,#REG_LR) ,gr26697lddi @(gr31,#REG_CCR) ,gr24698lddi @(gr31,#REG_PSR) ,gr22699ldi @(gr31,#REG_PC) ,gr21700ldi @(gr31,#REG_TBR) ,gr20701702sethi.p %hi(__debug_status),gr6703setlo %lo(__debug_status),gr6704ldi.p @(gr6,#DEBUG_DCR) ,gr6705706andi gr22,#PSR_S,gr19 /* rebuild BPSR */707andi.p gr22,#PSR_ET,gr5708slli gr19,#10,gr19709or gr5,gr19,gr19710711movgs gr6 ,dcr712movgs gr19,bpsr713movgs gr20,tbr714movgs gr21,bpcsr715movgs gr23,isr716movgs gr24,ccr717movgs gr25,cccr718movgs gr26,lr719movgs gr27,lcr720721LEDS 0x407f,gr2722723#ifdef CONFIG_MMU724ldi @(gr31,#REG_GR(31)),gr2725movgs gr2,scr3726#endif727728ldi @(gr31,#REG_GR(30)),gr30729ldi @(gr31,#REG_GR(29)),gr29730lddi @(gr31,#REG_GR(26)),gr26731lddi @(gr31,#REG_GR(24)),gr24732lddi @(gr31,#REG_GR(22)),gr22733lddi @(gr31,#REG_GR(20)),gr20734lddi @(gr31,#REG_GR(18)),gr18735lddi @(gr31,#REG_GR(16)),gr16736lddi @(gr31,#REG_GR(14)),gr14737lddi @(gr31,#REG_GR(12)),gr12738lddi @(gr31,#REG_GR(10)),gr10739lddi @(gr31,#REG_GR(8)) ,gr8740lddi @(gr31,#REG_GR(6)) ,gr6741lddi @(gr31,#REG_GR(4)) ,gr4742lddi @(gr31,#REG_GR(2)) ,gr2743ldi.p @(gr31,#REG_SP) ,sp744745xor gr31,gr31,gr31746movgs gr0,brr747#ifdef CONFIG_MMU748movsg scr3,gr31749#endif750rett #1751752###################################################################################################753#754# GDB stub "system calls"755#756###################################################################################################757758#ifdef CONFIG_GDBSTUB759# void gdbstub_console_write(struct console *con, const char *p, unsigned n)760.globl gdbstub_console_write761gdbstub_console_write:762break763bralr764#endif765766# GDB stub BUG() trap767# GR8 is the proposed signal number768.globl __debug_bug_trap769__debug_bug_trap:770break771bralr772773# transfer kernel exeception to GDB for handling774.globl __break_hijack_kernel_event775__break_hijack_kernel_event:776break777.globl __break_hijack_kernel_event_breaks_here778__break_hijack_kernel_event_breaks_here:779nop780781#ifdef CONFIG_MMU782# handle a return from TLB-miss that requires single-step reactivation783.globl __break_tlb_miss_return_break784__break_tlb_miss_return_break:785break786__break_tlb_miss_return_breaks_here:787nop788#endif789790# guard the first .text label in the next file from confusion791nop792793794