NetBSD-5.0.2/sys/arch/acorn26/acorn26/genassym.cf

# $NetBSD: genassym.cf,v 1.10 2008/06/23 17:58:17 matt Exp $
#
# Copyright (c) 1999 Ben Harris
# 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. The name of the author may not be used to endorse or promote products
#    derived from this software without specific prior written permission.
# 
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.

include "eca.h"

include <sys/param.h>

include <sys/proc.h>
include <sys/user.h>
include <sys/mbuf.h>
include <netinet/in.h>
include <netinet/in_systm.h>
include <netinet/ip.h>
include <netinet/ip6.h>
include <netinet/ip_var.h>

include <machine/pcb.h>

if NECA > 0
include <arch/acorn26/ioc/if_ecavar.h>
endif

define	__PROG26	1

define	U_PCB		offsetof(struct user, u_pcb)
define	PCB_SF		offsetof(struct pcb, pcb_sf)
define	PCB_ONFAULT	offsetof(struct pcb, pcb_onfault)
define	L_ADDR		offsetof(struct lwp, l_addr)

define	TF_SPSR		offsetof(struct trapframe, tf_spsr)
define	TF_R0		offsetof(struct trapframe, tf_r0)
define	TF_R15		offsetof(struct trapframe, tf_r15)
define	TF_SIZE		sizeof(struct trapframe)

define	IF_R15		offsetof(struct irqframe, if_r15)
define	IF_SIZE		sizeof(struct irqframe)

# Constants required for in_cksum() and friends.
define	M_NEXT		offsetof(struct mbuf, m_next)
define	M_DATA		offsetof(struct mbuf, m_data)
define	M_LEN		offsetof(struct mbuf, m_len)
define	IP_SRC		offsetof(struct ip, ip_src)
define	IP_DST		offsetof(struct ip, ip_dst)

if NECA > 0
define	EFS_FIQHANDLER	offsetof(struct eca_fiqstate, efs_fiqhandler)
define	EFS_RX_CURMBUF	offsetof(struct eca_fiqstate, efs_rx_curmbuf)
define	EFS_RX_FIQREGS	offsetof(struct eca_fiqstate, efs_rx_fiqregs)
define	EFS_RX_FLAGS	offsetof(struct eca_fiqstate, efs_rx_flags)
define	EFS_RX_MYADDR	offsetof(struct eca_fiqstate, efs_rx_myaddr)
define	EFS_TX_CURMBUF	offsetof(struct eca_fiqstate, efs_tx_curmbuf)
endif

define	CI_ASTPENDING	offsetof(struct cpu_info, ci_astpending)
define	CI_CURLWP	offsetof(struct cpu_info, ci_curlwp)
define	CI_CURPCB	offsetof(struct cpu_info, ci_curpcb)