diff options
40 files changed, 3068 insertions, 0 deletions
diff --git a/sys/sparc64/include/_limits.h b/sys/sparc64/include/_limits.h new file mode 100644 index 0000000..4196887 --- /dev/null +++ b/sys/sparc64/include/_limits.h @@ -0,0 +1,98 @@ +/* + * Copyright (c) 1988, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)limits.h 8.3 (Berkeley) 1/4/94 + * $FreeBSD$ + */ + +#ifndef _MACHINE_LIMITS_H_ +#define _MACHINE_LIMITS_H_ + +#define CHAR_BIT 8 /* number of bits in a char */ +#define MB_LEN_MAX 6 /* Allow 31 bit UTF2 */ + +/* + * According to ANSI (section 2.2.4.2), the values below must be usable by + * #if preprocessing directives. Additionally, the expression must have the + * same type as would an expression that is an object of the corresponding + * type converted according to the integral promotions. The subtraction for + * INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an + * unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2). + * These numbers are for the default configuration of gcc. They work for + * some other compilers as well, but this should not be depended on. + */ +#define SCHAR_MAX 0x7f /* max value for a signed char */ +#define SCHAR_MIN (-0x7f-1) /* min value for a signed char */ + +#define UCHAR_MAX 0xffU /* max value for an unsigned char */ +#define CHAR_MAX 0x7f /* max value for a char */ +#define CHAR_MIN (-0x7f-1) /* min value for a char */ + +#define USHRT_MAX 0xffffU /* max value for an unsigned short */ +#define SHRT_MAX 0x7fff /* max value for a short */ +#define SHRT_MIN (-0x7fff-1) /* min value for a short */ + +#define UINT_MAX 0xffffffffU /* max value for an unsigned int */ +#define INT_MAX 0x7fffffff /* max value for an int */ +#define INT_MIN (-0x7fffffff-1) /* min value for an int */ + +#define ULONG_MAX 0xffffffffffffffffUL /* max for an unsigned long */ +#define LONG_MAX 0x7fffffffffffffffL /* max for a long */ +#define LONG_MIN (-0x7fffffffffffffffL-1) /* min for a long */ + +/* Long longs and longs are the same size on the alpha. */ + /* max for an unsigned long long */ +#define ULLONG_MAX 0xffffffffffffffffULL +#define LLONG_MAX 0x7fffffffffffffffLL /* max for a long long */ +#define LLONG_MIN (-0x7fffffffffffffffLL-1) /* min for a long long */ + +#if !defined(_ANSI_SOURCE) +#define SSIZE_MAX LONG_MAX /* max value for a ssize_t */ + +#if !defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE) +#define SIZE_T_MAX ULONG_MAX /* max value for a size_t */ + +/* Quads and longs are the same on the alpha. Ensure they stay in sync. */ +#define UQUAD_MAX (ULONG_MAX) /* max value for a uquad_t */ +#define QUAD_MAX (LONG_MAX) /* max value for a quad_t */ +#define QUAD_MIN (LONG_MIN) /* min value for a quad_t */ + +#endif /* !_POSIX_SOURCE && !_XOPEN_SOURCE */ +#endif /* !_ANSI_SOURCE */ + +#if (!defined(_ANSI_SOURCE)&&!defined(_POSIX_SOURCE)) || defined(_XOPEN_SOURCE) +#define LONG_BIT 64 +#define WORD_BIT 32 + +#define DBL_DIG 15 +#define DBL_MAX 1.7976931348623157E+308 +#define DBL_MIN 2.2250738585072014E-308 + +#define FLT_DIG 6 +#define FLT_MAX 3.40282347E+38F +#define FLT_MIN 1.17549435E-38F +#endif + +#endif /* !_MACHINE_LIMITS_H_ */ diff --git a/sys/sparc64/include/ansi.h b/sys/sparc64/include/ansi.h new file mode 100644 index 0000000..0157d56 --- /dev/null +++ b/sys/sparc64/include/ansi.h @@ -0,0 +1,114 @@ +/*- + * Copyright (c) 1990, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)ansi.h 8.2 (Berkeley) 1/4/94 + * $FreeBSD$ + */ + +#ifndef _MACHINE_ANSI_H_ +#define _MACHINE_ANSI_H_ + +/* + * Types which are fundamental to the implementation and may appear in + * more than one standard header are defined here. Standard headers + * then use: + * #ifdef _BSD_SIZE_T_ + * typedef _BSD_SIZE_T_ size_t; + * #undef _BSD_SIZE_T_ + * #endif + */ +#define _BSD_CLOCK_T_ int /* clock() */ +#define _BSD_CLOCKID_T_ int /* clockid_t */ +#define _BSD_PTRDIFF_T_ long /* ptr1 - ptr2 */ +#define _BSD_SIZE_T_ unsigned long /* sizeof() */ +#define _BSD_SOCKLEN_T_ __uint32_t +#define _BSD_SSIZE_T_ long /* byte count or error */ +#define _BSD_TIME_T_ int /* time() */ +#define _BSD_TIMER_T_ int /* timer_t */ + +/* + * Types which are fundamental to the implementation and must be used + * in more than one standard header although they are only declared in + * one (perhaps nonstandard) header are defined here. Standard headers + * use _BSD_XXX_T_ without undef'ing it. + */ +#define _BSD_CT_RUNE_T_ int /* arg type for ctype funcs */ +#define _BSD_OFF_T_ long /* file offset */ +#define _BSD_PID_T_ int /* process [group] */ +#define _BSD_VA_LIST_ char * /* va_list */ + +/* + * Runes (wchar_t) is declared to be an ``int'' instead of the more natural + * ``unsigned long'' or ``long''. Two things are happening here. It is not + * unsigned so that EOF (-1) can be naturally assigned to it and used. Also, + * it looks like 10646 will be a 31 bit standard. This means that if your + * ints cannot hold 32 bits, you will be in trouble. The reason an int was + * chosen over a long is that the is*() and to*() routines take ints (says + * ANSI C), but they use _RUNE_T_ instead of int. By changing it here, you + * lose a bit of ANSI conformance, but your programs will still work. + * + * Note that _WCHAR_T_ and _RUNE_T_ must be of the same type. When wchar_t + * and rune_t are typedef'd, _WCHAR_T_ will be undef'd, but _RUNE_T remains + * defined for ctype.h. + */ +#define _BSD_WCHAR_T_ int /* wchar_t */ +#define _BSD_WINT_T_ int /* wint_t */ +#define _BSD_RUNE_T_ int /* rune_t */ + +/* + * Frequencies of the clock ticks reported by clock() and times(). They + * are the same as stathz for bogus historical reasons. They should be + * 1e6 because clock() and times() are implemented using getrusage() and + * there is no good reason why they should be less accurate. There is + * the bad reason that (broken) programs might not like clock_t or + * CLOCKS_PER_SEC being ``double'' (``unsigned long'' is not large enough + * to hold the required 24 hours worth of ticks if the frequency is + * 1000000ul, and ``unsigned long long'' would be nonstandard). + */ +#define _BSD_CLK_TCK_ 100 +#define _BSD_CLOCKS_PER_SEC_ 100 + +/* + * We define this here since both <stddef.h> and <sys/types.h> needs it. + */ +#define __offsetof(type, field) ((size_t)(&((type *)0)->field)) + +/* + * Internal names for basic integral types. Omit the typedef if + * not possible for a machine/compiler combination. + */ +typedef __signed char __int8_t; +typedef unsigned char __uint8_t; +typedef short __int16_t; +typedef unsigned short __uint16_t; +typedef int __int32_t; +typedef unsigned int __uint32_t; +typedef long __int64_t; +typedef unsigned long __uint64_t; + +typedef long __intptr_t; +typedef unsigned long __uintptr_t; + +#endif /* _MACHINE_ANSI_H_ */ diff --git a/sys/sparc64/include/atomic.h b/sys/sparc64/include/atomic.h new file mode 100644 index 0000000..b8273e9 --- /dev/null +++ b/sys/sparc64/include/atomic.h @@ -0,0 +1,352 @@ +/*- + * Copyright (c) 2001 Jake Burkholder. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +/* + * This is not atomic. It is just a stub to make things compile. + */ + +#ifndef _MACHINE_ATOMIC_H_ +#define _MACHINE_ATOMIC_H_ + +#define __atomic_op(p, op, v) ({ \ + __typeof(*p) __v = (__typeof(*p))v; \ + *p op __v; \ +}) + +#define __atomic_load(p) ({ \ + __typeof(*p) __v; \ + __v = *p; \ + __v; \ +}) + +#define __atomic_load_clear(p) ({ \ + __typeof(*p) __v; \ + __v = *p; \ + *p = 0; \ + __v; \ +}) + +#define __atomic_cas(p, e, s) ({ \ + u_int __v; \ + if (*p == (__typeof(*p))e) { \ + *p = (__typeof(*p))s; \ + __v = 1; \ + } else { \ + __v = 0; \ + } \ + __v; \ +}) + +#define __atomic_op_8(p, op, v) __atomic_op(p, op, v) +#define __atomic_op_16(p, op, v) __atomic_op(p, op, v) +#define __atomic_op_32(p, op, v) __atomic_op(p, op, v) +#define __atomic_load_32(p) __atomic_load(p) +#define __atomic_load_clear_32(p) __atomic_load_clear(p) +#define __atomic_cas_32(p, e, s) __atomic_cas(p, e, s) +#define __atomic_op_64(p, op, v) __atomic_op(p, op, v) +#define __atomic_load_64(p) __atomic_load(p) +#define __atomic_load_clear_64(p) __atomic_load_clear(p) +#define __atomic_cas_64(p, e, s) __atomic_cas(p, e, s) + +#define atomic_add_8(p, v) __atomic_op_8(p, +=, v) +#define atomic_subtract_8(p, v) __atomic_op_8(p, -=, v) +#define atomic_set_8(p, v) __atomic_op_8(p, |=, v) +#define atomic_clear_8(p, v) __atomic_op_8(p, &=, ~v) +#define atomic_store_8(p, v) __atomic_op_8(p, =, v) + +#define atomic_add_16(p, v) __atomic_op_16(p, +=, v) +#define atomic_subtract_16(p, v) __atomic_op_16(p, -=, v) +#define atomic_set_16(p, v) __atomic_op_16(p, |=, v) +#define atomic_clear_16(p, v) __atomic_op_16(p, &=, ~v) +#define atomic_store_16(p, v) __atomic_op_16(p, =, v) + +#define atomic_add_32(p, v) __atomic_op_32(p, +=, v) +#define atomic_subtract_32(p, v) __atomic_op_32(p, -=, v) +#define atomic_set_32(p, v) __atomic_op_32(p, |=, v) +#define atomic_clear_32(p, v) __atomic_op_32(p, &=, ~v) +#define atomic_store_32(p, v) __atomic_op_32(p, =, v) +#define atomic_load_32(p) __atomic_load_32(p) +#define atomic_readandclear_32(p) __atomic_load_clear_32(p) +#define atomic_cmpset_32(p, e, s) __atomic_cas_32(p, e, s) + +#define atomic_add_64(p, v) __atomic_op_64(p, +=, v) +#define atomic_subtract_64(p, v) __atomic_op_64(p, -=, v) +#define atomic_set_64(p, v) __atomic_op_64(p, |=, v) +#define atomic_clear_64(p, v) __atomic_op_64(p, &=, ~v) +#define atomic_store_64(p, v) __atomic_op_64(p, =, v) +#define atomic_load_64(p) __atomic_load_64(p) +#define atomic_readandclear_64(p) __atomic_load_clear_64(p) +#define atomic_cmpset_64(p, e, s) __atomic_cas_64(p, e, s) + +#define atomic_add_acq_8(p, v) __atomic_op_8(p, +=, v) +#define atomic_subtract_acq_8(p, v) __atomic_op_8(p, -=, v) +#define atomic_set_acq_8(p, v) __atomic_op_8(p, |=, v) +#define atomic_clear_acq_8(p, v) __atomic_op_8(p, &=, ~v) +#define atomic_store_acq_8(p, v) __atomic_op_8(p, =, v) + +#define atomic_add_acq_16(p, v) __atomic_op_16(p, +=, v) +#define atomic_subtract_acq_16(p, v) __atomic_op_16(p, -=, v) +#define atomic_set_acq_16(p, v) __atomic_op_16(p, |=, v) +#define atomic_clear_acq_16(p, v) __atomic_op_16(p, &=, ~v) +#define atomic_store_acq_16(p, v) __atomic_op_16(p, =, v) + +#define atomic_add_acq_32(p, v) __atomic_op_32(p, +=, v) +#define atomic_subtract_acq_32(p, v) __atomic_op_32(p, -=, v) +#define atomic_set_acq_32(p, v) __atomic_op_32(p, |=, v) +#define atomic_clear_acq_32(p, v) __atomic_op_32(p, &=, ~v) +#define atomic_store_acq_32(p, v) __atomic_op_32(p, =, v) +#define atomic_load_acq_32(p) __atomic_load_32(p) +#define atomic_cmpset_acq_32(p, e, s) __atomic_cas_32(p, e, s) + +#define atomic_add_acq_64(p, v) __atomic_op_64(p, +=, v) +#define atomic_subtract_acq_64(p, v) __atomic_op_64(p, -=, v) +#define atomic_set_acq_64(p, v) __atomic_op_64(p, |=, v) +#define atomic_clear_acq_64(p, v) __atomic_op_64(p, &=, ~v) +#define atomic_store_acq_64(p, v) __atomic_op_64(p, =, v) +#define atomic_load_acq_64(p) __atomic_load_64(p) +#define atomic_cmpset_acq_64(p, e, s) __atomic_cas_64(p, e, s) + +#define atomic_add_rel_8(p, v) __atomic_op_8(p, +=, v) +#define atomic_subtract_rel_8(p, v) __atomic_op_8(p, -=, v) +#define atomic_set_rel_8(p, v) __atomic_op_8(p, |=, v) +#define atomic_clear_rel_8(p, v) __atomic_op_8(p, &=, ~v) +#define atomic_store_rel_8(p, v) __atomic_op_8(p, =, v) + +#define atomic_add_rel_16(p, v) __atomic_op_16(p, +=, v) +#define atomic_subtract_rel_16(p, v) __atomic_op_16(p, -=, v) +#define atomic_set_rel_16(p, v) __atomic_op_16(p, |=, v) +#define atomic_clear_rel_16(p, v) __atomic_op_16(p, &=, ~v) +#define atomic_store_rel_16(p, v) __atomic_op_16(p, =, v) + +#define atomic_add_rel_32(p, v) __atomic_op_32(p, +=, v) +#define atomic_subtract_rel_32(p, v) __atomic_op_32(p, -=, v) +#define atomic_set_rel_32(p, v) __atomic_op_32(p, |=, v) +#define atomic_clear_rel_32(p, v) __atomic_op_32(p, &=, ~v) +#define atomic_store_rel_32(p, v) __atomic_op_32(p, =, v) +#define atomic_cmpset_rel_32(p, e, s) __atomic_cas_32(p, e, s) + +#define atomic_add_rel_64(p, v) __atomic_op_64(p, +=, v) +#define atomic_subtract_rel_64(p, v) __atomic_op_64(p, -=, v) +#define atomic_set_rel_64(p, v) __atomic_op_64(p, |=, v) +#define atomic_clear_rel_64(p, v) __atomic_op_64(p, &=, ~v) +#define atomic_store_rel_64(p, v) __atomic_op_64(p, =, v) +#define atomic_cmpset_rel_64(p, e, s) __atomic_cas_64(p, e, s) + +#define atomic_add_char(p, v) __atomic_op_8(p, +=, v) +#define atomic_subtract_char(p, v) __atomic_op_8(p, -=, v) +#define atomic_set_char(p, v) __atomic_op_8(p, |=, v) +#define atomic_clear_char(p, v) __atomic_op_8(p, &=, ~v) +#define atomic_store_char(p, v) __atomic_op_8(p, =, v) + +#define atomic_add_short(p, v) __atomic_op_16(p, +=, v) +#define atomic_subtract_short(p, v) __atomic_op_16(p, -=, v) +#define atomic_set_short(p, v) __atomic_op_16(p, |=, v) +#define atomic_clear_short(p, v) __atomic_op_16(p, &=, ~v) +#define atomic_store_short(p, v) __atomic_op_16(p, =, v) + +#define atomic_add_int(p, v) __atomic_op_32(p, +=, v) +#define atomic_subtract_int(p, v) __atomic_op_32(p, -=, v) +#define atomic_set_int(p, v) __atomic_op_32(p, |=, v) +#define atomic_clear_int(p, v) __atomic_op_32(p, &=, ~v) +#define atomic_store_int(p, v) __atomic_op_32(p, =, v) +#define atomic_load_int(p) __atomic_load_32(p) +#define atomic_readandclear_int(p) __atomic_load_clear_32(p) +#define atomic_cmpset_int(p, e, s) __atomic_cas_32(p, e, s) + +#define atomic_add_long(p, v) __atomic_op_64(p, +=, v) +#define atomic_subtract_long(p, v) __atomic_op_64(p, -=, v) +#define atomic_set_long(p, v) __atomic_op_64(p, |=, v) +#define atomic_clear_long(p, v) __atomic_op_64(p, &=, ~v) +#define atomic_store_long(p, v) __atomic_op_64(p, =, v) +#define atomic_load_long(p) __atomic_load_64(p) +#define atomic_readandclear_long(p) __atomic_load_clear_64(p) +#define atomic_cmpset_long(p, e, s) __atomic_cas_64(p, e, s) + +#define atomic_add_acq_char(p, v) __atomic_op_8(p, +=, v) +#define atomic_subtract_acq_char(p, v) __atomic_op_8(p, -=, v) +#define atomic_set_acq_char(p, v) __atomic_op_8(p, |=, v) +#define atomic_clear_acq_char(p, v) __atomic_op_8(p, &=, ~v) +#define atomic_store_acq_char(p, v) __atomic_op_8(p, =, v) + +#define atomic_add_acq_short(p, v) __atomic_op_16(p, +=, v) +#define atomic_subtract_acq_short(p, v) __atomic_op_16(p, -=, v) +#define atomic_set_acq_short(p, v) __atomic_op_16(p, |=, v) +#define atomic_clear_acq_short(p, v) __atomic_op_16(p, &=, ~v) +#define atomic_store_acq_short(p, v) __atomic_op_16(p, =, v) + +#define atomic_add_acq_int(p, v) __atomic_op_32(p, +=, v) +#define atomic_subtract_acq_int(p, v) __atomic_op_32(p, -=, v) +#define atomic_set_acq_int(p, v) __atomic_op_32(p, |=, v) +#define atomic_clear_acq_int(p, v) __atomic_op_32(p, &=, ~v) +#define atomic_store_acq_int(p, v) __atomic_op_32(p, =, v) +#define atomic_load_acq_int(p) __atomic_load_32(p) +#define atomic_cmpset_acq_int(p, e, s) __atomic_cas_32(p, e, s) + +#define atomic_add_acq_long(p, v) __atomic_op_64(p, +=, v) +#define atomic_subtract_acq_long(p, v) __atomic_op_64(p, -=, v) +#define atomic_set_acq_long(p, v) __atomic_op_64(p, |=, v) +#define atomic_clear_acq_long(p, v) __atomic_op_64(p, &=, ~v) +#define atomic_store_acq_long(p, v) __atomic_op_64(p, =, v) +#define atomic_load_acq_long(p) __atomic_load_64(p) +#define atomic_cmpset_acq_long(p, e, s) __atomic_cas_64(p, e, s) + +#define atomic_add_rel_char(p, v) __atomic_op_8(p, +=, v) +#define atomic_subtract_rel_char(p, v) __atomic_op_8(p, -=, v) +#define atomic_set_rel_char(p, v) __atomic_op_8(p, |=, v) +#define atomic_clear_rel_char(p, v) __atomic_op_8(p, &=, ~v) +#define atomic_store_rel_char(p, v) __atomic_op_8(p, =, v) + +#define atomic_add_rel_short(p, v) __atomic_op_16(p, +=, v) +#define atomic_subtract_rel_short(p, v) __atomic_op_16(p, -=, v) +#define atomic_set_rel_short(p, v) __atomic_op_16(p, |=, v) +#define atomic_clear_rel_short(p, v) __atomic_op_16(p, &=, ~v) +#define atomic_store_rel_short(p, v) __atomic_op_16(p, =, v) + +#define atomic_add_rel_int(p, v) __atomic_op_32(p, +=, v) +#define atomic_subtract_rel_int(p, v) __atomic_op_32(p, -=, v) +#define atomic_set_rel_int(p, v) __atomic_op_32(p, |=, v) +#define atomic_clear_rel_int(p, v) __atomic_op_32(p, &=, ~v) +#define atomic_store_rel_int(p, v) __atomic_op_32(p, =, v) +#define atomic_cmpset_rel_int(p, e, s) __atomic_cas_32(p, e, s) + +#define atomic_add_rel_long(p, v) __atomic_op_64(p, +=, v) +#define atomic_subtract_rel_long(p, v) __atomic_op_64(p, -=, v) +#define atomic_set_rel_long(p, v) __atomic_op_64(p, |=, v) +#define atomic_clear_rel_long(p, v) __atomic_op_64(p, &=, ~v) +#define atomic_store_rel_long(p, v) __atomic_op_64(p, =, v) +#define atomic_cmpset_rel_long(p, e, s) __atomic_cas_64(p, e, s) + +#define atomic_add_char(p, v) __atomic_op_8(p, +=, v) +#define atomic_subtract_char(p, v) __atomic_op_8(p, -=, v) +#define atomic_set_char(p, v) __atomic_op_8(p, |=, v) +#define atomic_clear_char(p, v) __atomic_op_8(p, &=, ~v) +#define atomic_store_char(p, v) __atomic_op_8(p, =, v) + +#define atomic_add_short(p, v) __atomic_op_16(p, +=, v) +#define atomic_subtract_short(p, v) __atomic_op_16(p, -=, v) +#define atomic_set_short(p, v) __atomic_op_16(p, |=, v) +#define atomic_clear_short(p, v) __atomic_op_16(p, &=, ~v) +#define atomic_store_short(p, v) __atomic_op_16(p, =, v) + +#define atomic_add_int(p, v) __atomic_op_32(p, +=, v) +#define atomic_subtract_int(p, v) __atomic_op_32(p, -=, v) +#define atomic_set_int(p, v) __atomic_op_32(p, |=, v) +#define atomic_clear_int(p, v) __atomic_op_32(p, &=, ~v) +#define atomic_store_int(p, v) __atomic_op_32(p, =, v) +#define atomic_load_int(p) __atomic_load_32(p) +#define atomic_readandclear_int(p) __atomic_load_clear_32(p) +#define atomic_cmpset_int(p, e, s) __atomic_cas_32(p, e, s) + +#define atomic_add_long(p, v) __atomic_op_64(p, +=, v) +#define atomic_subtract_long(p, v) __atomic_op_64(p, -=, v) +#define atomic_set_long(p, v) __atomic_op_64(p, |=, v) +#define atomic_clear_long(p, v) __atomic_op_64(p, &=, ~v) +#define atomic_store_long(p, v) __atomic_op_64(p, =, v) +#define atomic_load_long(p) __atomic_load_64(p) +#define atomic_readandclear_long(p) __atomic_load_clear_64(p) +#define atomic_cmpset_long(p, e, s) __atomic_cas_64(p, e, s) + +#define atomic_add_ptr(p, v) __atomic_op_64(p, +=, v) +#define atomic_subtract_ptr(p, v) __atomic_op_64(p, -=, v) +#define atomic_set_ptr(p, v) __atomic_op_64(p, |=, v) +#define atomic_clear_ptr(p, v) __atomic_op_64(p, &=, ~v) +#define atomic_store_ptr(p, v) __atomic_op_64(p, =, v) +#define atomic_load_ptr(p) __atomic_load_64(p) +#define atomic_readandclear_ptr(p) __atomic_load_clear_64(p) +#define atomic_cmpset_ptr(p, e, s) __atomic_cas_64(p, e, s) + +#define atomic_add_acq_char(p, v) __atomic_op_8(p, +=, v) +#define atomic_subtract_acq_char(p, v) __atomic_op_8(p, -=, v) +#define atomic_set_acq_char(p, v) __atomic_op_8(p, |=, v) +#define atomic_clear_acq_char(p, v) __atomic_op_8(p, &=, ~v) +#define atomic_store_acq_char(p, v) __atomic_op_8(p, =, v) + +#define atomic_add_acq_short(p, v) __atomic_op_16(p, +=, v) +#define atomic_subtract_acq_short(p, v) __atomic_op_16(p, -=, v) +#define atomic_set_acq_short(p, v) __atomic_op_16(p, |=, v) +#define atomic_clear_acq_short(p, v) __atomic_op_16(p, &=, ~v) +#define atomic_store_acq_short(p, v) __atomic_op_16(p, =, v) + +#define atomic_add_acq_int(p, v) __atomic_op_32(p, +=, v) +#define atomic_subtract_acq_int(p, v) __atomic_op_32(p, -=, v) +#define atomic_set_acq_int(p, v) __atomic_op_32(p, |=, v) +#define atomic_clear_acq_int(p, v) __atomic_op_32(p, &=, ~v) +#define atomic_store_acq_int(p, v) __atomic_op_32(p, =, v) +#define atomic_load_acq_int(p) __atomic_load_32(p) +#define atomic_cmpset_acq_int(p, e, s) __atomic_cas_32(p, e, s) + +#define atomic_add_acq_long(p, v) __atomic_op_64(p, +=, v) +#define atomic_subtract_acq_long(p, v) __atomic_op_64(p, -=, v) +#define atomic_set_acq_long(p, v) __atomic_op_64(p, |=, v) +#define atomic_clear_acq_long(p, v) __atomic_op_64(p, &=, ~v) +#define atomic_store_acq_long(p, v) __atomic_op_64(p, =, v) +#define atomic_load_acq_long(p) __atomic_load_64(p) +#define atomic_cmpset_acq_long(p, e, s) __atomic_cas_64(p, e, s) + +#define atomic_add_acq_ptr(p, v) __atomic_op_64(p, +=, v) +#define atomic_subtract_acq_ptr(p, v) __atomic_op_64(p, -=, v) +#define atomic_set_acq_ptr(p, v) __atomic_op_64(p, |=, v) +#define atomic_clear_acq_ptr(p, v) __atomic_op_64(p, &=, ~v) +#define atomic_store_acq_ptr(p, v) __atomic_op_64(p, =, v) +#define atomic_load_acq_ptr(p) __atomic_load_64(p) +#define atomic_cmpset_acq_ptr(p, e, s) __atomic_cas_64(p, e, s) + +#define atomic_add_rel_char(p, v) __atomic_op_8(p, +=, v) +#define atomic_subtract_rel_char(p, v) __atomic_op_8(p, -=, v) +#define atomic_set_rel_char(p, v) __atomic_op_8(p, |=, v) +#define atomic_clear_rel_char(p, v) __atomic_op_8(p, &=, ~v) +#define atomic_store_rel_char(p, v) __atomic_op_8(p, =, v) + +#define atomic_add_rel_short(p, v) __atomic_op_16(p, +=, v) +#define atomic_subtract_rel_short(p, v) __atomic_op_16(p, -=, v) +#define atomic_set_rel_short(p, v) __atomic_op_16(p, |=, v) +#define atomic_clear_rel_short(p, v) __atomic_op_16(p, &=, ~v) +#define atomic_store_rel_short(p, v) __atomic_op_16(p, =, v) + +#define atomic_add_rel_int(p, v) __atomic_op_32(p, +=, v) +#define atomic_subtract_rel_int(p, v) __atomic_op_32(p, -=, v) +#define atomic_set_rel_int(p, v) __atomic_op_32(p, |=, v) +#define atomic_clear_rel_int(p, v) __atomic_op_32(p, &=, ~v) +#define atomic_store_rel_int(p, v) __atomic_op_32(p, =, v) +#define atomic_cmpset_rel_int(p, e, s) __atomic_cas_32(p, e, s) + +#define atomic_add_rel_long(p, v) __atomic_op_64(p, +=, v) +#define atomic_subtract_rel_long(p, v) __atomic_op_64(p, -=, v) +#define atomic_set_rel_long(p, v) __atomic_op_64(p, |=, v) +#define atomic_clear_rel_long(p, v) __atomic_op_64(p, &=, ~v) +#define atomic_store_rel_long(p, v) __atomic_op_64(p, =, v) +#define atomic_cmpset_rel_long(p, e, s) __atomic_cas_64(p, e, s) + +#define atomic_add_rel_ptr(p, v) __atomic_op_64(p, +=, v) +#define atomic_subtract_rel_ptr(p, v) __atomic_op_64(p, -=, v) +#define atomic_set_rel_ptr(p, v) __atomic_op_64(p, |=, v) +#define atomic_clear_rel_ptr(p, v) __atomic_op_64(p, &=, ~v) +#define atomic_store_rel_ptr(p, v) __atomic_op_64(p, =, v) +#define atomic_cmpset_rel_ptr(p, e, s) __atomic_cas_64(p, e, s) + +#endif /* !_MACHINE_ATOMIC_H_ */ diff --git a/sys/sparc64/include/bus.h b/sys/sparc64/include/bus.h new file mode 100644 index 0000000..0ad3d72 --- /dev/null +++ b/sys/sparc64/include/bus.h @@ -0,0 +1,35 @@ +/*- + * Copyright (c) 2001 Jake Burkholder. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _MACHINE_BUS_H_ +#define _MACHINE_BUS_H_ + +typedef int bus_space_tag_t; +typedef int bus_space_handle_t; + +#endif /* !_MACHINE_BUS_H_ */ diff --git a/sys/sparc64/include/clock.h b/sys/sparc64/include/clock.h new file mode 100644 index 0000000..d05c552 --- /dev/null +++ b/sys/sparc64/include/clock.h @@ -0,0 +1,32 @@ +/*- + * Copyright (c) 2001 Jake Burkholder. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _MACHINE_CLOCK_H_ +#define _MACHINE_CLOCK_H_ + +#endif /* !_MACHINE_CLOCK_H_ */ diff --git a/sys/sparc64/include/cpu.h b/sys/sparc64/include/cpu.h new file mode 100644 index 0000000..a6c206a --- /dev/null +++ b/sys/sparc64/include/cpu.h @@ -0,0 +1,76 @@ +/*- + * Copyright (c) 2001 Jake Burkholder. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _MACHINE_CPU_H_ +#define _MACHINE_CPU_H_ + +#include <machine/frame.h> + +#define CLKF_USERMODE(cfp) (0) +#define CLKF_PC(cfp) (0) + +#define cpu_getstack(p) (0) +#define cpu_setstack(p, sp) (0) + +/* + * Arrange to handle pending profiling ticks before returning to user mode. + */ +#define need_proftick(p) do { \ + mtx_lock_spin(&sched_lock); \ + (p)->p_sflag |= PS_OWEUPC; \ + aston(p); \ + mtx_unlock_spin(&sched_lock); \ +} while (0) + +/* + * CTL_MACHDEP definitions. + */ +#define CPU_CONSDEV 1 /* dev_t: console terminal device */ +#define CPU_ADJKERNTZ 2 /* int: timezone offset (seconds) */ +#define CPU_DISRTCSET 3 /* int: disable resettodr() call */ +#define CPU_BOOTINFO 4 /* struct: bootinfo */ +#define CPU_WALLCLOCK 5 /* int: indicates wall CMOS clock */ +#define CPU_MAXID 6 /* number of valid machdep ids */ + +#define CTL_MACHDEP_NAMES { \ + { 0, 0 }, \ + { "console_device", CTLTYPE_STRUCT }, \ + { "adjkerntz", CTLTYPE_INT }, \ + { "disable_rtc_set", CTLTYPE_INT }, \ + { "bootinfo", CTLTYPE_STRUCT }, \ + { "wall_cmos_clock", CTLTYPE_INT }, \ +} + +static __inline u_int64_t +get_cyclecount(void) +{ + static u_long now; + return (++now); +} + +#endif /* !_MACHINE_CPU_H_ */ diff --git a/sys/sparc64/include/cpufunc.h b/sys/sparc64/include/cpufunc.h new file mode 100644 index 0000000..57cf2ab --- /dev/null +++ b/sys/sparc64/include/cpufunc.h @@ -0,0 +1,43 @@ +/*- + * Copyright (c) 2001 Jake Burkholder. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _MACHINE_CPUFUNC_H_ +#define _MACHINE_CPUFUNC_H_ + +static __inline critical_t +critical_enter(void) +{ + return (0); +} + +static __inline void +critical_exit(critical_t ie) +{ +} + +#endif /* !_MACHINE_CPUFUNC_H_ */ diff --git a/sys/sparc64/include/db_machdep.h b/sys/sparc64/include/db_machdep.h new file mode 100644 index 0000000..5d091ee --- /dev/null +++ b/sys/sparc64/include/db_machdep.h @@ -0,0 +1,32 @@ +/*- + * Copyright (c) 2001 Jake Burkholder. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _MACHINE_DB_MACHDEP_H_ +#define _MACHINE_DB_MACHDEP_H_ + +#endif /* !_MACHINE_DB_MACHDEP_H_ */ diff --git a/sys/sparc64/include/elf.h b/sys/sparc64/include/elf.h new file mode 100644 index 0000000..f5f7cfa --- /dev/null +++ b/sys/sparc64/include/elf.h @@ -0,0 +1,90 @@ +/*- + * Copyright (c) 2001 Jake Burkholder. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _MACHINE_ELF_H_ +#define _MACHINE_ELF_H_ + +#include <sys/elf64.h> + +#define __ELF_WORD_SIZE 64 +#include <sys/elf_generic.h> + +#define ELF_ARCH EM_SPARCV9 + +#define ELF_TARG_CLASS ELFCLASS64 +#define ELF_TARG_DATA ELFDATA2MSB +#define ELF_TARG_MACH ELF_ARCH +#define ELF_TARG_VER 1 + +#define ELF_MACHINE_OK(m) ((m) == ELF_ARCH) +#define ELF_RTLD_ADDR(vm) (0) + +/* + * Auxiliary vector entries for passing information to the interpreter. + */ + +typedef struct { + long a_type; + union { + long a_val; + void *a_ptr; + void (*a_fcn)(void); + } a_un; +} Elf64_Auxinfo; + +__ElfType(Auxinfo); + +/* + * Values for a_type. + */ + +#define AT_NULL 0 /* Terminates the vector. */ +#define AT_IGNORE 1 /* Ignored entry. */ +#define AT_EXECFD 2 /* File descriptor of program to load. */ +#define AT_PHDR 3 /* Program header of program already loaded. */ +#define AT_PHENT 4 /* Size of each program header entry. */ +#define AT_PHNUM 5 /* Number of program header entries. */ +#define AT_PAGESZ 6 /* Page size in bytes. */ +#define AT_BASE 7 /* Interpreter's base address. */ +#define AT_FLAGS 8 /* Flags (unused). */ +#define AT_ENTRY 9 /* Where interpreter should transfer control. */ + +/* + * The following non-standard values are used for passing information + * from John Polstra's testbed program to the dynamic linker. These + * are expected to go away soon. + * + * Unfortunately, these overlap the Linux non-standard values, so they + * must not be used in the same context. + */ +#define AT_BRK 10 /* Starting point for sbrk and brk. */ +#define AT_DEBUG 11 /* Debugging level. */ + +#define AT_COUNT 15 /* Count of defined aux entry types. */ + +#endif /* !_MACHINE_ELF_H_ */ diff --git a/sys/sparc64/include/endian.h b/sys/sparc64/include/endian.h new file mode 100644 index 0000000..0e8e1f1 --- /dev/null +++ b/sys/sparc64/include/endian.h @@ -0,0 +1,85 @@ +/* + * Copyright (c) 1987, 1991, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)endian.h 8.1 (Berkeley) 6/10/93 + * $FreeBSD$ + */ + +#ifndef _MACHINE_ENDIAN_H_ +#define _MACHINE_ENDIAN_H_ + +/* + * Define the order of 32-bit words in 64-bit words. + */ +#define _QUAD_HIGHWORD 0 +#define _QUAD_LOWWORD 1 + +#ifndef _POSIX_SOURCE +/* + * Definitions for byte order, according to byte significance from low + * address to high. + */ +#define LITTLE_ENDIAN 1234 /* LSB first: i386, vax */ +#define BIG_ENDIAN 4321 /* MSB first: 68000, ibm, net */ +#define PDP_ENDIAN 3412 /* LSB first in word, MSW first in long */ + +#define BYTE_ORDER BIG_ENDIAN + +#include <sys/cdefs.h> +#include <sys/types.h> + +__BEGIN_DECLS +in_addr_t htonl __P((in_addr_t)); +in_port_t htons __P((in_port_t)); +in_addr_t ntohl __P((in_addr_t)); +in_port_t ntohs __P((in_port_t)); +u_int16_t bswap16 __P((u_int16_t)); +u_int32_t bswap32 __P((u_int32_t)); +u_int64_t bswap64 __P((u_int64_t)); +__END_DECLS + +/* + * Macros for network/external number representation conversion. + */ +#if BYTE_ORDER == BIG_ENDIAN && !defined(lint) +#define ntohl(x) (x) +#define ntohs(x) (x) +#define htonl(x) (x) +#define htons(x) (x) + +#define NTOHL(x) (x) +#define NTOHS(x) (x) +#define HTONL(x) (x) +#define HTONS(x) (x) + +#else + +#define NTOHL(x) (x) = ntohl((in_addr_t)x) +#define NTOHS(x) (x) = ntohs((in_port_t)x) +#define HTONL(x) (x) = htonl((in_addr_t)x) +#define HTONS(x) (x) = htons((in_port_t)x) +#endif +#endif /* !_POSIX_SOURCE */ +#endif /* !_MACHINE_ENDIAN_H_ */ diff --git a/sys/sparc64/include/exec.h b/sys/sparc64/include/exec.h new file mode 100644 index 0000000..fd8a538 --- /dev/null +++ b/sys/sparc64/include/exec.h @@ -0,0 +1,34 @@ +/*- + * Copyright (c) 2001 Jake Burkholder. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _MACHINE_EXEC_H_ +#define _MACHINE_EXEC_H_ + +#define __LDPGSZ 8192 + +#endif /* !_MACHINE_EXEC_H_ */ diff --git a/sys/sparc64/include/frame.h b/sys/sparc64/include/frame.h new file mode 100644 index 0000000..da06e3c --- /dev/null +++ b/sys/sparc64/include/frame.h @@ -0,0 +1,38 @@ +/*- + * Copyright (c) 2001 Jake Burkholder. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _MACHINE_FRAME_H_ +#define _MACHINE_FRAME_H_ + +struct clockframe { +}; + +struct trapframe { +}; + +#endif /* !_MACHINE_FRAME_H_ */ diff --git a/sys/sparc64/include/globaldata.h b/sys/sparc64/include/globaldata.h new file mode 100644 index 0000000..38b351e --- /dev/null +++ b/sys/sparc64/include/globaldata.h @@ -0,0 +1,49 @@ +/*- + * Copyright (c) 2001 Jake Burkholder. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _MACHINE_GLOBALDATA_H_ +#define _MACHINE_GLOBALDATA_H_ + +struct lock_list_entry; +struct pcb; +struct proc; + +struct globaldata { + SLIST_ENTRY(globaldata) gd_allcpu; + struct pcb *gd_curpcb; + struct proc *gd_curproc; + struct proc *gd_fpproc; + struct proc *gd_idleproc; + u_int gd_cpuid; + u_int gd_other_cpus; + struct lock_list_entry *gd_spinlocks; + struct timeval gd_switchtime; + int gd_switchticks; +}; + +#endif /* !_MACHINE_GLOBALDATA_H_ */ diff --git a/sys/sparc64/include/globals.h b/sys/sparc64/include/globals.h new file mode 100644 index 0000000..0ff859c --- /dev/null +++ b/sys/sparc64/include/globals.h @@ -0,0 +1,48 @@ +/*- + * Copyright (c) 2001 Jake Burkholder. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _MACHINE_GLOBALS_H_ +#define _MACHINE_GLOBALS_H_ + +#ifdef _KERNEL + +#include <machine/globaldata.h> + +register struct globaldata *globaldata __asm("%g7"); + +#define PCPU_GET(name) (globaldata->gd_ ## name) +#define PCPU_PTR(name) (&globaldata->gd_ ## name) +#define PCPU_SET(name, value) (globaldata->gd_ ## name = (value)) + +#define curproc PCPU_GET(curproc) +#define CURPROC PCPU_GET(curproc) +#define CURTHD PCPU_GET(curproc) + +#endif /* _KERNEL */ + +#endif /* !_MACHINE_GLOBALS_H_ */ diff --git a/sys/sparc64/include/limits.h b/sys/sparc64/include/limits.h new file mode 100644 index 0000000..4196887 --- /dev/null +++ b/sys/sparc64/include/limits.h @@ -0,0 +1,98 @@ +/* + * Copyright (c) 1988, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)limits.h 8.3 (Berkeley) 1/4/94 + * $FreeBSD$ + */ + +#ifndef _MACHINE_LIMITS_H_ +#define _MACHINE_LIMITS_H_ + +#define CHAR_BIT 8 /* number of bits in a char */ +#define MB_LEN_MAX 6 /* Allow 31 bit UTF2 */ + +/* + * According to ANSI (section 2.2.4.2), the values below must be usable by + * #if preprocessing directives. Additionally, the expression must have the + * same type as would an expression that is an object of the corresponding + * type converted according to the integral promotions. The subtraction for + * INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an + * unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2). + * These numbers are for the default configuration of gcc. They work for + * some other compilers as well, but this should not be depended on. + */ +#define SCHAR_MAX 0x7f /* max value for a signed char */ +#define SCHAR_MIN (-0x7f-1) /* min value for a signed char */ + +#define UCHAR_MAX 0xffU /* max value for an unsigned char */ +#define CHAR_MAX 0x7f /* max value for a char */ +#define CHAR_MIN (-0x7f-1) /* min value for a char */ + +#define USHRT_MAX 0xffffU /* max value for an unsigned short */ +#define SHRT_MAX 0x7fff /* max value for a short */ +#define SHRT_MIN (-0x7fff-1) /* min value for a short */ + +#define UINT_MAX 0xffffffffU /* max value for an unsigned int */ +#define INT_MAX 0x7fffffff /* max value for an int */ +#define INT_MIN (-0x7fffffff-1) /* min value for an int */ + +#define ULONG_MAX 0xffffffffffffffffUL /* max for an unsigned long */ +#define LONG_MAX 0x7fffffffffffffffL /* max for a long */ +#define LONG_MIN (-0x7fffffffffffffffL-1) /* min for a long */ + +/* Long longs and longs are the same size on the alpha. */ + /* max for an unsigned long long */ +#define ULLONG_MAX 0xffffffffffffffffULL +#define LLONG_MAX 0x7fffffffffffffffLL /* max for a long long */ +#define LLONG_MIN (-0x7fffffffffffffffLL-1) /* min for a long long */ + +#if !defined(_ANSI_SOURCE) +#define SSIZE_MAX LONG_MAX /* max value for a ssize_t */ + +#if !defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE) +#define SIZE_T_MAX ULONG_MAX /* max value for a size_t */ + +/* Quads and longs are the same on the alpha. Ensure they stay in sync. */ +#define UQUAD_MAX (ULONG_MAX) /* max value for a uquad_t */ +#define QUAD_MAX (LONG_MAX) /* max value for a quad_t */ +#define QUAD_MIN (LONG_MIN) /* min value for a quad_t */ + +#endif /* !_POSIX_SOURCE && !_XOPEN_SOURCE */ +#endif /* !_ANSI_SOURCE */ + +#if (!defined(_ANSI_SOURCE)&&!defined(_POSIX_SOURCE)) || defined(_XOPEN_SOURCE) +#define LONG_BIT 64 +#define WORD_BIT 32 + +#define DBL_DIG 15 +#define DBL_MAX 1.7976931348623157E+308 +#define DBL_MIN 2.2250738585072014E-308 + +#define FLT_DIG 6 +#define FLT_MAX 3.40282347E+38F +#define FLT_MIN 1.17549435E-38F +#endif + +#endif /* !_MACHINE_LIMITS_H_ */ diff --git a/sys/sparc64/include/md_var.h b/sys/sparc64/include/md_var.h new file mode 100644 index 0000000..9c517bc --- /dev/null +++ b/sys/sparc64/include/md_var.h @@ -0,0 +1,48 @@ +/*- + * Copyright (c) 2001 Jake Burkholder. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _MACHINE_MD_VAR_H_ +#define _MACHINE_MD_VAR_H_ + +extern char sigcode[]; +extern int szsigcode; +extern int Maxmem; + +struct dbreg; +struct fpreg; +struct proc; +struct reg; + +void cpu_halt(void); +void cpu_reset(void); +int fill_dbregs(struct proc *p, struct dbreg *dbregs); +int fill_fpregs(struct proc *p, struct fpreg *fpregs); +int fill_regs(struct proc *p, struct reg *regs); +void swi_vm(void *v); + +#endif /* !_MACHINE_MD_VAR_H_ */ diff --git a/sys/sparc64/include/mutex.h b/sys/sparc64/include/mutex.h new file mode 100644 index 0000000..9c6bc1a --- /dev/null +++ b/sys/sparc64/include/mutex.h @@ -0,0 +1,37 @@ +/*- + * Copyright (c) 2001 Jake Burkholder. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _MACHINE_MUTEX_H_ +#define _MACHINE_MUTEX_H_ + +static __inline void +mtx_intr_enable(struct mtx *mtx) +{ +} + +#endif /* !_MACHINE_MUTEX_H_ */ diff --git a/sys/sparc64/include/param.h b/sys/sparc64/include/param.h new file mode 100644 index 0000000..c164134 --- /dev/null +++ b/sys/sparc64/include/param.h @@ -0,0 +1,165 @@ +/*- + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * William Jolitz. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * from: @(#)param.h 5.8 (Berkeley) 6/28/91 + * $FreeBSD$ + */ + +/* + * Machine dependent constants for sparc64. + */ + +#define TODO \ + panic("implement " __func__) + +/* + * Round p (pointer or byte index) up to a correctly-aligned value + * for all data types (int, long, ...). The result is unsigned int + * and must be cast to any desired pointer type. + */ +#ifndef _ALIGNBYTES +#define _ALIGNBYTES 0xf +#endif +#ifndef _ALIGN +#define _ALIGN(p) (((u_long)(p) + _ALIGNBYTES) & ~_ALIGNBYTES) +#endif + +#ifndef _MACHINE +#define _MACHINE sparc64 +#endif +#ifndef _MACHINE_ARCH +#define _MACHINE_ARCH sparc64 +#endif + +#ifndef _NO_NAMESPACE_POLLUTION + +#ifndef _MACHINE_PARAM_H_ +#define _MACHINE_PARAM_H_ + +#ifndef MACHINE +#define MACHINE "sparc64" +#endif +#ifndef MACHINE_ARCH +#define MACHINE_ARCH "sparc64" +#endif +#define MID_MACHINE MID_SPARC64 + +/* + * OBJFORMAT_NAMES is a comma-separated list of the object formats + * that are supported on the architecture. + */ +#define OBJFORMAT_NAMES "elf" +#define OBJFORMAT_DEFAULT "elf" + +#ifdef SMP +#define MAXCPU 16 +#else +#define MAXCPU 1 +#endif /* SMP */ + +#define ALIGNBYTES _ALIGNBYTES +#define ALIGN(p) _ALIGN(p) + +#define PAGE_SHIFT 13 /* LOG2(PAGE_SIZE) */ +#define PAGE_SIZE (1<<PAGE_SHIFT) /* bytes/page */ +#define PAGE_MASK (PAGE_SIZE-1) +#define NPTEPG (PAGE_SIZE/(sizeof (pt_entry_t))) + +#define NPDEPG (PAGE_SIZE/(sizeof (pd_entry_t))) +#define PDRSHIFT 22 /* LOG2(NBPDR) */ +#define NBPDR (1<<PDRSHIFT) /* bytes/page dir */ +#define PDRMASK (NBPDR-1) + +#define DEV_BSHIFT 9 /* log2(DEV_BSIZE) */ +#define DEV_BSIZE (1<<DEV_BSHIFT) + +#ifndef BLKDEV_IOSIZE +#define BLKDEV_IOSIZE PAGE_SIZE /* default block device I/O size */ +#endif +#define DFLTPHYS (64 * 1024) /* default max raw I/O transfer size */ +#define MAXPHYS (128 * 1024) /* max raw I/O transfer size */ +#define MAXDUMPPGS (DFLTPHYS/PAGE_SIZE) + +#define IOPAGES 2 /* pages of i/o permission bitmap */ +#define UPAGES 2 /* pages of u-area */ + +/* + * Constants related to network buffer management. + * MCLBYTES must be no larger than PAGE_SIZE. + */ +#ifndef MSIZE +#define MSIZE 256 /* size of an mbuf */ +#endif /* MSIZE */ + +#ifndef MCLSHIFT +#define MCLSHIFT 11 /* convert bytes to mbuf clusters */ +#endif /* MCLSHIFT */ +#define MCLBYTES (1 << MCLSHIFT) /* size of an mbuf cluster */ + +/* + * Some macros for units conversion + */ + +/* clicks to bytes */ +#define ctob(x) ((x)<<PAGE_SHIFT) + +/* bytes to clicks */ +#define btoc(x) (((unsigned)(x)+PAGE_MASK)>>PAGE_SHIFT) + +/* + * btodb() is messy and perhaps slow because `bytes' may be an off_t. We + * want to shift an unsigned type to avoid sign extension and we don't + * want to widen `bytes' unnecessarily. Assume that the result fits in + * a daddr_t. + */ +#define btodb(bytes) /* calculates (bytes / DEV_BSIZE) */ \ + (sizeof (bytes) > sizeof(long) \ + ? (daddr_t)((unsigned long long)(bytes) >> DEV_BSHIFT) \ + : (daddr_t)((unsigned long)(bytes) >> DEV_BSHIFT)) + +#define dbtob(db) /* calculates (db * DEV_BSIZE) */ \ + ((off_t)(db) << DEV_BSHIFT) + +/* + * Mach derived conversion macros + */ +#define trunc_page(x) ((unsigned long)(x) & ~PAGE_MASK) +#define round_page(x) (((unsigned long)(x) + PAGE_MASK) & ~PAGE_MASK) +#define trunc_4mpage(x) ((unsigned long)(x) & ~PDRMASK) +#define round_4mpage(x) ((((unsigned long)(x)) + PDRMASK) & ~PDRMASK) + +#define atop(x) ((unsigned long)(x) >> PAGE_SHIFT) +#define ptoa(x) ((unsigned long)(x) << PAGE_SHIFT) + +#define sparc64_btop(x) ((unsigned long)(x) >> PAGE_SHIFT) +#define sparc64_ptob(x) ((unsigned long)(x) << PAGE_SHIFT) + +#define pgtok(x) ((unsigned long)(x) * (PAGE_SIZE / 1024)) + +#endif /* !_MACHINE_PARAM_H_ */ +#endif /* !_NO_NAMESPACE_POLLUTION */ diff --git a/sys/sparc64/include/pcb.h b/sys/sparc64/include/pcb.h new file mode 100644 index 0000000..3a14b74 --- /dev/null +++ b/sys/sparc64/include/pcb.h @@ -0,0 +1,43 @@ +/*- + * Copyright (c) 2001 Jake Burkholder. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _MACHINE_PCB_H_ +#define _MACHINE_PCB_H_ + +struct pcb { + caddr_t pcb_onfault; +}; + +struct md_coredump { +}; + +#ifdef _KERNEL +void savectx(struct pcb *pcb); +#endif + +#endif /* !_MACHINE_PCB_H_ */ diff --git a/sys/sparc64/include/pcpu.h b/sys/sparc64/include/pcpu.h new file mode 100644 index 0000000..38b351e --- /dev/null +++ b/sys/sparc64/include/pcpu.h @@ -0,0 +1,49 @@ +/*- + * Copyright (c) 2001 Jake Burkholder. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _MACHINE_GLOBALDATA_H_ +#define _MACHINE_GLOBALDATA_H_ + +struct lock_list_entry; +struct pcb; +struct proc; + +struct globaldata { + SLIST_ENTRY(globaldata) gd_allcpu; + struct pcb *gd_curpcb; + struct proc *gd_curproc; + struct proc *gd_fpproc; + struct proc *gd_idleproc; + u_int gd_cpuid; + u_int gd_other_cpus; + struct lock_list_entry *gd_spinlocks; + struct timeval gd_switchtime; + int gd_switchticks; +}; + +#endif /* !_MACHINE_GLOBALDATA_H_ */ diff --git a/sys/sparc64/include/pmap.h b/sys/sparc64/include/pmap.h new file mode 100644 index 0000000..8740007 --- /dev/null +++ b/sys/sparc64/include/pmap.h @@ -0,0 +1,58 @@ +/*- + * Copyright (c) 2001 Jake Burkholder. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _MACHINE_PMAP_H_ +#define _MACHINE_PMAP_H_ + +struct md_page { +}; + +struct pmap { + struct pmap_statistics pm_stats; +}; + +typedef struct pmap *pmap_t; + +extern struct pmap __kernel_pmap; +#define kernel_pmap (&__kernel_pmap) + +#define pmap_resident_count(pm) (pm->pm_stats.resident_count) + +#ifdef _KERNEL + +vm_offset_t pmap_kextract(vm_offset_t va); + +extern vm_offset_t avail_start; +extern vm_offset_t avail_end; +extern vm_offset_t phys_avail[]; +extern vm_offset_t virtual_avail; +extern vm_offset_t virtual_end; + +#endif + +#endif /* !_MACHINE_PMAP_H_ */ diff --git a/sys/sparc64/include/proc.h b/sys/sparc64/include/proc.h new file mode 100644 index 0000000..e3f6e4d --- /dev/null +++ b/sys/sparc64/include/proc.h @@ -0,0 +1,37 @@ +/*- + * Copyright (c) 2001 Jake Burkholder. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _MACHINE_PROC_H_ +#define _MACHINE_PROC_H_ + +#include <machine/globals.h> + +struct mdproc { +}; + +#endif /* !_MACHINE_PROC_H_ */ diff --git a/sys/sparc64/include/ptrace.h b/sys/sparc64/include/ptrace.h new file mode 100644 index 0000000..8dde79e --- /dev/null +++ b/sys/sparc64/include/ptrace.h @@ -0,0 +1,34 @@ +/*- + * Copyright (c) 2001 Jake Burkholder. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _MACHINE_PTRACE_H_ +#define _MACHINE_PTRACE_H_ + +int ptrace_read_u_check(struct proc *p, vm_offset_t off, size_t len); + +#endif /* !_MACHINE_PTRACE_H_ */ diff --git a/sys/sparc64/include/reg.h b/sys/sparc64/include/reg.h new file mode 100644 index 0000000..5d42858 --- /dev/null +++ b/sys/sparc64/include/reg.h @@ -0,0 +1,48 @@ +/*- + * Copyright (c) 2001 Jake Burkholder. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _MACHINE_REG_H_ +#define _MACHINE_REG_H_ + +struct reg { +}; + +struct fpreg { +}; + +struct dbreg { +}; + +#ifdef _KERNEL +int set_fpregs(struct proc *p, struct fpreg *fpregs); +int set_regs(struct proc *p, struct reg *regs); +void setregs(struct proc *p, u_long e, u_long s, u_long ps); +int set_dbregs(struct proc *p, struct dbreg *dbregs); +#endif + +#endif /* !_MACHINE_REG_H_ */ diff --git a/sys/sparc64/include/resource.h b/sys/sparc64/include/resource.h new file mode 100644 index 0000000..28fcc98 --- /dev/null +++ b/sys/sparc64/include/resource.h @@ -0,0 +1,44 @@ +/* $FreeBSD$ */ +/* + * Copyright 1998 Massachusetts Institute of Technology + * + * Permission to use, copy, modify, and distribute this software and + * its documentation for any purpose and without fee is hereby + * granted, provided that both the above copyright notice and this + * permission notice appear in all copies, that both the above + * copyright notice and this permission notice appear in all + * supporting documentation, and that the name of M.I.T. not be used + * in advertising or publicity pertaining to distribution of the + * software without specific, written prior permission. M.I.T. makes + * no representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied + * warranty. + * + * THIS SOFTWARE IS PROVIDED BY M.I.T. ``AS IS''. M.I.T. DISCLAIMS + * ALL EXPRESS OR IMPLIED WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT + * SHALL M.I.T. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#ifndef _MACHINE_RESOURCE_H_ +#define _MACHINE_RESOURCE_H_ 1 + +/* + * Definitions of resource types for Intel Architecture machines + * with support for legacy ISA devices and drivers. + */ + +#define SYS_RES_IRQ 1 /* interrupt lines */ +#define SYS_RES_DRQ 2 /* isa dma lines */ +#define SYS_RES_MEMORY 3 /* i/o memory */ +#define SYS_RES_IOPORT 4 /* i/o ports */ + +#endif /* !_MACHINE_RESOURCE_H_ */ diff --git a/sys/sparc64/include/signal.h b/sys/sparc64/include/signal.h new file mode 100644 index 0000000..1c9f952 --- /dev/null +++ b/sys/sparc64/include/signal.h @@ -0,0 +1,48 @@ +/*- + * Copyright (c) 2001 Jake Burkholder. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _MACHINE_SIGNAL_H_ +#define _MACHINE_SIGNAL_H_ + +typedef long sig_atomic_t; + +#ifndef _ANSI_SOURCE + +#define MINSIGSTKSZ (1024 * 4) + +typedef u_int osigset_t; + +struct osigcontext { +}; + +struct sigcontext { +}; + +#endif /* !_ANSI_SOURCE */ + +#endif /* !_MACHINE_SIGNAL_H_ */ diff --git a/sys/sparc64/include/smp.h b/sys/sparc64/include/smp.h new file mode 100644 index 0000000..faeb5f7 --- /dev/null +++ b/sys/sparc64/include/smp.h @@ -0,0 +1,32 @@ +/*- + * Copyright (c) 2001 Jake Burkholder. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _MACHINE_SMP_H_ +#define _MACHINE_SMP_H_ + +#endif /* !_MACHINE_SMP_H_ */ diff --git a/sys/sparc64/include/stdarg.h b/sys/sparc64/include/stdarg.h new file mode 100644 index 0000000..a4b2550 --- /dev/null +++ b/sys/sparc64/include/stdarg.h @@ -0,0 +1,71 @@ +/* + * Copyright (c) 1992, 1993 + * The Regents of the University of California. All rights reserved. + * + * This software was developed by the Computer Systems Engineering group + * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and + * contributed to Berkeley. + * + * All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Lawrence Berkeley Laboratory. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * from: @(#)stdarg.h 8.2 (Berkeley) 9/27/93 + * $FreeBSD$ + */ + +#ifndef _MACHINE_STDARG_H_ +#define _MACHINE_STDARG_H_ + +#include <machine/ansi.h> + +typedef _BSD_VA_LIST_ va_list; + +#define va_start(ap, last) \ + (__builtin_next_arg(last), (ap) = (va_list)__builtin_saveregs()) + +#define va_end(ap) + +#define __va_arg8(ap, type) \ + (*(type *)(void *)((ap) += 8, (ap) - 8)) +#define __va_arg16(ap, type) \ + (*(type *)(void *)((ap) = (va_list)(((unsigned long)(ap) + 31) & -16),\ + (ap) - 16)) +#define __va_int(ap, type) \ + (*(type *)(void *)((ap) += 8, (ap) - sizeof(type))) + +#define __REAL_TYPE_CLASS 8 +#define __RECORD_TYPE_CLASS 12 +#define va_arg(ap, type) \ + (__builtin_classify_type(*(type *)0) == __REAL_TYPE_CLASS ? \ + (__alignof__(type) == 16 ? __va_arg16(ap, type) : \ + __va_arg8(ap, type)) : \ + (__builtin_classify_type(*(type *)0) < __RECORD_TYPE_CLASS ? \ + __va_int(ap, type) : \ + (sizeof(type) <= 8 ? __va_arg8(ap, type) : \ + (sizeof(type) <= 16 ? __va_arg16(ap, type) : \ + *__va_arg8(ap, type *))))) + +#endif /* !_MACHINE_STDARG_H_ */ diff --git a/sys/sparc64/include/types.h b/sys/sparc64/include/types.h new file mode 100644 index 0000000..0726618 --- /dev/null +++ b/sys/sparc64/include/types.h @@ -0,0 +1,64 @@ +/*- + * Copyright (c) 1990, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)types.h 8.3 (Berkeley) 1/5/94 + * $FreeBSD$ + */ + +#ifndef _MACHINE_TYPES_H_ +#define _MACHINE_TYPES_H_ + +#include <sys/cdefs.h> + +#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE) +typedef struct _physadr { + long r[1]; +} *physadr; + +typedef struct label_t { + long val[10]; +} label_t; +#endif + +typedef unsigned long vm_offset_t; +typedef long vm_ooffset_t; +typedef unsigned long vm_pindex_t; +typedef unsigned long vm_size_t; + +typedef __int64_t register_t; +typedef __uint64_t u_register_t; + +#ifdef _KERNEL +typedef long intfptr_t; +typedef unsigned long uintfptr_t; +#endif + +/* Critical section value */ +typedef register_t critical_t; + +/* Interrupt mask (spl, xxx_imask, etc) */ +typedef __uint32_t intrmask_t; + +#endif /* !_MACHINE_TYPES_H_ */ diff --git a/sys/sparc64/include/ucontext.h b/sys/sparc64/include/ucontext.h new file mode 100644 index 0000000..882379d --- /dev/null +++ b/sys/sparc64/include/ucontext.h @@ -0,0 +1,37 @@ +/*- + * Copyright (c) 2001 Jake Burkholder. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _MACHINE_UCONTEXT_H_ +#define _MACHINE_UCONTEXT_H_ + +struct __mcontext { +}; + +typedef struct __mcontext mcontext_t; + +#endif /* !_MACHINE_UCONTEXT_H_ */ diff --git a/sys/sparc64/include/vmparam.h b/sys/sparc64/include/vmparam.h new file mode 100644 index 0000000..81858cc --- /dev/null +++ b/sys/sparc64/include/vmparam.h @@ -0,0 +1,90 @@ +/*- + * Copyright (c) 2001 Jake Burkholder. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _MACHINE_VMPARAM_H_ +#define _MACHINE_VMPARAM_H_ + +/* + * Virtual memory related constants, all in bytes + */ +#ifndef MAXTSIZ +#define MAXTSIZ (1*1024*1024*1024) /* max text size */ +#endif +#ifndef DFLDSIZ +#define DFLDSIZ (128*1024*1024) /* initial data size limit */ +#endif +#ifndef MAXDSIZ +#define MAXDSIZ (1*1024*1024*1024) /* max data size */ +#endif +#ifndef DFLSSIZ +#define DFLSSIZ (128*1024*1024) /* initial stack size limit */ +#endif +#ifndef MAXSSIZ +#define MAXSSIZ (1*1024*1024*1024) /* max stack size */ +#endif +#ifndef SGROWSIZ +#define SGROWSIZ (128*1024) /* amount to grow stack */ +#endif + +/* + * The time for a process to be blocked before being very swappable. + * This is a number of seconds which the system takes as being a non-trivial + * amount of real time. You probably shouldn't change this; + * it is used in subtle ways (fractions and multiples of it are, that is, like + * half of a ``long time'', almost a long time, etc.) + * It is related to human patience and other factors which don't really + * change over time. + */ +#define MAXSLP 20 + +#define VM_MAXUSER_ADDRESS 0 + +#define USRSTACK VM_MAXUSER_ADDRESS + +#define VM_MIN_ADDRESS 0 + +/* + * Virtual size (bytes) for various kernel submaps. + */ +#ifndef VM_KMEM_SIZE +#define VM_KMEM_SIZE (12*1024*1024) +#endif + +#define VM_MIN_KERNEL_ADDRESS (0) +#define VM_MAX_KERNEL_ADDRESS (0) + +#define KERNBASE (0) + +/* + * Initial pagein size of beginning of executable file. + */ +#ifndef VM_INITIAL_PAGEIN +#define VM_INITIAL_PAGEIN 16 +#endif + +#endif /* !_MACHINE_VMPARAM_H_ */ diff --git a/sys/sparc64/sparc64/autoconf.c b/sys/sparc64/sparc64/autoconf.c new file mode 100644 index 0000000..ab581ab --- /dev/null +++ b/sys/sparc64/sparc64/autoconf.c @@ -0,0 +1,32 @@ +/*- + * Copyright (c) 2001 Jake Burkholder. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include <sys/param.h> + +dev_t dumpdev = NODEV; +dev_t rootdev = NODEV; diff --git a/sys/sparc64/sparc64/clock.c b/sys/sparc64/sparc64/clock.c new file mode 100644 index 0000000..d56a0b1 --- /dev/null +++ b/sys/sparc64/sparc64/clock.c @@ -0,0 +1,60 @@ +/*- + * Copyright (c) 2001 Jake Burkholder. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include <sys/param.h> +#include <sys/systm.h> + +void +cpu_initclocks(void) +{ + TODO; +} + +void +DELAY(int n) +{ + /* XXX */ +} + +void +inittodr(time_t base) +{ + TODO; +} + +void +resettodr(void) +{ + TODO; +} + +void +setstatclockrate(int newhz) +{ + TODO; +} diff --git a/sys/sparc64/sparc64/elf_machdep.c b/sys/sparc64/sparc64/elf_machdep.c new file mode 100644 index 0000000..bf98303 --- /dev/null +++ b/sys/sparc64/sparc64/elf_machdep.c @@ -0,0 +1,39 @@ +/*- + * Copyright (c) 2001 Jake Burkholder. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include <sys/param.h> +#include <sys/systm.h> +#include <sys/linker.h> +#include <machine/elf.h> + +int +elf_reloc(linker_file_t lf, const void *data, int type, const char *sym) +{ + TODO; + return (0); +} diff --git a/sys/sparc64/sparc64/machdep.c b/sys/sparc64/sparc64/machdep.c new file mode 100644 index 0000000..bbc1f96 --- /dev/null +++ b/sys/sparc64/sparc64/machdep.c @@ -0,0 +1,166 @@ +/*- + * Copyright (c) 2001 Jake Burkholder. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include <sys/param.h> +#include <sys/systm.h> +#include <sys/mutex.h> +#include <sys/proc.h> +#include <sys/ptrace.h> +#include <sys/signalvar.h> +#include <sys/sysproto.h> + +#include <dev/ofw/openfirm.h> + +#include <machine/md_var.h> +#include <machine/reg.h> + +void sparc64_init(ofw_vec_t *ofw_vec); + +int cold = 1; +long dumplo; +int Maxmem = 0; + +struct mtx Giant; +struct mtx sched_lock; + +struct user *proc0paddr; + +void +sparc64_init(ofw_vec_t *ofw_vec) +{ + OF_init(ofw_vec); + cninit(); + printf("hello world!!\n"); +} + +void +sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code) +{ + TODO; +} + +#ifndef _SYS_SYSPROTO_H_ +struct sigreturn_args { + ucontext_t *ucp; +}; +#endif + +int +sigreturn(struct proc *p, struct sigreturn_args *uap) +{ + TODO; + return (0); +} + +void +cpu_halt(void) +{ + TODO; +} + +int +ptrace_read_u_check(struct proc *p, vm_offset_t addr, size_t len) +{ + TODO; + return (0); +} + +int +ptrace_write_u(struct proc *p, vm_offset_t off, long data) +{ + TODO; + return (0); +} + +int +ptrace_set_pc(struct proc *p, u_long addr) +{ + TODO; + return (0); +} + +int +ptrace_single_step(struct proc *p) +{ + TODO; + return (0); +} + +void +setregs(struct proc *p, u_long entry, u_long stack, u_long ps_strings) +{ + TODO; +} + +void +Debugger(const char *msg) +{ + TODO; +} + +int +fill_dbregs(struct proc *p, struct dbreg *dbregs) +{ + TODO; + return (0); +} + +int +set_dbregs(struct proc *p, struct dbreg *dbregs) +{ + TODO; + return (0); +} + +int +fill_regs(struct proc *p, struct reg *regs) +{ + TODO; + return (0); +} + +int +set_regs(struct proc *p, struct reg *regs) +{ + TODO; + return (0); +} + +int +fill_fpregs(struct proc *p, struct fpreg *fpregs) +{ + TODO; + return (0); +} + +int +set_fpregs(struct proc *p, struct fpreg *fpregs) +{ + TODO; + return (0); +} diff --git a/sys/sparc64/sparc64/pmap.c b/sys/sparc64/sparc64/pmap.c new file mode 100644 index 0000000..bd22a07 --- /dev/null +++ b/sys/sparc64/sparc64/pmap.c @@ -0,0 +1,315 @@ +/*- + * Copyright (c) 2001 Jake Burkholder. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include <sys/param.h> +#include <sys/lock.h> +#include <sys/mutex.h> +#include <sys/systm.h> + +#include <vm/vm.h> +#include <vm/vm_param.h> +#include <vm/vm_kern.h> +#include <vm/vm_page.h> +#include <vm/vm_map.h> +#include <vm/vm_object.h> +#include <vm/vm_extern.h> +#include <vm/vm_pageout.h> +#include <vm/vm_pager.h> +#include <vm/vm_zone.h> + +struct msgbuf *msgbufp; + +vm_offset_t avail_start; +vm_offset_t avail_end; +vm_offset_t kernel_vm_end; +vm_offset_t phys_avail[10]; +vm_offset_t virtual_avail; +vm_offset_t virtual_end; + +struct pmap __kernel_pmap; + +static boolean_t pmap_initialized = FALSE; + +void +pmap_activate(struct proc *p) +{ + TODO; +} + +vm_offset_t +pmap_addr_hint(vm_object_t object, vm_offset_t va, vm_size_t size) +{ + TODO; + return (0); +} + +void +pmap_change_wiring(pmap_t pmap, vm_offset_t va, boolean_t wired) +{ + TODO; +} + +void +pmap_clear_modify(vm_page_t m) +{ + TODO; +} + +void +pmap_collect(void) +{ + TODO; +} + +void +pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vm_offset_t dst_addr, + vm_size_t len, vm_offset_t src_addr) +{ + TODO; +} + +void +pmap_copy_page(vm_offset_t src, vm_offset_t dst) +{ + TODO; +} + +void +pmap_zero_page(vm_offset_t pa) +{ + TODO; +} + +void +pmap_zero_page_area(vm_offset_t pa, int off, int size) +{ + TODO; +} + +void +pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, + boolean_t wired) +{ + TODO; +} + +vm_offset_t +pmap_extract(pmap_t pmap, vm_offset_t va) +{ + TODO; + return (0); +} + +void +pmap_growkernel(vm_offset_t addr) +{ + TODO; +} + +void +pmap_init(vm_offset_t phys_start, vm_offset_t phys_end) +{ + TODO; +} + +void +pmap_init2(void) +{ + TODO; +} + +boolean_t +pmap_is_modified(vm_page_t m) +{ + TODO; + return (0); +} + +void +pmap_clear_reference(vm_page_t m) +{ + TODO; +} + +int +pmap_ts_referenced(vm_page_t m) +{ + TODO; + return (0); +} + +void +pmap_kenter(vm_offset_t va, vm_offset_t pa) +{ + TODO; +} + +vm_offset_t +pmap_kextract(vm_offset_t va) +{ + TODO; + return (0); +} + +void +pmap_kremove(vm_offset_t va) +{ + TODO; +} + +vm_offset_t +pmap_map(vm_offset_t *va, vm_offset_t start, vm_offset_t end, int prot) +{ + TODO; + return (0); +} + +int +pmap_mincore(pmap_t pmap, vm_offset_t addr) +{ + TODO; + return (0); +} + +void +pmap_new_proc(struct proc *p) +{ + TODO; +} + +void +pmap_object_init_pt(pmap_t pmap, vm_offset_t addr, vm_object_t object, + vm_pindex_t pindex, vm_size_t size, int limit) +{ + TODO; +} + +void +pmap_page_protect(vm_page_t m, vm_prot_t prot) +{ + TODO; +} + +void +pmap_pageable(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, + boolean_t pageable) +{ + TODO; +} + +boolean_t +pmap_page_exists(pmap_t pmap, vm_page_t m) +{ + TODO; + return (0); +} + +void +pmap_pinit(pmap_t pmap) +{ + TODO; +} + +void +pmap_pinit0(pmap_t pmap) +{ + TODO; +} + +void +pmap_pinit2(pmap_t pmap) +{ + TODO; +} + +void +pmap_prefault(pmap_t pmap, vm_offset_t va, vm_map_entry_t entry) +{ + TODO; +} + +void +pmap_protect(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, vm_prot_t prot) +{ + TODO; +} + +vm_offset_t +pmap_phys_address(int ppn) +{ + TODO; + return (0); +} + +void +pmap_qenter(vm_offset_t va, vm_page_t *m, int count) +{ + TODO; +} + +void +pmap_qremove(vm_offset_t va, int count) +{ + TODO; +} + +void +pmap_reference(pmap_t pmap) +{ + TODO; +} + +void +pmap_release(pmap_t pmap) +{ + TODO; +} + +void +pmap_remove(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) +{ + TODO; +} + +void +pmap_remove_pages(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) +{ + TODO; +} + +void +pmap_swapin_proc(struct proc *p) +{ + TODO; +} + +void +pmap_swapout_proc(struct proc *p) +{ + TODO; +} diff --git a/sys/sparc64/sparc64/procfs_machdep.c b/sys/sparc64/sparc64/procfs_machdep.c new file mode 100644 index 0000000..f4ccd77 --- /dev/null +++ b/sys/sparc64/sparc64/procfs_machdep.c @@ -0,0 +1,150 @@ +/* + * Copyright (c) 1993 + * The Regents of the University of California. All rights reserved. + * Copyright (c) 1993 Jan-Simon Pendry + * + * This code is derived from software contributed to Berkeley by + * Jan-Simon Pendry. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)procfs_machdep.c 8.3 (Berkeley) 1/27/94 + * + * From: + * $FreeBSD$ + */ + +/* + * Functions to be implemented here are: + * + * procfs_read_regs(proc, regs) + * Get the current user-visible register set from the process + * and copy it into the regs structure (<machine/reg.h>). + * The process is stopped at the time read_regs is called. + * + * procfs_write_regs(proc, regs) + * Update the current register set from the passed in regs + * structure. Take care to avoid clobbering special CPU + * registers or privileged bits in the PSL. + * Depending on the architecture this may have fix-up work to do, + * especially if the IAR or PCW are modified. + * The process is stopped at the time write_regs is called. + * + * procfs_read_fpregs, procfs_write_fpregs + * deal with the floating point register set, otherwise as above. + * + * procfs_read_dbregs, procfs_write_dbregs + * deal with the processor debug register set, otherwise as above. + * + * procfs_sstep(proc) + * Arrange for the process to trap after executing a single instruction. + * + */ + +#include <sys/param.h> +#include <sys/systm.h> +#include <sys/lock.h> +#include <sys/mutex.h> +#include <sys/proc.h> +#include <sys/ptrace.h> +#include <sys/vnode.h> + +#include <machine/reg.h> +#include <machine/md_var.h> +#include <fs/procfs/procfs.h> + +#include <vm/vm.h> +#include <vm/pmap.h> +#include <vm/vm_map.h> + +#define PROCFS_ACTION(action) do { \ + int error; \ + \ + mtx_lock_spin(&sched_lock); \ + if ((p->p_sflag & PS_INMEM) == 0) \ + error = EIO; \ + else \ + error = (action); \ + mtx_unlock_spin(&sched_lock); \ + return (error); \ +} while(0) + +int +procfs_read_regs(struct proc *p, struct reg *regs) +{ + + PROCFS_ACTION(fill_regs(p, regs)); +} + +int +procfs_write_regs(struct proc *p, struct reg *regs) +{ + + PROCFS_ACTION(set_regs(p, regs)); +} + +int +procfs_read_dbregs(struct proc *p, struct dbreg *dbregs) +{ + + PROCFS_ACTION(fill_dbregs(p, dbregs)); +} + +int +procfs_write_dbregs(struct proc *p, struct dbreg *dbregs) +{ + + PROCFS_ACTION(set_dbregs(p, dbregs)); +} + +/* + * Ptrace doesn't support fpregs at all, and there are no security holes + * or translations for fpregs, so we can just copy them. + */ + +int +procfs_read_fpregs(struct proc *p, struct fpreg *fpregs) +{ + + PROCFS_ACTION(fill_fpregs(p, fpregs)); +} + +int +procfs_write_fpregs(struct proc *p, struct fpreg *fpregs) +{ + + PROCFS_ACTION(set_fpregs(p, fpregs)); +} + +int +procfs_sstep(struct proc *p) +{ + + PROCFS_ACTION(ptrace_single_step(p)); +} diff --git a/sys/sparc64/sparc64/sys_machdep.c b/sys/sparc64/sparc64/sys_machdep.c new file mode 100644 index 0000000..5e564fe --- /dev/null +++ b/sys/sparc64/sparc64/sys_machdep.c @@ -0,0 +1,45 @@ +/*- + * Copyright (c) 2001 Jake Burkholder. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include <sys/param.h> +#include <sys/proc.h> +#include <sys/sysproto.h> + +#ifndef _SYS_SYSPROTO_H_ +struct sysarch_args { + int op; + char *parms; +}; +#endif + +int +sysarch(struct proc *p, struct sysarch_args *uap) +{ + TODO; + return (0); +} diff --git a/sys/sparc64/sparc64/trap.c b/sys/sparc64/sparc64/trap.c new file mode 100644 index 0000000..78434a1 --- /dev/null +++ b/sys/sparc64/sparc64/trap.c @@ -0,0 +1,40 @@ +/*- + * Copyright (c) 2001 Jake Burkholder. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include <sys/param.h> +#include <sys/proc.h> + +#include <machine/frame.h> + +void trap(u_int type, struct trapframe *tf); + +void +trap(u_int type, struct trapframe *tf) +{ + TODO; +} diff --git a/sys/sparc64/sparc64/vm_machdep.c b/sys/sparc64/sparc64/vm_machdep.c new file mode 100644 index 0000000..e96db4c --- /dev/null +++ b/sys/sparc64/sparc64/vm_machdep.c @@ -0,0 +1,92 @@ +/*- + * Copyright (c) 2001 Jake Burkholder. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include <sys/param.h> +#include <sys/systm.h> +#include <sys/proc.h> +#include <sys/bio.h> +#include <sys/buf.h> + +#include <vm/vm.h> +#include <vm/vm_extern.h> + +#include <machine/md_var.h> + +void +cpu_exit(struct proc *p) +{ + TODO; +} + +void +cpu_fork(struct proc *p1, struct proc *p2, int flags) +{ + TODO; +} + +void +cpu_reset(void) +{ +} + +void +cpu_set_fork_handler(struct proc *p, void (*func)(void *), void *arg) +{ + TODO; +} + +void +cpu_wait(struct proc *p) +{ + TODO; +} + +void +swi_vm(void *v) +{ + TODO; +} + +int +vm_fault_quick(caddr_t v, int prot) +{ + TODO; + return (0); +} + +void +vmapbuf(struct buf *bp) +{ + TODO; +} + +void +vunmapbuf(struct buf *bp) +{ + TODO; +} |