提交 c06b3a06 编写于 作者: M Michal Simek

microblaze: Do not use r0_ram space for hw exception debugging

Remove hw exception counting space from r0_ram. Use special
exception_debug_table poll for exception statistic.
Signed-off-by: NMichal Simek <monstr@monstr.eu>
上级 a5abba98
...@@ -77,6 +77,8 @@ ...@@ -77,6 +77,8 @@
#include <asm/signal.h> #include <asm/signal.h>
#include <asm/asm-offsets.h> #include <asm/asm-offsets.h>
#undef DEBUG
/* Helpful Macros */ /* Helpful Macros */
#define NUM_TO_REG(num) r ## num #define NUM_TO_REG(num) r ## num
...@@ -228,6 +230,16 @@ ...@@ -228,6 +230,16 @@
/* wrappers to restore state before coming to entry.S */ /* wrappers to restore state before coming to entry.S */
#ifdef CONFIG_MMU #ifdef CONFIG_MMU
#ifdef DEBUG
/* Create space for exception counting. */
.section .data
.global exception_debug_table
.align 4
exception_debug_table:
/* Look at exception vector table. There is 32 exceptions * word size */
.space (32 * 4)
#endif /* DEBUG */
.section .rodata .section .rodata
.align 4 .align 4
_MB_HW_ExceptionVectorTable: _MB_HW_ExceptionVectorTable:
...@@ -329,12 +341,12 @@ not_in_delay_slot: ...@@ -329,12 +341,12 @@ not_in_delay_slot:
#ifdef DEBUG #ifdef DEBUG
/* counting which exception happen */ /* counting which exception happen */
lwi r5, r0, 0x200 + TOPHYS(r0_ram) lwi r5, r0, TOPHYS(exception_debug_table)
addi r5, r5, 1 addi r5, r5, 1
swi r5, r0, 0x200 + TOPHYS(r0_ram) swi r5, r0, TOPHYS(exception_debug_table)
lwi r5, r6, 0x200 + TOPHYS(r0_ram) lwi r5, r6, TOPHYS(exception_debug_table)
addi r5, r5, 1 addi r5, r5, 1
swi r5, r6, 0x200 + TOPHYS(r0_ram) swi r5, r6, TOPHYS(exception_debug_table)
#endif #endif
/* end */ /* end */
/* Load the HW Exception vector */ /* Load the HW Exception vector */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册