aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/mach-common/entry.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/blackfin/mach-common/entry.S')
-rw-r--r--arch/blackfin/mach-common/entry.S73
1 files changed, 73 insertions, 0 deletions
diff --git a/arch/blackfin/mach-common/entry.S b/arch/blackfin/mach-common/entry.S
index 207e69786b40..ab278a72f282 100644
--- a/arch/blackfin/mach-common/entry.S
+++ b/arch/blackfin/mach-common/entry.S
@@ -731,6 +731,75 @@ ENTRY(_init_exception_buff)
731 rts; 731 rts;
732ENDPROC(_init_exception_buff) 732ENDPROC(_init_exception_buff)
733 733
734/* We handle this 100% in exception space - to reduce overhead
735 * Only potiential problem is if the software buffer gets swapped out of the
736 * CPLB table - then double fault. - so we don't let this happen in other places
737 */
738#ifdef CONFIG_DEBUG_BFIN_HWTRACE_EXPAND
739ENTRY(_ex_trace_buff_full)
740 [--sp] = P3;
741 [--sp] = P2;
742 [--sp] = LC0;
743 [--sp] = LT0;
744 [--sp] = LB0;
745 P5.L = _trace_buff_offset;
746 P5.H = _trace_buff_offset;
747 P3 = [P5]; /* trace_buff_offset */
748 P5.L = lo(TBUFSTAT);
749 P5.H = hi(TBUFSTAT);
750 R7 = [P5];
751 R7 <<= 1; /* double, since we need to read twice */
752 LC0 = R7;
753 R7 <<= 2; /* need to shift over again,
754 * to get the number of bytes */
755 P5.L = lo(TBUF);
756 P5.H = hi(TBUF);
757 R6 = ((1 << CONFIG_DEBUG_BFIN_HWTRACE_EXPAND_LEN)*1024) - 1;
758
759 P2 = R7;
760 P3 = P3 + P2;
761 R7 = P3;
762 R7 = R7 & R6;
763 P3 = R7;
764 P2.L = _trace_buff_offset;
765 P2.H = _trace_buff_offset;
766 [P2] = P3;
767
768 P2.L = _software_trace_buff;
769 P2.H = _software_trace_buff;
770
771 LSETUP (.Lstart, .Lend) LC0;
772.Lstart:
773 R7 = [P5]; /* read TBUF */
774 P4 = P3 + P2;
775 [P4] = R7;
776 P3 += -4;
777 R7 = P3;
778 R7 = R7 & R6;
779.Lend:
780 P3 = R7;
781
782 LB0 = [sp++];
783 LT0 = [sp++];
784 LC0 = [sp++];
785 P2 = [sp++];
786 P3 = [sp++];
787 jump _return_from_exception;
788
789#if CONFIG_DEBUG_BFIN_HWTRACE_EXPAND_LEN == 4
790.data
791#else
792.section .l1.data.B
793#endif
794ENTRY(_trace_buff_offset)
795 .long 0;
796ALIGN
797ENTRY(_software_trace_buff)
798 .rept ((1 << CONFIG_DEBUG_BFIN_HWTRACE_EXPAND_LEN)*256);
799 .long 0
800 .endr
801#endif
802
734/* 803/*
735 * Put these in the kernel data section - that should always be covered by 804 * Put these in the kernel data section - that should always be covered by
736 * a CPLB. This is needed to ensure we don't get double fault conditions 805 * a CPLB. This is needed to ensure we don't get double fault conditions
@@ -764,7 +833,11 @@ _extable:
764 .long _ex_trap_c /* 0x0E - User Defined */ 833 .long _ex_trap_c /* 0x0E - User Defined */
765 .long _ex_trap_c /* 0x0F - User Defined */ 834 .long _ex_trap_c /* 0x0F - User Defined */
766 .long _ex_single_step /* 0x10 - HW Single step */ 835 .long _ex_single_step /* 0x10 - HW Single step */
836#ifdef CONFIG_DEBUG_BFIN_HWTRACE_EXPAND
837 .long _ex_trace_buff_full /* 0x11 - Trace Buffer Full */
838#else
767 .long _ex_trap_c /* 0x11 - Trace Buffer Full */ 839 .long _ex_trap_c /* 0x11 - Trace Buffer Full */
840#endif
768 .long _ex_trap_c /* 0x12 - Reserved */ 841 .long _ex_trap_c /* 0x12 - Reserved */
769 .long _ex_trap_c /* 0x13 - Reserved */ 842 .long _ex_trap_c /* 0x13 - Reserved */
770 .long _ex_trap_c /* 0x14 - Reserved */ 843 .long _ex_trap_c /* 0x14 - Reserved */