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/amd64/amd64/genassym.c

Version: -  FREEBSD  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-2  -  FREEBSD-11-1  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-4  -  FREEBSD-10-3  -  FREEBSD-10-2  -  FREEBSD-10-1  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-3  -  FREEBSD-9-2  -  FREEBSD-9-1  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-4  -  FREEBSD-8-3  -  FREEBSD-8-2  -  FREEBSD-8-1  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-4  -  FREEBSD-7-3  -  FREEBSD-7-2  -  FREEBSD-7-1  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-4  -  FREEBSD-6-3  -  FREEBSD-6-2  -  FREEBSD-6-1  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-5  -  FREEBSD-5-4  -  FREEBSD-5-3  -  FREEBSD-5-2  -  FREEBSD-5-1  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  linux-2.6  -  linux-2.4.22  -  MK83  -  MK84  -  PLAN9  -  DFBSD  -  NETBSD  -  NETBSD5  -  NETBSD4  -  NETBSD3  -  NETBSD20  -  OPENBSD  -  xnu-517  -  xnu-792  -  xnu-792.6.70  -  xnu-1228  -  xnu-1456.1.26  -  xnu-1699.24.8  -  xnu-2050.18.24  -  OPENSOLARIS  -  minix-3-1-1 
SearchContext: -  none  -  3  -  10 

    1 /*-
    2  * Copyright (c) 1982, 1990 The Regents of the University of California.
    3  * All rights reserved.
    4  *
    5  * This code is derived from software contributed to Berkeley by
    6  * William Jolitz.
    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  * 4. Neither the name of the University nor the names of its contributors
   17  *    may be used to endorse or promote products derived from this software
   18  *    without specific prior written permission.
   19  *
   20  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
   21  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   22  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   23  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
   24  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   25  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   26  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   27  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   28  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   29  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   30  * SUCH DAMAGE.
   31  *
   32  *      from: @(#)genassym.c    5.11 (Berkeley) 5/10/91
   33  */
   34 
   35 #include <sys/cdefs.h>
   36 __FBSDID("$FreeBSD: releng/10.0/sys/amd64/amd64/genassym.c 255217 2013-09-04 23:31:29Z kib $");
   37 
   38 #include "opt_compat.h"
   39 #include "opt_hwpmc_hooks.h"
   40 #include "opt_kstack_pages.h"
   41 
   42 #include <sys/param.h>
   43 #include <sys/systm.h>
   44 #include <sys/assym.h>
   45 #include <sys/bio.h>
   46 #include <sys/buf.h>
   47 #include <sys/proc.h>
   48 #ifdef  HWPMC_HOOKS
   49 #include <sys/pmckern.h>
   50 #endif
   51 #include <sys/errno.h>
   52 #include <sys/mount.h>
   53 #include <sys/mutex.h>
   54 #include <sys/socket.h>
   55 #include <sys/resourcevar.h>
   56 #include <sys/ucontext.h>
   57 #include <machine/tss.h>
   58 #include <sys/vmmeter.h>
   59 #include <vm/vm.h>
   60 #include <vm/vm_param.h>
   61 #include <vm/pmap.h>
   62 #include <vm/vm_map.h>
   63 #include <sys/proc.h>
   64 #include <net/if.h>
   65 #include <netinet/in.h>
   66 #include <nfs/nfsproto.h>
   67 #include <nfsclient/nfs.h>
   68 #include <nfs/nfsdiskless.h>
   69 #include <x86/apicreg.h>
   70 #include <machine/cpu.h>
   71 #include <machine/pcb.h>
   72 #include <machine/sigframe.h>
   73 #include <machine/proc.h>
   74 #include <machine/segments.h>
   75 
   76 ASSYM(P_VMSPACE, offsetof(struct proc, p_vmspace));
   77 ASSYM(VM_PMAP, offsetof(struct vmspace, vm_pmap));
   78 ASSYM(PM_ACTIVE, offsetof(struct pmap, pm_active));
   79 ASSYM(PM_SAVE, offsetof(struct pmap, pm_save));
   80 ASSYM(PM_PCID, offsetof(struct pmap, pm_pcid));
   81 
   82 ASSYM(P_MD, offsetof(struct proc, p_md));
   83 ASSYM(MD_LDT, offsetof(struct mdproc, md_ldt));
   84 ASSYM(MD_LDT_SD, offsetof(struct mdproc, md_ldt_sd));
   85 
   86 ASSYM(TD_LOCK, offsetof(struct thread, td_lock));
   87 ASSYM(TD_FLAGS, offsetof(struct thread, td_flags));
   88 ASSYM(TD_PCB, offsetof(struct thread, td_pcb));
   89 ASSYM(TD_PFLAGS, offsetof(struct thread, td_pflags));
   90 ASSYM(TD_PROC, offsetof(struct thread, td_proc));
   91 ASSYM(TD_TID, offsetof(struct thread, td_tid));
   92 ASSYM(TD_FRAME, offsetof(struct thread, td_frame));
   93 
   94 ASSYM(TDF_ASTPENDING, TDF_ASTPENDING);
   95 ASSYM(TDF_NEEDRESCHED, TDF_NEEDRESCHED);
   96 
   97 ASSYM(TDP_CALLCHAIN, TDP_CALLCHAIN);
   98 ASSYM(TDP_KTHREAD, TDP_KTHREAD);
   99 
  100 ASSYM(V_TRAP, offsetof(struct vmmeter, v_trap));
  101 ASSYM(V_SYSCALL, offsetof(struct vmmeter, v_syscall));
  102 ASSYM(V_INTR, offsetof(struct vmmeter, v_intr));
  103 ASSYM(KSTACK_PAGES, KSTACK_PAGES);
  104 ASSYM(PAGE_SIZE, PAGE_SIZE);
  105 ASSYM(NPTEPG, NPTEPG);
  106 ASSYM(NPDEPG, NPDEPG);
  107 ASSYM(addr_PTmap, addr_PTmap);
  108 ASSYM(addr_PDmap, addr_PDmap);
  109 ASSYM(addr_PDPmap, addr_PDPmap);
  110 ASSYM(addr_PML4map, addr_PML4map);
  111 ASSYM(addr_PML4pml4e, addr_PML4pml4e);
  112 ASSYM(PDESIZE, sizeof(pd_entry_t));
  113 ASSYM(PTESIZE, sizeof(pt_entry_t));
  114 ASSYM(PAGE_SHIFT, PAGE_SHIFT);
  115 ASSYM(PAGE_MASK, PAGE_MASK);
  116 ASSYM(PDRSHIFT, PDRSHIFT);
  117 ASSYM(PDPSHIFT, PDPSHIFT);
  118 ASSYM(PML4SHIFT, PML4SHIFT);
  119 ASSYM(val_KPDPI, KPDPI);
  120 ASSYM(val_KPML4I, KPML4I);
  121 ASSYM(val_PML4PML4I, PML4PML4I);
  122 ASSYM(USRSTACK, USRSTACK);
  123 ASSYM(VM_MAXUSER_ADDRESS, VM_MAXUSER_ADDRESS);
  124 ASSYM(KERNBASE, KERNBASE);
  125 ASSYM(DMAP_MIN_ADDRESS, DMAP_MIN_ADDRESS);
  126 ASSYM(DMAP_MAX_ADDRESS, DMAP_MAX_ADDRESS);
  127 ASSYM(MCLBYTES, MCLBYTES);
  128 
  129 ASSYM(PCB_R15, offsetof(struct pcb, pcb_r15));
  130 ASSYM(PCB_R14, offsetof(struct pcb, pcb_r14));
  131 ASSYM(PCB_R13, offsetof(struct pcb, pcb_r13));
  132 ASSYM(PCB_R12, offsetof(struct pcb, pcb_r12));
  133 ASSYM(PCB_RBP, offsetof(struct pcb, pcb_rbp));
  134 ASSYM(PCB_RSP, offsetof(struct pcb, pcb_rsp));
  135 ASSYM(PCB_RBX, offsetof(struct pcb, pcb_rbx));
  136 ASSYM(PCB_RIP, offsetof(struct pcb, pcb_rip));
  137 ASSYM(PCB_FSBASE, offsetof(struct pcb, pcb_fsbase));
  138 ASSYM(PCB_GSBASE, offsetof(struct pcb, pcb_gsbase));
  139 ASSYM(PCB_KGSBASE, offsetof(struct pcb, pcb_kgsbase));
  140 ASSYM(PCB_CR0, offsetof(struct pcb, pcb_cr0));
  141 ASSYM(PCB_CR2, offsetof(struct pcb, pcb_cr2));
  142 ASSYM(PCB_CR3, offsetof(struct pcb, pcb_cr3));
  143 ASSYM(PCB_CR4, offsetof(struct pcb, pcb_cr4));
  144 ASSYM(PCB_DR0, offsetof(struct pcb, pcb_dr0));
  145 ASSYM(PCB_DR1, offsetof(struct pcb, pcb_dr1));
  146 ASSYM(PCB_DR2, offsetof(struct pcb, pcb_dr2));
  147 ASSYM(PCB_DR3, offsetof(struct pcb, pcb_dr3));
  148 ASSYM(PCB_DR6, offsetof(struct pcb, pcb_dr6));
  149 ASSYM(PCB_DR7, offsetof(struct pcb, pcb_dr7));
  150 ASSYM(PCB_GDT, offsetof(struct pcb, pcb_gdt));
  151 ASSYM(PCB_IDT, offsetof(struct pcb, pcb_idt));
  152 ASSYM(PCB_LDT, offsetof(struct pcb, pcb_ldt));
  153 ASSYM(PCB_TR, offsetof(struct pcb, pcb_tr));
  154 ASSYM(PCB_FLAGS, offsetof(struct pcb, pcb_flags));
  155 ASSYM(PCB_ONFAULT, offsetof(struct pcb, pcb_onfault));
  156 ASSYM(PCB_GS32SD, offsetof(struct pcb, pcb_gs32sd));
  157 ASSYM(PCB_TSSP, offsetof(struct pcb, pcb_tssp));
  158 ASSYM(PCB_SAVEFPU, offsetof(struct pcb, pcb_save));
  159 ASSYM(PCB_SAVEFPU_SIZE, sizeof(struct savefpu));
  160 ASSYM(PCB_USERFPU, sizeof(struct pcb));
  161 ASSYM(PCB_EFER, offsetof(struct pcb, pcb_efer));
  162 ASSYM(PCB_STAR, offsetof(struct pcb, pcb_star));
  163 ASSYM(PCB_LSTAR, offsetof(struct pcb, pcb_lstar));
  164 ASSYM(PCB_CSTAR, offsetof(struct pcb, pcb_cstar));
  165 ASSYM(PCB_SFMASK, offsetof(struct pcb, pcb_sfmask));
  166 ASSYM(PCB_XSMASK, offsetof(struct pcb, pcb_xsmask));
  167 ASSYM(PCB_FPUSUSPEND, offsetof(struct pcb, pcb_fpususpend));
  168 ASSYM(PCB_SIZE, sizeof(struct pcb));
  169 ASSYM(PCB_FULL_IRET, PCB_FULL_IRET);
  170 ASSYM(PCB_DBREGS, PCB_DBREGS);
  171 ASSYM(PCB_32BIT, PCB_32BIT);
  172 
  173 ASSYM(COMMON_TSS_RSP0, offsetof(struct amd64tss, tss_rsp0));
  174 
  175 ASSYM(TF_R15, offsetof(struct trapframe, tf_r15));
  176 ASSYM(TF_R14, offsetof(struct trapframe, tf_r14));
  177 ASSYM(TF_R13, offsetof(struct trapframe, tf_r13));
  178 ASSYM(TF_R12, offsetof(struct trapframe, tf_r12));
  179 ASSYM(TF_R11, offsetof(struct trapframe, tf_r11));
  180 ASSYM(TF_R10, offsetof(struct trapframe, tf_r10));
  181 ASSYM(TF_R9, offsetof(struct trapframe, tf_r9));
  182 ASSYM(TF_R8, offsetof(struct trapframe, tf_r8));
  183 ASSYM(TF_RDI, offsetof(struct trapframe, tf_rdi));
  184 ASSYM(TF_RSI, offsetof(struct trapframe, tf_rsi));
  185 ASSYM(TF_RBP, offsetof(struct trapframe, tf_rbp));
  186 ASSYM(TF_RBX, offsetof(struct trapframe, tf_rbx));
  187 ASSYM(TF_RDX, offsetof(struct trapframe, tf_rdx));
  188 ASSYM(TF_RCX, offsetof(struct trapframe, tf_rcx));
  189 ASSYM(TF_RAX, offsetof(struct trapframe, tf_rax));
  190 ASSYM(TF_TRAPNO, offsetof(struct trapframe, tf_trapno));
  191 ASSYM(TF_ADDR, offsetof(struct trapframe, tf_addr));
  192 ASSYM(TF_ERR, offsetof(struct trapframe, tf_err));
  193 ASSYM(TF_RIP, offsetof(struct trapframe, tf_rip));
  194 ASSYM(TF_CS, offsetof(struct trapframe, tf_cs));
  195 ASSYM(TF_RFLAGS, offsetof(struct trapframe, tf_rflags));
  196 ASSYM(TF_RSP, offsetof(struct trapframe, tf_rsp));
  197 ASSYM(TF_SS, offsetof(struct trapframe, tf_ss));
  198 ASSYM(TF_DS, offsetof(struct trapframe, tf_ds));
  199 ASSYM(TF_ES, offsetof(struct trapframe, tf_es));
  200 ASSYM(TF_FS, offsetof(struct trapframe, tf_fs));
  201 ASSYM(TF_GS, offsetof(struct trapframe, tf_gs));
  202 ASSYM(TF_FLAGS, offsetof(struct trapframe, tf_flags));
  203 ASSYM(TF_SIZE, sizeof(struct trapframe));
  204 ASSYM(TF_HASSEGS, TF_HASSEGS);
  205 
  206 ASSYM(SIGF_HANDLER, offsetof(struct sigframe, sf_ahu.sf_handler));
  207 ASSYM(SIGF_UC, offsetof(struct sigframe, sf_uc));
  208 ASSYM(UC_EFLAGS, offsetof(ucontext_t, uc_mcontext.mc_rflags));
  209 ASSYM(ENOENT, ENOENT);
  210 ASSYM(EFAULT, EFAULT);
  211 ASSYM(ENAMETOOLONG, ENAMETOOLONG);
  212 ASSYM(MAXCOMLEN, MAXCOMLEN);
  213 ASSYM(MAXPATHLEN, MAXPATHLEN);
  214 ASSYM(PC_SIZEOF, sizeof(struct pcpu));
  215 ASSYM(PC_PRVSPACE, offsetof(struct pcpu, pc_prvspace));
  216 ASSYM(PC_CURTHREAD, offsetof(struct pcpu, pc_curthread));
  217 ASSYM(PC_FPCURTHREAD, offsetof(struct pcpu, pc_fpcurthread));
  218 ASSYM(PC_IDLETHREAD, offsetof(struct pcpu, pc_idlethread));
  219 ASSYM(PC_CURPCB, offsetof(struct pcpu, pc_curpcb));
  220 ASSYM(PC_CPUID, offsetof(struct pcpu, pc_cpuid));
  221 ASSYM(PC_SCRATCH_RSP, offsetof(struct pcpu, pc_scratch_rsp));
  222 ASSYM(PC_CURPMAP, offsetof(struct pcpu, pc_curpmap));
  223 ASSYM(PC_TSSP, offsetof(struct pcpu, pc_tssp));
  224 ASSYM(PC_RSP0, offsetof(struct pcpu, pc_rsp0));
  225 ASSYM(PC_FS32P, offsetof(struct pcpu, pc_fs32p));
  226 ASSYM(PC_GS32P, offsetof(struct pcpu, pc_gs32p));
  227 ASSYM(PC_LDT, offsetof(struct pcpu, pc_ldt));
  228 ASSYM(PC_COMMONTSSP, offsetof(struct pcpu, pc_commontssp));
  229 ASSYM(PC_TSS, offsetof(struct pcpu, pc_tss));
  230 ASSYM(PC_PM_SAVE_CNT, offsetof(struct pcpu, pc_pm_save_cnt));
  231  
  232 ASSYM(LA_VER, offsetof(struct LAPIC, version));
  233 ASSYM(LA_TPR, offsetof(struct LAPIC, tpr));
  234 ASSYM(LA_EOI, offsetof(struct LAPIC, eoi));
  235 ASSYM(LA_SVR, offsetof(struct LAPIC, svr));
  236 ASSYM(LA_ICR_LO, offsetof(struct LAPIC, icr_lo));
  237 ASSYM(LA_ICR_HI, offsetof(struct LAPIC, icr_hi));
  238 ASSYM(LA_ISR, offsetof(struct LAPIC, isr0));
  239 
  240 ASSYM(KCSEL, GSEL(GCODE_SEL, SEL_KPL));
  241 ASSYM(KDSEL, GSEL(GDATA_SEL, SEL_KPL));
  242 ASSYM(KUCSEL, GSEL(GUCODE_SEL, SEL_UPL));
  243 ASSYM(KUDSEL, GSEL(GUDATA_SEL, SEL_UPL));
  244 ASSYM(KUC32SEL, GSEL(GUCODE32_SEL, SEL_UPL));
  245 ASSYM(KUF32SEL, GSEL(GUFS32_SEL, SEL_UPL));
  246 ASSYM(KUG32SEL, GSEL(GUGS32_SEL, SEL_UPL));
  247 ASSYM(TSSSEL, GSEL(GPROC0_SEL, SEL_KPL));
  248 ASSYM(LDTSEL, GSEL(GUSERLDT_SEL, SEL_KPL));
  249 ASSYM(SEL_RPL_MASK, SEL_RPL_MASK);
  250 
  251 #ifdef  HWPMC_HOOKS
  252 ASSYM(PMC_FN_USER_CALLCHAIN, PMC_FN_USER_CALLCHAIN);
  253 #endif

Cache object: 5cd65fcee219d6fb4cd7f51fa52926ef


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