summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Irofti <pirofti@cvs.openbsd.org>2011-07-04 23:29:09 +0000
committerPaul Irofti <pirofti@cvs.openbsd.org>2011-07-04 23:29:09 +0000
commit9c09c2a414dbd0601897559ec634f69332b5a5c3 (patch)
tree576596aa57df6c1b249465c5f8b5f2bb23dbe9b1
parent9b88d5a56b5df088ed28704cd5dbc84d34c65fce (diff)
Add ia64 kernel include files needed for userland.
Okay deraadt@, drahn@, kettenis@.
-rw-r--r--sys/arch/ia64/include/_types.h122
-rwxr-xr-xsys/arch/ia64/include/asm.h186
-rw-r--r--sys/arch/ia64/include/atomic.h10
-rw-r--r--sys/arch/ia64/include/cdefs.h24
-rw-r--r--sys/arch/ia64/include/endian.h15
-rw-r--r--sys/arch/ia64/include/exec.h17
-rw-r--r--sys/arch/ia64/include/float.h78
-rw-r--r--sys/arch/ia64/include/ieee.h142
-rw-r--r--sys/arch/ia64/include/ieeefp.h26
-rw-r--r--sys/arch/ia64/include/internal_types.h6
-rw-r--r--sys/arch/ia64/include/limits.h98
-rw-r--r--sys/arch/ia64/include/mutex.h50
-rw-r--r--sys/arch/ia64/include/param.h16
-rw-r--r--sys/arch/ia64/include/pcb.h9
-rw-r--r--sys/arch/ia64/include/pmap.h9
-rw-r--r--sys/arch/ia64/include/proc.h9
-rw-r--r--sys/arch/ia64/include/ptrace.h48
-rw-r--r--sys/arch/ia64/include/reg.h54
-rw-r--r--sys/arch/ia64/include/setjmp.h102
-rw-r--r--sys/arch/ia64/include/signal.h10
-rw-r--r--sys/arch/ia64/include/stdarg.h63
-rw-r--r--sys/arch/ia64/include/trap.h5
-rw-r--r--sys/arch/ia64/include/vmparam.h113
23 files changed, 1212 insertions, 0 deletions
diff --git a/sys/arch/ia64/include/_types.h b/sys/arch/ia64/include/_types.h
new file mode 100644
index 00000000000..7b98f445c1e
--- /dev/null
+++ b/sys/arch/ia64/include/_types.h
@@ -0,0 +1,122 @@
+/* $OpenBSD: _types.h,v 1.1 2011/07/04 23:29:08 pirofti Exp $ */
+
+/*-
+ * 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.
+ * 3. 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.
+ *
+ * @(#)types.h 8.3 (Berkeley) 1/5/94
+ * @(#)ansi.h 8.2 (Berkeley) 1/4/94
+ */
+
+#ifndef _MACHINE__TYPES_H_
+#define _MACHINE__TYPES_H_
+
+#if defined(_KERNEL)
+typedef struct label_t {
+ long val[8];
+} label_t;
+#endif
+
+/* 7.18.1.1 Exact-width integer types */
+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;
+/* LONGLONG */
+typedef long long __int64_t;
+/* LONGLONG */
+typedef unsigned long long __uint64_t;
+
+/* 7.18.1.2 Minimum-width integer types */
+typedef __int8_t __int_least8_t;
+typedef __uint8_t __uint_least8_t;
+typedef __int16_t __int_least16_t;
+typedef __uint16_t __uint_least16_t;
+typedef __int32_t __int_least32_t;
+typedef __uint32_t __uint_least32_t;
+typedef __int64_t __int_least64_t;
+typedef __uint64_t __uint_least64_t;
+
+/* 7.18.1.3 Fastest minimum-width integer types */
+typedef __int32_t __int_fast8_t;
+typedef __uint32_t __uint_fast8_t;
+typedef __int32_t __int_fast16_t;
+typedef __uint32_t __uint_fast16_t;
+typedef __int32_t __int_fast32_t;
+typedef __uint32_t __uint_fast32_t;
+typedef __int64_t __int_fast64_t;
+typedef __uint64_t __uint_fast64_t;
+
+/* 7.18.1.4 Integer types capable of holding object pointers */
+typedef long __intptr_t;
+typedef unsigned long __uintptr_t;
+
+/* 7.18.1.5 Greatest-width integer types */
+typedef __int64_t __intmax_t;
+typedef __uint64_t __uintmax_t;
+
+/* Register size */
+typedef long __register_t;
+
+/* VM system types */
+typedef unsigned long __vaddr_t;
+typedef unsigned long __paddr_t;
+typedef unsigned long __vsize_t;
+typedef unsigned long __psize_t;
+
+/* Standard system types */
+typedef int __clock_t;
+typedef int __clockid_t;
+typedef double __double_t;
+typedef float __float_t;
+typedef long long __off_t;
+typedef long __ptrdiff_t;
+typedef unsigned long __size_t;
+typedef long __ssize_t;
+typedef int __time_t;
+typedef int __timer_t;
+#if defined(__GNUC__) && __GNUC__ >= 3
+typedef __builtin_va_list __va_list;
+#else
+typedef char * __va_list;
+#endif
+
+/* Wide character support types */
+#ifndef __cplusplus
+typedef int __wchar_t;
+#endif
+typedef int __wint_t;
+typedef int __rune_t;
+typedef void * __wctrans_t;
+typedef void * __wctype_t;
+
+/* Feature test macros */
+#define __HAVE_TIMECOUNTER
+
+#endif /* _MACHINE__TYPES_H_ */
diff --git a/sys/arch/ia64/include/asm.h b/sys/arch/ia64/include/asm.h
new file mode 100755
index 00000000000..12ac3a46bf7
--- /dev/null
+++ b/sys/arch/ia64/include/asm.h
@@ -0,0 +1,186 @@
+/* $OpenBSD: asm.h,v 1.1 2011/07/04 23:29:08 pirofti Exp $ */
+/* $NetBSD: asm.h,v 1.4 2006/08/30 11:14:23 cherry Exp $ */
+
+/* -
+ * Copyright (c) 1991,1990,1989,1994,1995,1996 Carnegie Mellon University
+ * All Rights Reserved.
+ *
+ * Permission to use, copy, modify and distribute this software and its
+ * documentation is hereby granted, provided that both the copyright
+ * notice and this permission notice appear in all copies of the
+ * software, derivative works or modified versions, and any portions
+ * thereof, and that both notices appear in supporting documentation.
+ *
+ * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
+ * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
+ * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
+ *
+ * Carnegie Mellon requests users of this software to return to
+ *
+ * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
+ * School of Computer Science
+ * Carnegie Mellon University
+ * Pittsburgh PA 15213-3890
+ *
+ * any improvements or extensions that they make and grant Carnegie Mellon
+ * the rights to redistribute these changes.
+ */
+
+/*
+ * Assembly coding style
+ *
+ * This file contains macros and register defines to
+ * aid in writing more readable assembly code.
+ * Some rules to make assembly code understandable by
+ * a debugger are also noted.
+ */
+
+/*
+ * Macro to make a local label name.
+ */
+#define LLABEL(name,num) L ## name ## num
+
+/*
+ * MCOUNT
+ */
+#if defined(GPROF)
+#define MCOUNT \
+ alloc out0 = ar.pfs, 8, 0, 4, 0; \
+ mov out1 = r1; \
+ mov out2 = b0;; \
+ mov out3 = r0; \
+ br.call.sptk b0 = _mcount;;
+#else
+#define MCOUNT /* nothing */
+#endif
+
+/*
+ * ENTRY
+ * Declare a global leaf function.
+ * A leaf function does not call other functions.
+ */
+#define ENTRY(_name_, _n_args_) \
+ .global _name_; \
+ .align 16; \
+ .proc _name_; \
+_name_:; \
+ .regstk _n_args_, 0, 0, 0; \
+ MCOUNT
+
+#define ENTRY_NOPROFILE(_name_, _n_args_) \
+ .global _name_; \
+ .align 16; \
+ .proc _name_; \
+_name_:; \
+ .regstk _n_args_, 0, 0, 0
+
+/*
+ * STATIC_ENTRY
+ * Declare a local leaf function.
+ */
+#define STATIC_ENTRY(_name_, _n_args_) \
+ .align 16; \
+ .proc _name_; \
+_name_:; \
+ .regstk _n_args_, 0, 0, 0 \
+ MCOUNT
+/*
+ * XENTRY
+ * Global alias for a leaf function, or alternate entry point
+ */
+#define XENTRY(_name_) \
+ .globl _name_; \
+_name_:
+
+/*
+ * STATIC_XENTRY
+ * Local alias for a leaf function, or alternate entry point
+ */
+#define STATIC_XENTRY(_name_) \
+_name_:
+
+
+/*
+ * END
+ * Function delimiter
+ */
+#define END(_name_) \
+ .endp _name_
+
+
+/*
+ * EXPORT
+ * Export a symbol
+ */
+#define EXPORT(_name_) \
+ .global _name_; \
+_name_:
+
+
+/*
+ * IMPORT
+ * Make an external name visible, typecheck the size
+ */
+#define IMPORT(_name_, _size_) \
+ /* .extern _name_,_size_ */
+
+
+/*
+ * ABS
+ * Define an absolute symbol
+ */
+#define ABS(_name_, _value_) \
+ .globl _name_; \
+_name_ = _value_
+
+
+/*
+ * BSS
+ * Allocate un-initialized space for a global symbol
+ */
+#define BSS(_name_,_numbytes_) \
+ .comm _name_,_numbytes_
+
+
+/*
+ * MSG
+ * Allocate space for a message (a read-only ascii string)
+ */
+#define ASCIZ .asciz
+#define MSG(msg,reg,label) \
+ addl reg,@ltoff(label),gp;; \
+ ld8 reg=[reg];; \
+ .data; \
+label: ASCIZ msg; \
+ .text;
+
+
+/*
+ * System call glue.
+ */
+#define SYSCALLNUM(name) ___CONCAT(SYS_,name)
+
+#define CALLSYS_NOERROR(name) \
+{ .mmi ; \
+ alloc r9 = ar.pfs, 0, 0, 8, 0 ; \
+ mov r31 = ar.k5 ; \
+ mov r10 = b0 ;; } \
+{ .mib ; \
+ mov r8 = SYSCALLNUM(name) ; \
+ mov b7 = r31 ; \
+ br.call.sptk b0 = b7 ;; }
+
+
+/*
+ * WEAK_ALIAS: create a weak alias (ELF only).
+ */
+#define WEAK_ALIAS(alias,sym) \
+ .weak alias; \
+ alias = sym
+
+/*
+ * STRONG_ALIAS: create a strong alias.
+ */
+#define STRONG_ALIAS(alias,sym) \
+ .globl alias; \
+ alias = sym
diff --git a/sys/arch/ia64/include/atomic.h b/sys/arch/ia64/include/atomic.h
new file mode 100644
index 00000000000..fdb979875ec
--- /dev/null
+++ b/sys/arch/ia64/include/atomic.h
@@ -0,0 +1,10 @@
+/* $OpenBSD: atomic.h,v 1.1 2011/07/04 23:29:08 pirofti Exp $ */
+
+/*
+ * Written by Paul Irofti <pirofti@openbsd.org>. Public Domain.
+ */
+
+#ifndef _MACHINE_ATOMIC_H_
+#define _MACHINE_ATOMIC_H_
+
+#endif /* _MACHINE_ATOMIC_H_ */
diff --git a/sys/arch/ia64/include/cdefs.h b/sys/arch/ia64/include/cdefs.h
new file mode 100644
index 00000000000..20015b5ae66
--- /dev/null
+++ b/sys/arch/ia64/include/cdefs.h
@@ -0,0 +1,24 @@
+/* $OpenBSD: cdefs.h,v 1.1 2011/07/04 23:29:08 pirofti Exp $ */
+
+/*
+ * Written by J.T. Conklin <jtc@wimsey.com> 01/17/95.
+ * Public domain.
+ */
+
+#ifndef _MACHINE_CDEFS_H_
+#define _MACHINE_CDEFS_H_
+
+#if defined(lint)
+#define __indr_reference(sym,alias) __lint_equal__(sym,alias)
+#define __warn_references(sym,msg)
+#define __weak_alias(alias,sym) __lint_equal__(sym,alias)
+#elif defined(__GNUC__) && defined(__STDC__)
+#define __weak_alias(alias,sym) \
+ __asm__(".weak " __STRING(alias) " ; " __STRING(alias) \
+ " = " __STRING(sym))
+#define __warn_references(sym,msg) \
+ __asm__(".section .gnu.warning." __STRING(sym) \
+ " ; .ascii \"" msg "\" ; .text")
+#endif
+
+#endif /* !_MACHINE_CDEFS_H_ */
diff --git a/sys/arch/ia64/include/endian.h b/sys/arch/ia64/include/endian.h
new file mode 100644
index 00000000000..bb775dbe727
--- /dev/null
+++ b/sys/arch/ia64/include/endian.h
@@ -0,0 +1,15 @@
+/* $OpenBSD: endian.h,v 1.1 2011/07/04 23:29:08 pirofti Exp $ */
+
+/*
+ * Written by Paul Irofti <pirofti@openbsd.org>. Public Domain.
+ */
+
+#ifndef _MACHINE_ENDIAN_H_
+#define _MACHINE_ENDIAN_H_
+
+#define __STRICT_ALIGNMENT
+
+#define _BYTE_ORDER _LITTLE_ENDIAN
+#include <sys/endian.h>
+
+#endif /* _MACHINE_ENDIAN_H_ */
diff --git a/sys/arch/ia64/include/exec.h b/sys/arch/ia64/include/exec.h
new file mode 100644
index 00000000000..d08a436f4f5
--- /dev/null
+++ b/sys/arch/ia64/include/exec.h
@@ -0,0 +1,17 @@
+/* $OpenBSD: exec.h,v 1.1 2011/07/04 23:29:08 pirofti Exp $ */
+
+/*
+ * Written by Paul Irofti <pirofti@openbsd.org>. Public Domain.
+ */
+
+#ifndef _IA64_EXEC_H_
+#define _IA64_EXEC_H_
+
+#define NATIVE_EXEC_ELF
+
+#define ARCH_ELFSIZE 64
+
+#define _NLIST_DO_ELF
+#define _KERN_DO_ELF64
+
+#endif
diff --git a/sys/arch/ia64/include/float.h b/sys/arch/ia64/include/float.h
new file mode 100644
index 00000000000..f1d3e96d6a9
--- /dev/null
+++ b/sys/arch/ia64/include/float.h
@@ -0,0 +1,78 @@
+/* $OpenBSD: float.h,v 1.1 2011/07/04 23:29:08 pirofti Exp $ */
+/* $NetBSD: float.h,v 1.8 1995/06/20 20:45:37 jtc Exp $ */
+
+/*
+ * Copyright (c) 1989 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.
+ * 3. 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.
+ *
+ * @(#)float.h 7.1 (Berkeley) 5/8/90
+ */
+
+#ifndef _IA64_FLOAT_H_
+#define _IA64_FLOAT_H_
+
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+int __flt_rounds(void);
+__END_DECLS
+
+#define FLT_RADIX 2 /* b */
+#define FLT_ROUNDS __flt_rounds()
+#define FLT_EVAL_METHOD 0 /* no promotions */
+
+#define FLT_MANT_DIG 24 /* p */
+#define FLT_EPSILON 1.19209290E-07F /* b**(1-p) */
+#define FLT_DIG 6 /* floor((p-1)*log10(b))+(b == 10) */
+#define FLT_MIN_EXP (-125) /* emin */
+#define FLT_MIN 1.17549435E-38F /* b**(emin-1) */
+#define FLT_MIN_10_EXP (-37) /* ceil(log10(b**(emin-1))) */
+#define FLT_MAX_EXP 128 /* emax */
+#define FLT_MAX 3.40282347E+38F /* (1-b**(-p))*b**emax */
+#define FLT_MAX_10_EXP 38 /* floor(log10((1-b**(-p))*b**emax)) */
+
+#define DBL_MANT_DIG 53
+#define DBL_EPSILON 2.2204460492503131E-16
+#define DBL_DIG 15
+#define DBL_MIN_EXP (-1021)
+#define DBL_MIN 2.2250738585072014E-308
+#define DBL_MIN_10_EXP (-307)
+#define DBL_MAX_EXP 1024
+#define DBL_MAX 1.7976931348623157E+308
+#define DBL_MAX_10_EXP 308
+
+#define LDBL_MANT_DIG 64
+#define LDBL_EPSILON 1.08420217248550443401e-19L
+#define LDBL_DIG 18
+#define LDBL_MIN_EXP (-16381)
+#define LDBL_MIN 3.36210314311209350626e-4932L
+#define LDBL_MIN_10_EXP (-4931)
+#define LDBL_MAX_EXP 16384
+#define LDBL_MAX 1.18973149535723176502e+4932L
+#define LDBL_MAX_10_EXP 4932
+
+#endif /* _IA64_FLOAT_H_ */
diff --git a/sys/arch/ia64/include/ieee.h b/sys/arch/ia64/include/ieee.h
new file mode 100644
index 00000000000..815018b1bfe
--- /dev/null
+++ b/sys/arch/ia64/include/ieee.h
@@ -0,0 +1,142 @@
+/* $OpenBSD: ieee.h,v 1.1 2011/07/04 23:29:08 pirofti Exp $ */
+/* $NetBSD: ieee.h,v 1.1 1996/09/30 16:34:25 ws Exp $ */
+
+/*
+ * 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.
+ * 3. 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.
+ *
+ * @(#)ieee.h 8.1 (Berkeley) 6/11/93
+ */
+
+/*
+ * ieee.h defines the machine-dependent layout of the machine's IEEE
+ * floating point. It does *not* define (yet?) any of the rounding
+ * mode bits, exceptions, and so forth.
+ */
+
+/*
+ * Define the number of bits in each fraction and exponent.
+ *
+ * k k+1
+ * Note that 1.0 x 2 == 0.1 x 2 and that denorms are represented
+ *
+ * (-exp_bias+1)
+ * as fractions that look like 0.fffff x 2 . This means that
+ *
+ * -126
+ * the number 0.10000 x 2 , for instance, is the same as the normalized
+ *
+ * -127 -128
+ * float 1.0 x 2 . Thus, to represent 2 , we need one leading zero
+ *
+ * -129
+ * in the fraction; to represent 2 , we need two, and so on. This
+ *
+ * (-exp_bias-fracbits+1)
+ * implies that the smallest denormalized number is 2
+ *
+ * for whichever format we are talking about: for single precision, for
+ *
+ * -126 -149
+ * instance, we get .00000000000000000000001 x 2 , or 1.0 x 2 , and
+ *
+ * -149 == -127 - 23 + 1.
+ */
+#define SNG_EXPBITS 8
+#define SNG_FRACBITS 23
+
+#define DBL_EXPBITS 11
+#define DBL_FRACHBITS 20
+#define DBL_FRACLBITS 32
+#define DBL_FRACBITS 52
+
+#define EXT_EXPBITS 15
+#define EXT_FRACHBITS 32
+#define EXT_FRACLBITS 32
+#define EXT_FRACBITS 64
+
+#define EXT_TO_ARRAY32(p, a) do { \
+ (a)[0] = (uint32_t)(p)->ext_fracl; \
+ (a)[1] = (uint32_t)(p)->ext_frach; \
+} while(0)
+
+struct ieee_single {
+ u_int sng_frac:23;
+ u_int sng_exp:8;
+ u_int sng_sign:1;
+};
+
+struct ieee_double {
+ u_int dbl_fracl;
+ u_int dbl_frach:20;
+ u_int dbl_exp:11;
+ u_int dbl_sign:1;
+};
+
+struct ieee_ext {
+ u_int ext_fracl;
+ u_int ext_frach;
+ u_int ext_exp:15;
+ u_int ext_sign:1;
+ u_int ext_padl:16;
+ u_int ext_padh;
+};
+
+/*
+ * Floats whose exponent is in [1..INFNAN) (of whatever type) are
+ * `normal'. Floats whose exponent is INFNAN are either Inf or NaN.
+ * Floats whose exponent is zero are either zero (iff all fraction
+ * bits are zero) or subnormal values.
+ *
+ * A NaN is a `signalling NaN' if its QUIETNAN bit is clear in its
+ * high fraction; if the bit is set, it is a `quiet NaN'.
+ */
+#define SNG_EXP_INFNAN 255
+#define DBL_EXP_INFNAN 2047
+#define EXT_EXP_INFNAN 32767
+
+#if 0
+#define SNG_QUIETNAN (1 << 22)
+#define DBL_QUIETNAN (1 << 19)
+#define EXT_QUIETNAN (1 << 15)
+#endif
+
+/*
+ * Exponent biases.
+ */
+#define SNG_EXP_BIAS 127
+#define DBL_EXP_BIAS 1023
+#define EXT_EXP_BIAS 16383
diff --git a/sys/arch/ia64/include/ieeefp.h b/sys/arch/ia64/include/ieeefp.h
new file mode 100644
index 00000000000..e7c79b6f126
--- /dev/null
+++ b/sys/arch/ia64/include/ieeefp.h
@@ -0,0 +1,26 @@
+/* $OpenBSD: ieeefp.h,v 1.1 2011/07/04 23:29:08 pirofti Exp $ */
+
+/*
+ * Written by J.T. Conklin, Apr 6, 1995
+ * Public domain.
+ */
+
+#ifndef _IA64_IEEEFP_H_
+#define _IA64_IEEEFP_H_
+
+typedef int fp_except;
+#define FP_X_INV 0x01 /* invalid operation exception */
+#define FP_X_DNML 0x02 /* denormalization exception */
+#define FP_X_DZ 0x04 /* divide-by-zero exception */
+#define FP_X_OFL 0x08 /* overflow exception */
+#define FP_X_UFL 0x10 /* underflow exception */
+#define FP_X_IMP 0x20 /* imprecise (loss of precision) */
+
+typedef enum {
+ FP_RN=0, /* round to nearest representable number */
+ FP_RM=1, /* round toward negative infinity */
+ FP_RP=2, /* round toward positive infinity */
+ FP_RZ=3 /* round to zero (truncate) */
+} fp_rnd;
+
+#endif /* _IA64_IEEEFP_H_ */
diff --git a/sys/arch/ia64/include/internal_types.h b/sys/arch/ia64/include/internal_types.h
new file mode 100644
index 00000000000..c305ca38de6
--- /dev/null
+++ b/sys/arch/ia64/include/internal_types.h
@@ -0,0 +1,6 @@
+/* $OpenBSD: internal_types.h,v 1.1 2011/07/04 23:29:08 pirofti Exp $ */
+/* Public domain */
+#ifndef _MACHINE_INTERNAL_TYPES_H_
+#define _MACHINE_INTERNAL_TYPES_H_
+
+#endif
diff --git a/sys/arch/ia64/include/limits.h b/sys/arch/ia64/include/limits.h
new file mode 100644
index 00000000000..c5542ca3def
--- /dev/null
+++ b/sys/arch/ia64/include/limits.h
@@ -0,0 +1,98 @@
+/* $OpenBSD: limits.h,v 1.1 2011/07/04 23:29:08 pirofti Exp $ */
+/* $NetBSD: limits.h,v 1.5 2010/06/07 13:52:31 tnozaki Exp $ */
+
+/*
+ * Copyright (c) 1988 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.
+ * 3. 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.
+ *
+ * @(#)limits.h 7.2 (Berkeley) 6/28/90
+ */
+
+#ifndef _MACHINE_LIMITS_H_
+#define _MACHINE_LIMITS_H_
+
+#define CHAR_BIT 8 /* number of bits in a char */
+
+#define SCHAR_MIN (-0x7f-1) /* max value for a signed char */
+#define SCHAR_MAX 0x7f /* min value for a signed char */
+
+#define UCHAR_MAX 0xff /* 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 0xffff /* 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 value for an unsigned long */
+#define LONG_MAX 0x7fffffffffffffffL /* max value for a long */
+#define LONG_MIN (-0x7fffffffffffffffL-1) /* min value for a long */
+
+
+#if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
+ defined(_NETBSD_SOURCE)
+#define SSIZE_MAX LONG_MAX /* max value for a ssize_t */
+
+#if defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L || \
+ defined(_NETBSD_SOURCE)
+#define ULLONG_MAX 0xffffffffffffffffULL /* max unsigned long long */
+#define LLONG_MAX 0x7fffffffffffffffLL /* max signed long long */
+#define LLONG_MIN (-0x7fffffffffffffffLL-1) /* min signed long long */
+#endif
+
+#if defined(_NETBSD_SOURCE)
+#define SIZE_T_MAX ULONG_MAX /* max value for a size_t */
+
+/* GCC requires that quad constants be written as expressions. */
+#define UQUAD_MAX ((u_quad_t)0-1) /* max value for a uquad_t */
+ /* max value for a quad_t */
+#define QUAD_MAX ((quad_t)(UQUAD_MAX >> 1))
+#define QUAD_MIN (-QUAD_MAX-1) /* min value for a quad_t */
+
+#endif /* _NETBSD_SOURCE */
+#endif /* _POSIX_C_SOURCE || _XOPEN_SOURCE || _NETBSD_SOURCE */
+
+#if defined(_XOPEN_SOURCE) || defined(_NETBSD_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 /* _XOPEN_SOURCE || _NETBSD_SOURCE */
+
+
+
+#endif /* _MACHINE_LIMITS_H_ */
diff --git a/sys/arch/ia64/include/mutex.h b/sys/arch/ia64/include/mutex.h
new file mode 100644
index 00000000000..f035892c210
--- /dev/null
+++ b/sys/arch/ia64/include/mutex.h
@@ -0,0 +1,50 @@
+/* $OpenBSD: mutex.h,v 1.1 2011/07/04 23:29:08 pirofti Exp $ */
+
+/*
+ * Copyright (c) 2004 Artur Grabowski <art@openbsd.org>
+ * 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. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED ``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 AUTHOR 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 _IA64_MUTEX_H_
+#define _IA64_MUTEX_H_
+
+struct mutex {
+ int mtx_wantipl;
+ int mtx_oldipl;
+ __volatile void *mtx_owner;
+};
+
+#define MUTEX_INITIALIZER(ipl) { (ipl), 0, NULL }
+
+#define MUTEX_ASSERT_LOCKED(mtx) do { \
+ if ((mtx)->mtx_owner != curcpu()) \
+ panic("mutex %p not held in %s", (mtx), __func__); \
+} while (0)
+
+#define MUTEX_ASSERT_UNLOCKED(mtx) do { \
+ if ((mtx)->mtx_owner == curcpu()) \
+ panic("mutex %p held in %s", (mtx), __func__); \
+} while (0)
+
+#define MUTEX_OLDIPL(mtx) (mtx)->mtx_oldipl
+
+#endif
diff --git a/sys/arch/ia64/include/param.h b/sys/arch/ia64/include/param.h
new file mode 100644
index 00000000000..cb69567d3b0
--- /dev/null
+++ b/sys/arch/ia64/include/param.h
@@ -0,0 +1,16 @@
+/* $OpenBSD: param.h,v 1.1 2011/07/04 23:29:08 pirofti Exp $ */
+
+/*
+ * Written by Paul Irofti <pirofti@openbsd.org>. Public Domain.
+ */
+
+#ifndef _IA64_PARAM_H_
+#define _IA64_PARAM_H_
+
+#define _MACHINE ia64
+#define MACHINE "ia64"
+#define _MACHINE_ARCH ia64
+#define MACHINE_ARCH "ia64"
+#define MID_MACHINE MID_IA64
+
+#endif /* _IA64_PARAM_H_ */
diff --git a/sys/arch/ia64/include/pcb.h b/sys/arch/ia64/include/pcb.h
new file mode 100644
index 00000000000..8db08ada7fa
--- /dev/null
+++ b/sys/arch/ia64/include/pcb.h
@@ -0,0 +1,9 @@
+/* $OpenBSD: pcb.h,v 1.1 2011/07/04 23:29:08 pirofti Exp $ */
+
+/*
+ * Public Domain.
+ */
+#ifndef _MACHINE_PCB_H_
+#define _MACHINE_PCB_H_
+
+#endif /* _MACHINE_PCB_H_ */
diff --git a/sys/arch/ia64/include/pmap.h b/sys/arch/ia64/include/pmap.h
new file mode 100644
index 00000000000..f7d61510a0c
--- /dev/null
+++ b/sys/arch/ia64/include/pmap.h
@@ -0,0 +1,9 @@
+/* $OpenBSD: pmap.h,v 1.1 2011/07/04 23:29:08 pirofti Exp $ */
+
+/*
+ * Public Domain.
+ */
+#ifndef _MACHINE_PMAP_H_
+#define _MACHINE_PMAP_H_
+
+#endif /* _MACHINE_PMAP_H_ */
diff --git a/sys/arch/ia64/include/proc.h b/sys/arch/ia64/include/proc.h
new file mode 100644
index 00000000000..311f1bb1889
--- /dev/null
+++ b/sys/arch/ia64/include/proc.h
@@ -0,0 +1,9 @@
+/* $OpenBSD: proc.h,v 1.1 2011/07/04 23:29:08 pirofti Exp $ */
+
+/*
+ * Public Domain.
+ */
+#ifndef _MACHINE_PROC_H_
+#define _MACHINE_PROC_H_
+
+#endif /* _MACHINE_PROC_H_ */
diff --git a/sys/arch/ia64/include/ptrace.h b/sys/arch/ia64/include/ptrace.h
new file mode 100644
index 00000000000..561034849a2
--- /dev/null
+++ b/sys/arch/ia64/include/ptrace.h
@@ -0,0 +1,48 @@
+/* $OpenBSD: ptrace.h,v 1.1 2011/07/04 23:29:08 pirofti Exp $ */
+/* $NetBSD: ptrace.h,v 1.2 2008/01/25 12:03:36 skrll Exp $ */
+
+/*
+ * Copyright (c) 1994 Christopher G. Demetriou
+ * 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.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by Christopher G. Demetriou.
+ * 4. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ */
+
+/*
+ * IA64 dependent ptrace definitions.
+ */
+#define PT_STEP (PT_FIRSTMACH + 0)
+#define PT_GETREGS (PT_FIRSTMACH + 1)
+#define PT_SETREGS (PT_FIRSTMACH + 2)
+#define PT_GETFPREGS (PT_FIRSTMACH + 3)
+#define PT_SETFPREGS (PT_FIRSTMACH + 4)
+
+#define PT_MACHDEP_STRINGS \
+ "PT_STEP", \
+ "PT_GETREGS", \
+ "PT_SETREGS", \
+ "PT_GETFPREGS", \
+ "PT_SETFPREGS",
diff --git a/sys/arch/ia64/include/reg.h b/sys/arch/ia64/include/reg.h
new file mode 100644
index 00000000000..f715c90ad78
--- /dev/null
+++ b/sys/arch/ia64/include/reg.h
@@ -0,0 +1,54 @@
+/* $OpenBSD: reg.h,v 1.1 2011/07/04 23:29:08 pirofti Exp $ */
+/* $NetBSD: reg.h,v 1.1 2006/04/07 14:21:18 cherry Exp $ */
+
+/*-
+ * Copyright (c) 2000 Doug Rabson
+ * 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 AUTHOR 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 AUTHOR 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 _IA64_REG_H_
+#define _IA64_REG_H_
+
+#include <machine/_regset.h>
+
+struct reg {
+ struct _special r_special;
+ struct _callee_saved r_preserved;
+ struct _caller_saved r_scratch;
+};
+
+struct fpreg {
+ struct _callee_saved_fp fpr_preserved;
+ struct _caller_saved_fp fpr_scratch;
+ struct _high_fp fpr_high;
+};
+
+struct dbreg {
+ unsigned long dbr_data[8];
+ unsigned long dbr_inst[8];
+};
+
+#endif /* _IA64_REG_H_ */
diff --git a/sys/arch/ia64/include/setjmp.h b/sys/arch/ia64/include/setjmp.h
new file mode 100644
index 00000000000..b05ba5dcfdf
--- /dev/null
+++ b/sys/arch/ia64/include/setjmp.h
@@ -0,0 +1,102 @@
+/* $OpenBSD: setjmp.h,v 1.1 2011/07/04 23:29:08 pirofti Exp $ */
+/* $NetBSD: setjmp.h,v 1.2 2006/09/10 21:16:56 cherry Exp $ */
+
+/*-
+ * Copyright (c) 2000
+ * Intel Corporation.
+ * 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.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ *
+ * This product includes software developed by Intel Corporation and
+ * its contributors.
+ *
+ * 4. Neither the name of Intel Corporation or its contributors may be
+ * used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION 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 INTEL CORPORATION 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: src/sys/ia64/include/setjmp.h,v 1.12 2003/07/26 08:03:43 marcel Exp $
+ */
+
+#ifndef _MACHINE_SETJMP_H_
+#define _MACHINE_SETJMP_H_
+
+#include <sys/cdefs.h>
+
+#define JMPBUF_ADDR_OF(buf, item) ((unsigned long)((char *)buf + item))
+
+#define J_UNAT 0
+#define J_NATS 0x8
+#define J_PFS 0x10
+#define J_BSP 0x18
+#define J_RNAT 0x20
+#define J_PREDS 0x28
+#define J_LC 0x30
+#define J_R4 0x38
+#define J_R5 0x40
+#define J_R6 0x48
+#define J_R7 0x50
+#define J_SP 0x58
+#define J_F2 0x60
+#define J_F3 0x70
+#define J_F4 0x80
+#define J_F5 0x90
+#define J_F16 0xa0
+#define J_F17 0xb0
+#define J_F18 0xc0
+#define J_F19 0xd0
+#define J_F20 0xe0
+#define J_F21 0xf0
+#define J_F22 0x100
+#define J_F23 0x110
+#define J_F24 0x120
+#define J_F25 0x130
+#define J_F26 0x140
+#define J_F27 0x150
+#define J_F28 0x160
+#define J_F29 0x170
+#define J_F30 0x180
+#define J_F31 0x190
+#define J_FPSR 0x1a0
+#define J_B0 0x1a8
+#define J_B1 0x1b0
+#define J_B2 0x1b8
+#define J_B3 0x1c0
+#define J_B4 0x1c8
+#define J_B5 0x1d0
+#define J_SIGMASK 0x1d8
+#define J_SIGSET 0x1e0
+
+#define _JBLEN 0x200 /* Size in long XXX: Set to sizeof(mcontext_t)/sizeof(long) */
+
+#ifdef _KERNEL
+#ifdef CTASSERT
+CTASSERT(sizeof(struct _jmp_buf) == 512);
+#endif
+#endif
+
+#endif /* !_MACHINE_SETJMP_H_ */
diff --git a/sys/arch/ia64/include/signal.h b/sys/arch/ia64/include/signal.h
new file mode 100644
index 00000000000..3554e903492
--- /dev/null
+++ b/sys/arch/ia64/include/signal.h
@@ -0,0 +1,10 @@
+/* $OpenBSD: signal.h,v 1.1 2011/07/04 23:29:08 pirofti Exp $ */
+
+/*
+ * Public Domain.
+ */
+
+#ifndef _MACHINE_SIGNAL_H_
+#define _MACHINE_SIGNAL_H_
+
+#endif /* _MACHINE_SIGNAL_H_ */
diff --git a/sys/arch/ia64/include/stdarg.h b/sys/arch/ia64/include/stdarg.h
new file mode 100644
index 00000000000..2d05090e89e
--- /dev/null
+++ b/sys/arch/ia64/include/stdarg.h
@@ -0,0 +1,63 @@
+/* $OpenBSD: stdarg.h,v 1.1 2011/07/04 23:29:08 pirofti Exp $ */
+/* $NetBSD: stdarg.h,v 1.2 2003/04/28 23:16:17 bjh21 Exp $ */
+
+/*-
+ * Copyright (c) 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.
+ * 3. 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.
+ *
+ * @(#)stdarg.h 8.1 (Berkeley) 6/10/93
+ */
+
+#ifndef _IA64_STDARG_H_
+#define _IA64_STDARG_H_
+
+#include <sys/cdefs.h>
+#include <machine/_types.h> /* for __va_list */
+
+/*
+ * NOTE: this file is only used by lint and non-GNU compilers
+ */
+
+typedef __va_list va_list;
+
+#define __va_size(type) \
+ (((sizeof(type) + sizeof(long) - 1) / sizeof(long)) * sizeof(long))
+
+#ifdef lint
+#define va_start(ap,lastarg) ((ap) = (ap))
+#define __va_copy(dst, src) ((dst) = (src))
+#else
+#define va_start(ap, last) \
+ ((ap) = (va_list)&(last) + __va_size(last))
+#endif /* lint */
+
+#define va_arg(ap, type) \
+ (*(type *)((ap) += __va_size(type), (ap) - __va_size(type)))
+
+#define va_end(ap)
+
+#endif /* !_IA64_STDARG_H_ */
diff --git a/sys/arch/ia64/include/trap.h b/sys/arch/ia64/include/trap.h
new file mode 100644
index 00000000000..d3467a2bb6c
--- /dev/null
+++ b/sys/arch/ia64/include/trap.h
@@ -0,0 +1,5 @@
+/* $OpenBSD: trap.h,v 1.1 2011/07/04 23:29:08 pirofti Exp $ */
+
+/*
+ * Public Domain.
+ */
diff --git a/sys/arch/ia64/include/vmparam.h b/sys/arch/ia64/include/vmparam.h
new file mode 100644
index 00000000000..a872afa14d4
--- /dev/null
+++ b/sys/arch/ia64/include/vmparam.h
@@ -0,0 +1,113 @@
+/* $OpenBSD: vmparam.h,v 1.1 2011/07/04 23:29:08 pirofti Exp $ */
+/* $NetBSD: vmparam.h,v 1.7 2010/11/14 13:33:22 uebayasi Exp $ */
+
+/*-
+ * 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.
+ * 3. 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.
+ *
+ * @(#)vmparam.h 5.9 (Berkeley) 5/12/91
+ */
+
+#ifndef _VMPARAM_H_
+#define _VMPARAM_H_
+
+#include <sys/tree.h>
+
+#define USRSTACK VM_MAX_ADDRESS /* XXX: Revisit vm address space. */
+
+/*
+ * Virtual memory related constants, all in bytes
+ */
+#ifndef MAXTSIZ
+#define MAXTSIZ (1<<30) /* max text size (1G) */
+#endif
+#ifndef DFLDSIZ
+#define DFLDSIZ (1<<27) /* initial data size (128M) */
+#endif
+#ifndef MAXDSIZ
+#define MAXDSIZ (1<<30) /* max data size (1G) */
+#endif
+#ifndef DFLSSIZ
+#define DFLSSIZ (1<<21) /* initial stack size (2M) */
+#endif
+#ifndef MAXSSIZ
+#define MAXSSIZ (1<<28) /* max stack size (256M) */
+#endif
+#ifndef SGROWSIZ
+#define SGROWSIZ (128UL*1024) /* amount to grow stack */
+#endif
+
+
+
+/*
+ * PTEs for mapping user space into the kernel for phyio operations.
+ * 64 pte's are enough to cover 8 disks * MAXBSIZE.
+ */
+#ifndef USRIOSIZE
+#define USRIOSIZE 64
+#endif
+
+/*
+ * Manipulating region bits of an address.
+ */
+#define IA64_RR_BASE(n) (((uint64_t) (n)) << 61)
+#define IA64_RR_MASK(x) ((x) & ((1L << 61) - 1))
+
+#define IA64_PHYS_TO_RR6(x) ((x) | IA64_RR_BASE(6))
+#define IA64_PHYS_TO_RR7(x) ((x) | IA64_RR_BASE(7))
+
+#define IA64_ID_PAGE_SHIFT 28 /* 256M */
+#define IA64_ID_PAGE_SIZE (1 << IA64_ID_PAGE_SHIFT)
+#define IA64_ID_PAGE_MASK (IA64_ID_PAGE_SIZE-1)
+
+#define IA64_BACKINGSTORE IA64_RR_BASE(4)
+
+#define PAGE_SHIFT 14 /* 16K pages by default. */
+#define PAGE_SIZE (1 << PAGE_SHIFT)
+#define PAGE_MASK (PAGE_SIZE - 1)
+
+/* user/kernel map constants */
+#define VM_MIN_ADDRESS ((vaddr_t)0)
+#define VM_MAX_ADDRESS ((vaddr_t) IA64_RR_BASE(5))
+#define VM_GATEWAY_SIZE PAGE_SIZE
+#define VM_MAXUSER_ADDRESS (VM_MAX_ADDRESS + VM_GATEWAY_SIZE)
+#define VM_MIN_KERNEL_ADDRESS VM_MAXUSER_ADDRESS
+#define VM_MAX_KERNEL_ADDRESS ((vaddr_t) (IA64_RR_BASE(6) - 1))
+
+#define VM_PHYSSEG_MAX 16 /* XXX: */
+#define VM_PHYSSEG_STRAT VM_PSTRAT_BSEARCH
+
+#define VM_NFREELIST 1 /* XXX: */
+#define VM_FREELIST_DEFAULT 0 /* XXX: */
+
+/* virtual sizes (bytes) for various kernel submaps */
+#define VM_PHYS_SIZE (USRIOSIZE*PAGE_SIZE)
+
+#endif /* _VMPARAM_H_ */