aboutsummaryrefslogtreecommitdiffstats
path: root/arch/microblaze
diff options
context:
space:
mode:
authorMichal Simek <monstr@monstr.eu>2011-03-10 04:51:27 -0500
committerMichal Simek <monstr@monstr.eu>2011-03-15 05:58:34 -0400
commit626afa35c1d39be43fc2b225d21973daf1c7e299 (patch)
tree27bdde9bb8b6da20c5deaf070edc356ccee8f980 /arch/microblaze
parentcaa66ce9055d15fb319075ebcf30fbc666b41665 (diff)
microblaze: Fix microblaze init vectors
Microblaze vector table stores several vectors (reset, user exception, interrupt, debug exception and hardware exception). All these functions can be below address 0x10000. If they are, wrong vector table is genarated because jump is not setup from two instructions (imm upper 16bit and brai lower 16bit). Adding specific offset prevent problem if address is below 0x10000. For this case only brai instruction is used. Signed-off-by: Michal Simek <monstr@monstr.eu>
Diffstat (limited to 'arch/microblaze')
-rw-r--r--arch/microblaze/kernel/entry.S5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/microblaze/kernel/entry.S b/arch/microblaze/kernel/entry.S
index e3c8d69e248b..d68a397e3936 100644
--- a/arch/microblaze/kernel/entry.S
+++ b/arch/microblaze/kernel/entry.S
@@ -998,10 +998,13 @@ ENTRY(_reset)
998 /* in current MMU branch you don't care what is here - it is 998 /* in current MMU branch you don't care what is here - it is
999 * used from bootloader site - but this is correct for FS-BOOT */ 999 * used from bootloader site - but this is correct for FS-BOOT */
1000 brai 0x70 1000 brai 0x70
1001 nop 1001 .org 0x8
1002 brai TOPHYS(_user_exception); /* syscall handler */ 1002 brai TOPHYS(_user_exception); /* syscall handler */
1003 .org 0x10
1003 brai TOPHYS(_interrupt); /* Interrupt handler */ 1004 brai TOPHYS(_interrupt); /* Interrupt handler */
1005 .org 0x18
1004 brai TOPHYS(_debug_exception); /* debug trap handler */ 1006 brai TOPHYS(_debug_exception); /* debug trap handler */
1007 .org 0x20
1005 brai TOPHYS(_hw_exception_handler); /* HW exception handler */ 1008 brai TOPHYS(_hw_exception_handler); /* HW exception handler */
1006 1009
1007.section .rodata,"a" 1010.section .rodata,"a"