From: jsg Date: Sun, 18 Jan 2015 10:17:41 +0000 (+0000) Subject: unifdef IPKDB. These codepaths are holdouts from NetBSD code and are X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=19c46673415e240940bd0366c73977220f37df82;p=openbsd unifdef IPKDB. These codepaths are holdouts from NetBSD code and are not used. --- diff --git a/sys/arch/arm/arm/exception.S b/sys/arch/arm/arm/exception.S index 6329bc4bfbc..0674628efba 100644 --- a/sys/arch/arm/arm/exception.S +++ b/sys/arch/arm/arm/exception.S @@ -1,4 +1,4 @@ -/* $OpenBSD: exception.S,v 1.3 2011/09/20 22:02:10 miod Exp $ */ +/* $OpenBSD: exception.S,v 1.4 2015/01/18 10:17:41 jsg Exp $ */ /* $NetBSD: exception.S,v 1.13 2003/10/31 16:30:15 scw Exp $ */ /* @@ -206,122 +206,6 @@ exception_exit: * look like direct entry from the vector. */ ASENTRY_NP(undefined_entry) -#ifdef IPKDB -/* - * IPKDB must be hooked in at the earliest possible entry point. - * - */ -/* - * Make room for all registers saving real r0-r7 and r15. - * The remaining registers are updated later. - */ - stmfd sp!, {r0,r1} /* psr & spsr */ - stmfd sp!, {lr} /* pc */ - stmfd sp!, {r0-r14} /* r0-r7, r8-r14 */ -/* - * Get previous psr. - */ - mrs r7, cpsr_all - mrs r0, spsr_all - str r0, [sp, #(16*4)] -/* - * Test for user mode. - */ - tst r0, #0xf - bne .Lprenotuser_push - add r1, sp, #(8*4) - stmia r1,{r8-r14}^ /* store user mode r8-r14*/ - b .Lgoipkdb -/* - * Switch to previous mode to get r8-r13. - */ -.Lprenotuser_push: - orr r0, r0, #(I32_bit) /* disable interrupts */ - msr cpsr_all, r0 - mov r1, r8 - mov r2, r9 - mov r3, r10 - mov r4, r11 - mov r5, r12 - mov r6, r13 - msr cpsr_all, r7 /* back to undefined mode */ - add r8, sp, #(8*4) - stmia r8, {r1-r6} /* r8-r13 */ -/* - * Now back to previous mode to get r14 and spsr. - */ - msr cpsr_all, r0 - mov r1, r14 - mrs r2, spsr - msr cpsr_all, r7 /* back to undefined mode */ - str r1, [sp, #(14*4)] /* r14 */ - str r2, [sp, #(17*4)] /* spsr */ -/* - * Now to IPKDB. - */ -.Lgoipkdb: - mov r0, sp - bl _C_LABEL(ipkdb_trap_glue) - ldr r1, .Lipkdb_trap_return - str r0,[r1] - -/* - * Have to load all registers from the stack. - * - * Start with spsr and pc. - */ - ldr r0, [sp, #(16*4)] /* spsr */ - ldr r1, [sp, #(15*4)] /* r15 */ - msr spsr_all, r0 - mov r14, r1 -/* - * Test for user mode. - */ - tst r0, #0xf - bne .Lprenotuser_pull - add r1, sp, #(8*4) - ldmia r1, {r8-r14}^ /* load user mode r8-r14 */ - b .Lpull_r0r7 -.Lprenotuser_pull: -/* - * Now previous mode spsr and r14. - */ - ldr r1, [sp, #(17*4)] /* spsr */ - ldr r2, [sp, #(14*4)] /* r14 */ - orr r0, r0, #(I32_bit) - msr cpsr_all, r0 /* switch to previous mode */ - msr spsr_all, r1 - mov r14, r2 - msr cpsr_all, r7 /* back to undefined mode */ -/* - * Now r8-r13. - */ - add r8, sp, #(8*4) - ldmia r8, {r1-r6} /* r8-r13 */ - msr cpsr_all, r0 - mov r8, r1 - mov r9, r2 - mov r10, r3 - mov r11, r4 - mov r12, r5 - mov r13, r6 - msr cpsr_all, r7 -.Lpull_r0r7: -/* - * Now the rest of the registers. - */ - ldr r1,Lipkdb_trap_return - ldr r0,[r1] - tst r0,r0 - ldmfd sp!, {r0-r7} /* r0-r7 */ - add sp, sp, #(10*4) /* adjust sp */ - -/* - * Did IPKDB handle it? - */ - movnes pc, lr /* return */ - -#endif stmfd sp!, {r0, r1} ldr r0, Lundefined_handler_indirection ldr r1, [sp], #0x0004 @@ -330,11 +214,6 @@ ASENTRY_NP(undefined_entry) str r1, [r0, #0x0004] ldmia r0, {r0, r1, pc} -#ifdef IPKDB -Lipkdb_trap_return: - .word Lipkdb_trap_return_data -#endif - Lundefined_handler_indirection: .word Lundefined_handler_indirection_data @@ -354,11 +233,6 @@ ENTRY_NP(undefinedinstruction_bounce) .data .align 0 -#ifdef IPKDB -Lipkdb_trap_return_data: - .word 0 -#endif - /* * Indirection data * 2 words use for preserving r0 and r1 diff --git a/sys/arch/arm/arm/locore.S b/sys/arch/arm/arm/locore.S index 4ba0ec20df8..c8eec47239a 100644 --- a/sys/arch/arm/arm/locore.S +++ b/sys/arch/arm/arm/locore.S @@ -1,4 +1,4 @@ -/* $OpenBSD: locore.S,v 1.4 2011/10/19 20:18:31 drahn Exp $ */ +/* $OpenBSD: locore.S,v 1.5 2015/01/18 10:17:41 jsg Exp $ */ /* $NetBSD: locore.S,v 1.14 2003/04/20 16:21:40 thorpej Exp $ */ /* @@ -158,43 +158,6 @@ ENTRY_NP(cpu_reset) #endif /* OFW */ -#ifdef IPKDB -/* - * Execute(inst, psr, args, sp) - * - * Execute INSTruction with PSR and ARGS[0] - ARGS[3] making - * available stack at SP for next undefined instruction trap. - * - * Move the instruction onto the stack and jump to it. - */ -ENTRY_NP(Execute) - mov ip, sp - stmfd sp!, {r2, r4-r7, fp, ip, lr, pc} - sub fp, ip, #4 - mov ip, r3 - ldr r7, .Lreturn - stmfd sp!, {r0, r7} - adr r7, #.LExec - mov r5, r1 - mrs r4, cpsr - ldmia r2, {r0-r3} - mov r6, sp - mov sp, ip - msr cpsr_all, r5 - mov pc, r6 -.LExec: - mrs r5, cpsr -/* XXX Cannot switch thus easily back from user mode */ - msr cpsr_all, r4 - add sp, r6, #8 - ldmfd sp!, {r6} - stmia r6, {r0-r3} - mov r0, r5 - ldmdb fp, {r4-r7, fp, sp, pc} -.Lreturn: - mov pc, r7 -#endif - /* * setjump + longjmp */ diff --git a/sys/arch/armish/armish/armish_machdep.c b/sys/arch/armish/armish/armish_machdep.c index b5d4978e237..ece2c284508 100644 --- a/sys/arch/armish/armish/armish_machdep.c +++ b/sys/arch/armish/armish/armish_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: armish_machdep.c,v 1.35 2014/12/10 15:29:53 mikeb Exp $ */ +/* $OpenBSD: armish_machdep.c,v 1.36 2015/01/18 10:17:42 jsg Exp $ */ /* $NetBSD: lubbock_machdep.c,v 1.2 2003/07/15 00:25:06 lukem Exp $ */ /* @@ -144,11 +144,7 @@ u_int cpu_reset_address = 0; /* Define various stack sizes in pages */ #define IRQ_STACK_SIZE 1 #define ABT_STACK_SIZE 1 -#ifdef IPKDB -#define UND_STACK_SIZE 2 -#else #define UND_STACK_SIZE 1 -#endif BootConfig bootconfig; /* Boot config storage */ char *boot_args = NULL; diff --git a/sys/arch/armv7/armv7/armv7_machdep.c b/sys/arch/armv7/armv7/armv7_machdep.c index bfd9a84a5d7..d538bfc51a6 100644 --- a/sys/arch/armv7/armv7/armv7_machdep.c +++ b/sys/arch/armv7/armv7/armv7_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: armv7_machdep.c,v 1.17 2014/12/10 15:29:53 mikeb Exp $ */ +/* $OpenBSD: armv7_machdep.c,v 1.18 2015/01/18 10:17:42 jsg Exp $ */ /* $NetBSD: lubbock_machdep.c,v 1.2 2003/07/15 00:25:06 lukem Exp $ */ /* @@ -157,11 +157,7 @@ /* Define various stack sizes in pages */ #define IRQ_STACK_SIZE 1 #define ABT_STACK_SIZE 1 -#ifdef IPKDB -#define UND_STACK_SIZE 2 -#else #define UND_STACK_SIZE 1 -#endif BootConfig bootconfig; /* Boot config storage */ char *boot_args = NULL; @@ -740,12 +736,6 @@ initarm(void *arg0, void *arg1, void *arg2) pmap_bootstrap((pd_entry_t *)kernel_l1pt.pv_va, KERNEL_VM_BASE, KERNEL_VM_BASE + KERNEL_VM_SIZE); -#ifdef IPKDB - /* Initialise ipkdb */ - ipkdb_init(); - if (boothowto & RB_KDB) - ipkdb_connect(0); -#endif /* * Restore proper bus_space operation, now that pmap is initialized. */ diff --git a/sys/arch/zaurus/zaurus/zaurus_machdep.c b/sys/arch/zaurus/zaurus/zaurus_machdep.c index a68839cd466..edc2c6e0325 100644 --- a/sys/arch/zaurus/zaurus/zaurus_machdep.c +++ b/sys/arch/zaurus/zaurus/zaurus_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: zaurus_machdep.c,v 1.55 2014/12/10 15:29:53 mikeb Exp $ */ +/* $OpenBSD: zaurus_machdep.c,v 1.56 2015/01/18 10:17:42 jsg Exp $ */ /* $NetBSD: lubbock_machdep.c,v 1.2 2003/07/15 00:25:06 lukem Exp $ */ /* @@ -189,11 +189,7 @@ u_int cpu_reset_address = 0; /* Define various stack sizes in pages */ #define IRQ_STACK_SIZE 1 #define ABT_STACK_SIZE 1 -#ifdef IPKDB -#define UND_STACK_SIZE 2 -#else #define UND_STACK_SIZE 1 -#endif int zaurusmod; @@ -714,7 +710,6 @@ initarm(void *arg0, void *arg1, void *arg2) kgdb_port_init(); #endif - /* Talk to the user */ printf("\nOpenBSD/zaurus booting ...\n"); @@ -1103,13 +1098,6 @@ initarm(void *arg0, void *arg1, void *arg2) cpu_kcore_hdr.pmap_kernel_l1 = (u_int32_t)pmap_kernel()->pm_l1; cpu_kcore_hdr.pmap_kernel_l2 = (u_int32_t)&(pmap_kernel()->pm_l2); -#ifdef IPKDB - /* Initialise ipkdb */ - ipkdb_init(); - if (boothowto & RB_KDB) - ipkdb_connect(0); -#endif - #ifdef KGDB if (boothowto & RB_KDB) { kgdb_debug_init = 1;