CRIS: Add debug for assembler functions
Signed-off-by: Edgar Iglesias <Edgar.Iglesias@axis.com> Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
This commit is contained in:
parent
b4973ae9da
commit
a80a635f3d
2 changed files with 29 additions and 1 deletions
|
@ -1,4 +1,5 @@
|
||||||
.global cris_flush_cache_range
|
.global cris_flush_cache_range
|
||||||
|
.type cris_flush_cache_range, @function
|
||||||
cris_flush_cache_range:
|
cris_flush_cache_range:
|
||||||
move.d 1024, $r12
|
move.d 1024, $r12
|
||||||
cmp.d $r11, $r12
|
cmp.d $r11, $r12
|
||||||
|
@ -80,8 +81,10 @@ cris_flush_1KB:
|
||||||
addq 32, $r10
|
addq 32, $r10
|
||||||
ba cris_flush_cache_range
|
ba cris_flush_cache_range
|
||||||
sub.d $r12, $r11
|
sub.d $r12, $r11
|
||||||
|
.size cris_flush_cache_range, . - cris_flush_cache_range
|
||||||
|
|
||||||
.global cris_flush_cache
|
.global cris_flush_cache
|
||||||
|
.type cris_flush_cache, @function
|
||||||
cris_flush_cache:
|
cris_flush_cache:
|
||||||
moveq 0, $r10
|
moveq 0, $r10
|
||||||
cris_flush_line:
|
cris_flush_line:
|
||||||
|
@ -92,3 +95,5 @@ cris_flush_line:
|
||||||
fidxd [$r10]
|
fidxd [$r10]
|
||||||
ret
|
ret
|
||||||
nop
|
nop
|
||||||
|
.size cris_flush_cache, . - cris_flush_cache
|
||||||
|
|
||||||
|
|
|
@ -76,12 +76,15 @@ _need_resched:
|
||||||
|
|
||||||
; Called at exit from fork. schedule_tail must be called to drop
|
; Called at exit from fork. schedule_tail must be called to drop
|
||||||
; spinlock if CONFIG_PREEMPT.
|
; spinlock if CONFIG_PREEMPT.
|
||||||
|
.type ret_from_fork,@function
|
||||||
ret_from_fork:
|
ret_from_fork:
|
||||||
jsr schedule_tail
|
jsr schedule_tail
|
||||||
nop
|
nop
|
||||||
ba ret_from_sys_call
|
ba ret_from_sys_call
|
||||||
nop
|
nop
|
||||||
|
.size ret_from_fork, . - ret_from_fork
|
||||||
|
|
||||||
|
.type ret_from_intr,@function
|
||||||
ret_from_intr:
|
ret_from_intr:
|
||||||
;; Check for resched if preemptive kernel, or if we're going back to
|
;; Check for resched if preemptive kernel, or if we're going back to
|
||||||
;; user-mode. This test matches the user_regs(regs) macro. Don't simply
|
;; user-mode. This test matches the user_regs(regs) macro. Don't simply
|
||||||
|
@ -91,9 +94,10 @@ ret_from_intr:
|
||||||
move.d [$acr], $r0
|
move.d [$acr], $r0
|
||||||
btstq 16, $r0 ; User-mode flag.
|
btstq 16, $r0 ; User-mode flag.
|
||||||
bpl _resume_kernel
|
bpl _resume_kernel
|
||||||
|
.size ret_from_intr, . - ret_from_intr + 2 ; +2 includes the dslot.
|
||||||
|
|
||||||
; Note that di below is in delay slot.
|
; Note that di below is in delay slot.
|
||||||
|
.type _resume_userspace,@function
|
||||||
_resume_userspace:
|
_resume_userspace:
|
||||||
di ; So need_resched and sigpending don't change.
|
di ; So need_resched and sigpending don't change.
|
||||||
|
|
||||||
|
@ -107,6 +111,7 @@ _resume_userspace:
|
||||||
nop
|
nop
|
||||||
ba _Rexit
|
ba _Rexit
|
||||||
nop
|
nop
|
||||||
|
.size _resume_userspace, . - _resume_userspace
|
||||||
|
|
||||||
;; The system_call is called by a BREAK instruction, which looks pretty
|
;; The system_call is called by a BREAK instruction, which looks pretty
|
||||||
;; much like any other exception.
|
;; much like any other exception.
|
||||||
|
@ -122,6 +127,7 @@ _resume_userspace:
|
||||||
;; non-used instructions. Only the non-common cases cause the outlined code
|
;; non-used instructions. Only the non-common cases cause the outlined code
|
||||||
;; to run..
|
;; to run..
|
||||||
|
|
||||||
|
.type system_call,@function
|
||||||
system_call:
|
system_call:
|
||||||
;; Stack-frame similar to the irq heads, which is reversed in
|
;; Stack-frame similar to the irq heads, which is reversed in
|
||||||
;; ret_from_sys_call.
|
;; ret_from_sys_call.
|
||||||
|
@ -217,7 +223,9 @@ ret_from_sys_call:
|
||||||
and.d _TIF_ALLWORK_MASK, $r1
|
and.d _TIF_ALLWORK_MASK, $r1
|
||||||
bne _syscall_exit_work
|
bne _syscall_exit_work
|
||||||
nop
|
nop
|
||||||
|
.size system_call, . - system_call
|
||||||
|
|
||||||
|
.type _Rexit,@function
|
||||||
_Rexit:
|
_Rexit:
|
||||||
;; This epilogue MUST match the prologues in multiple_interrupt, irq.h
|
;; This epilogue MUST match the prologues in multiple_interrupt, irq.h
|
||||||
;; and ptregs.h.
|
;; and ptregs.h.
|
||||||
|
@ -234,10 +242,12 @@ _Rexit:
|
||||||
addq 8, $sp ; Skip EXS, EDA.
|
addq 8, $sp ; Skip EXS, EDA.
|
||||||
jump $erp
|
jump $erp
|
||||||
rfe ; Restore condition code stack in delay-slot.
|
rfe ; Restore condition code stack in delay-slot.
|
||||||
|
.size _Rexit, . - _Rexit
|
||||||
|
|
||||||
;; We get here after doing a syscall if extra work might need to be done
|
;; We get here after doing a syscall if extra work might need to be done
|
||||||
;; perform syscall exit tracing if needed.
|
;; perform syscall exit tracing if needed.
|
||||||
|
|
||||||
|
.type _syscall_exit_work,@function
|
||||||
_syscall_exit_work:
|
_syscall_exit_work:
|
||||||
;; R0 contains current at this point and irq's are disabled.
|
;; R0 contains current at this point and irq's are disabled.
|
||||||
|
|
||||||
|
@ -253,14 +263,18 @@ _syscall_exit_work:
|
||||||
move.d $r1, $r9
|
move.d $r1, $r9
|
||||||
ba _resume_userspace
|
ba _resume_userspace
|
||||||
nop
|
nop
|
||||||
|
.size _syscall_exit_work, . - _syscall_exit_work
|
||||||
|
|
||||||
|
.type _work_pending,@function
|
||||||
_work_pending:
|
_work_pending:
|
||||||
addoq +TI_flags, $r0, $acr
|
addoq +TI_flags, $r0, $acr
|
||||||
move.d [$acr], $r10
|
move.d [$acr], $r10
|
||||||
btstq TIF_NEED_RESCHED, $r10 ; Need resched?
|
btstq TIF_NEED_RESCHED, $r10 ; Need resched?
|
||||||
bpl _work_notifysig ; No, must be signal/notify.
|
bpl _work_notifysig ; No, must be signal/notify.
|
||||||
nop
|
nop
|
||||||
|
.size _work_pending, . - _work_pending
|
||||||
|
|
||||||
|
.type _work_resched,@function
|
||||||
_work_resched:
|
_work_resched:
|
||||||
move.d $r9, $r1 ; Preserve R9.
|
move.d $r9, $r1 ; Preserve R9.
|
||||||
jsr schedule
|
jsr schedule
|
||||||
|
@ -276,7 +290,9 @@ _work_resched:
|
||||||
btstq TIF_NEED_RESCHED, $r1
|
btstq TIF_NEED_RESCHED, $r1
|
||||||
bmi _work_resched ; current->work.need_resched.
|
bmi _work_resched ; current->work.need_resched.
|
||||||
nop
|
nop
|
||||||
|
.size _work_resched, . - _work_resched
|
||||||
|
|
||||||
|
.type _work_notifysig,@function
|
||||||
_work_notifysig:
|
_work_notifysig:
|
||||||
;; Deal with pending signals and notify-resume requests.
|
;; Deal with pending signals and notify-resume requests.
|
||||||
|
|
||||||
|
@ -288,6 +304,7 @@ _work_notifysig:
|
||||||
|
|
||||||
ba _Rexit
|
ba _Rexit
|
||||||
nop
|
nop
|
||||||
|
.size _work_notifysig, . - _work_notifysig
|
||||||
|
|
||||||
;; We get here as a sidetrack when we've entered a syscall with the
|
;; We get here as a sidetrack when we've entered a syscall with the
|
||||||
;; trace-bit set. We need to call do_syscall_trace and then continue
|
;; trace-bit set. We need to call do_syscall_trace and then continue
|
||||||
|
@ -329,6 +346,7 @@ _syscall_trace_entry:
|
||||||
;;
|
;;
|
||||||
;; Returns old current in R10.
|
;; Returns old current in R10.
|
||||||
|
|
||||||
|
.type resume,@function
|
||||||
resume:
|
resume:
|
||||||
subq 4, $sp
|
subq 4, $sp
|
||||||
move $srp, [$sp] ; Keep old/new PC on the stack.
|
move $srp, [$sp] ; Keep old/new PC on the stack.
|
||||||
|
@ -364,6 +382,7 @@ resume:
|
||||||
move.d [$sp+], $acr
|
move.d [$sp+], $acr
|
||||||
jump $acr ; Restore PC.
|
jump $acr ; Restore PC.
|
||||||
nop
|
nop
|
||||||
|
.size resume, . - resume
|
||||||
|
|
||||||
nmi_interrupt:
|
nmi_interrupt:
|
||||||
|
|
||||||
|
@ -426,6 +445,7 @@ spurious_interrupt:
|
||||||
;; time. Jump to the first set interrupt bit in a priotiry fashion. The
|
;; time. Jump to the first set interrupt bit in a priotiry fashion. The
|
||||||
;; hardware will call the unserved interrupts after the handler
|
;; hardware will call the unserved interrupts after the handler
|
||||||
;; finishes.
|
;; finishes.
|
||||||
|
.type multiple_interrupt, @function
|
||||||
multiple_interrupt:
|
multiple_interrupt:
|
||||||
;; This prologue MUST match the one in irq.h and the struct in ptregs.h!
|
;; This prologue MUST match the one in irq.h and the struct in ptregs.h!
|
||||||
subq 12, $sp ; Skip EXS, EDA.
|
subq 12, $sp ; Skip EXS, EDA.
|
||||||
|
@ -458,6 +478,7 @@ multiple_interrupt:
|
||||||
move.d $sp, $r10
|
move.d $sp, $r10
|
||||||
jump ret_from_intr
|
jump ret_from_intr
|
||||||
nop
|
nop
|
||||||
|
.size multiple_interrupt, . - multiple_interrupt
|
||||||
|
|
||||||
do_sigtrap:
|
do_sigtrap:
|
||||||
;; Sigtraps the process that executed the BREAK instruction. Creates a
|
;; Sigtraps the process that executed the BREAK instruction. Creates a
|
||||||
|
@ -514,11 +535,13 @@ _ugdb_handle_exception:
|
||||||
move.d [$sp+], $r0 ; Restore R0 in delay slot.
|
move.d [$sp+], $r0 ; Restore R0 in delay slot.
|
||||||
|
|
||||||
.global kernel_execve
|
.global kernel_execve
|
||||||
|
.type kernel_execve,@function
|
||||||
kernel_execve:
|
kernel_execve:
|
||||||
move.d __NR_execve, $r9
|
move.d __NR_execve, $r9
|
||||||
break 13
|
break 13
|
||||||
ret
|
ret
|
||||||
nop
|
nop
|
||||||
|
.size kernel_execve, . - kernel_execve
|
||||||
|
|
||||||
.data
|
.data
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue