1: /* 2: * Copyright (c) 1986 Regents of the University of California. 3: * All rights reserved. The Berkeley software License Agreement 4: * specifies the terms and conditions for redistribution. 5: * 6: * @(#)genassym.c 1.1 (2.10BSD Berkeley) 6/12/88 7: */ 8: 9: #include "param.h" 10: #include "../machine/seg.h" 11: 12: #include "user.h" 13: #include "inode.h" 14: #include "mbuf.h" 15: #include "buf.h" 16: #include "proc.h" 17: #include "errno.h" 18: #include "reboot.h" 19: #include "syscall.h" 20: #include "vm.h" 21: #include "dz.h" 22: #include "../net/netisr.h" 23: #include <stdio.h> 24: 25: struct proc proc[1]; /* satisfy proc.h and inode.h */ 26: struct inode inode[1]; 27: struct buf buf[1]; 28: 29: main() 30: { 31: { 32: struct buf *bp = 0; 33: 34: printf("#define B_ADDR %o\n",&bp->b_un.b_addr); 35: printf("#define B_XMEM %o\n",&bp->b_xmem); 36: } 37: 38: { 39: segm *se = 0; 40: 41: printf("#define SE_ADDR %o\n",&se->se_addr); 42: printf("#define SE_DESC %o\n",&se->se_desc); 43: } 44: 45: { 46: struct user *u = 0; 47: 48: printf("#define U_AR0 %o\n",&u->u_ar0); 49: printf("#define U_CUROV %o\n",&u->u_ovdata.uo_curov); 50: printf("#define U_FPERR %o\n",&u->u_fperr); 51: printf("#define U_FPREGS %o\n",&u->u_fps.u_fpregs[0]); 52: printf("#define U_FPSR %o\n",&u->u_fps.u_fpsr); 53: printf("#define U_OVBASE %o\n",&u->u_ovdata.uo_ovbase); 54: printf("#define U_RU %o\n",&u->u_ru); 55: printf("#define U_PROCP %o\n",&u->u_procp); 56: printf("#define U_SSIZE %o\n",&u->u_ssize); 57: printf("#define U_STACK %o\n",u->u_stack); 58: } 59: 60: { 61: struct fperr *f = 0; 62: 63: printf("#define F_FEC %o\n",&f->f_fec); 64: printf("#define F_FEA %o\n",&f->f_fea); 65: } 66: 67: { 68: struct k_rusage *ru = 0; 69: 70: printf("#define RU_OVLY %o\n",&ru->ru_ovly); 71: } 72: 73: { 74: struct vmrate *vm = 0; 75: 76: printf("#define V_INTR %o\n",&vm->v_intr); 77: printf("#define V_SOFT %o\n",&vm->v_soft); 78: printf("#define V_PDMA %o\n",&vm->v_pdma); 79: printf("#define V_OVLY %o\n",&vm->v_ovly); 80: } 81: 82: printf("#define NET_SBASE [_u+%d.]\n",NET_SBASE); 83: printf("#define NET_STOP [_u+%d.]\n",NET_STOP); 84: printf("#define KERN_SBASE [_u+%d.]\n",KERN_SBASE); 85: printf("#define KERN_STOP [_u+%d.]\n",KERN_STOP); 86: 87: printf("#define DEV_BSIZE %d.\n",DEV_BSIZE); 88: printf("#define EFAULT %d.\n",EFAULT); 89: printf("#define ENOENT %d.\n",ENOENT); 90: printf("#define MAXBSIZE %d.\n",MAXBSIZE); 91: printf("#define NETISR_IMP %d.\n",NETISR_IMP); 92: printf("#define NETISR_IP %d.\n",NETISR_IP); 93: printf("#define NETISR_NS %d.\n",NETISR_NS); 94: printf("#define NETISR_RAW %d.\n",NETISR_RAW); 95: printf("#define NETISR_CLOCK %d.\n",NETISR_CLOCK); 96: printf("#define NOVL %d.\n",NOVL); 97: printf("#define RB_POWRFAIL %d.\n",RB_POWRFAIL); 98: printf("#define RB_SINGLE %d.\n",RB_SINGLE); 99: printf("#define SIGFPE %d.\n",SIGFPE); 100: printf("#define SIGILL %d.\n",SIGILL); 101: printf("#define SIGSEGV %d.\n",SIGSEGV); 102: printf("#define SIGTRAP %d.\n",SIGTRAP); 103: printf("#define SYS_execv %d.\n",SYS_execv); 104: printf("#define SYS_exit %d.\n",SYS_exit); 105: printf("#define USIZE %d.\n",USIZE); 106: 107: exit(0); 108: }