1178172Simp/*- 2178172Simp * Copyright (c) 1982, 1990 The Regents of the University of California. 3178172Simp * All rights reserved. 4178172Simp * 5178172Simp * This code is derived from software contributed to Berkeley by 6178172Simp * William Jolitz. 7178172Simp * 8178172Simp * Redistribution and use in source and binary forms, with or without 9178172Simp * modification, are permitted provided that the following conditions 10178172Simp * are met: 11178172Simp * 1. Redistributions of source code must retain the above copyright 12178172Simp * notice, this list of conditions and the following disclaimer. 13178172Simp * 2. Redistributions in binary form must reproduce the above copyright 14178172Simp * notice, this list of conditions and the following disclaimer in the 15178172Simp * documentation and/or other materials provided with the distribution. 16178172Simp * 4. Neither the name of the University nor the names of its contributors 17178172Simp * may be used to endorse or promote products derived from this software 18178172Simp * without specific prior written permission. 19178172Simp * 20178172Simp * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 21178172Simp * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22178172Simp * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23178172Simp * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 24178172Simp * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25178172Simp * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26178172Simp * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27178172Simp * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28178172Simp * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29178172Simp * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30178172Simp * SUCH DAMAGE. 31178172Simp * 32178172Simp * from: @(#)genassym.c 5.11 (Berkeley) 5/10/91 33178172Simp * from: src/sys/i386/i386/genassym.c,v 1.86.2.1 2000/05/16 06:58:06 dillon 34178172Simp * JNPR: genassym.c,v 1.4 2007/08/09 11:23:32 katta 35178172Simp */ 36178172Simp 37178172Simp#include <sys/cdefs.h> 38178172Simp__FBSDID("$FreeBSD$"); 39178172Simp 40178172Simp#include <sys/param.h> 41178172Simp#include <sys/systm.h> 42178172Simp#include <sys/assym.h> 43178172Simp#include <machine/pte.h> 44178172Simp#include <sys/proc.h> 45178172Simp#include <sys/errno.h> 46178172Simp#include <sys/lock.h> 47178172Simp#include <sys/mutex.h> 48178172Simp#include <sys/socket.h> 49178172Simp#include <sys/resourcevar.h> 50178172Simp#include <sys/ucontext.h> 51178172Simp#include <sys/vmmeter.h> 52178172Simp#include <vm/vm.h> 53178172Simp#include <vm/vm_param.h> 54178172Simp#include <vm/pmap.h> 55178172Simp#include <vm/vm_map.h> 56206829Sjmallett#include <machine/cpuregs.h> 57178172Simp#include <machine/pcb.h> 58178172Simp#include <machine/sigframe.h> 59178172Simp#include <machine/proc.h> 60178172Simp 61178172Simp#ifndef offsetof 62178172Simp#define offsetof(t,m) (int)((&((t *)0L)->m)) 63178172Simp#endif 64178172Simp 65178172Simp 66178172SimpASSYM(TD_PCB, offsetof(struct thread, td_pcb)); 67178172SimpASSYM(TD_UPTE, offsetof(struct thread, td_md.md_upte)); 68206819SjmallettASSYM(TD_KSTACK, offsetof(struct thread, td_kstack)); 69178172SimpASSYM(TD_FLAGS, offsetof(struct thread, td_flags)); 70178172SimpASSYM(TD_LOCK, offsetof(struct thread, td_lock)); 71178172SimpASSYM(TD_FRAME, offsetof(struct thread, td_frame)); 72202046SimpASSYM(TD_TLS, offsetof(struct thread, td_md.md_tls)); 73178172Simp 74178172SimpASSYM(TF_REG_SR, offsetof(struct trapframe, sr)); 75178172Simp 76178172SimpASSYM(U_PCB_REGS, offsetof(struct pcb, pcb_regs.zero)); 77178172SimpASSYM(U_PCB_CONTEXT, offsetof(struct pcb, pcb_context)); 78178172SimpASSYM(U_PCB_ONFAULT, offsetof(struct pcb, pcb_onfault)); 79178172SimpASSYM(U_PCB_FPREGS, offsetof(struct pcb, pcb_regs.f0)); 80178172Simp 81178172SimpASSYM(PC_CURPCB, offsetof(struct pcpu, pc_curpcb)); 82178172SimpASSYM(PC_SEGBASE, offsetof(struct pcpu, pc_segbase)); 83178172SimpASSYM(PC_CURTHREAD, offsetof(struct pcpu, pc_curthread)); 84178172SimpASSYM(PC_FPCURTHREAD, offsetof(struct pcpu, pc_fpcurthread)); 85178172SimpASSYM(PC_CPUID, offsetof(struct pcpu, pc_cpuid)); 86178172SimpASSYM(PC_CURPMAP, offsetof(struct pcpu, pc_curpmap)); 87178172Simp 88178172SimpASSYM(VM_MAX_KERNEL_ADDRESS, VM_MAX_KERNEL_ADDRESS); 89178172SimpASSYM(VM_MAXUSER_ADDRESS, VM_MAXUSER_ADDRESS); 90178172SimpASSYM(SIGF_UC, offsetof(struct sigframe, sf_uc)); 91178172SimpASSYM(SIGFPE, SIGFPE); 92202046SimpASSYM(PAGE_SHIFT, PAGE_SHIFT); 93206746SjmallettASSYM(PAGE_SIZE, PAGE_SIZE); 94206829SjmallettASSYM(PAGE_MASK, PAGE_MASK); 95210846SjchandraASSYM(PDRSHIFT, PDRSHIFT); 96178172SimpASSYM(SEGSHIFT, SEGSHIFT); 97178172SimpASSYM(NPTEPG, NPTEPG); 98178172SimpASSYM(TDF_NEEDRESCHED, TDF_NEEDRESCHED); 99178172SimpASSYM(TDF_ASTPENDING, TDF_ASTPENDING); 100178172SimpASSYM(PCPU_SIZE, sizeof(struct pcpu)); 101202046SimpASSYM(MAXCOMLEN, MAXCOMLEN); 102206829Sjmallett 103206829SjmallettASSYM(MIPS_KSEG0_START, MIPS_KSEG0_START); 104206829SjmallettASSYM(MIPS_KSEG1_START, MIPS_KSEG1_START); 105206829SjmallettASSYM(MIPS_KSEG2_START, MIPS_KSEG2_START); 106210638SjchandraASSYM(MIPS_XKSEG_START, MIPS_XKSEG_START); 107