[ 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  -  FREEBSD7  -  FREEBSD71  -  FREEBSD70  -  FREEBSD6  -  FREEBSD64  -  FREEBSD63  -  FREEBSD62  -  FREEBSD61  -  FREEBSD60  -  FREEBSD5  -  FREEBSD55  -  FREEBSD54  -  FREEBSD53  -  FREEBSD52  -  FREEBSD51  -  FREEBSD50  -  FREEBSD4  -  FREEBSD3  -  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  -  OPENSOLARIS  -  minix-3-1-1  -  TRUSTEDBSD-SEBSD  -  FREEBSD-LIBC  -  FREEBSD7-LIBC  -  FREEBSD6-LIBC  -  GLIBC27 
SearchContext: -  none  -  excerpts  -  bigexcerpts 

  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: src/sys/amd64/amd64/genassym.c,v 1.171 2008/12/12 16:09:34 jkoshy Exp $");
 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 <nfs/rpcv2.h>
 68 #include <nfsclient/nfs.h>
 69 #include <nfsclient/nfsdiskless.h>
 70 #include <machine/apicreg.h>
 71 #include <machine/cpu.h>
 72 #include <machine/pcb.h>
 73 #include <machine/sigframe.h>
 74 #include <machine/proc.h>
 75 #include <machine/specialreg.h>
 76 #include <machine/segments.h>
 77 
 78 ASSYM(P_VMSPACE, offsetof(struct proc, p_vmspace));
 79 ASSYM(VM_PMAP, offsetof(struct vmspace, vm_pmap));
 80 ASSYM(PM_ACTIVE, offsetof(struct pmap, pm_active));
 81 
 82 ASSYM(TD_LOCK, offsetof(struct thread, td_lock));
 83 ASSYM(TD_FLAGS, offsetof(struct thread, td_flags));
 84 ASSYM(TD_PCB, offsetof(struct thread, td_pcb));
 85 ASSYM(TD_PFLAGS, offsetof(struct thread, td_pflags));
 86 ASSYM(TD_PROC, offsetof(struct thread, td_proc));
 87 ASSYM(TD_TID, offsetof(struct thread, td_tid));
 88 
 89 ASSYM(TDF_ASTPENDING, TDF_ASTPENDING);
 90 ASSYM(TDF_NEEDRESCHED, TDF_NEEDRESCHED);
 91 
 92 ASSYM(TDP_CALLCHAIN, TDP_CALLCHAIN);
 93 ASSYM(TDP_KTHREAD, TDP_KTHREAD);
 94 
 95 ASSYM(V_TRAP, offsetof(struct vmmeter, v_trap));
 96 ASSYM(V_SYSCALL, offsetof(struct vmmeter, v_syscall));
 97 ASSYM(V_INTR, offsetof(struct vmmeter, v_intr));
 98 ASSYM(KSTACK_PAGES, KSTACK_PAGES);
 99 ASSYM(PAGE_SIZE, PAGE_SIZE);
100 ASSYM(NPTEPG, NPTEPG);
101 ASSYM(NPDEPG, NPDEPG);
102 ASSYM(addr_PTmap, addr_PTmap);
103 ASSYM(addr_PDmap, addr_PDmap);
104 ASSYM(addr_PDPmap, addr_PDPmap);
105 ASSYM(addr_PML4map, addr_PML4map);
106 ASSYM(addr_PML4pml4e, addr_PML4pml4e);
107 ASSYM(PDESIZE, sizeof(pd_entry_t));
108 ASSYM(PTESIZE, sizeof(pt_entry_t));
109 ASSYM(PTESHIFT, PTESHIFT);
110 ASSYM(PAGE_SHIFT, PAGE_SHIFT);
111 ASSYM(PAGE_MASK, PAGE_MASK);
112 ASSYM(PDRSHIFT, PDRSHIFT);
113 ASSYM(PDPSHIFT, PDPSHIFT);
114 ASSYM(PML4SHIFT, PML4SHIFT);
115 ASSYM(val_KPDPI, KPDPI);
116 ASSYM(val_KPML4I, KPML4I);
117 ASSYM(val_PML4PML4I, PML4PML4I);
118 ASSYM(USRSTACK, USRSTACK);
119 ASSYM(VM_MAXUSER_ADDRESS, VM_MAXUSER_ADDRESS);
120 ASSYM(KERNBASE, KERNBASE);
121 ASSYM(DMAP_MIN_ADDRESS, DMAP_MIN_ADDRESS);
122 ASSYM(DMAP_MAX_ADDRESS, DMAP_MAX_ADDRESS);
123 ASSYM(MCLBYTES, MCLBYTES);
124 ASSYM(PCB_CR3, offsetof(struct pcb, pcb_cr3));
125 ASSYM(PCB_R15, offsetof(struct pcb, pcb_r15));
126 ASSYM(PCB_R14, offsetof(struct pcb, pcb_r14));
127 ASSYM(PCB_R13, offsetof(struct pcb, pcb_r13));
128 ASSYM(PCB_R12, offsetof(struct pcb, pcb_r12));
129 ASSYM(PCB_RBP, offsetof(struct pcb, pcb_rbp));
130 ASSYM(PCB_RSP, offsetof(struct pcb, pcb_rsp));
131 ASSYM(PCB_RBX, offsetof(struct pcb, pcb_rbx));
132 ASSYM(PCB_RIP, offsetof(struct pcb, pcb_rip));
133 ASSYM(PCB_FSBASE, offsetof(struct pcb, pcb_fsbase));
134 ASSYM(PCB_GSBASE, offsetof(struct pcb, pcb_gsbase));
135 ASSYM(PCB_DS, offsetof(struct pcb, pcb_ds));
136 ASSYM(PCB_ES, offsetof(struct pcb, pcb_es));
137 ASSYM(PCB_FS, offsetof(struct pcb, pcb_fs));
138 ASSYM(PCB_GS, offsetof(struct pcb, pcb_gs));
139 ASSYM(PCB_DR0, offsetof(struct pcb, pcb_dr0));
140 ASSYM(PCB_DR1, offsetof(struct pcb, pcb_dr1));
141 ASSYM(PCB_DR2, offsetof(struct pcb, pcb_dr2));
142 ASSYM(PCB_DR3, offsetof(struct pcb, pcb_dr3));
143 ASSYM(PCB_DR6, offsetof(struct pcb, pcb_dr6));
144 ASSYM(PCB_DR7, offsetof(struct pcb, pcb_dr7));
145 ASSYM(PCB_DBREGS, PCB_DBREGS);
146 ASSYM(PCB_32BIT, PCB_32BIT);
147 ASSYM(PCB_GS32BIT, PCB_GS32BIT);
148 ASSYM(PCB_FULLCTX, PCB_FULLCTX);
149 
150 ASSYM(PCB_FLAGS, offsetof(struct pcb, pcb_flags));
151 ASSYM(PCB_SAVEFPU, offsetof(struct pcb, pcb_save));
152 ASSYM(PCB_SAVEFPU_SIZE, sizeof(struct savefpu));
153 ASSYM(PCB_ONFAULT, offsetof(struct pcb, pcb_onfault));
154 ASSYM(PCB_GS32SD, offsetof(struct pcb, pcb_gs32sd));
155 
156 ASSYM(PCB_SIZE, sizeof(struct pcb));
157 
158 ASSYM(COMMON_TSS_RSP0, offsetof(struct amd64tss, tss_rsp0));
159 
160 ASSYM(TF_R15, offsetof(struct trapframe, tf_r15));
161 ASSYM(TF_R14, offsetof(struct trapframe, tf_r14));
162 ASSYM(TF_R13, offsetof(struct trapframe, tf_r13));
163 ASSYM(TF_R12, offsetof(struct trapframe, tf_r12));
164 ASSYM(TF_R11, offsetof(struct trapframe, tf_r11));
165 ASSYM(TF_R10, offsetof(struct trapframe, tf_r10));
166 ASSYM(TF_R9, offsetof(struct trapframe, tf_r9));
167 ASSYM(TF_R8, offsetof(struct trapframe, tf_r8));
168 ASSYM(TF_RDI, offsetof(struct trapframe, tf_rdi));
169 ASSYM(TF_RSI, offsetof(struct trapframe, tf_rsi));
170 ASSYM(TF_RBP, offsetof(struct trapframe, tf_rbp));
171 ASSYM(TF_RBX, offsetof(struct trapframe, tf_rbx));
172 ASSYM(TF_RDX, offsetof(struct trapframe, tf_rdx));
173 ASSYM(TF_RCX, offsetof(struct trapframe, tf_rcx));
174 ASSYM(TF_RAX, offsetof(struct trapframe, tf_rax));
175 ASSYM(TF_TRAPNO, offsetof(struct trapframe, tf_trapno));
176 ASSYM(TF_ADDR, offsetof(struct trapframe, tf_addr));
177 ASSYM(TF_ERR, offsetof(struct trapframe, tf_err));
178 ASSYM(TF_RIP, offsetof(struct trapframe, tf_rip));
179 ASSYM(TF_CS, offsetof(struct trapframe, tf_cs));
180 ASSYM(TF_RFLAGS, offsetof(struct trapframe, tf_rflags));
181 ASSYM(TF_RSP, offsetof(struct trapframe, tf_rsp));
182 ASSYM(TF_SS, offsetof(struct trapframe, tf_ss));
183 ASSYM(TF_SIZE, sizeof(struct trapframe));
184 
185 ASSYM(SIGF_HANDLER, offsetof(struct sigframe, sf_ahu.sf_handler));
186 ASSYM(SIGF_UC, offsetof(struct sigframe, sf_uc));
187 ASSYM(UC_EFLAGS, offsetof(ucontext_t, uc_mcontext.mc_rflags));
188 ASSYM(ENOENT, ENOENT);
189 ASSYM(EFAULT, EFAULT);
190 ASSYM(ENAMETOOLONG, ENAMETOOLONG);
191 ASSYM(MAXCPU, MAXCPU);
192 ASSYM(MAXCOMLEN, MAXCOMLEN);
193 ASSYM(MAXPATHLEN, MAXPATHLEN);
194 ASSYM(PC_SIZEOF, sizeof(struct pcpu));
195 ASSYM(PC_PRVSPACE, offsetof(struct pcpu, pc_prvspace));
196 ASSYM(PC_CURTHREAD, offsetof(struct pcpu, pc_curthread));
197 ASSYM(PC_FPCURTHREAD, offsetof(struct pcpu, pc_fpcurthread));
198 ASSYM(PC_IDLETHREAD, offsetof(struct pcpu, pc_idlethread));
199 ASSYM(PC_CURPCB, offsetof(struct pcpu, pc_curpcb));
200 ASSYM(PC_CPUID, offsetof(struct pcpu, pc_cpuid));
201 ASSYM(PC_SCRATCH_RSP, offsetof(struct pcpu, pc_scratch_rsp));
202 ASSYM(PC_CURPMAP, offsetof(struct pcpu, pc_curpmap));
203 ASSYM(PC_TSSP, offsetof(struct pcpu, pc_tssp));
204 ASSYM(PC_RSP0, offsetof(struct pcpu, pc_rsp0));
205 ASSYM(PC_GS32P, offsetof(struct pcpu, pc_gs32p));
206  
207 ASSYM(LA_VER, offsetof(struct LAPIC, version));
208 ASSYM(LA_TPR, offsetof(struct LAPIC, tpr));
209 ASSYM(LA_EOI, offsetof(struct LAPIC, eoi));
210 ASSYM(LA_SVR, offsetof(struct LAPIC, svr));
211 ASSYM(LA_ICR_LO, offsetof(struct LAPIC, icr_lo));
212 ASSYM(LA_ICR_HI, offsetof(struct LAPIC, icr_hi));
213 ASSYM(LA_ISR, offsetof(struct LAPIC, isr0));
214 
215 ASSYM(KCSEL, GSEL(GCODE_SEL, SEL_KPL));
216 ASSYM(KDSEL, GSEL(GDATA_SEL, SEL_KPL));
217 ASSYM(KUCSEL, GSEL(GUCODE_SEL, SEL_UPL));
218 ASSYM(KUDSEL, GSEL(GUDATA_SEL, SEL_UPL));
219 ASSYM(KUC32SEL, GSEL(GUCODE32_SEL, SEL_UPL));
220 ASSYM(SEL_RPL_MASK, SEL_RPL_MASK);
221 
222 ASSYM(MSR_GSBASE, MSR_GSBASE);
223 
224 #ifdef  HWPMC_HOOKS
225 ASSYM(PMC_FN_USER_CALLCHAIN, PMC_FN_USER_CALLCHAIN);
226 #endif
227 

Cache object: a2c425ce1fed5f0d617f69ca5eabbef3


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