2 * SPDX-License-Identifier: BSD-3-Clause
4 * Copyright (c) 1994 Søren Schmidt
5 * Copyright (c) 1995 Steven Wallace
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer
13 * in this position and unchanged.
14 * 2. Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in the
16 * documentation and/or other materials provided with the distribution.
17 * 3. The name of the author may not be used to endorse or promote products
18 * derived from this software without specific prior written permission
20 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
21 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
22 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
23 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
24 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
25 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
29 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 #include <sys/cdefs.h>
33 __FBSDID("$FreeBSD$");
35 #include <sys/param.h>
37 #include <sys/mutex.h>
38 #include <sys/systm.h>
39 #include <sys/sysctl.h>
41 #include <i386/ibcs2/ibcs2_types.h>
42 #include <i386/ibcs2/ibcs2_signal.h>
43 #include <i386/ibcs2/ibcs2_util.h>
44 #include <i386/ibcs2/ibcs2_proto.h>
46 #define IBCS2_FP_NO 0 /* no fp support */
47 #define IBCS2_FP_SW 1 /* software emulator */
48 #define IBCS2_FP_287 2 /* 80287 FPU */
49 #define IBCS2_FP_387 3 /* 80387 FPU */
59 ibcs2_sysi86(struct thread *td, struct ibcs2_sysi86_args *args)
62 case SI86_FPHW: { /* Floating Point information */
69 if ((error = copyout(&val, args->arg, sizeof(val))) != 0)
74 case STIME: /* set the system time given pointer to long */
75 /* gettimeofday; time.tv_sec = *args->arg; settimeofday */
78 case SETNAME: { /* set hostname given string w/ len <= 7 chars */
82 name[1] = KERN_HOSTNAME;
83 return (userland_sysctl(td, name, 2, 0, 0, 0,
87 case SI86_MEM: /* size of physical memory */
88 td->td_retval[0] = ctob(physmem);
93 printf("IBCS2: 'sysi86' function %d(0x%x) "
94 "not implemented yet\n", args->cmd, args->cmd);