summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2009-11-19 20:13:55 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2009-11-19 20:13:55 +0000
commitcaef78a243ae42b3eac78ec5120f6fa768e82a48 (patch)
treef3b6ebe59fcdaca9dbfe67c6aaadb601368825b8 /sys
parentabf7583934232cf6d4e39dd3e69eced896aa4cd2 (diff)
Remove code allowing native binaries with O32 ABI to run, there aren't any...
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/mips64/include/exec.h5
-rw-r--r--sys/arch/mips64/include/proc.h4
-rw-r--r--sys/arch/mips64/mips64/trap.c76
-rw-r--r--sys/arch/sgi/sgi/machdep.c26
4 files changed, 21 insertions, 90 deletions
diff --git a/sys/arch/mips64/include/exec.h b/sys/arch/mips64/include/exec.h
index 3c63f743523..bf91f90dcb3 100644
--- a/sys/arch/mips64/include/exec.h
+++ b/sys/arch/mips64/include/exec.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: exec.h,v 1.1 2004/10/18 19:05:36 grange Exp $ */
+/* $OpenBSD: exec.h,v 1.2 2009/11/19 20:13:51 miod Exp $ */
/*
* Copyright (c) 1996-2004 Per Fogelstrom, Opsycon AB
@@ -62,9 +62,6 @@
#if defined(_LP64)
#define _KERN_DO_ELF64
-#if defined(COMPAT_O32)
-#define _KERN_DO_ELF
-#endif
#else
#define _KERN_DO_ELF
#endif
diff --git a/sys/arch/mips64/include/proc.h b/sys/arch/mips64/include/proc.h
index bbdd8f4a1af..587ee4be25f 100644
--- a/sys/arch/mips64/include/proc.h
+++ b/sys/arch/mips64/include/proc.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: proc.h,v 1.3 2009/06/10 18:05:30 miod Exp $ */
+/* $OpenBSD: proc.h,v 1.4 2009/11/19 20:13:51 miod Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -57,8 +57,6 @@ struct mdproc {
/* md_flags */
#define MDP_FPUSED 0x00000001 /* floating point coprocessor used */
-#define MDP_O32 0x00000002 /* Uses 32 bit syscall interface */
-#define MDP_64 0x00000004 /* Uses new 64 bit syscall interface */
#define MDP_PERF 0x00010000 /* Performance counter used */
#define MDP_WATCH1 0x00020000 /* Watch register 1 used */
#define MDP_WATCH2 0x00040000 /* Watch register 1 used */
diff --git a/sys/arch/mips64/mips64/trap.c b/sys/arch/mips64/mips64/trap.c
index 95ee0ca4638..c39409c9279 100644
--- a/sys/arch/mips64/mips64/trap.c
+++ b/sys/arch/mips64/mips64/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.47 2009/11/18 20:58:52 miod Exp $ */
+/* $OpenBSD: trap.c,v 1.48 2009/11/19 20:13:52 miod Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -447,24 +447,12 @@ printf("SIG-BUSB @%p pc %p, ra %p\n", trapframe->badvaddr, trapframe->pc, trapfr
args.i[1] = locr0->a2;
args.i[2] = locr0->a3;
if (i > 3) {
- if (p->p_md.md_flags & MDP_O32) {
- int32_t p[5];
-
- i = copyin((int32_t *)locr0->sp + 4,
- p, 5 * sizeof(int32_t));
- args.i[3] = p[0];
- args.i[4] = p[1];
- args.i[5] = p[2];
- args.i[6] = p[3];
- args.i[7] = p[4];
- } else {
- args.i[3] = locr0->a4;
- args.i[4] = locr0->a5;
- args.i[5] = locr0->a6;
- args.i[6] = locr0->a7;
- i = copyin((void *)locr0->sp,
- &args.i[7], sizeof(register_t));
- }
+ args.i[3] = locr0->a4;
+ args.i[4] = locr0->a5;
+ args.i[5] = locr0->a6;
+ args.i[6] = locr0->a7;
+ i = copyin((void *)locr0->sp,
+ &args.i[7], sizeof(register_t));
}
break;
@@ -473,38 +461,17 @@ printf("SIG-BUSB @%p pc %p, ra %p\n", trapframe->badvaddr, trapframe->pc, trapfr
* Like syscall, but code is a quad, so as to maintain
* quad alignment for the rest of the arguments.
*/
- if (p->p_md.md_flags & MDP_O32) {
- if (_QUAD_LOWWORD == 0) {
- code = locr0->a0;
- } else {
- code = locr0->a1;
- }
- args.i[0] = locr0->a2;
- args.i[1] = locr0->a3;
- } else {
- code = locr0->a0;
- args.i[0] = locr0->a1;
- args.i[1] = locr0->a2;
- args.i[2] = locr0->a3;
- }
+ code = locr0->a0;
+ args.i[0] = locr0->a1;
+ args.i[1] = locr0->a2;
+ args.i[2] = locr0->a3;
if (code >= numsys)
callp += p->p_emul->e_nosys; /* (illegal) */
else
callp += code;
i = callp->sy_argsize / sizeof(int);
- if (i > 2 && p->p_md.md_flags & MDP_O32) {
- int32_t p[6];
-
- i = copyin((int32_t *)locr0->sp + 4,
- p, 6 * sizeof(int32_t));
- args.i[2] = p[0];
- args.i[3] = p[1];
- args.i[4] = p[2];
- args.i[5] = p[3];
- args.i[6] = p[4];
- args.i[7] = p[5];
- } else if (i > 3) {
+ if (i > 3) {
args.i[3] = locr0->a4;
args.i[4] = locr0->a5;
args.i[5] = locr0->a6;
@@ -526,21 +493,10 @@ printf("SIG-BUSB @%p pc %p, ra %p\n", trapframe->badvaddr, trapframe->pc, trapfr
args.i[2] = locr0->a2;
args.i[3] = locr0->a3;
if (i > 4) {
- if (p->p_md.md_flags & MDP_O32) {
- int32_t p[4];
-
- i = copyin((int32_t *)locr0->sp + 4,
- p, 4 * sizeof(int32_t));
- args.i[4] = p[0];
- args.i[5] = p[1];
- args.i[6] = p[2];
- args.i[7] = p[3];
- } else {
- args.i[4] = locr0->a4;
- args.i[5] = locr0->a5;
- args.i[6] = locr0->a6;
- args.i[7] = locr0->a7;
- }
+ args.i[4] = locr0->a4;
+ args.i[5] = locr0->a5;
+ args.i[6] = locr0->a6;
+ args.i[7] = locr0->a7;
}
}
#ifdef SYSCALL_DEBUG
diff --git a/sys/arch/sgi/sgi/machdep.c b/sys/arch/sgi/sgi/machdep.c
index 815ad599b26..20d9719953b 100644
--- a/sys/arch/sgi/sgi/machdep.c
+++ b/sys/arch/sgi/sgi/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.88 2009/11/19 06:06:51 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.89 2009/11/19 20:13:54 miod Exp $ */
/*
* Copyright (c) 2003-2004 Opsycon AB (www.opsycon.se / www.opsycon.com)
@@ -776,36 +776,16 @@ setregs(p, pack, stack, retval)
register_t *retval;
{
extern struct proc *machFPCurProcPtr;
-#if 0
-/* XXX should check validity of header and perhaps be 32/64 indep. */
- Elf64_Ehdr *eh = pack->ep_hdr;
-
- if ((((eh->e_flags & EF_MIPS_ABI) != E_MIPS_ABI_NONE) &&
- ((eh->e_flags & EF_MIPS_ABI) != E_MIPS_ABI_O32)) ||
- ((eh->e_flags & EF_MIPS_ARCH) >= E_MIPS_ARCH_3) ||
- (eh->e_ident[EI_CLASS] != ELFCLASS32)) {
- p->p_md.md_flags |= MDP_O32;
- }
-#endif
-
-#if !defined(__LP64__)
- p->p_md.md_flags |= MDP_O32;
-#else
- p->p_md.md_flags &= ~MDP_O32;
-#endif
bzero((caddr_t)p->p_md.md_regs, sizeof(struct trap_frame));
p->p_md.md_regs->sp = stack;
p->p_md.md_regs->pc = pack->ep_entry & ~3;
p->p_md.md_regs->t9 = pack->ep_entry & ~3; /* abicall req */
-#if defined(__LP64__)
p->p_md.md_regs->sr = SR_FR_32 | SR_XX | SR_KSU_USER | SR_KX | SR_UX |
SR_EXL | SR_INT_ENAB;
- if (sys_config.cpu[0].type == MIPS_R12000 &&
- sys_config.system_type == SGI_O2)
+#if !defined(TGT_COHERENT)
+ if (sys_config.cpu[0].type == MIPS_R12000)
p->p_md.md_regs->sr |= SR_DSD;
-#else
- p->p_md.md_regs->sr = SR_KSU_USER|SR_XX|SR_EXL|SR_INT_ENAB;
#endif
p->p_md.md_regs->sr |= idle_mask & SR_INT_MASK;
p->p_md.md_regs->ic = (idle_mask << 8) & IC_INT_MASK;