genassym.c revision 17371
1114239Snjl/*- 2114239Snjl * Copyright (c) 1982, 1990 The Regents of the University of California. 3114239Snjl * All rights reserved. 4151937Sjkim * 5114239Snjl * This code is derived from software contributed to Berkeley by 6114239Snjl * William Jolitz. 7114239Snjl * 8114239Snjl * Redistribution and use in source and binary forms, with or without 9114239Snjl * modification, are permitted provided that the following conditions 10114239Snjl * are met: 11114239Snjl * 1. Redistributions of source code must retain the above copyright 12151937Sjkim * notice, this list of conditions and the following disclaimer. 13114239Snjl * 2. Redistributions in binary form must reproduce the above copyright 14114239Snjl * notice, this list of conditions and the following disclaimer in the 15114239Snjl * documentation and/or other materials provided with the distribution. 16114239Snjl * 3. All advertising materials mentioning features or use of this software 17114239Snjl * must display the following acknowledgement: 18114239Snjl * This product includes software developed by the University of 19114239Snjl * California, Berkeley and its contributors. 20114239Snjl * 4. Neither the name of the University nor the names of its contributors 21114239Snjl * may be used to endorse or promote products derived from this software 22114239Snjl * without specific prior written permission. 23114239Snjl * 24114239Snjl * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 25114239Snjl * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 26114239Snjl * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 27114239Snjl * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 28114239Snjl * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 29114239Snjl * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 30114239Snjl * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31114239Snjl * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32114239Snjl * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33114239Snjl * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34114239Snjl * SUCH DAMAGE. 35114239Snjl * 36114239Snjl * from: @(#)genassym.c 5.11 (Berkeley) 5/10/91 37114239Snjl * $Id: genassym.c,v 1.37 1996/07/31 09:25:51 davidg Exp $ 38114239Snjl */ 39114239Snjl 40114239Snjl#include <stdio.h> 41114239Snjl#include <sys/param.h> 42114239Snjl#include <sys/buf.h> 43114239Snjl#include <sys/proc.h> 44114239Snjl/* XXX This is just real ugly to have to do, but it is what you have to do! */ 45114239Snjl#ifndef NFS 46114239Snjl#define NFS 47114239Snjl#include <sys/mount.h> 48114239Snjl#undef NFS 49114239Snjl#else 50114239Snjl#include <sys/mount.h> 51114239Snjl#endif 52114239Snjl#include <sys/mbuf.h> 53114239Snjl#include <sys/msgbuf.h> 54114239Snjl#include <machine/cpu.h> 55114239Snjl#include <machine/trap.h> 56114239Snjl#include <machine/psl.h> 57114239Snjl#include <machine/reg.h> 58114239Snjl#include <machine/bootinfo.h> 59114239Snjl#include <sys/syscall.h> 60114239Snjl#include <sys/vmmeter.h> 61114239Snjl#include <vm/vm.h> 62114239Snjl#include <vm/vm_param.h> 63114239Snjl#include <vm/lock.h> 64114239Snjl#include <vm/pmap.h> 65114239Snjl#include <vm/vm_map.h> 66114239Snjl#include <sys/user.h> 67114239Snjl#include <net/if.h> 68114239Snjl#include <netinet/in.h> 69114239Snjl#include <nfs/nfsv2.h> 70114239Snjl#include <nfs/nfsdiskless.h> 71114239Snjl 72114239Snjlextern int main __P((void)); 73114239Snjl 74114239Snjlint 75114239Snjlmain() 76114239Snjl{ 77114239Snjl struct proc *p = (struct proc *)0; 78114239Snjl struct vmmeter *vm = (struct vmmeter *)0; 79114239Snjl struct user *up = (struct user *)0; 80114239Snjl struct rusage *rup = (struct rusage *)0; 81114239Snjl struct uprof *uprof = (struct uprof *)0; 82114239Snjl struct vmspace *vms = (struct vmspace *)0; 83114239Snjl struct pcb *pcb = (struct pcb *)0; 84114239Snjl struct trapframe *tf = (struct trapframe *)0; 85114239Snjl struct sigframe *sigf = (struct sigframe *)0; 86114239Snjl struct bootinfo *bootinfo = (struct bootinfo *)0; 87114239Snjl 88114239Snjl printf("#define\tP_FORW %p\n", &p->p_procq.tqe_next); 89114239Snjl printf("#define\tP_BACK %p\n", &p->p_procq.tqe_prev); 90114239Snjl printf("#define\tP_VMSPACE %p\n", &p->p_vmspace); 91114239Snjl printf("#define\tVM_PMAP %p\n", &vms->vm_pmap); 92114239Snjl printf("#define\tP_ADDR %p\n", &p->p_addr); 93114239Snjl printf("#define\tP_PRI %p\n", &p->p_priority); 94114239Snjl printf("#define\tP_RTPRIO_TYPE %p\n", &p->p_rtprio.type); 95114239Snjl printf("#define\tP_RTPRIO_PRIO %p\n", &p->p_rtprio.prio); 96114239Snjl printf("#define\tP_STAT %p\n", &p->p_stat); 97114239Snjl printf("#define\tP_WCHAN %p\n", &p->p_wchan); 98114239Snjl printf("#define\tP_FLAG %p\n", &p->p_flag); 99114239Snjl printf("#define\tP_PID %p\n", &p->p_pid); 100114239Snjl printf("#define\tSSLEEP %d\n", SSLEEP); 101114239Snjl printf("#define\tSRUN %d\n", SRUN); 102114239Snjl printf("#define\tV_TRAP %p\n", &vm->v_trap); 103114239Snjl printf("#define\tV_SYSCALL %p\n", &vm->v_syscall); 104114239Snjl printf("#define\tV_INTR %p\n", &vm->v_intr); 105114239Snjl printf("#define\tUPAGES %d\n", UPAGES); 106114239Snjl printf("#define\tPAGE_SIZE %d\n", PAGE_SIZE); 107114239Snjl printf("#define\tNPTEPG %d\n", NPTEPG); 108114239Snjl printf("#define\tNPDEPG %d\n", NPDEPG); 109114239Snjl printf("#define\tPDESIZE %d\n", PDESIZE); 110114239Snjl printf("#define\tPTESIZE %d\n", PTESIZE); 111114239Snjl printf("#define\tNKPDE %d\n", NKPDE); 112114239Snjl printf("#define\tNKPT %d\n", NKPT); 113114239Snjl printf("#define\tPAGE_SHIFT %d\n", PAGE_SHIFT); 114114239Snjl printf("#define\tPAGE_MASK %d\n", PAGE_MASK); 115114239Snjl printf("#define\tPDRSHIFT %d\n", PDRSHIFT); 116114239Snjl printf("#define\tUSRSTACK 0x%lx\n", USRSTACK); 117151600Sobrien printf("#define\tVM_MAXUSER_ADDRESS 0x%lx\n", VM_MAXUSER_ADDRESS); 118151600Sobrien printf("#define\tKERNBASE 0x%x\n", KERNBASE); 119151600Sobrien printf("#define\tMCLBYTES %d\n", MCLBYTES); 120114239Snjl printf("#define\tPCB_LINK %p\n", &pcb->pcb_tss.tss_link); 121114239Snjl printf("#define\tPCB_ESP0 %p\n", &pcb->pcb_tss.tss_esp0); 122114239Snjl printf("#define\tPCB_SS0 %p\n", &pcb->pcb_tss.tss_ss0); 123114239Snjl printf("#define\tPCB_ESP1 %p\n", &pcb->pcb_tss.tss_esp1); 124151937Sjkim printf("#define\tPCB_SS1 %p\n", &pcb->pcb_tss.tss_ss1); 125114239Snjl printf("#define\tPCB_ESP2 %p\n", &pcb->pcb_tss.tss_esp2); 126151937Sjkim printf("#define\tPCB_SS2 %p\n", &pcb->pcb_tss.tss_ss2); 127151937Sjkim printf("#define\tPCB_CR3 %p\n", &pcb->pcb_tss.tss_cr3); 128151937Sjkim printf("#define\tPCB_EIP %p\n", &pcb->pcb_tss.tss_eip); 129151937Sjkim printf("#define\tPCB_EFLAGS %p\n", &pcb->pcb_tss.tss_eflags); 130151937Sjkim printf("#define\tPCB_EAX %p\n", &pcb->pcb_tss.tss_eax); 131114239Snjl printf("#define\tPCB_ECX %p\n", &pcb->pcb_tss.tss_ecx); 132114239Snjl printf("#define\tPCB_EDX %p\n", &pcb->pcb_tss.tss_edx); 133129684Snjl printf("#define\tPCB_EBX %p\n", &pcb->pcb_tss.tss_ebx); 134129684Snjl printf("#define\tPCB_ESP %p\n", &pcb->pcb_tss.tss_esp); 135129684Snjl printf("#define\tPCB_EBP %p\n", &pcb->pcb_tss.tss_ebp); 136129684Snjl printf("#define\tPCB_ESI %p\n", &pcb->pcb_tss.tss_esi); 137129684Snjl printf("#define\tPCB_EDI %p\n", &pcb->pcb_tss.tss_edi); 138129684Snjl printf("#define\tPCB_ES %p\n", &pcb->pcb_tss.tss_es); 139129684Snjl printf("#define\tPCB_CS %p\n", &pcb->pcb_tss.tss_cs); 140129684Snjl printf("#define\tPCB_SS %p\n", &pcb->pcb_tss.tss_ss); 141129684Snjl printf("#define\tPCB_DS %p\n", &pcb->pcb_tss.tss_ds); 142129684Snjl printf("#define\tPCB_FS %p\n", &pcb->pcb_tss.tss_fs); 143129684Snjl printf("#define\tPCB_GS %p\n", &pcb->pcb_tss.tss_gs); 144129684Snjl printf("#define\tPCB_LDT %p\n", &pcb->pcb_tss.tss_ldt); 145129684Snjl printf("#define\tPCB_USERLDT %p\n", &pcb->pcb_ldt); 146129684Snjl printf("#define\tPCB_IOOPT %p\n", &pcb->pcb_tss.tss_ioopt); 147129684Snjl printf("#define\tU_PROF %p\n", &up->u_stats.p_prof); 148129684Snjl printf("#define\tU_PROFSCALE %p\n", &up->u_stats.p_prof.pr_scale); 149129684Snjl printf("#define\tPR_BASE %p\n", &uprof->pr_base); 150129684Snjl printf("#define\tPR_SIZE %p\n", &uprof->pr_size); 151129684Snjl printf("#define\tPR_OFF %p\n", &uprof->pr_off); 152129684Snjl printf("#define\tPR_SCALE %p\n", &uprof->pr_scale); 153129684Snjl printf("#define\tRU_MINFLT %p\n", &rup->ru_minflt); 154129684Snjl printf("#define\tPCB_FLAGS %p\n", &pcb->pcb_flags); 155129684Snjl printf("#define\tPCB_SAVEFPU %p\n", &pcb->pcb_savefpu); 156129684Snjl printf("#define\tPCB_SAVEFPU_SIZE %d\n", sizeof pcb->pcb_savefpu); 157129684Snjl printf("#define\tPCB_ONFAULT %p\n", &pcb->pcb_onfault); 158129684Snjl 159129684Snjl printf("#define\tTF_ES %p\n", &tf->tf_es); 160129684Snjl printf("#define\tTF_DS %p\n", &tf->tf_ds); 161129684Snjl printf("#define\tTF_EDI %p\n", &tf->tf_edi); 162129684Snjl printf("#define\tTF_ESI %p\n", &tf->tf_esi); 163129684Snjl printf("#define\tTF_EBP %p\n", &tf->tf_ebp); 164129684Snjl printf("#define\tTF_ISP %p\n", &tf->tf_isp); 165129684Snjl printf("#define\tTF_EBX %p\n", &tf->tf_ebx); 166129684Snjl printf("#define\tTF_EDX %p\n", &tf->tf_edx); 167129684Snjl printf("#define\tTF_ECX %p\n", &tf->tf_ecx); 168129684Snjl printf("#define\tTF_EAX %p\n", &tf->tf_eax); 169129684Snjl printf("#define\tTF_TRAPNO %p\n", &tf->tf_trapno); 170129684Snjl printf("#define\tTF_ERR %p\n", &tf->tf_err); 171129684Snjl printf("#define\tTF_EIP %p\n", &tf->tf_eip); 172129684Snjl printf("#define\tTF_CS %p\n", &tf->tf_cs); 173129684Snjl printf("#define\tTF_EFLAGS %p\n", &tf->tf_eflags); 174129684Snjl printf("#define\tTF_ESP %p\n", &tf->tf_esp); 175129684Snjl printf("#define\tTF_SS %p\n", &tf->tf_ss); 176129684Snjl 177129684Snjl printf("#define\tSIGF_SIGNUM %p\n", &sigf->sf_signum); 178129684Snjl printf("#define\tSIGF_CODE %p\n", &sigf->sf_code); 179129684Snjl printf("#define\tSIGF_SCP %p\n", &sigf->sf_scp); 180129684Snjl printf("#define\tSIGF_HANDLER %p\n", &sigf->sf_handler); 181129684Snjl printf("#define\tSIGF_SC %p\n", &sigf->sf_sc); 182129684Snjl 183129684Snjl printf("#define\tB_READ %d\n", B_READ); 184129684Snjl printf("#define\tENOENT %d\n", ENOENT); 185138287Smarks printf("#define\tEFAULT %d\n", EFAULT); 186138287Smarks printf("#define\tENAMETOOLONG %d\n", ENAMETOOLONG); 187129684Snjl printf("#define\tMAXPATHLEN %d\n", MAXPATHLEN); 188129684Snjl 189129684Snjl printf("#define\tBOOTINFO_SIZE %d\n", sizeof *bootinfo); 190129684Snjl printf("#define\tBI_VERSION %p\n", &bootinfo->bi_version); 191129684Snjl printf("#define\tBI_KERNELNAME %p\n", &bootinfo->bi_kernelname); 192129684Snjl printf("#define\tBI_NFS_DISKLESS %p\n", &bootinfo->bi_nfs_diskless); 193129684Snjl printf("#define\tBI_ENDCOMMON %p\n", &bootinfo->bi_endcommon); 194129684Snjl printf("#define\tNFSDISKLESS_SIZE %d\n", sizeof(struct nfs_diskless)); 195129684Snjl printf("#define\tBI_SIZE %p\n", &bootinfo->bi_size); 196129684Snjl printf("#define\tBI_SYMTAB %p\n", &bootinfo->bi_symtab); 197129684Snjl printf("#define\tBI_ESYMTAB %p\n", &bootinfo->bi_esymtab); 198129684Snjl 199129684Snjl return (0); 200129684Snjl} 201129684Snjl