]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/powerpc/kernel/head_32.S
Merge branch 'drm-patches' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied...
[linux-2.6-omap-h63xx.git] / arch / powerpc / kernel / head_32.S
index 12febfe43de64a9463b14006fe2113e608c484c7..785af9b56591550d2947bf211e28901ab9981e48 100644 (file)
@@ -30,6 +30,7 @@
 #include <asm/thread_info.h>
 #include <asm/ppc_asm.h>
 #include <asm/asm-offsets.h>
+#include <asm/ptrace.h>
 
 /* 601 only have IBAT; cr0.eq is set on 601 when using this macro */
 #define LOAD_BAT(n, reg, RA, RB)       \
@@ -149,6 +150,9 @@ __after_mmu_off:
 #if defined(CONFIG_BOOTX_TEXT)
        bl      setup_disp_bat
 #endif
+#ifdef CONFIG_PPC_EARLY_DEBUG_CPM
+       bl      setup_cpm_bat
+#endif
 
 /*
  * Call setup_cpu for CPU 0 and initialize 6xx Idle
@@ -265,8 +269,8 @@ __secondary_hold_acknowledge:
        li      r10,MSR_KERNEL & ~(MSR_IR|MSR_DR); /* can take exceptions */ \
        MTMSRD(r10);                    /* (except for mach check in rtas) */ \
        stw     r0,GPR0(r11);   \
-       lis     r10,0x7265;             /* put exception frame marker */ \
-       addi    r10,r10,0x6773; \
+       lis     r10,STACK_FRAME_REGS_MARKER@ha; /* exception frame marker */ \
+       addi    r10,r10,STACK_FRAME_REGS_MARKER@l; \
        stw     r10,8(r11);     \
        SAVE_4GPRS(3, r11);     \
        SAVE_2GPRS(7, r11)
@@ -466,12 +470,12 @@ InstructionTLBMiss:
        mfctr   r0
        /* Get PTE (linux-style) and check access */
        mfspr   r3,SPRN_IMISS
-       lis     r1,KERNELBASE@h         /* check if kernel address */
-       cmplw   0,r3,r1
+       lis     r1,PAGE_OFFSET@h                /* check if kernel address */
+       cmplw   0,r1,r3
        mfspr   r2,SPRN_SPRG3
        li      r1,_PAGE_USER|_PAGE_PRESENT /* low addresses tested as user */
        lwz     r2,PGDIR(r2)
-       blt+    112f
+       bge-    112f
        mfspr   r2,SPRN_SRR1            /* and MSR_PR bit from SRR1 */
        rlwimi  r1,r2,32-12,29,29       /* shift MSR_PR to _PAGE_USER posn */
        lis     r2,swapper_pg_dir@ha    /* if kernel address, use */
@@ -540,12 +544,12 @@ DataLoadTLBMiss:
        mfctr   r0
        /* Get PTE (linux-style) and check access */
        mfspr   r3,SPRN_DMISS
-       lis     r1,KERNELBASE@h         /* check if kernel address */
-       cmplw   0,r3,r1
+       lis     r1,PAGE_OFFSET@h                /* check if kernel address */
+       cmplw   0,r1,r3
        mfspr   r2,SPRN_SPRG3
        li      r1,_PAGE_USER|_PAGE_PRESENT /* low addresses tested as user */
        lwz     r2,PGDIR(r2)
-       blt+    112f
+       bge-    112f
        mfspr   r2,SPRN_SRR1            /* and MSR_PR bit from SRR1 */
        rlwimi  r1,r2,32-12,29,29       /* shift MSR_PR to _PAGE_USER posn */
        lis     r2,swapper_pg_dir@ha    /* if kernel address, use */
@@ -612,12 +616,12 @@ DataStoreTLBMiss:
        mfctr   r0
        /* Get PTE (linux-style) and check access */
        mfspr   r3,SPRN_DMISS
-       lis     r1,KERNELBASE@h         /* check if kernel address */
-       cmplw   0,r3,r1
+       lis     r1,PAGE_OFFSET@h                /* check if kernel address */
+       cmplw   0,r1,r3
        mfspr   r2,SPRN_SPRG3
        li      r1,_PAGE_RW|_PAGE_USER|_PAGE_PRESENT /* access flags */
        lwz     r2,PGDIR(r2)
-       blt+    112f
+       bge-    112f
        mfspr   r2,SPRN_SRR1            /* and MSR_PR bit from SRR1 */
        rlwimi  r1,r2,32-12,29,29       /* shift MSR_PR to _PAGE_USER posn */
        lis     r2,swapper_pg_dir@ha    /* if kernel address, use */
@@ -759,23 +763,6 @@ load_up_altivec:
        /* we haven't used ctr or xer or lr */
        b       fast_exception_return
 
-/*
- * AltiVec unavailable trap from kernel - print a message, but let
- * the task use AltiVec in the kernel until it returns to user mode.
- */
-KernelAltiVec:
-       lwz     r3,_MSR(r1)
-       oris    r3,r3,MSR_VEC@h
-       stw     r3,_MSR(r1)     /* enable use of AltiVec after return */
-       lis     r3,87f@h
-       ori     r3,r3,87f@l
-       mr      r4,r2           /* current */
-       lwz     r5,_NIP(r1)
-       bl      printk
-       b       ret_from_except
-87:    .string "AltiVec used in kernel  (task=%p, pc=%x)  \n"
-       .align  4,0
-
 /*
  * giveup_altivec(tsk)
  * Disable AltiVec for the task given as the argument,
@@ -1245,6 +1232,19 @@ setup_disp_bat:
        blr
 #endif /* CONFIG_BOOTX_TEXT */
 
+#ifdef CONFIG_PPC_EARLY_DEBUG_CPM
+setup_cpm_bat:
+       lis     r8, 0xf000
+       ori     r8, r8, 0x002a
+       mtspr   SPRN_DBAT1L, r8
+
+       lis     r11, 0xf000
+       ori     r11, r11, (BL_1M << 2) | 2
+       mtspr   SPRN_DBAT1U, r11
+
+       blr
+#endif
+
 #ifdef CONFIG_8260
 /* Jump into the system reset for the rom.
  * We first disable the MMU, and then jump to the ROM reset address.
@@ -1295,15 +1295,7 @@ empty_zero_page:
 
        .globl  swapper_pg_dir
 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
+       .space  PGD_TABLE_SIZE
 
        .globl intercept_table
 intercept_table: