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: src/sys/i386/i386/genassym.c,v 1.39.2.1 1999/09/05 08:11:07 peter Exp $
   38  */
   39 
   40 #include <stdio.h>
   41 #include <sys/param.h>
   42 #include <sys/buf.h>
   43 #include <sys/proc.h>
   44 /* XXX This is just real ugly to have to do, but it is what you have to do! */
   45 #ifndef NFS
   46 #define NFS
   47 #include <sys/mount.h>
   48 #undef  NFS
   49 #else
   50 #include <sys/mount.h>
   51 #endif
   52 #include <sys/mbuf.h>
   53 #include <sys/socket.h>
   54 #include <sys/msgbuf.h>
   55 #include <machine/cpu.h>
   56 #include <machine/trap.h>
   57 #include <machine/psl.h>
   58 #include <machine/reg.h>
   59 #include <machine/bootinfo.h>
   60 #include <sys/syscall.h>
   61 #include <sys/vmmeter.h>
   62 #include <vm/vm.h>
   63 #include <vm/vm_param.h>
   64 #include <vm/lock.h>
   65 #include <vm/pmap.h>
   66 #include <vm/vm_map.h>
   67 #include <sys/user.h>
   68 #include <net/if.h>
   69 #include <netinet/in.h>
   70 #include <nfs/nfsv2.h>
   71 #include <nfs/nfsdiskless.h>
   72 
   73 extern int      main __P((void));
   74 
   75 int
   76 main()
   77 {
   78         struct proc *p = (struct proc *)0;
   79         struct vmmeter *vm = (struct vmmeter *)0;
   80         struct user *up = (struct user *)0;
   81         struct rusage *rup = (struct rusage *)0;
   82         struct uprof *uprof = (struct uprof *)0;
   83         struct vmspace *vms = (struct vmspace *)0;
   84         struct pcb *pcb = (struct pcb *)0;
   85         struct trapframe *tf = (struct trapframe *)0;
   86         struct sigframe *sigf = (struct sigframe *)0;
   87         struct bootinfo *bootinfo = (struct bootinfo *)0;
   88 
   89         printf("#define\tP_FORW %p\n", &p->p_procq.tqe_next);
   90         printf("#define\tP_BACK %p\n", &p->p_procq.tqe_prev);
   91         printf("#define\tP_VMSPACE %p\n", &p->p_vmspace);
   92         printf("#define\tVM_PMAP %p\n", &vms->vm_pmap);
   93         printf("#define\tP_ADDR %p\n", &p->p_addr);
   94         printf("#define\tP_PRI %p\n", &p->p_priority);
   95         printf("#define\tP_RTPRIO_TYPE %p\n", &p->p_rtprio.type);
   96         printf("#define\tP_RTPRIO_PRIO %p\n", &p->p_rtprio.prio);
   97         printf("#define\tP_STAT %p\n", &p->p_stat);
   98         printf("#define\tP_WCHAN %p\n", &p->p_wchan);
   99         printf("#define\tP_FLAG %p\n", &p->p_flag);
  100         printf("#define\tP_PID %p\n", &p->p_pid);
  101         printf("#define\tSSLEEP %d\n", SSLEEP);
  102         printf("#define\tSRUN %d\n", SRUN);
  103         printf("#define\tV_TRAP %p\n", &vm->v_trap);
  104         printf("#define\tV_SYSCALL %p\n", &vm->v_syscall);
  105         printf("#define\tV_INTR %p\n", &vm->v_intr);
  106         printf("#define\tUPAGES %d\n", UPAGES);
  107         printf("#define\tPAGE_SIZE %d\n", PAGE_SIZE);
  108         printf("#define\tNPTEPG %d\n", NPTEPG);
  109         printf("#define\tNPDEPG %d\n", NPDEPG);
  110         printf("#define\tPDESIZE %d\n", PDESIZE);
  111         printf("#define\tPTESIZE %d\n", PTESIZE);
  112         printf("#define\tNKPDE %d\n", NKPDE);
  113         printf("#define\tNKPT %d\n", NKPT);
  114         printf("#define\tPAGE_SHIFT %d\n", PAGE_SHIFT);
  115         printf("#define\tPAGE_MASK %d\n", PAGE_MASK);
  116         printf("#define\tPDRSHIFT %d\n", PDRSHIFT);
  117         printf("#define\tUSRSTACK 0x%lx\n", USRSTACK);
  118         printf("#define\tVM_MAXUSER_ADDRESS 0x%lx\n", VM_MAXUSER_ADDRESS);
  119         printf("#define\tKERNBASE 0x%x\n", KERNBASE);
  120         printf("#define\tMCLBYTES %d\n", MCLBYTES);
  121         printf("#define\tPCB_LINK %p\n", &pcb->pcb_tss.tss_link);
  122         printf("#define\tPCB_ESP0 %p\n", &pcb->pcb_tss.tss_esp0);
  123         printf("#define\tPCB_SS0 %p\n", &pcb->pcb_tss.tss_ss0);
  124         printf("#define\tPCB_ESP1 %p\n", &pcb->pcb_tss.tss_esp1);
  125         printf("#define\tPCB_SS1 %p\n", &pcb->pcb_tss.tss_ss1);
  126         printf("#define\tPCB_ESP2 %p\n", &pcb->pcb_tss.tss_esp2);
  127         printf("#define\tPCB_SS2 %p\n", &pcb->pcb_tss.tss_ss2);
  128         printf("#define\tPCB_CR3 %p\n", &pcb->pcb_tss.tss_cr3);
  129         printf("#define\tPCB_EIP %p\n", &pcb->pcb_tss.tss_eip);
  130         printf("#define\tPCB_EFLAGS %p\n", &pcb->pcb_tss.tss_eflags);
  131         printf("#define\tPCB_EAX %p\n", &pcb->pcb_tss.tss_eax);
  132         printf("#define\tPCB_ECX %p\n", &pcb->pcb_tss.tss_ecx);
  133         printf("#define\tPCB_EDX %p\n", &pcb->pcb_tss.tss_edx);
  134         printf("#define\tPCB_EBX %p\n", &pcb->pcb_tss.tss_ebx);
  135         printf("#define\tPCB_ESP %p\n", &pcb->pcb_tss.tss_esp);
  136         printf("#define\tPCB_EBP %p\n", &pcb->pcb_tss.tss_ebp);
  137         printf("#define\tPCB_ESI %p\n", &pcb->pcb_tss.tss_esi);
  138         printf("#define\tPCB_EDI %p\n", &pcb->pcb_tss.tss_edi);
  139         printf("#define\tPCB_ES %p\n", &pcb->pcb_tss.tss_es);
  140         printf("#define\tPCB_CS %p\n", &pcb->pcb_tss.tss_cs);
  141         printf("#define\tPCB_SS %p\n", &pcb->pcb_tss.tss_ss);
  142         printf("#define\tPCB_DS %p\n", &pcb->pcb_tss.tss_ds);
  143         printf("#define\tPCB_FS %p\n", &pcb->pcb_tss.tss_fs);
  144         printf("#define\tPCB_GS %p\n", &pcb->pcb_tss.tss_gs);
  145         printf("#define\tPCB_LDT %p\n", &pcb->pcb_tss.tss_ldt);
  146         printf("#define\tPCB_USERLDT %p\n", &pcb->pcb_ldt);
  147         printf("#define\tPCB_IOOPT %p\n", &pcb->pcb_tss.tss_ioopt);
  148         printf("#define\tU_PROF %p\n", &up->u_stats.p_prof);
  149         printf("#define\tU_PROFSCALE %p\n", &up->u_stats.p_prof.pr_scale);
  150         printf("#define\tPR_BASE %p\n", &uprof->pr_base);
  151         printf("#define\tPR_SIZE %p\n", &uprof->pr_size);
  152         printf("#define\tPR_OFF %p\n", &uprof->pr_off);
  153         printf("#define\tPR_SCALE %p\n", &uprof->pr_scale);
  154         printf("#define\tRU_MINFLT %p\n", &rup->ru_minflt);
  155         printf("#define\tPCB_FLAGS %p\n", &pcb->pcb_flags);
  156         printf("#define\tPCB_SAVEFPU %p\n", &pcb->pcb_savefpu);
  157         printf("#define\tPCB_SAVEFPU_SIZE %d\n", sizeof pcb->pcb_savefpu);
  158         printf("#define\tPCB_ONFAULT %p\n", &pcb->pcb_onfault);
  159 
  160         printf("#define\tTF_ES %p\n", &tf->tf_es);
  161         printf("#define\tTF_DS %p\n", &tf->tf_ds);
  162         printf("#define\tTF_EDI %p\n", &tf->tf_edi);
  163         printf("#define\tTF_ESI %p\n", &tf->tf_esi);
  164         printf("#define\tTF_EBP %p\n", &tf->tf_ebp);
  165         printf("#define\tTF_ISP %p\n", &tf->tf_isp);
  166         printf("#define\tTF_EBX %p\n", &tf->tf_ebx);
  167         printf("#define\tTF_EDX %p\n", &tf->tf_edx);
  168         printf("#define\tTF_ECX %p\n", &tf->tf_ecx);
  169         printf("#define\tTF_EAX %p\n", &tf->tf_eax);
  170         printf("#define\tTF_TRAPNO %p\n", &tf->tf_trapno);
  171         printf("#define\tTF_ERR %p\n", &tf->tf_err);
  172         printf("#define\tTF_EIP %p\n", &tf->tf_eip);
  173         printf("#define\tTF_CS %p\n", &tf->tf_cs);
  174         printf("#define\tTF_EFLAGS %p\n", &tf->tf_eflags);
  175         printf("#define\tTF_ESP %p\n", &tf->tf_esp);
  176         printf("#define\tTF_SS %p\n", &tf->tf_ss);
  177 
  178         printf("#define\tSIGF_SIGNUM %p\n", &sigf->sf_signum);
  179         printf("#define\tSIGF_CODE %p\n", &sigf->sf_code);
  180         printf("#define\tSIGF_SCP %p\n", &sigf->sf_scp);
  181         printf("#define\tSIGF_HANDLER %p\n", &sigf->sf_handler);
  182         printf("#define\tSIGF_SC %p\n", &sigf->sf_sc);
  183 
  184         printf("#define\tB_READ %d\n", B_READ);
  185         printf("#define\tENOENT %d\n", ENOENT);
  186         printf("#define\tEFAULT %d\n", EFAULT);
  187         printf("#define\tENAMETOOLONG %d\n", ENAMETOOLONG);
  188         printf("#define\tMAXPATHLEN %d\n", MAXPATHLEN);
  189 
  190         printf("#define\tBOOTINFO_SIZE %d\n", sizeof *bootinfo);
  191         printf("#define\tBI_VERSION %p\n", &bootinfo->bi_version);
  192         printf("#define\tBI_KERNELNAME %p\n", &bootinfo->bi_kernelname);
  193         printf("#define\tBI_NFS_DISKLESS %p\n", &bootinfo->bi_nfs_diskless);
  194         printf("#define\tBI_ENDCOMMON %p\n", &bootinfo->bi_endcommon);
  195         printf("#define\tNFSDISKLESS_SIZE %d\n", sizeof(struct nfs_diskless));
  196         printf("#define\tBI_SIZE %p\n", &bootinfo->bi_size);
  197         printf("#define\tBI_SYMTAB %p\n", &bootinfo->bi_symtab);
  198         printf("#define\tBI_ESYMTAB %p\n", &bootinfo->bi_esymtab);
  199 
  200         return (0);
  201 }

Cache object: f774118feed14a144400e584382adf0e


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