[BACK]Return to genassym.cf CVS log [TXT][DIR] Up to [local] / sys / arch / i386 / i386

File: [local] / sys / arch / i386 / i386 / genassym.cf (download)

Revision 1.1, Tue Mar 4 16:06:22 2008 UTC (16 years, 2 months ago) by nbrk
Branch point for: MAIN

Initial revision

#	$OpenBSD: genassym.cf,v 1.26 2007/04/03 10:14:47 art Exp $
#
# Copyright (c) 1982, 1990 The Regents of the University of California.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
#    notice, this list of conditions and the following disclaimer in the
#    documentation and/or other materials provided with the distribution.
# 3. Neither the name of the University nor the names of its contributors
#    may be used to endorse or promote products derived from this software
#    without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
#	@(#)genassym.c	7.8 (Berkeley) 5/7/91
#

include <sys/param.h>
include <sys/proc.h>
include <sys/resourcevar.h>
include <sys/device.h>
include <sys/user.h>
ifdef INET
include <sys/mbuf.h>
include <sys/socketvar.h>
include <netinet/in.h>
include <netinet/in_systm.h>
include <netinet/ip.h>
include <netinet/ip_var.h>
endif

include <uvm/uvm_extern.h>

include <machine/trap.h>
include <machine/pmap.h>
include <machine/vmparam.h>
include <machine/mutex.h>

if COMPAT_SVR4 > 0
include <compat/svr4/svr4_ucontext.h>
endif

if COMPAT_LINUX > 0
include <machine/linux_machdep.h>
endif

if COMPAT_FREEBSD > 0
include <machine/freebsd_machdep.h>
endif

if MULTIPROCESSOR
include <machine/cpu.h>
endif

include "isa.h"
if NISA > 0
include <i386/isa/isa_machdep.h>
endif

export	SRUN
export	SONPROC

# values for page tables
export	PDSLOT_KERN
export	PDSLOT_PTE
export	PDSLOT_APTE
export	NKPTP_MIN
export	NKPTP_MAX

# values for virtual memory
export	VM_MAXUSER_ADDRESS

# proc fields and values
struct	proc
member	p_addr
member	p_back
member	p_forw
member	p_priority
member	p_stat
member	p_wchan
member	p_vmspace
member	p_flag
member	p_cpu
member	P_MD_ASTPENDING	p_md.md_astpending

export	P_SYSTEM

# interrupt/fault metering
struct	uvmexp		V_
member	TRAP		traps
member	INTR		intrs

# pcb fields
struct	pcb
member	pcb_cr3
member	pcb_ebp
member	pcb_esp
member	pcb_cr0
member	pcb_ldt
member	pcb_ldt_sel
member	pcb_onfault
member	pcb_fpcpu

# frame definitions
struct	trapframe
member	tf_cs
member	tf_trapno
member	tf_eflags
member	tf_eip
member	tf_err
member	tf_eax
member	tf_esp
define	FRAMESIZE	sizeof(struct trapframe)

# interrupt frame definitions
struct intrframe
member if_ppl

# signal handling
struct	sigframe	SIGF_
member	HANDLER		sf_handler
member	SC		sf_sc
member	FPSTATE		sf_fpstate
struct	sigcontext

# mbuf fields
ifdef INET
struct	mbuf
member	m_next
member	m_data
member	m_len
endif

# SVR4 frame offsets
ifdef COMPAT_SVR4
struct	svr4_sigframe	SVR4_SIGF_
member	HANDLER		sf_handler
member	UC		sf_uc
struct	svr4_ucontext	SVR4_UC_
endif

# Linux frame offsets
ifdef COMPAT_LINUX
struct	linux_sigframe		LINUX_SIGF_
member	HANDLER			sf_handler
member	SC			sf_sc
struct	linux_sigcontext	LINUX_
endif

# FreeBSD frame offsets
ifdef COMPAT_FREEBSD
struct	freebsd_sigframe	FREEBSD_SIGF_
member	HANDLER			sf_handler
member	SC			sf_sc
endif

# Interrupt metering
if NISA > 0
struct	intrhand
member	ih_fun
member	ih_arg
member	IH_COUNT		ih_count.ec_count
member	ih_next
endif

struct mutex
member	mtx_lock
member	mtx_wantipl
member	mtx_oldipl
member	mtx_owner

define	IP_SRC			offsetof(struct ip, ip_src)
define	IP_DST			offsetof(struct ip, ip_dst)

define	P_MD_TSS_SEL		offsetof(struct proc, p_md.md_tss_sel)

define	CPU_INFO_SELF		offsetof(struct cpu_info, ci_self)
define	CPU_INFO_CURPROC	offsetof(struct cpu_info, ci_curproc)
define	CPU_INFO_CURPCB		offsetof(struct cpu_info, ci_curpcb)
define	CPU_INFO_NAME		offsetof(struct cpu_info, ci_dev.dv_xname)
define	CPU_INFO_IDLE_PCB	offsetof(struct cpu_info, ci_idle_pcb)
define	CPU_INFO_IDLE_TSS_SEL	offsetof(struct cpu_info, ci_idle_tss_sel)
define	CPU_INFO_LEVEL		offsetof(struct cpu_info, ci_level)
define	CPU_INFO_VENDOR		offsetof(struct cpu_info, ci_vendor[0])
define	CPU_INFO_SIGNATURE	offsetof(struct cpu_info, ci_signature)
define	CPU_INFO_RESCHED	offsetof(struct cpu_info, ci_want_resched)
define	CPU_INFO_GDT		offsetof(struct cpu_info, ci_gdt)
define	CPU_INFO_IPENDING	offsetof(struct cpu_info, ci_ipending)
define	CPU_INFO_IMASK		offsetof(struct cpu_info, ci_imask)
define	CPU_INFO_IUNMASK	offsetof(struct cpu_info, ci_iunmask)
define	CPU_INFO_ILEVEL		offsetof(struct cpu_info, ci_ilevel)
define	CPU_INFO_IDEPTH		offsetof(struct cpu_info, ci_idepth)
define	CPU_INFO_ISOURCES	offsetof(struct cpu_info, ci_isources)

define	SIZEOF_CPU_INFO		sizeof(struct cpu_info)