summaryrefslogtreecommitdiff
path: root/sys/arch/arm/include
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2006-03-07 20:20:31 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2006-03-07 20:20:31 +0000
commit3749e2909f3f8eb6df96f9a31f9189fb6562609e (patch)
tree845d62ab686df26472f6c1abf647ee66aa52b022 /sys/arch/arm/include
parent34e4ea8e6a04b429e2019dda68817b65a32c1cfb (diff)
Remove COMPAT_1x stuff inherited from NetBSD, which does not apply to us.
ok uwe@
Diffstat (limited to 'sys/arch/arm/include')
-rw-r--r--sys/arch/arm/include/frame.h121
-rw-r--r--sys/arch/arm/include/pcb.h3
2 files changed, 4 insertions, 120 deletions
diff --git a/sys/arch/arm/include/frame.h b/sys/arch/arm/include/frame.h
index 3a64436dd4e..afc98ddf7b9 100644
--- a/sys/arch/arm/include/frame.h
+++ b/sys/arch/arm/include/frame.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: frame.h,v 1.2 2004/05/19 03:17:07 drahn Exp $ */
+/* $OpenBSD: frame.h,v 1.3 2006/03/07 20:20:30 miod Exp $ */
/* $NetBSD: frame.h,v 1.9 2003/12/01 08:48:33 scw Exp $ */
/*
@@ -172,123 +172,9 @@ void validate_trapframe (trapframe_t *, int);
/*
* AST_ALIGNMENT_FAULT_LOCALS and ENABLE_ALIGNMENT_FAULTS
* These are used in order to support dynamic enabling/disabling of
- * alignment faults when executing old a.out ARM binaries.
+ * alignment faults when executing old a.out ARM binaries (which we do
+ * not support).
*/
-#if defined(COMPAT_15) && defined(EXEC_AOUT)
-#ifndef MULTIPROCESSOR
-
-/*
- * Local variables needed by the AST/Alignment Fault macroes
- */
-#define AST_ALIGNMENT_FAULT_LOCALS \
-.Laflt_astpending: ;\
- .word _C_LABEL(astpending) ;\
-.Laflt_cpufuncs: ;\
- .word _C_LABEL(cpufuncs) ;\
-.Laflt_curpcb: ;\
- .word _C_LABEL(curpcb) ;\
-.Laflt_cpu_info_store: ;\
- .word _C_LABEL(cpu_info_store)
-
-#define GET_CURPCB_ENTER \
- ldr r1, .Laflt_curpcb ;\
- ldr r1, [r1]
-
-#define GET_CPUINFO_ENTER \
- ldr r0, .Laflt_cpu_info_store
-
-#define GET_CURPCB_EXIT \
- ldr r1, .Laflt_curpcb ;\
- ldr r2, .Laflt_cpu_info_store ;\
- ldr r1, [r1]
-
-#else /* !MULTIPROCESSOR */
-
-#define AST_ALIGNMENT_FAULT_LOCALS \
-.Laflt_astpending: ;\
- .word _C_LABEL(astpending) ;\
-.Laflt_cpufuncs: ;\
- .word _C_LABEL(cpufuncs) ;\
-.Laflt_cpu_info: ;\
- .word _C_LABEL(cpu_info)
-
-#define GET_CURPCB_ENTER \
- ldr r4, .Laflt_cpu_info ;\
- bl _C_LABEL(cpu_number) ;\
- ldr r0, [r4, r0, lsl #2] ;\
- ldr r1, [r0, #CI_CURPCB]
-
-#define GET_CPUINFO_ENTER /* nothing to do */
-
-#define GET_CURPCB_EXIT \
- ldr r7, .Laflt_cpu_info ;\
- bl _C_LABEL(cpu_number) ;\
- ldr r2, [r7, r0, lsl #2] ;\
- ldr r1, [r2, #CI_CURPCB]
-#endif /* MULTIPROCESSOR */
-
-/*
- * This macro must be invoked following PUSHFRAMEINSVC or PUSHFRAME at
- * the top of interrupt/exception handlers.
- *
- * When invoked, r0 *must* contain the value of SPSR on the current
- * trap/interrupt frame. This is always the case if ENABLE_ALIGNMENT_FAULTS
- * is invoked immediately after PUSHFRAMEINSVC or PUSHFRAME.
- */
-#define ENABLE_ALIGNMENT_FAULTS \
- and r0, r0, #(PSR_MODE) /* Test for USR32 mode */ ;\
- teq r0, #(PSR_USR32_MODE) ;\
- bne 1f /* Not USR mode skip AFLT */ ;\
- GET_CURPCB_ENTER /* r1 = curpcb */ ;\
- cmp r1, #0x00 /* curpcb NULL? */ ;\
- ldrne r1, [r1, #PCB_FLAGS] /* Fetch curpcb->pcb_flags */ ;\
- tstne r1, #PCB_NOALIGNFLT ;\
- beq 1f /* AFLTs already enabled */ ;\
- GET_CPUINFO_ENTER /* r0 = cpuinfo */ ;\
- ldr r2, .Laflt_cpufuncs ;\
- ldr r1, [r0, #CI_CTRL] /* Fetch control register */ ;\
- mov r0, #-1 ;\
- mov lr, pc ;\
- ldr pc, [r2, #CF_CONTROL] /* Enable alignment faults */ ;\
-1:
-
-/*
- * This macro must be invoked just before PULLFRAMEFROMSVCANDEXIT or
- * PULLFRAME at the end of interrupt/exception handlers.
- */
-#define DO_AST_AND_RESTORE_ALIGNMENT_FAULTS \
- ldr r0, [sp] /* Get the SPSR from stack */ ;\
- mrs r4, cpsr /* save CPSR */ ;\
- and r0, r0, #(PSR_MODE) /* Returning to USR mode? */ ;\
- teq r0, #(PSR_USR32_MODE) ;\
- ldreq r5, .Laflt_astpending ;\
- bne 3f /* Nope, get out now */ ;\
- bic r4, r4, #(I32_bit) ;\
-1: orr r0, r4, #(I32_bit) /* Disable IRQs */ ;\
- msr cpsr_c, r0 ;\
- ldr r1, [r5] /* Pending AST? */ ;\
- teq r1, #0x00000000 ;\
- bne 2f /* Yup. Go deal with it */ ;\
- GET_CURPCB_EXIT /* r1 = curpcb, r2 = cpuinfo */ ;\
- cmp r1, #0x00 /* curpcb NULL? */ ;\
- ldrne r1, [r1, #PCB_FLAGS] /* Fetch curpcb->pcb_flags */ ;\
- tstne r1, #PCB_NOALIGNFLT ;\
- beq 3f /* Keep AFLTs enabled */ ;\
- ldr r1, [r2, #CI_CTRL] /* Fetch control register */ ;\
- ldr r2, .Laflt_cpufuncs ;\
- mov r0, #-1 ;\
- bic r1, r1, #CPU_CONTROL_AFLT_ENABLE /* Disable AFLTs */ ;\
- adr lr, 3f ;\
- ldr pc, [r2, #CF_CONTROL] /* Set new CTRL reg value */ ;\
-2: mov r1, #0x00000000 ;\
- str r1, [r5] /* Clear astpending */ ;\
- msr cpsr_c, r4 /* Restore interrupts */ ;\
- mov r0, sp ;\
- adr lr, 1b ;\
- b _C_LABEL(ast) /* ast(frame) */ ;\
-3:
-
-#else /* !(COMPAT_15 && EXEC_AOUT) */
#define AST_ALIGNMENT_FAULT_LOCALS ;\
.Laflt_astpending: ;\
@@ -316,7 +202,6 @@ void validate_trapframe (trapframe_t *, int);
adr lr, 1b ;\
b _C_LABEL(ast) /* ast(frame) */ ;\
2:
-#endif /* COMPAT_15 && EXEC_AOUT */
/*
* ASM macros for pushing and pulling trapframes from the stack
diff --git a/sys/arch/arm/include/pcb.h b/sys/arch/arm/include/pcb.h
index d52c0893513..29303fc170b 100644
--- a/sys/arch/arm/include/pcb.h
+++ b/sys/arch/arm/include/pcb.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pcb.h,v 1.1 2004/02/01 05:09:49 drahn Exp $ */
+/* $OpenBSD: pcb.h,v 1.2 2006/03/07 20:20:30 miod Exp $ */
/* $NetBSD: pcb.h,v 1.10 2003/10/13 21:46:39 scw Exp $ */
/*
@@ -83,7 +83,6 @@ struct pcb_arm26 {
struct pcb {
u_int pcb_flags;
#define PCB_OWNFPU 0x00000001
-#define PCB_NOALIGNFLT 0x00000002 /* For COMPAT_15/EXEC_AOUT */
struct trapframe *pcb_tf;
caddr_t pcb_onfault; /* On fault handler */
union {