summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDale Rahn <drahn@cvs.openbsd.org>2003-10-24 19:56:45 +0000
committerDale Rahn <drahn@cvs.openbsd.org>2003-10-24 19:56:45 +0000
commitb1ad6b4cf35556d6a52d4e724c959f02000d7d05 (patch)
tree333882b55fa32bee87957d55ee3bb34563ac9777
parent60d40ef937404ccf56e671127398007aff350afc (diff)
IPKDB has never been supported in OpenBSD/powerpc/macppc delete this
old unused code. Remove very old 'where' debugging references. ANSI a previously missed function.
-rw-r--r--sys/arch/macppc/macppc/locore.S149
-rw-r--r--sys/arch/macppc/macppc/machdep.c28
2 files changed, 4 insertions, 173 deletions
diff --git a/sys/arch/macppc/macppc/locore.S b/sys/arch/macppc/macppc/locore.S
index 2098eec82e4..b4494746597 100644
--- a/sys/arch/macppc/macppc/locore.S
+++ b/sys/arch/macppc/macppc/locore.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: locore.S,v 1.12 2003/10/20 02:45:10 drahn Exp $ */
+/* $OpenBSD: locore.S,v 1.13 2003/10/24 19:56:44 drahn Exp $ */
/* $NetBSD: locore.S,v 1.2 1996/10/16 19:33:09 ws Exp $ */
/*
@@ -32,8 +32,6 @@
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "machine/ipkdb.h"
-
#include "assym.h"
#include <sys/syscall.h>
@@ -58,9 +56,6 @@ idle_u: .long 0 /* fake uarea during idle after exit */
fwargsave:
.long 0
.long 0
- .globl _C_LABEL(where)
- .type _C_LABEL(where),@object
-_C_LABEL(where): .long 0
/*
* Startup entry
@@ -127,10 +122,6 @@ start:
li %r0,0
stwu %r0,-16(%r1) /* end of stack chain */
- li %r0, 2
- lis %r9,_C_LABEL(where)@ha
- stw %r0,_C_LABEL(where)@l(%r9)
-
lis %r3,start@ha
addi %r3,%r3,start@l
mr %r5,%r6 /* args string */
@@ -348,8 +339,7 @@ _C_LABEL(intr_depth):
/*
* This code gets copied to all the trap vectors
- * (except ISI/DSI, ALI, the interrupts, and possibly the debugging traps
- * when using IPKDB).
+ * except ISI/DSI, ALI, and the interrupts
*/
.text
.globl _C_LABEL(trapcode),_C_LABEL(trapsize)
@@ -743,27 +733,6 @@ _C_LABEL(ddbsize) = .-_C_LABEL(ddblow)
#endif /* DDB */
-#if NIPKDB > 0
-#define ipkdbsave 0xde0 /* primary save area for IPKDB */
-/*
- * In case of IPKDB we want a separate trap catcher for it
- */
-.lcomm ipkdbstk,INTSTK /* ipkdb stack */
-
- .globl _C_LABEL(ipkdblow),_C_LABEL(ipkdbsize)
- .type _C_LABEL(ipkdblow),@function
- .type _C_LABEL(ipkdbsize),@object
-_C_LABEL(ipkdblow):
- mtsprg 1,%r1 /* save SP */
- stmw %r28,ipkdbsave(0) /* free r28-r31 */
- lis %r1,ipkdbstk+INTSTK@ha /* get new SP */
- addi %r1,%r1,ipkdbstk+INTSTK@l
- mflr %r28
- mfcr %r29
- bla ipkdbtrap
-_C_LABEL(ipkdbsize) = .-_C_LABEL(ipkdblow)
-#endif /* NIPKDB > 0 */
-
/*
* FRAME_SETUP assumes:
* SPRG1 SP (1)
@@ -1137,120 +1106,6 @@ decrintr:
bl _C_LABEL(decr_intr)
b intr_exit
-#if NIPKDB > 0
-/*
- * Deliberate entry to ipkdbtrap
- */
- .globl _C_LABEL(ipkdb_trap)
- .type _C_LABEL(ipkdb_trap),@function
-_C_LABEL(ipkdb_trap):
-
- mtsprg %r2,2
- mfmsr %r3
- mtsrr1 %r3
- andi. %r3,%r3,~(PSL_EE|PSL_ME)@l
- mtmsr %r3 /* disable interrupts */
- isync
- stmw %r28,ipkdbsave(0)
- mflr %r28
- li %r29,EXC_BPT
- mtlr %r29
- mfcr %r29
- mtsrr0 %r28
-
-/*
- * Now the ipkdb trap catching code.
- */
-ipkdbtrap:
- FRAME_SETUP(ipkdbsave)
-/* Call C trap code: */
- addi %r3,%r1,8
- bl _C_LABEL(ipkdb_trap_glue)
- or. %r3,%r3,%r3
- bne ipkdbleave
-/* This wasn't for IPKDB, so switch to real trap: */
- lwz %r3,FRAME_EXC+8(%r1) /* save exception */
- stw %r3,ipkdbsave+8(0)
- FRAME_LEAVE(ipkdbsave)
- mtsprg %r1,1 /* prepare for entrance to realtrap */
- stmw %r28,tempsave(0)
- mflr %r28
- mfcr %r29
- lwz %r31,ipkdbsave+8(0)
- mtlr %r31
- b realtrap
-ipkdbleave:
- FRAME_LEAVE(ipkdbsave)
- rfi
-
-ipkdbfault:
- ba _C_LABEL(ipkdbfault)
-_C_LABEL(ipkdbfault):
- mfsrr0 %r3
- addi %r3,%r3,4
- mtsrr0 %r3
- li %r3,-1
- rfi
-
-/*
- * int ipkdbfbyte(unsigned char *p)
- */
- .globl _C_LABEL(ipkdbfbyte)
- .type _C_LABEL(ipkdbfbyte),@function
-_C_LABEL(ipkdbfbyte):
- li %r9,EXC_DSI /* establish new fault routine */
- lwz %r5,0(%r9)
- lis %r6,ipkdbfault@ha
- lwz %r6,ipkdbfault@l(%r6)
- stw %r6,0(%r9)
-#ifdef IPKDBUSERHACK
- lis %r8,_C_LABEL(ipkdbsr)@ha
- lwz %r8,_C_LABEL(ipkdbsr)@l(%r8)
- mtsr USER_SR,%r8
- isync
-#endif
- dcbst 0,%r9 /* flush data... */
- sync
- icbi 0,%r9 /* and instruction caches */
- lbz %r3,0(%r3) /* fetch data */
- stw %r5,0(%r9) /* restore previous fault handler */
- dcbst 0,%r9 /* and flush data... */
- sync
- icbi 0,%r9 /* and instruction caches */
- blr
-
-/*
- * int ipkdbsbyte(unsigned char *p, int c)
- */
- .globl _C_LABEL(ipkdbsbyte)
- .type _C_LABEL(ipkdbsbyte),@function
-_C_LABEL(ipkdbsbyte):
- li %r9,EXC_DSI /* establish new fault routine */
- lwz %r5,0(%r9)
- lis %r6,ipkdbfault@ha
- lwz %r6,ipkdbfault@l(%r6)
- stw %r6,0(%r9)
-#ifdef IPKDBUSERHACK
- lis %r8,_C_LABEL(ipkdbsr)@ha
- lwz %r8,_C_LABEL(ipkdbsr)@l(%r8)
- mtsr USER_SR,8
- isync
-#endif
- dcbst 0,%r9 /* flush data... */
- sync
- icbi 0,%r9 /* and instruction caches */
- mr %r6,%r3
- li %r3,0
- stb 4,0(%r6)
- dcbst 0,%r6 /* Now do appropriate flushes to data... */
- sync
- icbi %r0,%r6 /* and instruction caches */
- stw %r5,0(%r9) /* restore previous fault handler */
- dcbst 0,%r9 /* and flush data... */
- sync
- icbi 0,%r9 /* and instruction caches */
- blr
-#endif /* NIPKDB > 0 */
/*
* int setfault()
diff --git a/sys/arch/macppc/macppc/machdep.c b/sys/arch/macppc/macppc/machdep.c
index 24aae0acc58..eccba1a6b78 100644
--- a/sys/arch/macppc/macppc/machdep.c
+++ b/sys/arch/macppc/macppc/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.60 2003/10/21 20:53:34 drahn Exp $ */
+/* $OpenBSD: machdep.c,v 1.61 2003/10/24 19:56:44 drahn Exp $ */
/* $NetBSD: machdep.c,v 1.4 1996/10/16 19:33:11 ws Exp $ */
/*
@@ -31,9 +31,6 @@
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-/*
-#include "machine/ipkdb.h"
-*/
#include <sys/param.h>
#include <sys/buf.h>
@@ -183,7 +180,6 @@ static int devio_malloc_safe = 0;
int segment8_a_mapped = 0;
extern int OF_stdout;
-extern int where;
/* XXX, called from asm */
void initppc(u_int startkernel, u_int endkernel, char *args);
@@ -204,9 +200,6 @@ initppc(startkernel, endkernel, args)
#ifdef DDB
extern void *ddblow; extern int ddbsize;
#endif
-#if NIPKDB > 0
- extern ipkdblow, ipkdbsize;
-#endif
extern void consinit(void);
extern void callback(void *);
extern void *msgbuf_addr;
@@ -215,7 +208,6 @@ initppc(startkernel, endkernel, args)
proc0.p_addr = proc0paddr;
bzero(proc0.p_addr, sizeof *proc0.p_addr);
-where = 3;
curpcb = &proc0paddr->u_pcb;
curpm = curpcb->pcb_pmreal = curpcb->pcb_pm = pmap_kernel();
@@ -293,10 +285,6 @@ where = 3;
case EXC_BPT:
#if defined(DDB)
bcopy(&ddblow, (void *)exc, (size_t)&ddbsize);
-#else
-#if NIPKDB > 0
- bcopy(&ipkdblow, (void *)exc, (size_t)&ipkdbsize);
-#endif
#endif
break;
}
@@ -468,19 +456,10 @@ where = 3;
ofwconprobe();
consinit();
-#if NIPKDB > 0
- /*
- * Now trap to IPKDB
- */
- ipkdb_init();
- if (boothowto & RB_KDB)
- ipkdb_connect(0);
-#else
#ifdef DDB
if (boothowto & RB_KDB)
Debugger();
#endif
-#endif
/*
* Figure out ethernet address.
@@ -1390,10 +1369,7 @@ ppc_close_pci_bridge(int handle)
/* bcopy(), error on fault */
int
-kcopy(from, to, size)
- const void *from;
- void *to;
- size_t size;
+kcopy(const void *from, void *to, size_t size)
{
faultbuf env;
void *oldh = curproc->p_addr->u_pcb.pcb_onfault;