genassym.c revision 106189
166458Sdfr/*-
266458Sdfr * Copyright (c) 1982, 1990 The Regents of the University of California.
366458Sdfr * All rights reserved.
466458Sdfr *
566458Sdfr * This code is derived from software contributed to Berkeley by
666458Sdfr * William Jolitz.
766458Sdfr *
866458Sdfr * Redistribution and use in source and binary forms, with or without
966458Sdfr * modification, are permitted provided that the following conditions
1066458Sdfr * are met:
1166458Sdfr * 1. Redistributions of source code must retain the above copyright
1266458Sdfr *    notice, this list of conditions and the following disclaimer.
1366458Sdfr * 2. Redistributions in binary form must reproduce the above copyright
1466458Sdfr *    notice, this list of conditions and the following disclaimer in the
1566458Sdfr *    documentation and/or other materials provided with the distribution.
1666458Sdfr * 3. All advertising materials mentioning features or use of this software
1766458Sdfr *    must display the following acknowledgement:
1866458Sdfr *	This product includes software developed by the University of
1966458Sdfr *	California, Berkeley and its contributors.
2066458Sdfr * 4. Neither the name of the University nor the names of its contributors
2166458Sdfr *    may be used to endorse or promote products derived from this software
2266458Sdfr *    without specific prior written permission.
2366458Sdfr *
2466458Sdfr * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
2566458Sdfr * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2666458Sdfr * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2766458Sdfr * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
2866458Sdfr * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2966458Sdfr * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
3066458Sdfr * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
3166458Sdfr * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
3266458Sdfr * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3366458Sdfr * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3466458Sdfr * SUCH DAMAGE.
3566458Sdfr *
3666458Sdfr *	from: @(#)genassym.c	5.11 (Berkeley) 5/10/91
3766458Sdfr * $FreeBSD: head/sys/ia64/ia64/genassym.c 106189 2002-10-30 05:55:29Z marcel $
3866458Sdfr */
3966458Sdfr
4066458Sdfr#include <sys/param.h>
4166458Sdfr#include <sys/systm.h>
4266458Sdfr#include <sys/assym.h>
4366458Sdfr#include <sys/proc.h>
4466458Sdfr#include <sys/bio.h>
4566458Sdfr#include <sys/buf.h>
4666458Sdfr#include <sys/errno.h>
4766458Sdfr#include <sys/proc.h>
4866458Sdfr#include <sys/mount.h>
4966458Sdfr#include <sys/socket.h>
5066458Sdfr#include <sys/resource.h>
5166458Sdfr#include <sys/resourcevar.h>
5266458Sdfr#include <sys/ucontext.h>
5366458Sdfr#include <machine/frame.h>
5466458Sdfr#include <machine/mutex.h>
5583407Sdfr#include <machine/elf.h>
5684118Sdfr#include <machine/pal.h>
5766458Sdfr#include <sys/vmmeter.h>
5866458Sdfr#include <vm/vm.h>
5966458Sdfr#include <vm/vm_param.h>
6066458Sdfr#include <vm/pmap.h>
6166458Sdfr#include <vm/vm_map.h>
6266458Sdfr#include <sys/user.h>
6366458Sdfr#include <net/if.h>
6466458Sdfr#include <netinet/in.h>
6566458Sdfr
6687702SjhbASSYM(PC_CURTHREAD,	offsetof(struct pcpu, pc_curthread));
6788686SmarcelASSYM(PC_IDLETHREAD,	offsetof(struct pcpu, pc_idlethread));
6887702SjhbASSYM(PC_FPCURTHREAD,	offsetof(struct pcpu, pc_fpcurthread));
6987702SjhbASSYM(PC_CURPCB,	offsetof(struct pcpu, pc_curpcb));
7087702SjhbASSYM(PC_CPUID,		offsetof(struct pcpu, pc_cpuid));
7192281SdfrASSYM(PC_CURRENT_PMAP,	offsetof(struct pcpu, pc_current_pmap));
7266486Sdfr
7383727SdfrASSYM(MTX_LOCK,		offsetof(struct mtx, mtx_lock));
7483727SdfrASSYM(MTX_RECURSE,	offsetof(struct mtx, mtx_recurse));
7583727SdfrASSYM(MTX_UNOWNED,	MTX_UNOWNED);
7666458Sdfr
7783727SdfrASSYM(TD_PROC,		offsetof(struct thread, td_proc));
7883727SdfrASSYM(TD_PCB,		offsetof(struct thread, td_pcb));
7993389SjakeASSYM(TD_KSE,		offsetof(struct thread, td_kse));
8083727SdfrASSYM(TD_KSTACK,	offsetof(struct thread, td_kstack));
8183727SdfrASSYM(TD_MD_FLAGS,	offsetof(struct thread, td_md.md_flags));
8266458Sdfr
8393389SjakeASSYM(KE_FLAGS, offsetof(struct kse, ke_flags));
8493389Sjake
8593389SjakeASSYM(KEF_ASTPENDING, KEF_ASTPENDING);
8693389SjakeASSYM(KEF_NEEDRESCHED, KEF_NEEDRESCHED);
8793389Sjake
8866458SdfrASSYM(VM_MAXUSER_ADDRESS, VM_MAXUSER_ADDRESS);
8966458Sdfr
9067522SdfrASSYM(FRAME_SYSCALL,	FRAME_SYSCALL);
9167522Sdfr
9267020SdfrASSYM(TF_CR_IPSR,	offsetof(struct trapframe, tf_cr_ipsr));
9367199SdfrASSYM(TF_CR_IFS,	offsetof(struct trapframe, tf_cr_ifs));
9467199SdfrASSYM(TF_NDIRTY,	offsetof(struct trapframe, tf_ndirty));
9585777SdfrASSYM(TF_AR_FPSR,	offsetof(struct trapframe, tf_ar_fpsr));
9667199SdfrASSYM(TF_B,		offsetof(struct trapframe, tf_b));
9767199SdfrASSYM(TF_R,		offsetof(struct trapframe, tf_r));
9885286SdfrASSYM(TF_R_R1,		offsetof(struct trapframe, tf_r[FRAME_R1]));
9985286SdfrASSYM(TF_R_R2,		offsetof(struct trapframe, tf_r[FRAME_R2]));
10085286SdfrASSYM(TF_R_R3,		offsetof(struct trapframe, tf_r[FRAME_R3]));
10185286SdfrASSYM(TF_R_R4,		offsetof(struct trapframe, tf_r[FRAME_R4]));
10285286SdfrASSYM(TF_R_R5,		offsetof(struct trapframe, tf_r[FRAME_R5]));
10385286SdfrASSYM(TF_R_R6,		offsetof(struct trapframe, tf_r[FRAME_R6]));
10485286SdfrASSYM(TF_R_R7,		offsetof(struct trapframe, tf_r[FRAME_R7]));
10585286SdfrASSYM(TF_R_R8,		offsetof(struct trapframe, tf_r[FRAME_R8]));
10685286SdfrASSYM(TF_R_R9,		offsetof(struct trapframe, tf_r[FRAME_R9]));
10785286SdfrASSYM(TF_R_R10,		offsetof(struct trapframe, tf_r[FRAME_R10]));
10885286SdfrASSYM(TF_R_R11,		offsetof(struct trapframe, tf_r[FRAME_R11]));
10985286SdfrASSYM(TF_R_SP,		offsetof(struct trapframe, tf_r[FRAME_SP]));
11085286SdfrASSYM(TF_R_R13,		offsetof(struct trapframe, tf_r[FRAME_R13]));
11185286SdfrASSYM(TF_R_R14,		offsetof(struct trapframe, tf_r[FRAME_R14]));
11285286SdfrASSYM(TF_R_R15,		offsetof(struct trapframe, tf_r[FRAME_R15]));
11367199SdfrASSYM(TF_F,		offsetof(struct trapframe, tf_f));
11467020Sdfr
115106189SmarcelASSYM(PCB_CURRENT_PMAP,	offsetof(struct pcb, pcb_current_pmap));
11683366SjulianASSYM(PCB_ONFAULT,	offsetof(struct pcb, pcb_onfault));
117106189SmarcelASSYM(PCB_RP,		offsetof(struct pcb, pcb_rp));
118106189SmarcelASSYM(PCB_UNAT47,	offsetof(struct pcb, pcb_unat47));
11966486Sdfr
12066458SdfrASSYM(UC_MCONTEXT_MC_AR_BSP,  offsetof(ucontext_t, uc_mcontext.mc_ar_bsp));
12166458SdfrASSYM(UC_MCONTEXT_MC_AR_RNAT, offsetof(ucontext_t, uc_mcontext.mc_ar_rnat));
12266458Sdfr
12383727SdfrASSYM(EFAULT,		EFAULT);
12483727SdfrASSYM(ENAMETOOLONG,	ENAMETOOLONG);
12566458Sdfr
12684118SdfrASSYM(PAGE_SHIFT,	PAGE_SHIFT);
12783727SdfrASSYM(PAGE_SIZE,	PAGE_SIZE);
12883727SdfrASSYM(KSTACK_PAGES,	KSTACK_PAGES);
12983366Sjulian
13083727SdfrASSYM(SIZEOF_TRAPFRAME,	sizeof(struct trapframe));
13183727SdfrASSYM(SIZEOF_PCB,	sizeof(struct pcb));
13283407Sdfr
13383407SdfrASSYM(DT_NULL,		DT_NULL);
13483407SdfrASSYM(DT_RELA,		DT_RELA);
13583407SdfrASSYM(DT_RELASZ,	DT_RELASZ);
13683407SdfrASSYM(DT_SYMTAB,	DT_SYMTAB);
13783407SdfrASSYM(DT_SYMENT,	DT_SYMENT);
13883407SdfrASSYM(DT_RELAENT,	DT_RELAENT);
13983407SdfrASSYM(R_IA64_NONE,	R_IA64_NONE);
14083407SdfrASSYM(R_IA64_DIR64LSB,	R_IA64_DIR64LSB);
14183407SdfrASSYM(R_IA64_FPTR64LSB,	R_IA64_FPTR64LSB);
14283407SdfrASSYM(R_IA64_REL64LSB,	R_IA64_REL64LSB);
14384118Sdfr
14484118SdfrASSYM(PAL_PTCE_INFO,	PAL_PTCE_INFO);
14584118SdfrASSYM(PAL_FREQ_RATIOS,	PAL_FREQ_RATIOS);
14691635SdfrASSYM(PAL_VM_SUMMARY,	PAL_VM_SUMMARY);
147