1# $NetBSD: genassym.cf,v 1.20 2011/01/14 02:06:30 rmind Exp $ 2 3#- 4# Copyright (c) 2002 The NetBSD Foundation, Inc. 5# All rights reserved. 6# 7# Redistribution and use in source and binary forms, with or without 8# modification, are permitted provided that the following conditions 9# are met: 10# 1. Redistributions of source code must retain the above copyright 11# notice, this list of conditions and the following disclaimer. 12# 2. Redistributions in binary form must reproduce the above copyright 13# notice, this list of conditions and the following disclaimer in the 14# documentation and/or other materials provided with the distribution. 15# 16# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 17# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 18# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 19# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 20# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26# POSSIBILITY OF SUCH DAMAGE. 27# 28 29include <sys/param.h> 30include <sys/proc.h> 31include <sys/mbuf.h> 32include <sys/errno.h> 33include <uvm/uvm_extern.h> 34include <sh3/pcb.h> 35include <sh3/vmparam.h> 36include <sh3/pte.h> 37 38define CI_IDEPTH offsetof(struct cpu_info, ci_idepth) 39define CI_NINTR offsetof(struct cpu_info, ci_data.cpu_nintr) 40 41define TF_SIZE sizeof(struct trapframe) 42define TF_EXPEVT offsetof(struct trapframe, tf_expevt) 43define TF_UBC offsetof(struct trapframe, tf_ubc) 44define TF_SPC offsetof(struct trapframe, tf_spc) 45define TF_SSR offsetof(struct trapframe, tf_ssr) 46define TF_GBR offsetof(struct trapframe, tf_gbr) 47define TF_MACL offsetof(struct trapframe, tf_macl) 48define TF_MACH offsetof(struct trapframe, tf_mach) 49define TF_PR offsetof(struct trapframe, tf_pr) 50define TF_R14 offsetof(struct trapframe, tf_r14) 51define TF_R13 offsetof(struct trapframe, tf_r13) 52define TF_R12 offsetof(struct trapframe, tf_r12) 53define TF_R11 offsetof(struct trapframe, tf_r11) 54define TF_R10 offsetof(struct trapframe, tf_r10) 55define TF_R9 offsetof(struct trapframe, tf_r9) 56define TF_R8 offsetof(struct trapframe, tf_r8) 57define TF_R7 offsetof(struct trapframe, tf_r7) 58define TF_R6 offsetof(struct trapframe, tf_r6) 59define TF_R5 offsetof(struct trapframe, tf_r5) 60define TF_R4 offsetof(struct trapframe, tf_r4) 61define TF_R3 offsetof(struct trapframe, tf_r3) 62define TF_R2 offsetof(struct trapframe, tf_r2) 63define TF_R1 offsetof(struct trapframe, tf_r1) 64define TF_R0 offsetof(struct trapframe, tf_r0) 65define TF_R15 offsetof(struct trapframe, tf_r15) 66 67define SF_SIZE sizeof(struct switchframe) 68define SF_GBR offsetof(struct switchframe, sf_gbr) 69define SF_SR offsetof(struct switchframe, sf_sr) 70define SF_R15 offsetof(struct switchframe, sf_r15) 71define SF_R14 offsetof(struct switchframe, sf_r14) 72define SF_R13 offsetof(struct switchframe, sf_r13) 73define SF_R12 offsetof(struct switchframe, sf_r12) 74define SF_R10 offsetof(struct switchframe, sf_r10) 75define SF_R9 offsetof(struct switchframe, sf_r9) 76define SF_R8 offsetof(struct switchframe, sf_r8) 77define SF_PR offsetof(struct switchframe, sf_pr) 78define SF_R6_BANK offsetof(struct switchframe, sf_r6_bank) 79define SF_R7_BANK offsetof(struct switchframe, sf_r7_bank) 80 81define L_MD_UPTE offsetof(struct lwp, l_md.md_upte) 82define L_MD_PCB offsetof(struct lwp, l_md.md_pcb) 83 84define PCB_ONFAULT offsetof(struct pcb, pcb_onfault) 85define PCB_FAULTBAIL offsetof(struct pcb, pcb_faultbail) 86 87define VM_MAXUSER_ADDRESS VM_MAXUSER_ADDRESS 88define VM_MIN_KERNEL_ADDRESS VM_MIN_KERNEL_ADDRESS 89 90define EFAULT EFAULT 91define ENAMETOOLONG ENAMETOOLONG 92 93# 94# in_cksum.S 95# 96define M_DATA offsetof(struct mbuf, m_data) 97define M_LEN offsetof(struct mbuf, m_len) 98define M_NEXT offsetof(struct mbuf, m_next) 99