The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/powerpc/powerpc/genassym.c

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /*-
    2  * SPDX-License-Identifier: BSD-3-Clause
    3  *
    4  * Copyright (c) 1982, 1990 The Regents of the University of California.
    5  * All rights reserved.
    6  *
    7  * This code is derived from software contributed to Berkeley by
    8  * William Jolitz.
    9  *
   10  * Redistribution and use in source and binary forms, with or without
   11  * modification, are permitted provided that the following conditions
   12  * are met:
   13  * 1. Redistributions of source code must retain the above copyright
   14  *    notice, this list of conditions and the following disclaimer.
   15  * 2. Redistributions in binary form must reproduce the above copyright
   16  *    notice, this list of conditions and the following disclaimer in the
   17  *    documentation and/or other materials provided with the distribution.
   18  * 3. Neither the name of the University nor the names of its contributors
   19  *    may be used to endorse or promote products derived from this software
   20  *    without specific prior written permission.
   21  *
   22  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
   23  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   24  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   25  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
   26  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   27  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   28  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   29  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   30  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   31  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   32  * SUCH DAMAGE.
   33  *
   34  *      from: @(#)genassym.c    5.11 (Berkeley) 5/10/91
   35  * $FreeBSD: releng/12.0/sys/powerpc/powerpc/genassym.c 336918 2018-07-30 17:03:15Z jhibbits $
   36  */
   37 
   38 #include <sys/param.h>
   39 #include <sys/assym.h>
   40 #include <sys/errno.h>
   41 #include <sys/ktr.h>
   42 #include <sys/proc.h>
   43 #include <sys/queue.h>
   44 #include <sys/signal.h>
   45 #include <sys/smp.h>
   46 #include <sys/systm.h>
   47 #include <sys/ucontext.h>
   48 #include <sys/ucontext.h>
   49 #include <sys/vmmeter.h>
   50 
   51 #include <vm/vm.h>
   52 #include <vm/vm_param.h>
   53 #include <vm/pmap.h>
   54 #include <vm/vm_map.h>
   55 
   56 #include <machine/pcb.h>
   57 #include <machine/psl.h>
   58 #include <machine/sigframe.h>
   59 
   60 ASSYM(PC_CURTHREAD, offsetof(struct pcpu, pc_curthread));
   61 ASSYM(PC_CURPCB, offsetof(struct pcpu, pc_curpcb));
   62 ASSYM(PC_CURPMAP, offsetof(struct pcpu, pc_curpmap));
   63 ASSYM(PC_TEMPSAVE, offsetof(struct pcpu, pc_tempsave));
   64 ASSYM(PC_DISISAVE, offsetof(struct pcpu, pc_disisave));
   65 ASSYM(PC_DBSAVE, offsetof(struct pcpu, pc_dbsave));
   66 ASSYM(PC_RESTORE, offsetof(struct pcpu, pc_restore));
   67 
   68 #if defined(BOOKE)
   69 ASSYM(PC_BOOKE_CRITSAVE, offsetof(struct pcpu, pc_booke.critsave));
   70 ASSYM(PC_BOOKE_MCHKSAVE, offsetof(struct pcpu, pc_booke.mchksave));
   71 ASSYM(PC_BOOKE_TLBSAVE, offsetof(struct pcpu, pc_booke.tlbsave));
   72 ASSYM(PC_BOOKE_TLB_LEVEL, offsetof(struct pcpu, pc_booke.tlb_level));
   73 ASSYM(PC_BOOKE_TLB_LOCK, offsetof(struct pcpu, pc_booke.tlb_lock));
   74 #endif
   75 
   76 ASSYM(CPUSAVE_R27, CPUSAVE_R27*sizeof(register_t));
   77 ASSYM(CPUSAVE_R28, CPUSAVE_R28*sizeof(register_t));
   78 ASSYM(CPUSAVE_R29, CPUSAVE_R29*sizeof(register_t));
   79 ASSYM(CPUSAVE_R30, CPUSAVE_R30*sizeof(register_t));
   80 ASSYM(CPUSAVE_R31, CPUSAVE_R31*sizeof(register_t));
   81 ASSYM(CPUSAVE_SRR0, CPUSAVE_SRR0*sizeof(register_t));
   82 ASSYM(CPUSAVE_SRR1, CPUSAVE_SRR1*sizeof(register_t));
   83 ASSYM(CPUSAVE_AIM_DAR, CPUSAVE_AIM_DAR*sizeof(register_t));
   84 ASSYM(CPUSAVE_AIM_DSISR, CPUSAVE_AIM_DSISR*sizeof(register_t));
   85 ASSYM(CPUSAVE_BOOKE_DEAR, CPUSAVE_BOOKE_DEAR*sizeof(register_t));
   86 ASSYM(CPUSAVE_BOOKE_ESR, CPUSAVE_BOOKE_ESR*sizeof(register_t));
   87 ASSYM(BOOKE_CRITSAVE_SRR0, BOOKE_CRITSAVE_SRR0*sizeof(register_t));
   88 ASSYM(BOOKE_CRITSAVE_SRR1, BOOKE_CRITSAVE_SRR1*sizeof(register_t));
   89 
   90 ASSYM(TLBSAVE_BOOKE_LR, TLBSAVE_BOOKE_LR*sizeof(register_t));
   91 ASSYM(TLBSAVE_BOOKE_CR, TLBSAVE_BOOKE_CR*sizeof(register_t));
   92 ASSYM(TLBSAVE_BOOKE_SRR0, TLBSAVE_BOOKE_SRR0*sizeof(register_t));
   93 ASSYM(TLBSAVE_BOOKE_SRR1, TLBSAVE_BOOKE_SRR1*sizeof(register_t));
   94 ASSYM(TLBSAVE_BOOKE_R20, TLBSAVE_BOOKE_R20*sizeof(register_t));
   95 ASSYM(TLBSAVE_BOOKE_R21, TLBSAVE_BOOKE_R21*sizeof(register_t));
   96 ASSYM(TLBSAVE_BOOKE_R22, TLBSAVE_BOOKE_R22*sizeof(register_t));
   97 ASSYM(TLBSAVE_BOOKE_R23, TLBSAVE_BOOKE_R23*sizeof(register_t));
   98 ASSYM(TLBSAVE_BOOKE_R24, TLBSAVE_BOOKE_R24*sizeof(register_t));
   99 ASSYM(TLBSAVE_BOOKE_R25, TLBSAVE_BOOKE_R25*sizeof(register_t));
  100 ASSYM(TLBSAVE_BOOKE_R26, TLBSAVE_BOOKE_R26*sizeof(register_t));
  101 ASSYM(TLBSAVE_BOOKE_R27, TLBSAVE_BOOKE_R27*sizeof(register_t));
  102 ASSYM(TLBSAVE_BOOKE_R28, TLBSAVE_BOOKE_R28*sizeof(register_t));
  103 ASSYM(TLBSAVE_BOOKE_R29, TLBSAVE_BOOKE_R29*sizeof(register_t));
  104 ASSYM(TLBSAVE_BOOKE_R30, TLBSAVE_BOOKE_R30*sizeof(register_t));
  105 ASSYM(TLBSAVE_BOOKE_R31, TLBSAVE_BOOKE_R31*sizeof(register_t));
  106 
  107 ASSYM(MTX_LOCK, offsetof(struct mtx, mtx_lock));
  108 
  109 #if defined(AIM)
  110 ASSYM(USER_ADDR, USER_ADDR);
  111 #ifdef __powerpc64__
  112 ASSYM(PC_KERNSLB, offsetof(struct pcpu, pc_aim.slb));
  113 ASSYM(PC_USERSLB, offsetof(struct pcpu, pc_aim.userslb));
  114 ASSYM(PC_SLBSAVE, offsetof(struct pcpu, pc_aim.slbsave));
  115 ASSYM(PC_SLBSTACK, offsetof(struct pcpu, pc_aim.slbstack));
  116 ASSYM(USER_SLB_SLOT, USER_SLB_SLOT);
  117 ASSYM(USER_SLB_SLBE, USER_SLB_SLBE);
  118 ASSYM(SEGMENT_MASK, SEGMENT_MASK);
  119 #else
  120 ASSYM(PM_SR, offsetof(struct pmap, pm_sr));
  121 ASSYM(USER_SR, USER_SR);
  122 #endif
  123 #elif defined(BOOKE)
  124 #ifdef __powerpc64__
  125 ASSYM(PM_PP2D, offsetof(struct pmap, pm_pp2d));
  126 #else
  127 ASSYM(PM_PDIR, offsetof(struct pmap, pm_pdir));
  128 #endif
  129 /*
  130  * With pte_t being a bitfield struct, these fields cannot be addressed via
  131  * offsetof().
  132  */
  133 ASSYM(PTE_RPN, 0);
  134 ASSYM(PTE_FLAGS, sizeof(uint32_t));
  135 #if defined(BOOKE_E500)
  136 ASSYM(TLB_ENTRY_SIZE, sizeof(struct tlb_entry));
  137 #endif
  138 #endif
  139 
  140 #ifdef __powerpc64__
  141 ASSYM(FSP, 48);
  142 #else
  143 ASSYM(FSP, 8);
  144 #endif
  145 ASSYM(FRAMELEN, FRAMELEN);
  146 ASSYM(FRAME_0, offsetof(struct trapframe, fixreg[0]));
  147 ASSYM(FRAME_1, offsetof(struct trapframe, fixreg[1]));
  148 ASSYM(FRAME_2, offsetof(struct trapframe, fixreg[2]));
  149 ASSYM(FRAME_3, offsetof(struct trapframe, fixreg[3]));
  150 ASSYM(FRAME_4, offsetof(struct trapframe, fixreg[4]));
  151 ASSYM(FRAME_5, offsetof(struct trapframe, fixreg[5]));
  152 ASSYM(FRAME_6, offsetof(struct trapframe, fixreg[6]));
  153 ASSYM(FRAME_7, offsetof(struct trapframe, fixreg[7]));
  154 ASSYM(FRAME_8, offsetof(struct trapframe, fixreg[8]));
  155 ASSYM(FRAME_9, offsetof(struct trapframe, fixreg[9]));
  156 ASSYM(FRAME_10, offsetof(struct trapframe, fixreg[10]));
  157 ASSYM(FRAME_11, offsetof(struct trapframe, fixreg[11]));
  158 ASSYM(FRAME_12, offsetof(struct trapframe, fixreg[12]));
  159 ASSYM(FRAME_13, offsetof(struct trapframe, fixreg[13]));
  160 ASSYM(FRAME_14, offsetof(struct trapframe, fixreg[14]));
  161 ASSYM(FRAME_15, offsetof(struct trapframe, fixreg[15]));
  162 ASSYM(FRAME_16, offsetof(struct trapframe, fixreg[16]));
  163 ASSYM(FRAME_17, offsetof(struct trapframe, fixreg[17]));
  164 ASSYM(FRAME_18, offsetof(struct trapframe, fixreg[18]));
  165 ASSYM(FRAME_19, offsetof(struct trapframe, fixreg[19]));
  166 ASSYM(FRAME_20, offsetof(struct trapframe, fixreg[20]));
  167 ASSYM(FRAME_21, offsetof(struct trapframe, fixreg[21]));
  168 ASSYM(FRAME_22, offsetof(struct trapframe, fixreg[22]));
  169 ASSYM(FRAME_23, offsetof(struct trapframe, fixreg[23]));
  170 ASSYM(FRAME_24, offsetof(struct trapframe, fixreg[24]));
  171 ASSYM(FRAME_25, offsetof(struct trapframe, fixreg[25]));
  172 ASSYM(FRAME_26, offsetof(struct trapframe, fixreg[26]));
  173 ASSYM(FRAME_27, offsetof(struct trapframe, fixreg[27]));
  174 ASSYM(FRAME_28, offsetof(struct trapframe, fixreg[28]));
  175 ASSYM(FRAME_29, offsetof(struct trapframe, fixreg[29]));
  176 ASSYM(FRAME_30, offsetof(struct trapframe, fixreg[30]));
  177 ASSYM(FRAME_31, offsetof(struct trapframe, fixreg[31]));
  178 ASSYM(FRAME_LR, offsetof(struct trapframe, lr));
  179 ASSYM(FRAME_CR, offsetof(struct trapframe, cr));
  180 ASSYM(FRAME_CTR, offsetof(struct trapframe, ctr));
  181 ASSYM(FRAME_XER, offsetof(struct trapframe, xer));
  182 ASSYM(FRAME_SRR0, offsetof(struct trapframe, srr0));
  183 ASSYM(FRAME_SRR1, offsetof(struct trapframe, srr1));
  184 ASSYM(FRAME_EXC, offsetof(struct trapframe, exc));
  185 ASSYM(FRAME_AIM_DAR, offsetof(struct trapframe, dar));
  186 ASSYM(FRAME_AIM_DSISR, offsetof(struct trapframe, cpu.aim.dsisr));
  187 ASSYM(FRAME_BOOKE_DEAR, offsetof(struct trapframe, dar));
  188 ASSYM(FRAME_BOOKE_ESR, offsetof(struct trapframe, cpu.booke.esr));
  189 ASSYM(FRAME_BOOKE_DBCR0, offsetof(struct trapframe, cpu.booke.dbcr0));
  190 
  191 ASSYM(CF_FUNC, offsetof(struct callframe, cf_func));
  192 ASSYM(CF_ARG0, offsetof(struct callframe, cf_arg0));
  193 ASSYM(CF_ARG1, offsetof(struct callframe, cf_arg1));
  194 ASSYM(CF_SIZE, sizeof(struct callframe));
  195 
  196 ASSYM(PCB_CONTEXT, offsetof(struct pcb, pcb_context));
  197 ASSYM(PCB_CR, offsetof(struct pcb, pcb_cr));
  198 ASSYM(PCB_DSCR, offsetof(struct pcb, pcb_dscr));
  199 ASSYM(PCB_SP, offsetof(struct pcb, pcb_sp));
  200 ASSYM(PCB_TOC, offsetof(struct pcb, pcb_toc));
  201 ASSYM(PCB_LR, offsetof(struct pcb, pcb_lr));
  202 ASSYM(PCB_ONFAULT, offsetof(struct pcb, pcb_onfault));
  203 ASSYM(PCB_FLAGS, offsetof(struct pcb, pcb_flags));
  204 ASSYM(PCB_FPU, PCB_FPU);
  205 ASSYM(PCB_VEC, PCB_VEC);
  206 ASSYM(PCB_CDSCR, PCB_CDSCR);
  207 
  208 ASSYM(PCB_AIM_USR_VSID, offsetof(struct pcb, pcb_cpu.aim.usr_vsid));
  209 ASSYM(PCB_BOOKE_DBCR0, offsetof(struct pcb, pcb_cpu.booke.dbcr0));
  210 
  211 ASSYM(PCB_VSCR, offsetof(struct pcb, pcb_vec.vscr));
  212 
  213 ASSYM(TD_LOCK, offsetof(struct thread, td_lock));
  214 ASSYM(TD_PROC, offsetof(struct thread, td_proc));
  215 ASSYM(TD_PCB, offsetof(struct thread, td_pcb));
  216 
  217 ASSYM(P_VMSPACE, offsetof(struct proc, p_vmspace));
  218 
  219 ASSYM(VM_PMAP, offsetof(struct vmspace, vm_pmap));
  220 
  221 ASSYM(TD_FLAGS, offsetof(struct thread, td_flags));
  222 
  223 ASSYM(TDF_ASTPENDING, TDF_ASTPENDING);
  224 ASSYM(TDF_NEEDRESCHED, TDF_NEEDRESCHED);
  225 
  226 ASSYM(SF_UC, offsetof(struct sigframe, sf_uc));
  227 
  228 ASSYM(KERNBASE, KERNBASE);
  229 ASSYM(DMAP_BASE_ADDRESS, DMAP_BASE_ADDRESS);
  230 ASSYM(MAXCOMLEN, MAXCOMLEN);
  231 
  232 #ifdef __powerpc64__
  233 ASSYM(PSL_CM, PSL_CM);
  234 #endif
  235 ASSYM(PSL_GS, PSL_GS);
  236 ASSYM(PSL_DE, PSL_DE);
  237 ASSYM(PSL_DS, PSL_DS);
  238 ASSYM(PSL_IS, PSL_IS);
  239 ASSYM(PSL_CE, PSL_CE);
  240 ASSYM(PSL_UCLE, PSL_UCLE);
  241 ASSYM(PSL_WE, PSL_WE);
  242 ASSYM(PSL_UBLE, PSL_UBLE);
  243 
  244 #if defined(AIM) && defined(__powerpc64__)
  245 ASSYM(PSL_SF, PSL_SF);
  246 ASSYM(PSL_HV, PSL_HV);
  247 #endif
  248 
  249 ASSYM(PSL_POW, PSL_POW);
  250 ASSYM(PSL_ILE, PSL_ILE);
  251 ASSYM(PSL_LE, PSL_LE);
  252 ASSYM(PSL_SE, PSL_SE);
  253 ASSYM(PSL_RI, PSL_RI);
  254 ASSYM(PSL_DR, PSL_DR);
  255 ASSYM(PSL_IP, PSL_IP);
  256 ASSYM(PSL_IR, PSL_IR);
  257 
  258 ASSYM(PSL_FE_DIS, PSL_FE_DIS);
  259 ASSYM(PSL_FE_NONREC, PSL_FE_NONREC);
  260 ASSYM(PSL_FE_PREC, PSL_FE_PREC);
  261 ASSYM(PSL_FE_REC, PSL_FE_REC);
  262 
  263 ASSYM(PSL_VEC, PSL_VEC);
  264 ASSYM(PSL_BE, PSL_BE);
  265 ASSYM(PSL_EE, PSL_EE);
  266 ASSYM(PSL_FE0, PSL_FE0);
  267 ASSYM(PSL_FE1, PSL_FE1);
  268 ASSYM(PSL_FP, PSL_FP);
  269 ASSYM(PSL_ME, PSL_ME);
  270 ASSYM(PSL_PR, PSL_PR);
  271 ASSYM(PSL_PMM, PSL_PMM);
  272 

Cache object: 599c435f1c6b441421b00e92b9785b38


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.