2 * Copyright (c) 1982, 1990 The Regents of the University of California.
5 * This code is derived from software contributed to Berkeley by
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution.
16 * 4. Neither the name of the University nor the names of its contributors
17 * may be used to endorse or promote products derived from this software
18 * without specific prior written permission.
20 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35 #include "opt_compat.h"
36 #include "opt_kstack_pages.h"
38 #include <sys/param.h>
39 #include <sys/systm.h>
40 #include <sys/assym.h>
44 #include <sys/errno.h>
46 #include <sys/mount.h>
47 #include <sys/socket.h>
48 #include <sys/resource.h>
49 #include <sys/resourcevar.h>
50 #include <sys/ucontext.h>
51 #include <machine/frame.h>
52 #include <machine/elf.h>
53 #include <machine/pal.h>
54 #include <machine/pcb.h>
55 #include <sys/vmmeter.h>
57 #include <vm/vm_param.h>
59 #include <vm/vm_map.h>
61 #include <netinet/in.h>
63 #ifdef COMPAT_FREEBSD32
64 ASSYM(COMPAT_FREEBSD32, COMPAT_FREEBSD32);
67 ASSYM(DT_NULL, DT_NULL);
68 ASSYM(DT_RELA, DT_RELA);
69 ASSYM(DT_RELAENT, DT_RELAENT);
70 ASSYM(DT_RELASZ, DT_RELASZ);
71 ASSYM(DT_SYMTAB, DT_SYMTAB);
72 ASSYM(DT_SYMENT, DT_SYMENT);
74 ASSYM(EFAULT, EFAULT);
75 ASSYM(ENAMETOOLONG, ENAMETOOLONG);
76 ASSYM(ERESTART, ERESTART);
78 ASSYM(FRAME_SYSCALL, FRAME_SYSCALL);
80 ASSYM(IA64_PBVM_BASE, IA64_PBVM_BASE);
81 ASSYM(IA64_PBVM_PAGE_SHIFT, IA64_PBVM_PAGE_SHIFT);
82 ASSYM(IA64_PBVM_PGTBL, IA64_PBVM_PGTBL);
83 ASSYM(IA64_PBVM_RR, IA64_PBVM_RR);
85 ASSYM(IA64_VM_MINKERN_REGION, IA64_VM_MINKERN_REGION);
87 ASSYM(KSTACK_PAGES, KSTACK_PAGES);
89 ASSYM(MC_PRESERVED, offsetof(mcontext_t, mc_preserved));
90 ASSYM(MC_PRESERVED_FP, offsetof(mcontext_t, mc_preserved_fp));
91 ASSYM(MC_SPECIAL, offsetof(mcontext_t, mc_special));
92 ASSYM(MC_SPECIAL_BSPSTORE, offsetof(mcontext_t, mc_special.bspstore));
93 ASSYM(MC_SPECIAL_RNAT, offsetof(mcontext_t, mc_special.rnat));
95 ASSYM(PAGE_SHIFT, PAGE_SHIFT);
96 ASSYM(PAGE_SIZE, PAGE_SIZE);
98 ASSYM(PC_CURRENT_PMAP, offsetof(struct pcpu, pc_md.current_pmap));
99 ASSYM(PC_IDLETHREAD, offsetof(struct pcpu, pc_idlethread));
101 ASSYM(PCB_CURRENT_PMAP, offsetof(struct pcb, pcb_current_pmap));
102 ASSYM(PCB_ONFAULT, offsetof(struct pcb, pcb_onfault));
103 ASSYM(PCB_SPECIAL_RP, offsetof(struct pcb, pcb_special.rp));
105 ASSYM(R_IA_64_DIR64LSB, R_IA_64_DIR64LSB);
106 ASSYM(R_IA_64_FPTR64LSB, R_IA_64_FPTR64LSB);
107 ASSYM(R_IA_64_NONE, R_IA_64_NONE);
108 ASSYM(R_IA_64_REL64LSB, R_IA_64_REL64LSB);
110 ASSYM(SIZEOF_PCB, sizeof(struct pcb));
111 ASSYM(SIZEOF_SPECIAL, sizeof(struct _special));
112 ASSYM(SIZEOF_TRAPFRAME, sizeof(struct trapframe));
114 ASSYM(TD_FLAGS, offsetof(struct thread, td_flags));
115 ASSYM(TD_KSTACK, offsetof(struct thread, td_kstack));
116 ASSYM(TD_PCB, offsetof(struct thread, td_pcb));
118 ASSYM(TDF_ASTPENDING, TDF_ASTPENDING);
119 ASSYM(TDF_NEEDRESCHED, TDF_NEEDRESCHED);
121 ASSYM(UC_MCONTEXT, offsetof(ucontext_t, uc_mcontext));
123 ASSYM(VM_MAXUSER_ADDRESS, VM_MAXUSER_ADDRESS);