Annotation of sys/arch/i386/i386/genassym.cf, Revision 1.1
1.1 ! nbrk 1: # $OpenBSD: genassym.cf,v 1.26 2007/04/03 10:14:47 art Exp $
! 2: #
! 3: # Copyright (c) 1982, 1990 The Regents of the University of California.
! 4: # All rights reserved.
! 5: #
! 6: # Redistribution and use in source and binary forms, with or without
! 7: # modification, are permitted provided that the following conditions
! 8: # are met:
! 9: # 1. Redistributions of source code must retain the above copyright
! 10: # notice, this list of conditions and the following disclaimer.
! 11: # 2. Redistributions in binary form must reproduce the above copyright
! 12: # notice, this list of conditions and the following disclaimer in the
! 13: # documentation and/or other materials provided with the distribution.
! 14: # 3. Neither the name of the University nor the names of its contributors
! 15: # may be used to endorse or promote products derived from this software
! 16: # without specific prior written permission.
! 17: #
! 18: # THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
! 19: # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
! 20: # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
! 21: # ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
! 22: # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
! 23: # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
! 24: # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
! 25: # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
! 26: # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
! 27: # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
! 28: # SUCH DAMAGE.
! 29: #
! 30: # @(#)genassym.c 7.8 (Berkeley) 5/7/91
! 31: #
! 32:
! 33: include <sys/param.h>
! 34: include <sys/proc.h>
! 35: include <sys/resourcevar.h>
! 36: include <sys/device.h>
! 37: include <sys/user.h>
! 38: ifdef INET
! 39: include <sys/mbuf.h>
! 40: include <sys/socketvar.h>
! 41: include <netinet/in.h>
! 42: include <netinet/in_systm.h>
! 43: include <netinet/ip.h>
! 44: include <netinet/ip_var.h>
! 45: endif
! 46:
! 47: include <uvm/uvm_extern.h>
! 48:
! 49: include <machine/trap.h>
! 50: include <machine/pmap.h>
! 51: include <machine/vmparam.h>
! 52: include <machine/mutex.h>
! 53:
! 54: if COMPAT_SVR4 > 0
! 55: include <compat/svr4/svr4_ucontext.h>
! 56: endif
! 57:
! 58: if COMPAT_LINUX > 0
! 59: include <machine/linux_machdep.h>
! 60: endif
! 61:
! 62: if COMPAT_FREEBSD > 0
! 63: include <machine/freebsd_machdep.h>
! 64: endif
! 65:
! 66: if MULTIPROCESSOR
! 67: include <machine/cpu.h>
! 68: endif
! 69:
! 70: include "isa.h"
! 71: if NISA > 0
! 72: include <i386/isa/isa_machdep.h>
! 73: endif
! 74:
! 75: export SRUN
! 76: export SONPROC
! 77:
! 78: # values for page tables
! 79: export PDSLOT_KERN
! 80: export PDSLOT_PTE
! 81: export PDSLOT_APTE
! 82: export NKPTP_MIN
! 83: export NKPTP_MAX
! 84:
! 85: # values for virtual memory
! 86: export VM_MAXUSER_ADDRESS
! 87:
! 88: # proc fields and values
! 89: struct proc
! 90: member p_addr
! 91: member p_back
! 92: member p_forw
! 93: member p_priority
! 94: member p_stat
! 95: member p_wchan
! 96: member p_vmspace
! 97: member p_flag
! 98: member p_cpu
! 99: member P_MD_ASTPENDING p_md.md_astpending
! 100:
! 101: export P_SYSTEM
! 102:
! 103: # interrupt/fault metering
! 104: struct uvmexp V_
! 105: member TRAP traps
! 106: member INTR intrs
! 107:
! 108: # pcb fields
! 109: struct pcb
! 110: member pcb_cr3
! 111: member pcb_ebp
! 112: member pcb_esp
! 113: member pcb_cr0
! 114: member pcb_ldt
! 115: member pcb_ldt_sel
! 116: member pcb_onfault
! 117: member pcb_fpcpu
! 118:
! 119: # frame definitions
! 120: struct trapframe
! 121: member tf_cs
! 122: member tf_trapno
! 123: member tf_eflags
! 124: member tf_eip
! 125: member tf_err
! 126: member tf_eax
! 127: member tf_esp
! 128: define FRAMESIZE sizeof(struct trapframe)
! 129:
! 130: # interrupt frame definitions
! 131: struct intrframe
! 132: member if_ppl
! 133:
! 134: # signal handling
! 135: struct sigframe SIGF_
! 136: member HANDLER sf_handler
! 137: member SC sf_sc
! 138: member FPSTATE sf_fpstate
! 139: struct sigcontext
! 140:
! 141: # mbuf fields
! 142: ifdef INET
! 143: struct mbuf
! 144: member m_next
! 145: member m_data
! 146: member m_len
! 147: endif
! 148:
! 149: # SVR4 frame offsets
! 150: ifdef COMPAT_SVR4
! 151: struct svr4_sigframe SVR4_SIGF_
! 152: member HANDLER sf_handler
! 153: member UC sf_uc
! 154: struct svr4_ucontext SVR4_UC_
! 155: endif
! 156:
! 157: # Linux frame offsets
! 158: ifdef COMPAT_LINUX
! 159: struct linux_sigframe LINUX_SIGF_
! 160: member HANDLER sf_handler
! 161: member SC sf_sc
! 162: struct linux_sigcontext LINUX_
! 163: endif
! 164:
! 165: # FreeBSD frame offsets
! 166: ifdef COMPAT_FREEBSD
! 167: struct freebsd_sigframe FREEBSD_SIGF_
! 168: member HANDLER sf_handler
! 169: member SC sf_sc
! 170: endif
! 171:
! 172: # Interrupt metering
! 173: if NISA > 0
! 174: struct intrhand
! 175: member ih_fun
! 176: member ih_arg
! 177: member IH_COUNT ih_count.ec_count
! 178: member ih_next
! 179: endif
! 180:
! 181: struct mutex
! 182: member mtx_lock
! 183: member mtx_wantipl
! 184: member mtx_oldipl
! 185: member mtx_owner
! 186:
! 187: define IP_SRC offsetof(struct ip, ip_src)
! 188: define IP_DST offsetof(struct ip, ip_dst)
! 189:
! 190: define P_MD_TSS_SEL offsetof(struct proc, p_md.md_tss_sel)
! 191:
! 192: define CPU_INFO_SELF offsetof(struct cpu_info, ci_self)
! 193: define CPU_INFO_CURPROC offsetof(struct cpu_info, ci_curproc)
! 194: define CPU_INFO_CURPCB offsetof(struct cpu_info, ci_curpcb)
! 195: define CPU_INFO_NAME offsetof(struct cpu_info, ci_dev.dv_xname)
! 196: define CPU_INFO_IDLE_PCB offsetof(struct cpu_info, ci_idle_pcb)
! 197: define CPU_INFO_IDLE_TSS_SEL offsetof(struct cpu_info, ci_idle_tss_sel)
! 198: define CPU_INFO_LEVEL offsetof(struct cpu_info, ci_level)
! 199: define CPU_INFO_VENDOR offsetof(struct cpu_info, ci_vendor[0])
! 200: define CPU_INFO_SIGNATURE offsetof(struct cpu_info, ci_signature)
! 201: define CPU_INFO_RESCHED offsetof(struct cpu_info, ci_want_resched)
! 202: define CPU_INFO_GDT offsetof(struct cpu_info, ci_gdt)
! 203: define CPU_INFO_IPENDING offsetof(struct cpu_info, ci_ipending)
! 204: define CPU_INFO_IMASK offsetof(struct cpu_info, ci_imask)
! 205: define CPU_INFO_IUNMASK offsetof(struct cpu_info, ci_iunmask)
! 206: define CPU_INFO_ILEVEL offsetof(struct cpu_info, ci_ilevel)
! 207: define CPU_INFO_IDEPTH offsetof(struct cpu_info, ci_idepth)
! 208: define CPU_INFO_ISOURCES offsetof(struct cpu_info, ci_isources)
! 209:
! 210: define SIZEOF_CPU_INFO sizeof(struct cpu_info)
! 211:
CVSweb