xref: /netbsd/sys/arch/ia64/ia64/genassym.cf (revision 6550d01e)
1#	$NetBSD: genassym.cf,v 1.9 2010/12/20 00:25:35 matt Exp $
2
3#
4# Copyright (c) 1998 The NetBSD Foundation, Inc.
5# All rights reserved.
6#
7# This code is derived from software contributed to The NetBSD Foundation
8# by Charles M. Hannum.
9#
10# Redistribution and use in source and binary forms, with or without
11# modification, are permitted provided that the following conditions
12# are met:
13# 1. Redistributions of source code must retain the above copyright
14#    notice, this list of conditions and the following disclaimer.
15# 2. Redistributions in binary form must reproduce the above copyright
16#    notice, this list of conditions and the following disclaimer in the
17#    documentation and/or other materials provided with the distribution.
18#
19# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
20# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22# PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29# POSSIBILITY OF SUCH DAMAGE.
30#
31
32#
33# Copyright (c) 1982, 1990 The Regents of the University of California.
34# All rights reserved.
35#
36# This code is derived from software contributed to Berkeley by
37# William Jolitz.
38#
39# Redistribution and use in source and binary forms, with or without
40# modification, are permitted provided that the following conditions
41# are met:
42# 1. Redistributions of source code must retain the above copyright
43#    notice, this list of conditions and the following disclaimer.
44# 2. Redistributions in binary form must reproduce the above copyright
45#    notice, this list of conditions and the following disclaimer in the
46#    documentation and/or other materials provided with the distribution.
47# 3. Neither the name of the University nor the names of its contributors
48#    may be used to endorse or promote products derived from this software
49#    without specific prior written permission.
50#
51# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
52# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
53# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
54# ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
55# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
56# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
57# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
58# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
59# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
60# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
61# SUCH DAMAGE.
62#
63#	@(#)genassym.c	5.11 (Berkeley) 5/10/91
64#
65
66if defined(_KERNEL_OPT)
67include "opt_compat_freebsd.h"
68include "opt_compat_linux.h"
69include "opt_multiprocessor.h"
70endif
71
72include <sys/param.h>
73include <sys/proc.h>
74include <sys/resourcevar.h>
75include <sys/device.h>
76include <sys/mbuf.h>
77include <sys/exec_elf.h>
78include <sys/ucontext.h>
79
80include <netinet/in.h>
81include <netinet/in_systm.h>
82include <netinet/ip.h>
83include <netinet/ip6.h>
84include <netinet/ip_var.h>
85
86include <uvm/uvm.h>
87
88include <machine/pmap.h>
89include <machine/vmparam.h>
90include <machine/intr.h>
91include <machine/frame.h>
92include <machine/types.h>
93
94ifdef COMPAT_LINUX
95include <compat/linux/common/linux_signal.h>
96include <compat/linux/common/linux_machdep.h>
97endif
98
99ifdef COMPAT_FREEBSD
100include <machine/freebsd_machdep.h>
101endif
102
103ifdef COMPAT_IA32
104
105endif
106
107ifdef MULTIPROCESSOR
108include <machine/cpu.h>
109endif
110
111define	DT_NULL			DT_NULL
112define	DT_RELA			DT_RELA
113define	DT_RELAENT		DT_RELAENT
114define	DT_RELASZ		DT_RELASZ
115define	DT_SYMTAB		DT_SYMTAB
116define	DT_SYMENT		DT_SYMENT
117
118
119define	LSRUN			LSRUN
120define	LSONPROC		LSONPROC
121
122# errno values
123define	ENAMETOOLONG		ENAMETOOLONG
124define	EFAULT			EFAULT
125
126# Important offsets into the lwp and proc structs & associated constants
127define	L_PCB			offsetof(struct lwp, l_addr)
128define	L_PRIORITY		offsetof(struct lwp, l_priority)
129define	L_STAT			offsetof(struct lwp, l_stat)
130define	L_WCHAN			offsetof(struct lwp, l_wchan)
131define	L_PROC			offsetof(struct lwp, l_proc)
132define	L_CPU			offsetof(struct lwp, l_cpu)
133define	P_FLAG			offsetof(struct proc, p_flag)
134define	P_RASLIST		offsetof(struct proc, p_raslist)
135
136define	PK_SYSTEM		PK_SYSTEM
137
138define	M_DATA			offsetof(struct mbuf, m_data)
139define	M_LEN			offsetof(struct mbuf, m_len)
140define	M_NEXT			offsetof(struct mbuf, m_next)
141
142define	IP_SRC			offsetof(struct ip, ip_src)
143define	IP_DST			offsetof(struct ip, ip_dst)
144
145define	IP6_SRC			offsetof(struct ip6_hdr, ip6_src)
146define	IP6_DST			offsetof(struct ip6_hdr, ip6_dst)
147
148define	CI_NTRAP		offsetof(struct cpu_info, ci_data.cpu_ntrap)
149define	CI_NINTR		offsetof(struct cpu_info, ci_data.cpu_nintr)
150
151define  SIZEOF_PCB		sizeof(struct pcb)
152define  SIZEOF_TRAPFRAME	sizeof(struct trapframe)
153define	SIZEOF_SPECIAL		sizeof(struct _special)
154
155define	MC_SPECIAL		offsetof(struct __mcontext, mc_special)
156define	UC_MCONTEXT		offsetof(struct __ucontext, uc_mcontext)
157
158# general constants
159define	VM_MAX_ADDRESS		VM_MAX_ADDRESS
160
161# Important offsets into the user struct & associated constants
162define	UPAGES			UPAGES
163
164#XXX: <hack hack hack>
165
166define 	FRAME_SYSCALL		FRAME_SYSCALL
167
168define	PC_CURLWP		offsetof(struct cpu_info, ci_curlwp)
169define	PCB_ONFAULT		offsetof(struct pcb, pcb_onfault)
170