intr.h revision 204425
1/*- 2 * Copyright (c) 2007-2010 Marcel Moolenaar 3 * Copyright (c) 1998 Doug Rabson 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 * 15 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 16 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 * 27 * $FreeBSD: head/sys/ia64/include/intr.h 204425 2010-02-27 18:55:43Z marcel $ 28 */ 29 30#ifndef _MACHINE_INTR_H_ 31#define _MACHINE_INTR_H_ 32 33struct sapic; 34 35/* 36 * Layout of the Processor Interrupt Block. 37 */ 38struct ia64_pib 39{ 40 uint64_t ib_ipi[65536][2]; /* 64K-way IPIs (1MB area). */ 41 uint8_t _rsvd1[0xe0000]; 42 uint8_t ib_inta; /* Generate INTA cycle. */ 43 uint8_t _rsvd2[7]; 44 uint8_t ib_xtp; /* External Task Priority. */ 45 uint8_t _rsvd3[7]; 46 uint8_t _rsvd4[0x1fff0]; 47}; 48 49extern struct ia64_pib *ia64_pib; 50 51int ia64_setup_intr(const char *, int, driver_filter_t, driver_intr_t, 52 void *, enum intr_type, void **); 53int ia64_teardown_intr(void *); 54 55int sapic_config_intr(u_int, enum intr_trigger, enum intr_polarity); 56struct sapic *sapic_create(u_int, u_int, uint64_t); 57int sapic_enable(struct sapic *, u_int, u_int); 58void sapic_eoi(struct sapic *, u_int); 59struct sapic *sapic_lookup(u_int, u_int *); 60void sapic_mask(struct sapic *, u_int); 61void sapic_unmask(struct sapic *, u_int); 62 63#ifdef DDB 64void sapic_print(struct sapic *, u_int); 65#endif 66 67#endif /* !_MACHINE_INTR_H_ */ 68