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/i386/i386/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) 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  * 3. All advertising materials mentioning features or use of this software
   17  *    must display the following acknowledgement:
   18  *      This product includes software developed by the University of
   19  *      California, Berkeley and its contributors.
   20  * 4. Neither the name of the University nor the names of its contributors
   21  *    may be used to endorse or promote products derived from this software
   22  *    without specific prior written permission.
   23  *
   24  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
   25  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   26  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   27  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
   28  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   29  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   30  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   31  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   32  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   33  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   34  * SUCH DAMAGE.
   35  *
   36  *      from: @(#)genassym.c    5.11 (Berkeley) 5/10/91
   37  * $FreeBSD$
   38  */
   39 
   40 #include "opt_user_ldt.h"
   41 
   42 #include <stddef.h>
   43 
   44 #include <sys/param.h>
   45 #include <sys/systm.h>
   46 #include <sys/assym.h>
   47 #include <sys/buf.h>
   48 #include <sys/proc.h>
   49 #include <sys/errno.h>
   50 #include <sys/mount.h>
   51 #include <sys/socket.h>
   52 #include <sys/resourcevar.h>
   53 #include <machine/frame.h>
   54 #include <machine/bootinfo.h>
   55 #include <machine/tss.h>
   56 #include <sys/vmmeter.h>
   57 #include <vm/vm.h>
   58 #include <vm/vm_param.h>
   59 #include <vm/pmap.h>
   60 #include <vm/vm_map.h>
   61 #include <sys/user.h>
   62 #include <net/if.h>
   63 #include <netinet/in.h>
   64 #include <nfs/nfsv2.h>
   65 #include <nfs/rpcv2.h>
   66 #include <nfs/nfs.h>
   67 #include <nfs/nfsdiskless.h>
   68 #ifdef SMP
   69 #include <machine/apic.h>
   70 #endif
   71 #include <machine/segments.h>
   72 #include <machine/sigframe.h>
   73 #include <machine/globaldata.h>
   74 #include <machine/vm86.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(P_ADDR, offsetof(struct proc, p_addr));
   80 ASSYM(P_STAT, offsetof(struct proc, p_stat));
   81 ASSYM(P_WCHAN, offsetof(struct proc, p_wchan));
   82 
   83 #ifdef SMP
   84 ASSYM(P_ONCPU, offsetof(struct proc, p_oncpu));
   85 ASSYM(P_LASTCPU, offsetof(struct proc, p_lastcpu));
   86 #endif
   87 
   88 ASSYM(SSLEEP, SSLEEP);
   89 ASSYM(SRUN, SRUN);
   90 ASSYM(V_TRAP, offsetof(struct vmmeter, v_trap));
   91 ASSYM(V_SYSCALL, offsetof(struct vmmeter, v_syscall));
   92 ASSYM(V_INTR, offsetof(struct vmmeter, v_intr));
   93 ASSYM(UPAGES, UPAGES);
   94 ASSYM(PAGE_SIZE, PAGE_SIZE);
   95 ASSYM(NPTEPG, NPTEPG);
   96 ASSYM(NPDEPG, NPDEPG);
   97 ASSYM(PDESIZE, PDESIZE);
   98 ASSYM(PTESIZE, PTESIZE);
   99 ASSYM(PDESHIFT, PDESHIFT);
  100 ASSYM(PTESHIFT, PTESHIFT);
  101 ASSYM(NPGPTD, NPGPTD);
  102 ASSYM(NPDEPTD, NPDEPTD);
  103 ASSYM(PAGE_SHIFT, PAGE_SHIFT);
  104 ASSYM(PAGE_MASK, PAGE_MASK);
  105 ASSYM(PDRSHIFT, PDRSHIFT);
  106 ASSYM(USRSTACK, USRSTACK);
  107 ASSYM(VM_MAXUSER_ADDRESS, VM_MAXUSER_ADDRESS);
  108 ASSYM(KERNBASE, KERNBASE);
  109 ASSYM(MCLBYTES, MCLBYTES);
  110 ASSYM(PCB_CR3, offsetof(struct pcb, pcb_cr3));
  111 ASSYM(PCB_EDI, offsetof(struct pcb, pcb_edi));
  112 ASSYM(PCB_ESI, offsetof(struct pcb, pcb_esi));
  113 ASSYM(PCB_EBP, offsetof(struct pcb, pcb_ebp));
  114 ASSYM(PCB_ESP, offsetof(struct pcb, pcb_esp));
  115 ASSYM(PCB_EBX, offsetof(struct pcb, pcb_ebx));
  116 ASSYM(PCB_EIP, offsetof(struct pcb, pcb_eip));
  117 ASSYM(TSS_ESP0, offsetof(struct i386tss, tss_esp0));
  118 
  119 #ifdef USER_LDT
  120 ASSYM(PCB_USERLDT, offsetof(struct pcb, pcb_ldt));
  121 #endif
  122 
  123 ASSYM(PCB_GS, offsetof(struct pcb, pcb_gs));
  124 ASSYM(PCB_DR0, offsetof(struct pcb, pcb_dr0));
  125 ASSYM(PCB_DR1, offsetof(struct pcb, pcb_dr1));
  126 ASSYM(PCB_DR2, offsetof(struct pcb, pcb_dr2));
  127 ASSYM(PCB_DR3, offsetof(struct pcb, pcb_dr3));
  128 ASSYM(PCB_DR6, offsetof(struct pcb, pcb_dr6));
  129 ASSYM(PCB_DR7, offsetof(struct pcb, pcb_dr7));
  130 ASSYM(PCB_DBREGS, PCB_DBREGS);
  131 ASSYM(PCB_EXT, offsetof(struct pcb, pcb_ext));
  132 
  133 #ifdef SMP
  134 ASSYM(PCB_MPNEST, offsetof(struct pcb, pcb_mpnest));
  135 #endif
  136 
  137 ASSYM(PCB_SPARE, offsetof(struct pcb, __pcb_spare));
  138 ASSYM(PCB_FLAGS, offsetof(struct pcb, pcb_flags));
  139 ASSYM(PCB_SAVEFPU, offsetof(struct pcb, pcb_save));
  140 ASSYM(PCB_SAVEFPU_SIZE, sizeof(union savefpu));
  141 ASSYM(PCB_SAVE87_SIZE, sizeof(struct save87));
  142 ASSYM(PCB_ONFAULT, offsetof(struct pcb, pcb_onfault));
  143 
  144 #ifdef SMP
  145 ASSYM(PCB_SIZE, sizeof(struct pcb));
  146 #endif
  147 
  148 ASSYM(TF_TRAPNO, offsetof(struct trapframe, tf_trapno));
  149 ASSYM(TF_ERR, offsetof(struct trapframe, tf_err));
  150 ASSYM(TF_CS, offsetof(struct trapframe, tf_cs));
  151 ASSYM(TF_EFLAGS, offsetof(struct trapframe, tf_eflags));
  152 ASSYM(SIGF_HANDLER, offsetof(struct sigframe, sf_ahu.sf_handler));
  153 ASSYM(SIGF_SC, offsetof(struct osigframe, sf_siginfo.si_sc));
  154 ASSYM(SIGF_UC, offsetof(struct sigframe, sf_uc));
  155 ASSYM(SC_PS, offsetof(struct osigcontext, sc_ps));
  156 ASSYM(SC_FS, offsetof(struct osigcontext, sc_fs));
  157 ASSYM(SC_GS, offsetof(struct osigcontext, sc_gs));
  158 ASSYM(SC_TRAPNO, offsetof(struct osigcontext, sc_trapno));
  159 ASSYM(UC_EFLAGS, offsetof(ucontext_t, uc_mcontext.mc_eflags));
  160 ASSYM(UC_GS, offsetof(ucontext_t, uc_mcontext.mc_gs));
  161 ASSYM(B_READ, B_READ);
  162 ASSYM(ENOENT, ENOENT);
  163 ASSYM(EFAULT, EFAULT);
  164 ASSYM(ENAMETOOLONG, ENAMETOOLONG);
  165 ASSYM(MAXPATHLEN, MAXPATHLEN);
  166 ASSYM(BOOTINFO_SIZE, sizeof(struct bootinfo));
  167 ASSYM(BI_VERSION, offsetof(struct bootinfo, bi_version));
  168 ASSYM(BI_KERNELNAME, offsetof(struct bootinfo, bi_kernelname));
  169 ASSYM(BI_NFS_DISKLESS, offsetof(struct bootinfo, bi_nfs_diskless));
  170 ASSYM(BI_ENDCOMMON, offsetof(struct bootinfo, bi_endcommon));
  171 ASSYM(NFSDISKLESS_SIZE, sizeof(struct nfs_diskless));
  172 ASSYM(BI_SIZE, offsetof(struct bootinfo, bi_size));
  173 ASSYM(BI_SYMTAB, offsetof(struct bootinfo, bi_symtab));
  174 ASSYM(BI_ESYMTAB, offsetof(struct bootinfo, bi_esymtab));
  175 ASSYM(BI_KERNEND, offsetof(struct bootinfo, bi_kernend));
  176 ASSYM(GD_SIZEOF, sizeof(struct globaldata));
  177 ASSYM(GD_CURPROC, offsetof(struct globaldata, gd_curproc));
  178 ASSYM(GD_NPXPROC, offsetof(struct globaldata, gd_npxproc));
  179 ASSYM(GD_CURPCB, offsetof(struct globaldata, gd_curpcb));
  180 ASSYM(GD_COMMON_TSS, offsetof(struct globaldata, gd_common_tss));
  181 ASSYM(GD_SWITCHTIME, offsetof(struct globaldata, gd_switchtime));
  182 ASSYM(GD_SWITCHTICKS, offsetof(struct globaldata, gd_switchticks));
  183 ASSYM(GD_COMMON_TSSD, offsetof(struct globaldata, gd_common_tssd));
  184 ASSYM(GD_TSS_GDT, offsetof(struct globaldata, gd_tss_gdt));
  185 ASSYM(GD_ASTPENDING, offsetof(struct globaldata, gd_astpending));
  186 
  187 #ifdef USER_LDT
  188 ASSYM(GD_CURRENTLDT, offsetof(struct globaldata, gd_currentldt));
  189 #endif
  190 
  191 #ifdef SMP
  192 ASSYM(GD_CPUID, offsetof(struct globaldata, gd_cpuid));
  193 ASSYM(GD_CPU_LOCKID, offsetof(struct globaldata, gd_cpu_lockid));
  194 ASSYM(GD_OTHER_CPUS, offsetof(struct globaldata, gd_other_cpus));
  195 ASSYM(GD_SS_EFLAGS, offsetof(struct globaldata, gd_ss_eflags));
  196 ASSYM(GD_INSIDE_INTR, offsetof(struct globaldata, gd_inside_intr));
  197 ASSYM(GD_PRV_CMAP1, offsetof(struct globaldata, gd_prv_CMAP1));
  198 ASSYM(GD_PRV_CMAP2, offsetof(struct globaldata, gd_prv_CMAP2));
  199 ASSYM(GD_PRV_CMAP3, offsetof(struct globaldata, gd_prv_CMAP3));
  200 ASSYM(GD_PRV_PMAP1, offsetof(struct globaldata, gd_prv_PMAP1));
  201 ASSYM(GD_PRV_PMAP2, offsetof(struct globaldata, gd_prv_PMAP2));
  202 ASSYM(GD_PRV_CADDR1, offsetof(struct globaldata, gd_prv_CADDR1));
  203 ASSYM(GD_PRV_CADDR2, offsetof(struct globaldata, gd_prv_CADDR2));
  204 ASSYM(GD_PRV_CADDR3, offsetof(struct globaldata, gd_prv_CADDR3));
  205 ASSYM(GD_PRV_PADDR1, offsetof(struct globaldata, gd_prv_PADDR1));
  206 ASSYM(GD_PRV_PADDR2, offsetof(struct globaldata, gd_prv_PADDR2));
  207 ASSYM(PS_IDLESTACK, offsetof(struct privatespace, idlestack));
  208 ASSYM(PS_IDLESTACK_TOP, sizeof(struct privatespace));
  209 #endif
  210 
  211 ASSYM(KCSEL, GSEL(GCODE_SEL, SEL_KPL));
  212 ASSYM(KDSEL, GSEL(GDATA_SEL, SEL_KPL));
  213 
  214 #ifdef SMP
  215 ASSYM(KPSEL, GSEL(GPRIV_SEL, SEL_KPL));
  216 #endif
  217 
  218 ASSYM(BC32SEL, GSEL(GBIOSCODE32_SEL, SEL_KPL));
  219 ASSYM(GPROC0_SEL, GPROC0_SEL);
  220 ASSYM(VM86_FRAMESIZE, sizeof(struct vm86frame));
  221 
  222 #ifdef PC98
  223 #include <machine/bus.h>
  224 
  225 ASSYM(BUS_SPACE_HANDLE_BASE, offsetof(struct bus_space_handle, bsh_base));
  226 ASSYM(BUS_SPACE_HANDLE_IAT, offsetof(struct bus_space_handle, bsh_iat));
  227 #endif

Cache object: 9748cd43f3d93365c08030f74510bba1


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