1129198Scognet/*	$NetBSD: fiq.h,v 1.1 2001/12/20 01:20:23 thorpej Exp $	*/
2129198Scognet
3139735Simp/*-
4129198Scognet * Copyright (c) 2001 Wasabi Systems, Inc.
5129198Scognet * All rights reserved.
6129198Scognet *
7129198Scognet * Written by Jason R. Thorpe for Wasabi Systems, Inc.
8129198Scognet *
9129198Scognet * Redistribution and use in source and binary forms, with or without
10129198Scognet * modification, are permitted provided that the following conditions
11129198Scognet * are met:
12129198Scognet * 1. Redistributions of source code must retain the above copyright
13129198Scognet *    notice, this list of conditions and the following disclaimer.
14129198Scognet * 2. Redistributions in binary form must reproduce the above copyright
15129198Scognet *    notice, this list of conditions and the following disclaimer in the
16129198Scognet *    documentation and/or other materials provided with the distribution.
17129198Scognet * 3. All advertising materials mentioning features or use of this software
18129198Scognet *    must display the following acknowledgement:
19129198Scognet *	This product includes software developed for the NetBSD Project by
20129198Scognet *	Wasabi Systems, Inc.
21129198Scognet * 4. The name of Wasabi Systems, Inc. may not be used to endorse
22129198Scognet *    or promote products derived from this software without specific prior
23129198Scognet *    written permission.
24129198Scognet *
25129198Scognet * THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND
26129198Scognet * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
27129198Scognet * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28129198Scognet * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL WASABI SYSTEMS, INC
29129198Scognet * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
30129198Scognet * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
31129198Scognet * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
32129198Scognet * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
33129198Scognet * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34129198Scognet * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35129198Scognet * POSSIBILITY OF SUCH DAMAGE.
36129198Scognet *
37129198Scognet * $FreeBSD$
38129198Scognet *
39129198Scognet */
40129198Scognet
41129198Scognet#ifndef _MACHINE_FIQ_H_
42129198Scognet#define	_MACHINE_FIQ_H_
43129198Scognet
44129198Scognet#include <sys/queue.h>
45129198Scognet
46129198Scognetstruct fiqregs {
47129198Scognet	u_int	fr_r8;			/* FIQ mode r8 */
48129198Scognet	u_int	fr_r9;			/* FIQ mode r9 */
49129198Scognet	u_int	fr_r10;			/* FIQ mode r10 */
50129198Scognet	u_int	fr_r11;			/* FIQ mode r11 */
51129198Scognet	u_int	fr_r12;			/* FIQ mode r12 */
52129198Scognet	u_int	fr_r13;			/* FIQ mode r13 */
53129198Scognet};
54129198Scognet
55129198Scognetstruct fiqhandler {
56129198Scognet	TAILQ_ENTRY(fiqhandler) fh_list;/* link in the FIQ handler stack */
57129198Scognet	void	*fh_func;		/* FIQ handler routine */
58129198Scognet	size_t	fh_size;		/* size of FIQ handler */
59129198Scognet	int	fh_flags;		/* flags; see below */
60129198Scognet	struct fiqregs *fh_regs;	/* pointer to regs structure */
61129198Scognet};
62129198Scognet
63129198Scognet#define	FH_CANPUSH	0x01	/* can push this handler out of the way */
64129198Scognet
65129198Scognetint	fiq_claim(struct fiqhandler *);
66129198Scognetvoid	fiq_release(struct fiqhandler *);
67129198Scognet
68129198Scognetvoid	fiq_getregs(struct fiqregs *);
69129198Scognetvoid	fiq_setregs(struct fiqregs *);
70129198Scognet
71129198Scognet#endif /* _MACHINE_FIQ_H_ */
72