Home | History | Annotate | Line # | Download | only in oea
genassym.cf revision 1.13
      1  1.13  garbled #	$NetBSD: genassym.cf,v 1.13 2008/02/05 18:10:47 garbled Exp $
      2   1.1     matt 
      3   1.1     matt #
      4   1.1     matt # Copyright (C) 1995, 1996 Wolfgang Solfrank.
      5   1.1     matt # Copyright (C) 1995, 1996 TooLs GmbH.
      6   1.1     matt # All rights reserved.
      7   1.1     matt #
      8   1.1     matt # Redistribution and use in source and binary forms, with or without
      9   1.1     matt # modification, are permitted provided that the following conditions
     10   1.1     matt # are met:
     11   1.1     matt # 1. Redistributions of source code must retain the above copyright
     12   1.1     matt #    notice, this list of conditions and the following disclaimer.
     13   1.1     matt # 2. Redistributions in binary form must reproduce the above copyright
     14   1.1     matt #    notice, this list of conditions and the following disclaimer in the
     15   1.1     matt #    documentation and/or other materials provided with the distribution.
     16   1.1     matt # 3. All advertising materials mentioning features or use of this software
     17   1.1     matt #    must display the following acknowledgement:
     18   1.1     matt #	This product includes software developed by TooLs GmbH.
     19   1.1     matt # 4. The name of TooLs GmbH may not be used to endorse or promote products
     20   1.1     matt #    derived from this software without specific prior written permission.
     21   1.1     matt #
     22   1.1     matt # THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``AS IS'' AND ANY EXPRESS OR
     23   1.1     matt # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
     24   1.1     matt # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
     25   1.1     matt # IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
     26   1.1     matt # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
     27   1.1     matt # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
     28   1.1     matt # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
     29   1.1     matt # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
     30   1.1     matt # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
     31   1.1     matt # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     32   1.1     matt #
     33   1.1     matt 
     34   1.2     matt include "opt_ppcarch.h"
     35   1.2     matt 
     36   1.1     matt include <sys/param.h>
     37   1.1     matt include <sys/time.h>
     38   1.1     matt include <sys/proc.h>
     39   1.1     matt 
     40   1.1     matt include <uvm/uvm_extern.h>
     41   1.1     matt 
     42   1.1     matt include <machine/pcb.h>
     43   1.1     matt include <machine/pmap.h>
     44   1.1     matt 
     45   1.1     matt include <powerpc/cpu.h>
     46  1.13  garbled include <powerpc/oea/cpufeat.h>
     47   1.1     matt 
     48   1.1     matt define	FRAMELEN	FRAMELEN
     49   1.1     matt define	FRAME_0		offsetof(struct trapframe, fixreg[0])
     50   1.1     matt define	FRAME_1		offsetof(struct trapframe, fixreg[1])
     51   1.1     matt define	FRAME_2		offsetof(struct trapframe, fixreg[2])
     52   1.1     matt define	FRAME_3		offsetof(struct trapframe, fixreg[3])
     53   1.2     matt define	FRAME_4		offsetof(struct trapframe, fixreg[4])
     54   1.2     matt define	FRAME_5		offsetof(struct trapframe, fixreg[5])
     55   1.2     matt define	FRAME_6		offsetof(struct trapframe, fixreg[6])
     56   1.2     matt define	FRAME_7		offsetof(struct trapframe, fixreg[7])
     57   1.2     matt define	FRAME_8		offsetof(struct trapframe, fixreg[8])
     58   1.2     matt define	FRAME_9		offsetof(struct trapframe, fixreg[9])
     59   1.2     matt define	FRAME_10	offsetof(struct trapframe, fixreg[10])
     60   1.2     matt define	FRAME_11	offsetof(struct trapframe, fixreg[11])
     61   1.2     matt define	FRAME_12	offsetof(struct trapframe, fixreg[12])
     62   1.2     matt define	FRAME_13	offsetof(struct trapframe, fixreg[13])
     63   1.2     matt define	FRAME_14	offsetof(struct trapframe, fixreg[14])
     64   1.2     matt define	FRAME_15	offsetof(struct trapframe, fixreg[15])
     65   1.2     matt define	FRAME_16	offsetof(struct trapframe, fixreg[16])
     66   1.2     matt define	FRAME_17	offsetof(struct trapframe, fixreg[17])
     67   1.2     matt define	FRAME_18	offsetof(struct trapframe, fixreg[18])
     68   1.2     matt define	FRAME_19	offsetof(struct trapframe, fixreg[19])
     69   1.2     matt define	FRAME_20	offsetof(struct trapframe, fixreg[20])
     70   1.2     matt define	FRAME_21	offsetof(struct trapframe, fixreg[21])
     71   1.2     matt define	FRAME_22	offsetof(struct trapframe, fixreg[22])
     72   1.2     matt define	FRAME_23	offsetof(struct trapframe, fixreg[23])
     73   1.2     matt define	FRAME_24	offsetof(struct trapframe, fixreg[24])
     74   1.2     matt define	FRAME_25	offsetof(struct trapframe, fixreg[25])
     75   1.2     matt define	FRAME_26	offsetof(struct trapframe, fixreg[26])
     76   1.2     matt define	FRAME_27	offsetof(struct trapframe, fixreg[27])
     77   1.2     matt define	FRAME_28	offsetof(struct trapframe, fixreg[28])
     78   1.2     matt define	FRAME_29	offsetof(struct trapframe, fixreg[29])
     79   1.2     matt define	FRAME_30	offsetof(struct trapframe, fixreg[30])
     80   1.2     matt define	FRAME_31	offsetof(struct trapframe, fixreg[31])
     81   1.1     matt define	FRAME_LR	offsetof(struct trapframe, lr)
     82   1.1     matt define	FRAME_CR	offsetof(struct trapframe, cr)
     83   1.1     matt define	FRAME_CTR	offsetof(struct trapframe, ctr)
     84   1.1     matt define	FRAME_XER	offsetof(struct trapframe, xer)
     85   1.1     matt define	FRAME_SRR0	offsetof(struct trapframe, srr0)
     86   1.1     matt define	FRAME_SRR1	offsetof(struct trapframe, srr1)
     87   1.1     matt define	FRAME_DAR	offsetof(struct trapframe, dar)
     88   1.1     matt define	FRAME_DSISR	offsetof(struct trapframe, dsisr)
     89   1.1     matt define	FRAME_EXC	offsetof(struct trapframe, exc)
     90   1.1     matt define	FRAME_VRSAVE	offsetof(struct trapframe, tf_xtra[TF_VRSAVE])
     91   1.1     matt define	FRAME_MQ	offsetof(struct trapframe, tf_xtra[TF_MQ])
     92   1.1     matt 
     93   1.1     matt define	IFRAMELEN		IFRAMELEN
     94   1.1     matt define	IFRAME_R1		offsetof(struct intrframe, r1)
     95   1.1     matt define	IFRAME_SRR1		offsetof(struct intrframe, srr1)
     96   1.1     matt define	IFRAME_SRR0		offsetof(struct intrframe, srr0)
     97   1.1     matt define	IFRAME_PRI		offsetof(struct intrframe, pri)
     98   1.1     matt define	IFRAME_INTR_DEPTH	offsetof(struct intrframe, intrdepth)
     99   1.1     matt define	IFRAME_PID		offsetof(struct intrframe, pid)
    100   1.1     matt define	IFRAME_CTR		offsetof(struct intrframe, ctr)
    101   1.1     matt define	IFRAME_XER		offsetof(struct intrframe, xer)
    102   1.1     matt define	IFRAME_CR		offsetof(struct intrframe, cr)
    103   1.1     matt define	IFRAME_LR		offsetof(struct intrframe, lr)
    104   1.1     matt define	IFRAME_R12		offsetof(struct intrframe, r12)
    105   1.1     matt define	IFRAME_R11		offsetof(struct intrframe, r11)
    106   1.1     matt define	IFRAME_R10		offsetof(struct intrframe, r10)
    107   1.1     matt define	IFRAME_R9		offsetof(struct intrframe, r9)
    108   1.1     matt define	IFRAME_R8		offsetof(struct intrframe, r8)
    109   1.1     matt define	IFRAME_R7		offsetof(struct intrframe, r7)
    110   1.1     matt define	IFRAME_R6		offsetof(struct intrframe, r6)
    111   1.1     matt define	IFRAME_R5		offsetof(struct intrframe, r5)
    112   1.1     matt define	IFRAME_R4		offsetof(struct intrframe, r4)
    113   1.1     matt define	IFRAME_R3		offsetof(struct intrframe, r3)
    114   1.1     matt define	IFRAME_R0		offsetof(struct intrframe, r0)
    115   1.1     matt 
    116   1.2     matt ifdef PPC_OEA64
    117   1.2     matt define	PM_STEG		offsetof(struct pmap, pm_steg_table)
    118   1.2     matt else
    119   1.1     matt define	PM_SR		offsetof(struct pmap, pm_sr[0])
    120   1.1     matt define	PM_USRSR	offsetof(struct pmap, pm_sr[USER_SR])
    121   1.1     matt define	PM_KERNELSR	offsetof(struct pmap, pm_sr[KERNEL_SR])
    122   1.2     matt endif
    123   1.1     matt 
    124   1.1     matt define	CALLFRAMELEN	CALLFRAMELEN
    125   1.1     matt define	CFRAME_SP	offsetof(struct callframe, sp)
    126   1.1     matt define	CFRAME_LR	offsetof(struct callframe, lr)
    127   1.1     matt define	CFRAME_R30	offsetof(struct callframe, r30)
    128   1.1     matt define	CFRAME_R31	offsetof(struct callframe, r31)
    129   1.1     matt 
    130   1.6     matt define	SFRAMELEN	SFRAMELEN
    131   1.1     matt define	SFRAME_SP	offsetof(struct switchframe, sp)
    132   1.5     matt define	SFRAME_LR	offsetof(struct switchframe, lr)
    133   1.1     matt define	SFRAME_USER_SR	offsetof(struct switchframe, user_sr)
    134   1.1     matt define	SFRAME_CR	offsetof(struct switchframe, cr)
    135   1.1     matt define	SFRAME_R2	offsetof(struct switchframe, fixreg2)
    136   1.2     matt define	SFRAME_R13	offsetof(struct switchframe, fixreg[0])
    137   1.2     matt define	SFRAME_R14	offsetof(struct switchframe, fixreg[1])
    138   1.2     matt define	SFRAME_R15	offsetof(struct switchframe, fixreg[2])
    139   1.2     matt define	SFRAME_R16	offsetof(struct switchframe, fixreg[3])
    140   1.2     matt define	SFRAME_R17	offsetof(struct switchframe, fixreg[4])
    141   1.2     matt define	SFRAME_R18	offsetof(struct switchframe, fixreg[5])
    142   1.2     matt define	SFRAME_R19	offsetof(struct switchframe, fixreg[6])
    143   1.2     matt define	SFRAME_R20	offsetof(struct switchframe, fixreg[7])
    144   1.2     matt define	SFRAME_R21	offsetof(struct switchframe, fixreg[8])
    145   1.2     matt define	SFRAME_R22	offsetof(struct switchframe, fixreg[9])
    146   1.2     matt define	SFRAME_R23	offsetof(struct switchframe, fixreg[10])
    147   1.2     matt define	SFRAME_R24	offsetof(struct switchframe, fixreg[11])
    148   1.2     matt define	SFRAME_R25	offsetof(struct switchframe, fixreg[12])
    149   1.2     matt define	SFRAME_R26	offsetof(struct switchframe, fixreg[13])
    150   1.2     matt define	SFRAME_R27	offsetof(struct switchframe, fixreg[14])
    151   1.2     matt define	SFRAME_R28	offsetof(struct switchframe, fixreg[15])
    152   1.2     matt define	SFRAME_R29	offsetof(struct switchframe, fixreg[16])
    153   1.2     matt define	SFRAME_R30	offsetof(struct switchframe, fixreg[17])
    154   1.2     matt define	SFRAME_R31	offsetof(struct switchframe, fixreg[18])
    155   1.1     matt 
    156   1.4     matt define	PCB_PM		offsetof(struct pcb, pcb_pm)
    157   1.1     matt define	PCB_SP		offsetof(struct pcb, pcb_sp)
    158   1.1     matt define	PCB_FAULT	offsetof(struct pcb, pcb_onfault)
    159   1.1     matt 
    160   1.1     matt define	L_ADDR		offsetof(struct lwp, l_addr)
    161   1.1     matt define	L_STAT		offsetof(struct lwp, l_stat)
    162   1.1     matt define	L_CPU		offsetof(struct lwp, l_cpu)
    163   1.1     matt define	L_PRIORITY	offsetof(struct lwp, l_priority)
    164   1.1     matt define	L_PROC		offsetof(struct lwp, l_proc)
    165   1.1     matt 
    166  1.10     yamt define	LSRUN		LSRUN
    167   1.1     matt define	LSONPROC	LSONPROC
    168   1.1     matt define	P_MD_SYSCALL	offsetof(struct proc, p_md.md_syscall)
    169   1.1     matt 
    170   1.1     matt define	CI_SIZE		sizeof(struct cpu_info)
    171   1.1     matt define	CI_CURLWP	offsetof(struct cpu_info, ci_curlwp)
    172   1.1     matt define	CI_CURPCB	offsetof(struct cpu_info, ci_curpcb)
    173   1.7     matt define	CI_CURPM	offsetof(struct cpu_info, ci_curpm)
    174   1.1     matt define	CI_ASTPENDING	offsetof(struct cpu_info, ci_astpending)
    175  1.11      rjs define	CI_WANT_RESCHED	offsetof(struct cpu_info, ci_want_resched)
    176   1.1     matt define	CI_CPL		offsetof(struct cpu_info, ci_cpl)
    177   1.1     matt define	CI_INTRDEPTH	offsetof(struct cpu_info, ci_intrdepth)
    178   1.1     matt define	CI_INTSTK	offsetof(struct cpu_info, ci_intstk)
    179   1.1     matt define	CI_TEMPSAVE	offsetof(struct cpu_info, ci_tempsave)
    180   1.1     matt define	CI_DDBSAVE	offsetof(struct cpu_info, ci_ddbsave)
    181   1.1     matt define	CI_IPKDBSAVE	offsetof(struct cpu_info, ci_ipkdbsave)
    182   1.1     matt define	CI_DISISAVE	offsetof(struct cpu_info, ci_disisave)
    183   1.8     matt define	CI_IDLESPIN	offsetof(struct cpu_info, ci_idlespin)
    184   1.1     matt 
    185   1.2     matt define	CPUSAVE_R28	CPUSAVE_R28*sizeof(register_t)
    186   1.2     matt define	CPUSAVE_R29	CPUSAVE_R29*sizeof(register_t)
    187   1.2     matt define	CPUSAVE_R30	CPUSAVE_R30*sizeof(register_t)
    188   1.2     matt define	CPUSAVE_R31	CPUSAVE_R31*sizeof(register_t)
    189   1.2     matt define	CPUSAVE_DAR	CPUSAVE_DAR*sizeof(register_t)
    190   1.2     matt define	CPUSAVE_DSISR	CPUSAVE_DSISR*sizeof(register_t)
    191   1.2     matt define	CPUSAVE_SRR0	CPUSAVE_SRR0*sizeof(register_t)
    192   1.2     matt define	CPUSAVE_SRR1	CPUSAVE_SRR1*sizeof(register_t)
    193   1.2     matt 
    194   1.1     matt define	FB_PC		offsetof(struct faultbuf, fb_pc)
    195   1.1     matt define	FB_SP		offsetof(struct faultbuf, fb_sp)
    196   1.1     matt define	FB_R2		offsetof(struct faultbuf, fb_r2)
    197   1.1     matt define	FB_CR		offsetof(struct faultbuf, fb_cr)
    198   1.2     matt define	FB_R13		offsetof(struct faultbuf, fb_fixreg[0])
    199   1.2     matt define	FB_R14		offsetof(struct faultbuf, fb_fixreg[1])
    200   1.2     matt define	FB_R15		offsetof(struct faultbuf, fb_fixreg[2])
    201   1.2     matt define	FB_R16		offsetof(struct faultbuf, fb_fixreg[3])
    202   1.2     matt define	FB_R17		offsetof(struct faultbuf, fb_fixreg[4])
    203   1.2     matt define	FB_R18		offsetof(struct faultbuf, fb_fixreg[5])
    204   1.2     matt define	FB_R19		offsetof(struct faultbuf, fb_fixreg[6])
    205   1.2     matt define	FB_R20		offsetof(struct faultbuf, fb_fixreg[7])
    206   1.2     matt define	FB_R21		offsetof(struct faultbuf, fb_fixreg[8])
    207   1.2     matt define	FB_R22		offsetof(struct faultbuf, fb_fixreg[9])
    208   1.2     matt define	FB_R23		offsetof(struct faultbuf, fb_fixreg[10])
    209   1.2     matt define	FB_R24		offsetof(struct faultbuf, fb_fixreg[11])
    210   1.2     matt define	FB_R25		offsetof(struct faultbuf, fb_fixreg[12])
    211   1.2     matt define	FB_R26		offsetof(struct faultbuf, fb_fixreg[13])
    212   1.2     matt define	FB_R27		offsetof(struct faultbuf, fb_fixreg[14])
    213   1.2     matt define	FB_R28		offsetof(struct faultbuf, fb_fixreg[15])
    214   1.2     matt define	FB_R29		offsetof(struct faultbuf, fb_fixreg[16])
    215   1.2     matt define	FB_R30		offsetof(struct faultbuf, fb_fixreg[17])
    216   1.2     matt define	FB_R31		offsetof(struct faultbuf, fb_fixreg[18])
    217   1.1     matt 
    218   1.1     matt define	CACHELINESIZE	CACHELINESIZE
    219   1.1     matt 
    220   1.1     matt define	CPU_CI		offsetof(struct cpu_info, ci_ci)
    221  1.13  garbled 
    222  1.13  garbled define	OEACPU_64	OEACPU_64
    223  1.13  garbled define	OEACPU_64_BRIDGE	OEACPU_64_BRIDGE
    224  1.13  garbled define	OEACPU_NOBAT	OEACPU_NOBAT
    225  1.13  garbled define	OEACPU_HIGHBAT	OEACPU_HIGHBAT
    226  1.13  garbled define	OEACPU_601	OEACPU_601
    227  1.13  garbled define	OEACPU_HIGHSPRG	OEACPU_HIGHSPRG
    228  1.13  garbled define	OEACPU_ALTIVEC	OEACPU_ALTIVEC
    229