RTEMS 7.0-rc1
Loading...
Searching...
No Matches
irq.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-2-Clause */
2
17/*
18 * Copyright (c) 1998 Eric Valette <eric.valette@free.fr>
19 *
20 * Redistribution and use in source and binary forms, with or without
21 * modification, are permitted provided that the following conditions
22 * are met:
23 * 1. Redistributions of source code must retain the above copyright
24 * notice, this list of conditions and the following disclaimer.
25 * 2. Redistributions in binary form must reproduce the above copyright
26 * notice, this list of conditions and the following disclaimer in the
27 * documentation and/or other materials provided with the distribution.
28 *
29 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
30 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
31 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
32 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
33 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
34 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
35 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
36 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
37 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
38 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
39 * POSSIBILITY OF SUCH DAMAGE.
40 */
41
42#ifndef LIBBSP_POWERPC_IRQ_H
43#define LIBBSP_POWERPC_IRQ_H
44
45#ifndef BSP_SHARED_HANDLER_SUPPORT
46#define BSP_SHARED_HANDLER_SUPPORT 1
47#endif
48
49#ifndef ASM
50
51#include <rtems/irq.h>
52
53
54/*
55 * Symblolic IRQ names and related definitions.
56 */
57
58/*
59 * PCI IRQ handlers related definitions
60 * CAUTION : BSP_PCI_IRQ_LOWEST_OFFSET should be equal to OPENPIC_VEC_SOURCE
61 */
62/* FIXME: do we need PCI interrrupts here ? */
63#define BSP_PCI_IRQ_NUMBER (16)
64#define BSP_PCI_IRQ_LOWEST_OFFSET (0)
65#define BSP_PCI_IRQ_MAX_OFFSET (BSP_PCI_IRQ_LOWEST_OFFSET + BSP_PCI_IRQ_NUMBER - 1)
66
67#define BSP_PROCESSOR_IRQ_NUMBER (1)
68#define BSP_PROCESSOR_IRQ_LOWEST_OFFSET (BSP_PCI_IRQ_MAX_OFFSET)
69#define BSP_PROCESSOR_IRQ_MAX_OFFSET (BSP_PROCESSOR_IRQ_LOWEST_OFFSET+BSP_PROCESSOR_IRQ_NUMBER-1)
70
71
72 /*
73 * Summary
74 */
75#define BSP_IRQ_NUMBER (BSP_PROCESSOR_IRQ_MAX_OFFSET + 1)
76#define BSP_LOWEST_OFFSET (BSP_PCI_IRQ_LOWEST_OFFSET)
77#define BSP_MAX_OFFSET (BSP_IRQ_NUMBER - 1)
78
79 /*
80 * Some Processor execption handled as rtems IRQ symbolic name definition
81 */
82#define BSP_DECREMENTER (BSP_PROCESSOR_IRQ_LOWEST_OFFSET)
83
84#define BSP_INTERRUPT_VECTOR_COUNT BSP_IRQ_NUMBER
85
86/* #include <bsp/irq_supp.h> */
87
88#ifdef __cplusplus
89extern "C" {
90#endif
91
92void BSP_rtems_irq_mng_init(unsigned cpuId);
93
94#ifdef __cplusplus
95}
96#endif
97
98#endif
99#endif
Interrupt Handler Support.