]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/ppc/misc_asm.s
xnu-792.tar.gz
[apple/xnu.git] / osfmk / ppc / misc_asm.s
index 1b3222dbdb0318119ca35f8c5c44de06d30193bc..33d39c41bf609d4ca67164ecf7ebf0cbcbf65a1f 100644 (file)
@@ -45,46 +45,6 @@ ENTRY(getrpc, TAG_NO_FRAME_USED)
        blr                                     /* And return */
 
 
-/* Mask and unmask interrupts at the processor level */        
-ENTRY(interrupt_disable, TAG_NO_FRAME_USED)
-                       lis             r8,hi16(MASK(MSR_VEC))                  ; Get the vector flag
-                       mfmsr   r0                                                              ; Save the MSR 
-                       ori             r8,r8,lo16(MASK(MSR_EE)|MASK(MSR_FP))   ; Add the FP flag
-                       andc    r0,r0,r8                                                ; Clear VEC, FP, DR, and EE
-                       mtmsr   r0
-                       isync
-                       blr
-
-ENTRY(interrupt_enable, TAG_NO_FRAME_USED)
-
-       mfmsr   r0
-       ori             r0,     r0,     MASK(MSR_EE)
-       mtmsr   r0
-       blr
-
-#if    MACH_KDB
-/*
- * Kernel debugger versions of the spl*() functions.  This allows breakpoints
- * in the spl*() functions.
- */
-
-/* Mask and unmask interrupts at the processor level */        
-ENTRY(db_interrupt_disable, TAG_NO_FRAME_USED)
-                       lis             r8,hi16(MASK(MSR_VEC))                  ; Get the vector flag
-                       mfmsr   r0                                                              ; Save the MSR 
-                       ori             r8,r8,lo16(MASK(MSR_EE)|MASK(MSR_FP))   ; Add the FP flag
-                       andc    r0,r0,r8                                                ; Clear VEC, FP, DR, and EE
-                       mtmsr   r0
-                       isync
-                       blr
-
-ENTRY(db_interrupt_enable, TAG_NO_FRAME_USED)
-       mfmsr   r0
-       ori     r0,     r0,     MASK(MSR_EE)
-       mtmsr   r0
-       blr
-#endif /* MACH_KDB */
-
 /*
  *     General entry for all debuggers.  This gets us onto the debug stack and
  *     then back off at exit. We need to pass back R3 to caller.
@@ -100,7 +60,8 @@ ENTRY(Call_Debugger, TAG_NO_FRAME_USED)
                        andc    r7,r7,r8                                                ; Clear VEC and FP
                        mtmsr   r7                              ; Do it 
                        isync
-                       mfsprg  r8,0                    ; Get the per_proc block
+                       mfsprg  r8,1                                    ; Get the current activation
+                       lwz             r8,ACT_PER_PROC(r8)             ; Get the per_proc block
                        stw             r0,FM_LR_SAVE(r1)       ; Save return on current stack
                        
                        lwz             r9,PP_DEBSTACKPTR(r8)   ; Get the debug stack
@@ -127,7 +88,8 @@ cdNewDeb:    li              r0,0                    ; Clear this out
                        andc    r0,r0,r8                ; Turn off all the interesting stuff
                        mtmsr   r0
                
-                       mfsprg  r8,0                    ; Get the per_proc block address
+                       mfsprg  r8,1                                    ; Get the current activation
+                       lwz             r8,ACT_PER_PROC(r8)             ; Get the per_proc block
                        
                        lwz             r9,PP_DEBSTACK_TOP_SS(r8)       ; Get the top of the stack
                        cmplw   r1,r9                   ; Have we hit the bottom of the debug stack?