]> err.no Git - linux-2.6/blobdiff - arch/powerpc/kernel/head_8xx.S
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
[linux-2.6] / arch / powerpc / kernel / head_8xx.S
index cb1a3a54a02641c0e87e313d639d4b0630ba39d9..f7458396cd7c022968abb231d1fdf62cb5ec2c67 100644 (file)
@@ -1,6 +1,4 @@
 /*
- *  arch/ppc/kernel/except_8xx.S
- *
  *  PowerPC version
  *    Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org)
  *  Rewritten by Cort Dougan (cort@cs.nmt.edu) for PReP
@@ -21,7 +19,6 @@
  *
  */
 
-#include <linux/config.h>
 #include <asm/processor.h>
 #include <asm/page.h>
 #include <asm/mmu.h>
 #else
 #define DO_8xx_CPU6(val, reg)
 #endif
-       .text
-       .globl  _stext
-_stext:
-       .text
-       .globl  _start
-_start:
+       .section        .text.head, "ax"
+_ENTRY(_stext);
+_ENTRY(_start);
 
 /* MPC8xx
  * This port was done on an MBX board with an 860.  Right now I only
@@ -175,7 +169,7 @@ label:                                              \
 
 #define EXC_XFER_TEMPLATE(n, hdlr, trap, copyee, tfer, ret)    \
        li      r10,trap;                                       \
-       stw     r10,TRAP(r11);                                  \
+       stw     r10,_TRAP(r11);                                 \
        li      r10,MSR_KERNEL;                                 \
        copyee(r10, r9);                                        \
        bl      tfer;                                           \
@@ -203,7 +197,7 @@ i##n:                                                               \
                          ret_from_except)
 
 /* System reset */
-       EXCEPTION(0x100, Reset, UnknownException, EXC_XFER_STD)
+       EXCEPTION(0x100, Reset, unknown_exception, EXC_XFER_STD)
 
 /* Machine check */
        . = 0x200
@@ -214,7 +208,7 @@ MachineCheck:
        mfspr r5,SPRN_DSISR
        stw r5,_DSISR(r11)
        addi r3,r1,STACK_FRAME_OVERHEAD
-       EXC_XFER_STD(0x200, MachineCheckException)
+       EXC_XFER_STD(0x200, machine_check_exception)
 
 /* Data access exception.
  * This is "never generated" by the MPC8xx.  We jump to it for other
@@ -252,20 +246,20 @@ Alignment:
        mfspr   r5,SPRN_DSISR
        stw     r5,_DSISR(r11)
        addi    r3,r1,STACK_FRAME_OVERHEAD
-       EXC_XFER_EE(0x600, AlignmentException)
+       EXC_XFER_EE(0x600, alignment_exception)
 
 /* Program check exception */
-       EXCEPTION(0x700, ProgramCheck, ProgramCheckException, EXC_XFER_STD)
+       EXCEPTION(0x700, ProgramCheck, program_check_exception, EXC_XFER_STD)
 
 /* No FPU on MPC8xx.  This exception is not supposed to happen.
 */
-       EXCEPTION(0x800, FPUnavailable, UnknownException, EXC_XFER_STD)
+       EXCEPTION(0x800, FPUnavailable, unknown_exception, EXC_XFER_STD)
 
 /* Decrementer */
        EXCEPTION(0x900, Decrementer, timer_interrupt, EXC_XFER_LITE)
 
-       EXCEPTION(0xa00, Trap_0a, UnknownException, EXC_XFER_EE)
-       EXCEPTION(0xb00, Trap_0b, UnknownException, EXC_XFER_EE)
+       EXCEPTION(0xa00, Trap_0a, unknown_exception, EXC_XFER_EE)
+       EXCEPTION(0xb00, Trap_0b, unknown_exception, EXC_XFER_EE)
 
 /* System call */
        . = 0xc00
@@ -274,9 +268,9 @@ SystemCall:
        EXC_XFER_EE_LITE(0xc00, DoSyscall)
 
 /* Single step - not used on 601 */
-       EXCEPTION(0xd00, SingleStep, SingleStepException, EXC_XFER_STD)
-       EXCEPTION(0xe00, Trap_0e, UnknownException, EXC_XFER_EE)
-       EXCEPTION(0xf00, Trap_0f, UnknownException, EXC_XFER_EE)
+       EXCEPTION(0xd00, SingleStep, single_step_exception, EXC_XFER_STD)
+       EXCEPTION(0xe00, Trap_0e, unknown_exception, EXC_XFER_EE)
+       EXCEPTION(0xf00, Trap_0f, unknown_exception, EXC_XFER_EE)
 
 /* On the MPC8xx, this is a software emulation interrupt.  It occurs
  * for all unimplemented and illegal instructions.
@@ -304,6 +298,12 @@ InstructionTLBMiss:
        stw     r10, 0(r0)
        stw     r11, 4(r0)
        mfspr   r10, SPRN_SRR0  /* Get effective address of fault */
+#ifdef CONFIG_8xx_CPU15
+       addi    r11, r10, 0x1000
+       tlbie   r11
+       addi    r11, r10, -0x1000
+       tlbie   r11
+#endif
        DO_8xx_CPU6(0x3780, r3)
        mtspr   SPRN_MD_EPN, r10        /* Have to use MD_EPN for walk, MI_EPN can't */
        mfspr   r10, SPRN_M_TWB /* Get level 1 table entry address */
@@ -540,22 +540,22 @@ DataTLBError:
 #endif
        b       DataAccess
 
-       EXCEPTION(0x1500, Trap_15, UnknownException, EXC_XFER_EE)
-       EXCEPTION(0x1600, Trap_16, UnknownException, EXC_XFER_EE)
-       EXCEPTION(0x1700, Trap_17, UnknownException, EXC_XFER_EE)
-       EXCEPTION(0x1800, Trap_18, UnknownException, EXC_XFER_EE)
-       EXCEPTION(0x1900, Trap_19, UnknownException, EXC_XFER_EE)
-       EXCEPTION(0x1a00, Trap_1a, UnknownException, EXC_XFER_EE)
-       EXCEPTION(0x1b00, Trap_1b, UnknownException, EXC_XFER_EE)
+       EXCEPTION(0x1500, Trap_15, unknown_exception, EXC_XFER_EE)
+       EXCEPTION(0x1600, Trap_16, unknown_exception, EXC_XFER_EE)
+       EXCEPTION(0x1700, Trap_17, unknown_exception, EXC_XFER_EE)
+       EXCEPTION(0x1800, Trap_18, unknown_exception, EXC_XFER_EE)
+       EXCEPTION(0x1900, Trap_19, unknown_exception, EXC_XFER_EE)
+       EXCEPTION(0x1a00, Trap_1a, unknown_exception, EXC_XFER_EE)
+       EXCEPTION(0x1b00, Trap_1b, unknown_exception, EXC_XFER_EE)
 
 /* On the MPC8xx, these next four traps are used for development
  * support of breakpoints and such.  Someday I will get around to
  * using them.
  */
-       EXCEPTION(0x1c00, Trap_1c, UnknownException, EXC_XFER_EE)
-       EXCEPTION(0x1d00, Trap_1d, UnknownException, EXC_XFER_EE)
-       EXCEPTION(0x1e00, Trap_1e, UnknownException, EXC_XFER_EE)
-       EXCEPTION(0x1f00, Trap_1f, UnknownException, EXC_XFER_EE)
+       EXCEPTION(0x1c00, Trap_1c, unknown_exception, EXC_XFER_EE)
+       EXCEPTION(0x1d00, Trap_1d, unknown_exception, EXC_XFER_EE)
+       EXCEPTION(0x1e00, Trap_1e, unknown_exception, EXC_XFER_EE)
+       EXCEPTION(0x1f00, Trap_1f, unknown_exception, EXC_XFER_EE)
 
        . = 0x2000
 
@@ -733,13 +733,13 @@ initial_mmu:
        mtspr   SPRN_MD_TWC, r9
        li      r11, MI_BOOTINIT        /* Create RPN for address 0 */
        addis   r11, r11, 0x0080        /* Add 8M */
-       mtspr   SPRN_MD_RPN, r8
+       mtspr   SPRN_MD_RPN, r11
 
        addis   r8, r8, 0x0080          /* Add 8M */
        mtspr   SPRN_MD_EPN, r8
        mtspr   SPRN_MD_TWC, r9
        addis   r11, r11, 0x0080        /* Add 8M */
-       mtspr   SPRN_MD_RPN, r8
+       mtspr   SPRN_MD_RPN, r11
 #endif
 
        /* Since the cache is enabled according to the information we
@@ -838,14 +838,6 @@ empty_zero_page:
 swapper_pg_dir:
        .space  4096
 
-/*
- * This space gets a copy of optional info passed to us by the bootstrap
- * Used to pass parameters into the kernel like root=/dev/sda1, etc.
- */
-       .globl  cmd_line
-cmd_line:
-       .space  512
-
 /* Room for two PTE table poiners, usually the kernel and current user
  * pointer to their respective root page table (pgdir).
  */