瀏覽代碼

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>
Michal Simek 14 年之前
父節點
當前提交
626afa35c1
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      arch/microblaze/kernel/entry.S

+ 4 - 1
arch/microblaze/kernel/entry.S

@@ -998,10 +998,13 @@ ENTRY(_reset)
 	/* in current MMU branch you don't care what is here - it is
 	/* in current MMU branch you don't care what is here - it is
 	 * used from bootloader site - but this is correct for FS-BOOT */
 	 * used from bootloader site - but this is correct for FS-BOOT */
 	brai	0x70
 	brai	0x70
-	nop
+	.org	0x8
 	brai	TOPHYS(_user_exception); /* syscall handler */
 	brai	TOPHYS(_user_exception); /* syscall handler */
+	.org	0x10
 	brai	TOPHYS(_interrupt);	/* Interrupt handler */
 	brai	TOPHYS(_interrupt);	/* Interrupt handler */
+	.org	0x18
 	brai	TOPHYS(_debug_exception);	/* debug trap handler */
 	brai	TOPHYS(_debug_exception);	/* debug trap handler */
+	.org	0x20
 	brai	TOPHYS(_hw_exception_handler);	/* HW exception handler */
 	brai	TOPHYS(_hw_exception_handler);	/* HW exception handler */
 
 
 .section .rodata,"a"
 .section .rodata,"a"