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/sparc64/sparc64/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  * Copyright (c) 2001 Jake Burkholder.
    3  * All rights reserved.
    4  *
    5  * Redistribution and use in source and binary forms, with or without
    6  * modification, are permitted provided that the following conditions
    7  * are met:
    8  * 1. Redistributions of source code must retain the above copyright
    9  *    notice, this list of conditions and the following disclaimer.
   10  * 2. Redistributions in binary form must reproduce the above copyright
   11  *    notice, this list of conditions and the following disclaimer in the
   12  *    documentation and/or other materials provided with the distribution.
   13  *
   14  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
   15  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   16  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   17  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
   18  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   19  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   20  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   21  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   22  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   23  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   24  * SUCH DAMAGE.
   25  *
   26  *      from: @(#)genassym.c    5.11 (Berkeley) 5/10/91
   27  */
   28 
   29 #include <sys/cdefs.h>
   30 __FBSDID("$FreeBSD$");
   31 
   32 #include "opt_kstack_pages.h"
   33 
   34 #include <sys/param.h>
   35 #include <sys/assym.h>
   36 #include <sys/ktr.h>
   37 #include <sys/proc.h>
   38 #include <sys/smp.h>
   39 #include <sys/vmmeter.h>
   40 
   41 #include <vm/vm.h>
   42 #include <vm/vm_page.h>
   43 #include <vm/vm_map.h>
   44 
   45 #ifdef SUN4U
   46 #include <machine/cache.h>
   47 #endif
   48 #ifdef SUN4V
   49 #include <machine/mmu.h>
   50 #endif
   51 #include <machine/pcb.h>
   52 #include <machine/setjmp.h>
   53 #include <machine/smp.h>
   54 #include <machine/tlb.h>
   55 #include <machine/tte.h>
   56 #ifdef SUN4V
   57 #include <machine/trap.h>
   58 #include <machine/tte_hash.h>
   59 #endif
   60 #include <machine/vmparam.h>
   61 
   62 ASSYM(KERNBASE, KERNBASE);
   63 
   64 ASSYM(KSTACK_PAGES, KSTACK_PAGES);
   65 ASSYM(PCPU_PAGES, PCPU_PAGES);
   66 
   67 ASSYM(TAR_VPN_SHIFT, TAR_VPN_SHIFT);
   68 
   69 #ifdef SUN4U
   70 ASSYM(TLB_DEMAP_ALL, TLB_DEMAP_ALL);
   71 #endif
   72 ASSYM(TLB_DEMAP_CONTEXT, TLB_DEMAP_CONTEXT);
   73 ASSYM(TLB_DEMAP_NUCLEUS, TLB_DEMAP_NUCLEUS);
   74 ASSYM(TLB_DEMAP_PAGE, TLB_DEMAP_PAGE);
   75 ASSYM(TLB_DEMAP_PRIMARY, TLB_DEMAP_PRIMARY);
   76 
   77 ASSYM(INT_SHIFT, INT_SHIFT);
   78 ASSYM(PTR_SHIFT, PTR_SHIFT);
   79 
   80 ASSYM(PAGE_SHIFT, PAGE_SHIFT);
   81 ASSYM(PAGE_SHIFT_8K, PAGE_SHIFT_8K);
   82 ASSYM(PAGE_SHIFT_4M, PAGE_SHIFT_4M);
   83 ASSYM(PAGE_SIZE, PAGE_SIZE);
   84 ASSYM(PAGE_SIZE_4M, PAGE_SIZE_4M);
   85 
   86 #ifdef SMP
   87 ASSYM(CSA_PCPU, offsetof(struct cpu_start_args, csa_pcpu));
   88 ASSYM(CSA_STATE, offsetof(struct cpu_start_args, csa_state));
   89 #ifdef SUN4U
   90 ASSYM(CSA_MID, offsetof(struct cpu_start_args, csa_mid));
   91 ASSYM(CSA_STICK, offsetof(struct cpu_start_args, csa_stick));
   92 ASSYM(CSA_TICK, offsetof(struct cpu_start_args, csa_tick));
   93 ASSYM(CSA_TTES, offsetof(struct cpu_start_args, csa_ttes));
   94 ASSYM(CSA_VER, offsetof(struct cpu_start_args, csa_ver));
   95 #endif
   96 #ifdef SUN4V
   97 ASSYM(CSA_CPUID, offsetof(struct cpu_start_args, csa_cpuid));
   98 #endif
   99 #endif
  100 
  101 #ifdef SUN4U
  102 ASSYM(DC_SIZE, offsetof(struct cacheinfo, dc_size));
  103 ASSYM(DC_LINESIZE, offsetof(struct cacheinfo, dc_linesize));
  104 ASSYM(IC_SIZE, offsetof(struct cacheinfo, ic_size));
  105 ASSYM(IC_LINESIZE, offsetof(struct cacheinfo, ic_linesize));
  106 #endif
  107 
  108 ASSYM(KTR_SIZEOF, sizeof(struct ktr_entry));
  109 ASSYM(KTR_LINE, offsetof(struct ktr_entry, ktr_line));
  110 ASSYM(KTR_FILE, offsetof(struct ktr_entry, ktr_file));
  111 ASSYM(KTR_DESC, offsetof(struct ktr_entry, ktr_desc));
  112 ASSYM(KTR_CPU, offsetof(struct ktr_entry, ktr_cpu));
  113 ASSYM(KTR_TIMESTAMP, offsetof(struct ktr_entry, ktr_timestamp));
  114 ASSYM(KTR_PARM1, offsetof(struct ktr_entry, ktr_parms[0]));
  115 ASSYM(KTR_PARM2, offsetof(struct ktr_entry, ktr_parms[1]));
  116 ASSYM(KTR_PARM3, offsetof(struct ktr_entry, ktr_parms[2]));
  117 ASSYM(KTR_PARM4, offsetof(struct ktr_entry, ktr_parms[3]));
  118 ASSYM(KTR_PARM5, offsetof(struct ktr_entry, ktr_parms[4]));
  119 ASSYM(KTR_PARM6, offsetof(struct ktr_entry, ktr_parms[5]));
  120 
  121 ASSYM(TTE_SHIFT, TTE_SHIFT);
  122 #ifdef SUN4U
  123 ASSYM(TTE_VPN, offsetof(struct tte, tte_vpn));
  124 ASSYM(TTE_DATA, offsetof(struct tte, tte_data));
  125 
  126 ASSYM(TD_V, TD_V);
  127 ASSYM(TD_EXEC, TD_EXEC);
  128 ASSYM(TD_REF, TD_REF);
  129 ASSYM(TD_SW, TD_SW);
  130 ASSYM(TD_L, TD_L);
  131 ASSYM(TD_CP, TD_CP);
  132 ASSYM(TD_CV, TD_CV);
  133 ASSYM(TD_W, TD_W);
  134 
  135 ASSYM(TS_MIN, TS_MIN);
  136 ASSYM(TS_MAX, TS_MAX);
  137 ASSYM(TLB_DAR_SLOT_SHIFT, TLB_DAR_SLOT_SHIFT);
  138 ASSYM(TLB_CXR_PGSZ_MASK, TLB_CXR_PGSZ_MASK);
  139 ASSYM(TLB_DIRECT_ADDRESS_MASK, TLB_DIRECT_ADDRESS_MASK);
  140 ASSYM(TLB_DIRECT_TO_TTE_MASK, TLB_DIRECT_TO_TTE_MASK);
  141 ASSYM(TV_SIZE_BITS, TV_SIZE_BITS);
  142 #endif
  143 
  144 #ifdef SUN4V
  145 ASSYM(VTD_REF, VTD_REF);
  146 ASSYM(VTD_W, VTD_W);
  147 ASSYM(VTD_SW_W, VTD_SW_W);
  148 ASSYM(VTD_LOCK, VTD_LOCK);
  149 
  150 ASSYM(THE_SHIFT, THE_SHIFT);
  151 ASSYM(PM_HASHSCRATCH, offsetof(struct pmap, pm_hashscratch));
  152 ASSYM(PM_TSBSCRATCH, offsetof(struct pmap, pm_tsbscratch));
  153 ASSYM(PM_TSB_RA, offsetof(struct pmap, pm_tsb_ra));
  154 ASSYM(PM_TLBACTIVE, offsetof(struct pmap, pm_tlbactive));
  155 ASSYM(HASH_ENTRY_SHIFT, HASH_ENTRY_SHIFT);
  156 #endif
  157 
  158 ASSYM(V_INTR, offsetof(struct vmmeter, v_intr));
  159 
  160 ASSYM(MAXCOMLEN, MAXCOMLEN);
  161 ASSYM(PC_CURTHREAD, offsetof(struct pcpu, pc_curthread));
  162 ASSYM(PC_CURPCB, offsetof(struct pcpu, pc_curpcb));
  163 ASSYM(PC_CPUID, offsetof(struct pcpu, pc_cpuid));
  164 ASSYM(PC_CPUMASK, offsetof(struct pcpu, pc_cpumask));
  165 ASSYM(PC_IRHEAD, offsetof(struct pcpu, pc_irhead));
  166 ASSYM(PC_IRTAIL, offsetof(struct pcpu, pc_irtail));
  167 ASSYM(PC_IRFREE, offsetof(struct pcpu, pc_irfree));
  168 ASSYM(PC_CNT, offsetof(struct pcpu, pc_cnt));
  169 ASSYM(PC_SIZEOF, sizeof(struct pcpu));
  170 
  171 #ifdef SUN4V
  172 ASSYM(PC_CPU_Q_RA, offsetof(struct pcpu, pc_cpu_q_ra));
  173 ASSYM(PC_CPU_Q_SIZE, offsetof(struct pcpu, pc_cpu_q_size));
  174 ASSYM(PC_DEV_Q_RA, offsetof(struct pcpu, pc_dev_q_ra));
  175 ASSYM(PC_DEV_Q_SIZE, offsetof(struct pcpu, pc_dev_q_size));
  176 
  177 ASSYM(PC_RQ_BASE, offsetof(struct pcpu, pc_rq_ra));
  178 ASSYM(PC_RQ_SIZE, offsetof(struct pcpu, pc_rq_size));
  179 ASSYM(PC_NRQ_BASE, offsetof(struct pcpu, pc_nrq_ra));
  180 ASSYM(PC_NRQ_SIZE, offsetof(struct pcpu, pc_nrq_size));
  181 ASSYM(PC_MONDO_DATA, offsetof(struct pcpu, pc_mondo_data));
  182 ASSYM(PC_MONDO_DATA_RA, offsetof(struct pcpu, pc_mondo_data_ra));
  183 
  184 ASSYM(PC_KWBUF_FULL, offsetof(struct pcpu, pc_kwbuf_full));
  185 ASSYM(PC_KWBUF_SP, offsetof(struct pcpu, pc_kwbuf_sp));
  186 ASSYM(PC_KWBUF, offsetof(struct pcpu, pc_kwbuf));
  187 ASSYM(PC_PAD, offsetof(struct pcpu, pad));
  188 ASSYM(PC_PMAP, offsetof(struct pcpu, pc_curpmap));
  189 ASSYM(PC_TSBWBUF, offsetof(struct pcpu, pc_tsbwbuf));
  190 
  191 ASSYM(PCB_KSTACK, offsetof(struct pcb, pcb_kstack));
  192 ASSYM(PCB_TSTATE, offsetof(struct pcb, pcb_tstate));
  193 ASSYM(PCB_TPC, offsetof(struct pcb, pcb_tpc));
  194 ASSYM(PCB_TNPC, offsetof(struct pcb, pcb_tnpc));
  195 ASSYM(PCB_TT, offsetof(struct pcb, pcb_tt));
  196 ASSYM(PCB_SFAR, offsetof(struct pcb, pcb_sfar));
  197 ASSYM(PM_TSB_MISS_COUNT, offsetof(struct pmap, pm_tsb_miss_count));
  198 ASSYM(PM_TSB_CAP_MISS_COUNT, offsetof(struct pmap, pm_tsb_cap_miss_count));
  199 #endif
  200 #ifdef SUN4U
  201 ASSYM(PC_CACHE, offsetof(struct pcpu, pc_cache));
  202 ASSYM(PC_MID, offsetof(struct pcpu, pc_mid));
  203 ASSYM(PC_PMAP, offsetof(struct pcpu, pc_pmap));
  204 ASSYM(PC_TLB_CTX, offsetof(struct pcpu, pc_tlb_ctx));
  205 ASSYM(PC_TLB_CTX_MAX, offsetof(struct pcpu, pc_tlb_ctx_max));
  206 ASSYM(PC_TLB_CTX_MIN, offsetof(struct pcpu, pc_tlb_ctx_min));
  207 #endif
  208 
  209 ASSYM(IR_NEXT, offsetof(struct intr_request, ir_next));
  210 ASSYM(IR_FUNC, offsetof(struct intr_request, ir_func));
  211 ASSYM(IR_ARG, offsetof(struct intr_request, ir_arg));
  212 ASSYM(IR_PRI, offsetof(struct intr_request, ir_pri));
  213 ASSYM(IR_VEC, offsetof(struct intr_request, ir_vec));
  214 
  215 #if defined(SUN4U) && defined(SMP)
  216 ASSYM(ICA_PA, offsetof(struct ipi_cache_args, ica_pa));
  217 
  218 ASSYM(IRA_MASK, offsetof(struct ipi_rd_args, ira_mask));
  219 ASSYM(IRA_VAL, offsetof(struct ipi_rd_args, ira_val));
  220 
  221 ASSYM(ITA_MASK, offsetof(struct ipi_tlb_args, ita_mask));
  222 ASSYM(ITA_PMAP, offsetof(struct ipi_tlb_args, ita_pmap));
  223 ASSYM(ITA_START, offsetof(struct ipi_tlb_args, ita_start));
  224 ASSYM(ITA_END, offsetof(struct ipi_tlb_args, ita_end));
  225 ASSYM(ITA_VA, offsetof(struct ipi_tlb_args, ita_va));
  226 #endif
  227 
  228 ASSYM(IV_FUNC, offsetof(struct intr_vector, iv_func));
  229 ASSYM(IV_ARG, offsetof(struct intr_vector, iv_arg));
  230 ASSYM(IV_PRI, offsetof(struct intr_vector, iv_pri));
  231 
  232 ASSYM(TDF_ASTPENDING, TDF_ASTPENDING);
  233 ASSYM(TDF_NEEDRESCHED, TDF_NEEDRESCHED);
  234 
  235 ASSYM(MD_UTRAP, offsetof(struct mdproc, md_utrap));
  236 
  237 ASSYM(P_COMM, offsetof(struct proc, p_comm));
  238 ASSYM(P_MD, offsetof(struct proc, p_md));
  239 ASSYM(P_PID, offsetof(struct proc, p_pid));
  240 ASSYM(P_VMSPACE, offsetof(struct proc, p_vmspace));
  241 
  242 ASSYM(TD_FLAGS, offsetof(struct thread, td_flags));
  243 ASSYM(TD_FRAME, offsetof(struct thread, td_frame));
  244 ASSYM(TD_KSTACK, offsetof(struct thread, td_kstack));
  245 ASSYM(TD_LOCK, offsetof(struct thread, td_lock));
  246 ASSYM(TD_PCB, offsetof(struct thread, td_pcb));
  247 ASSYM(TD_PROC, offsetof(struct thread, td_proc));
  248 ASSYM(TD_MD, offsetof(struct thread, td_md));
  249 ASSYM(MD_SAVED_PIL, offsetof(struct mdthread, md_saved_pil));
  250 
  251 ASSYM(PCB_SIZEOF, sizeof(struct pcb));
  252 ASSYM(PCB_RW, offsetof(struct pcb, pcb_rw));
  253 ASSYM(PCB_KFP, offsetof(struct pcb, pcb_kfp));
  254 ASSYM(PCB_UFP, offsetof(struct pcb, pcb_ufp));
  255 ASSYM(PCB_RWSP, offsetof(struct pcb, pcb_rwsp));
  256 ASSYM(PCB_FLAGS, offsetof(struct pcb, pcb_flags));
  257 ASSYM(PCB_NSAVED, offsetof(struct pcb, pcb_nsaved));
  258 ASSYM(PCB_PC, offsetof(struct pcb, pcb_pc));
  259 ASSYM(PCB_SP, offsetof(struct pcb, pcb_sp));
  260 ASSYM(PCB_PAD, offsetof(struct pcb, pcb_pad));
  261 
  262 ASSYM(VM_PMAP, offsetof(struct vmspace, vm_pmap));
  263 ASSYM(PM_ACTIVE, offsetof(struct pmap, pm_active));
  264 ASSYM(PM_CONTEXT, offsetof(struct pmap, pm_context));
  265 ASSYM(PM_TSB, offsetof(struct pmap, pm_tsb));
  266 
  267 ASSYM(_JB_FP, offsetof(struct _jmp_buf, _jb[_JB_FP]));
  268 ASSYM(_JB_PC, offsetof(struct _jmp_buf, _jb[_JB_PC]));
  269 ASSYM(_JB_SP, offsetof(struct _jmp_buf, _jb[_JB_SP]));
  270 ASSYM(_JB_SIGFLAG, offsetof(struct _jmp_buf, _jb[_JB_SIGFLAG]));
  271 ASSYM(_JB_SIGMASK, offsetof(struct _jmp_buf, _jb[_JB_SIGMASK]));
  272 
  273 ASSYM(TF_G0, offsetof(struct trapframe, tf_global[0]));
  274 ASSYM(TF_G1, offsetof(struct trapframe, tf_global[1]));
  275 ASSYM(TF_G2, offsetof(struct trapframe, tf_global[2]));
  276 ASSYM(TF_G3, offsetof(struct trapframe, tf_global[3]));
  277 ASSYM(TF_G4, offsetof(struct trapframe, tf_global[4]));
  278 ASSYM(TF_G5, offsetof(struct trapframe, tf_global[5]));
  279 ASSYM(TF_G6, offsetof(struct trapframe, tf_global[6]));
  280 ASSYM(TF_G7, offsetof(struct trapframe, tf_global[7]));
  281 ASSYM(TF_O0, offsetof(struct trapframe, tf_out[0]));
  282 ASSYM(TF_O1, offsetof(struct trapframe, tf_out[1]));
  283 ASSYM(TF_O2, offsetof(struct trapframe, tf_out[2]));
  284 ASSYM(TF_O3, offsetof(struct trapframe, tf_out[3]));
  285 ASSYM(TF_O4, offsetof(struct trapframe, tf_out[4]));
  286 ASSYM(TF_O5, offsetof(struct trapframe, tf_out[5]));
  287 ASSYM(TF_O6, offsetof(struct trapframe, tf_out[6]));
  288 ASSYM(TF_O7, offsetof(struct trapframe, tf_out[7]));
  289 ASSYM(TF_FPRS, offsetof(struct trapframe, tf_fprs));
  290 ASSYM(TF_FSR, offsetof(struct trapframe, tf_fsr));
  291 ASSYM(TF_GSR, offsetof(struct trapframe, tf_gsr));
  292 ASSYM(TF_PIL, offsetof(struct trapframe, tf_pil));
  293 #ifdef SUN4U
  294 ASSYM(TF_LEVEL, offsetof(struct trapframe, tf_level));
  295 ASSYM(TF_SFAR, offsetof(struct trapframe, tf_sfar));
  296 ASSYM(TF_SFSR, offsetof(struct trapframe, tf_sfsr));
  297 ASSYM(TF_TAR, offsetof(struct trapframe, tf_tar));
  298 ASSYM(TF_TYPE, offsetof(struct trapframe, tf_type));
  299 ASSYM(TF_Y, offsetof(struct trapframe, tf_y));
  300 #endif
  301 #ifdef SUN4V
  302 ASSYM(TF_ASI, offsetof(struct trapframe, tf_asi));
  303 #endif
  304 ASSYM(TF_TNPC, offsetof(struct trapframe, tf_tnpc));
  305 ASSYM(TF_TPC, offsetof(struct trapframe, tf_tpc));
  306 ASSYM(TF_TSTATE, offsetof(struct trapframe, tf_tstate));
  307 ASSYM(TF_WSTATE, offsetof(struct trapframe, tf_wstate));
  308 ASSYM(TF_SIZEOF, sizeof(struct trapframe));
  309 
  310 ASSYM(VM_MIN_DIRECT_ADDRESS, VM_MIN_DIRECT_ADDRESS);
  311 ASSYM(VM_MIN_PROM_ADDRESS, VM_MIN_PROM_ADDRESS);
  312 ASSYM(VM_MAX_PROM_ADDRESS, VM_MAX_PROM_ADDRESS);

Cache object: 62b705ff3b08501b75e205d68cf712ef


[ 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.