Move the ibcs2 setmachine function here (from compat/ibcs2) since it is
i386 specific.
This commit is contained in:
parent
100b64e3c6
commit
1a241d6403
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ibcs2_machdep.c,v 1.8 1998/09/11 12:50:05 mycroft Exp $ */
|
||||
/* $NetBSD: ibcs2_machdep.c,v 1.9 2000/01/10 03:05:35 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1997 The NetBSD Foundation, Inc.
|
||||
|
@ -184,3 +184,45 @@ ibcs2_sendsig(catcher, sig, mask, code)
|
|||
if (onstack)
|
||||
psp->ps_sigstk.ss_flags |= SS_ONSTACK;
|
||||
}
|
||||
|
||||
int
|
||||
ibcs2_sys_sysmachine(p, v, retval)
|
||||
struct proc *p;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct ibcs2_sys_sysmachine_args /* {
|
||||
syscallarg(int) cmd;
|
||||
syscallarg(int) arg;
|
||||
} */ *uap = v;
|
||||
int val, error;
|
||||
|
||||
switch (SCARG(uap, cmd)) {
|
||||
case IBCS2_SI86FPHW:
|
||||
val = IBCS2_FP_NO;
|
||||
#ifdef MATH_EMULATE
|
||||
val = IBCS2_FP_SW;
|
||||
#else
|
||||
val = IBCS2_FP_387; /* a real coprocessor */
|
||||
#endif
|
||||
if ((error = copyout((caddr_t)&val, (caddr_t)SCARG(uap, arg),
|
||||
sizeof(val))))
|
||||
return error;
|
||||
break;
|
||||
|
||||
case IBCS2_SI86STIME: /* XXX - not used much, if at all */
|
||||
case IBCS2_SI86SETNAME:
|
||||
return EINVAL;
|
||||
|
||||
case IBCS2_SI86PHYSMEM:
|
||||
*retval = ctob(physmem);
|
||||
break;
|
||||
|
||||
case IBCS2_SI86GETFEATURES: /* XXX structure def? */
|
||||
break;
|
||||
|
||||
default:
|
||||
return EINVAL;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue