1# $NetBSD: genassym.cf,v 1.3 2002/05/19 18:56:55 augustss Exp $ 2 3# 4# Copyright (C) 1995, 1996 Wolfgang Solfrank. 5# Copyright (C) 1995, 1996 TooLs GmbH. 6# All rights reserved. 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# 3. All advertising materials mentioning features or use of this software 17# must display the following acknowledgement: 18# This product includes software developed by TooLs GmbH. 19# 4. The name of TooLs GmbH may not be used to endorse or promote products 20# derived from this software without specific prior written permission. 21# 22# THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``AS IS'' AND ANY EXPRESS OR 23# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 24# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 25# IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 26# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 27# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 28# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 29# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 30# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 31# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32# 33 34include <sys/param.h> 35include <sys/time.h> 36include <sys/proc.h> 37 38include <machine/pcb.h> 39include <machine/pmap.h> 40 41include <powerpc/cpu.h> 42 43define FRAMELEN FRAMELEN 44define FRAME_0 offsetof(struct trapframe, fixreg[0]) 45define FRAME_1 offsetof(struct trapframe, fixreg[1]) 46define FRAME_2 offsetof(struct trapframe, fixreg[2]) 47define FRAME_3 offsetof(struct trapframe, fixreg[3]) 48define FRAME_LR offsetof(struct trapframe, lr) 49define FRAME_CR offsetof(struct trapframe, cr) 50define FRAME_CTR offsetof(struct trapframe, ctr) 51define FRAME_XER offsetof(struct trapframe, xer) 52define FRAME_SRR0 offsetof(struct trapframe, srr0) 53define FRAME_SRR1 offsetof(struct trapframe, srr1) 54define FRAME_DAR offsetof(struct trapframe, dar) 55define FRAME_DSISR offsetof(struct trapframe, dsisr) 56define FRAME_EXC offsetof(struct trapframe, exc) 57 58define SFRAMELEN roundup(sizeof(struct switchframe), 16) 59 60define PCB_PMR offsetof(struct pcb, pcb_pmreal) 61define PCB_SP offsetof(struct pcb, pcb_sp) 62define PCB_SPL offsetof(struct pcb, pcb_spl) 63define PCB_FAULT offsetof(struct pcb, pcb_onfault) 64 65define PM_USRSR offsetof(struct pmap, pm_sr[USER_SR]) 66define PM_KERNELSR offsetof(struct pmap, pm_sr[KERNEL_SR]) 67 68define P_FORW offsetof(struct proc, p_forw) 69define P_BACK offsetof(struct proc, p_back) 70define P_ADDR offsetof(struct proc, p_addr) 71 72define SPLX offsetof(struct machvec, splx) 73 74define CACHELINESIZE CACHELINESIZE 75 76define CPU_CI offsetof(struct cpu_info, ci_ci) 77