From: NIIBE Y. <gn...@ch...> - 2000-07-22 04:19:26
|
Following changes is needed when I use zImage with BIOS (no GDB debug feature enabled). -------------------------- 2000-07-22 NIIBE Yutaka <gn...@m1...> * arch/sh/kernel/entry.S (debug_trap, debug_kernel): #ifdef/#endif change, this is needed for SH BIOS call too. * arch/sh/boot/compressed/head.S (init_sr): Set Block=0, so that we can use BIOS call. Index: arch/sh/boot/compressed/head.S =================================================================== RCS file: /cvsroot/linuxsh/kernel/arch/sh/boot/compressed/head.S,v retrieving revision 1.2 diff -u -r1.2 head.S --- arch/sh/boot/compressed/head.S 2000/05/22 09:41:30 1.2 +++ arch/sh/boot/compressed/head.S 2000/07/22 04:15:25 @@ -10,6 +10,9 @@ .global startup startup: + /* Load initial status register */ + mov.l init_sr, r1 + ldc r1, sr /* First clear BSS */ mov.l end_addr, r1 @@ -20,10 +23,6 @@ cmp/eq r1,r2 bf l1 - /* Load initial status register */ - mov.l init_sr, r1 - ldc r1, sr - /* Set the initial pointer. */ mov.l init_stack_addr, r0 mov.l @r0, r15 @@ -44,7 +43,7 @@ end_addr: .long _end init_sr: - .long 0x50000000 /* Privileged mode, Bank=0, Block=1, I3-I0=0 */ + .long 0x40000000 /* Privileged mode, Bank=0, Block=0, I3-I0=0 */ init_stack_addr: .long stack_start decompress_kernel_addr: cvs server: Diffing arch/sh/kernel Index: arch/sh/kernel/entry.S =================================================================== RCS file: /cvsroot/linuxsh/kernel/arch/sh/kernel/entry.S,v retrieving revision 1.15 diff -u -r1.15 entry.S --- arch/sh/kernel/entry.S 2000/07/21 18:06:52 1.15 +++ arch/sh/kernel/entry.S 2000/07/22 04:15:25 @@ -182,7 +182,7 @@ 1: .long SYMBOL_NAME(do_page_fault) 2: .long MMU_TEA -#ifdef CONFIG_DEBUG_KERNEL_WITH_GDB_STUB +#if defined(CONFIG_DEBUG_KERNEL_WITH_GDB_STUB) || defined(CONFIG_SH_STANDARD_BIOS) .align 2 /* Unwind the stack and jmp to the debug entry */ debug_kernel: @@ -224,7 +224,7 @@ .align 2 debug_trap: -#ifdef CONFIG_DEBUG_KERNEL_WITH_GDB_STUB +#if defined(CONFIG_DEBUG_KERNEL_WITH_GDB_STUB) || defined(CONFIG_SH_STANDARD_BIOS) mov #SR, $r0 mov.l @($r0,$r15), $r0 ! get status register shll $r0 @@ -674,7 +674,7 @@ tst $k1, $k0 mov.l 4f, $k1 bf/s 9f ! FPU is not enabled, no need to save it - mov $r15, $k0 ! save original stack to k0 + mov $r15, $k0 ! save original stack to k0 ! FPU is enabled, save it ! /* XXX: Need to save another bank of FPU if all FPU feature is used */ ! /* Currently it's not the case for GCC (only udivsi3_i4, divsi3_i4) */ |