1/*- 2 * Copyright (c) 1982, 1990 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * William Jolitz. 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions 10 * are met: 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. 19 * 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 30 * SUCH DAMAGE. 31 * 32 * $FreeBSD$ 33 */ 34 35#include "opt_compat.h" 36#include "opt_kstack_pages.h" 37 38#include <sys/param.h> 39#include <sys/systm.h> 40#include <sys/assym.h> 41#include <sys/proc.h> 42#include <sys/bio.h> 43#include <sys/buf.h> 44#include <sys/errno.h> 45#include <sys/proc.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> 56#include <vm/vm.h> 57#include <vm/vm_param.h> 58#include <vm/pmap.h> 59#include <vm/vm_map.h> 60#include <net/if.h> 61#include <netinet/in.h> 62 63#ifdef COMPAT_FREEBSD32 64ASSYM(COMPAT_FREEBSD32, COMPAT_FREEBSD32); 65#endif 66 67ASSYM(DT_NULL, DT_NULL); 68ASSYM(DT_RELA, DT_RELA); 69ASSYM(DT_RELAENT, DT_RELAENT); 70ASSYM(DT_RELASZ, DT_RELASZ); 71ASSYM(DT_SYMTAB, DT_SYMTAB); 72ASSYM(DT_SYMENT, DT_SYMENT); 73 74ASSYM(EFAULT, EFAULT); 75ASSYM(ENAMETOOLONG, ENAMETOOLONG); 76ASSYM(ERESTART, ERESTART); 77 78ASSYM(FRAME_SYSCALL, FRAME_SYSCALL); 79 80ASSYM(IA64_PBVM_BASE, IA64_PBVM_BASE); 81ASSYM(IA64_PBVM_PAGE_SHIFT, IA64_PBVM_PAGE_SHIFT); 82ASSYM(IA64_PBVM_PGTBL, IA64_PBVM_PGTBL); 83ASSYM(IA64_PBVM_RR, IA64_PBVM_RR); 84 85ASSYM(IA64_VM_MINKERN_REGION, IA64_VM_MINKERN_REGION); 86 87ASSYM(KSTACK_PAGES, KSTACK_PAGES); 88 89ASSYM(MC_PRESERVED, offsetof(mcontext_t, mc_preserved)); 90ASSYM(MC_PRESERVED_FP, offsetof(mcontext_t, mc_preserved_fp)); 91ASSYM(MC_SPECIAL, offsetof(mcontext_t, mc_special)); 92ASSYM(MC_SPECIAL_BSPSTORE, offsetof(mcontext_t, mc_special.bspstore)); 93ASSYM(MC_SPECIAL_RNAT, offsetof(mcontext_t, mc_special.rnat)); 94 95ASSYM(PAGE_SHIFT, PAGE_SHIFT); 96ASSYM(PAGE_SIZE, PAGE_SIZE); 97 98ASSYM(PC_CURRENT_PMAP, offsetof(struct pcpu, pc_md.current_pmap)); 99ASSYM(PC_IDLETHREAD, offsetof(struct pcpu, pc_idlethread)); 100 101ASSYM(PCB_CURRENT_PMAP, offsetof(struct pcb, pcb_current_pmap)); 102ASSYM(PCB_ONFAULT, offsetof(struct pcb, pcb_onfault)); 103ASSYM(PCB_SPECIAL_RP, offsetof(struct pcb, pcb_special.rp)); 104 105ASSYM(R_IA_64_DIR64LSB, R_IA_64_DIR64LSB); 106ASSYM(R_IA_64_FPTR64LSB, R_IA_64_FPTR64LSB); 107ASSYM(R_IA_64_NONE, R_IA_64_NONE); 108ASSYM(R_IA_64_REL64LSB, R_IA_64_REL64LSB); 109 110ASSYM(SIZEOF_PCB, sizeof(struct pcb)); 111ASSYM(SIZEOF_SPECIAL, sizeof(struct _special)); 112ASSYM(SIZEOF_TRAPFRAME, sizeof(struct trapframe)); 113 114ASSYM(TD_FLAGS, offsetof(struct thread, td_flags)); 115ASSYM(TD_KSTACK, offsetof(struct thread, td_kstack)); 116ASSYM(TD_PCB, offsetof(struct thread, td_pcb)); 117 118ASSYM(TDF_ASTPENDING, TDF_ASTPENDING); 119ASSYM(TDF_NEEDRESCHED, TDF_NEEDRESCHED); 120 121ASSYM(UC_MCONTEXT, offsetof(ucontext_t, uc_mcontext)); 122 123ASSYM(VM_MAXUSER_ADDRESS, VM_MAXUSER_ADDRESS); 124