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) 1999 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#define BSP_PCI_IRQ_NUMBER (16)
63#define BSP_PCI_IRQ_LOWEST_OFFSET (0)
64#define BSP_PCI_IRQ_MAX_OFFSET (BSP_PCI_IRQ_LOWEST_OFFSET + BSP_PCI_IRQ_NUMBER - 1)
65
66#define BSP_PROCESSOR_IRQ_NUMBER (1)
67#define BSP_PROCESSOR_IRQ_LOWEST_OFFSET (BSP_PCI_IRQ_MAX_OFFSET)
68#define BSP_PROCESSOR_IRQ_MAX_OFFSET (BSP_PROCESSOR_IRQ_LOWEST_OFFSET+BSP_PROCESSOR_IRQ_NUMBER-1)
69
70
71 /*
72 * Summary
73 */
74#define BSP_IRQ_NUMBER (BSP_PROCESSOR_IRQ_MAX_OFFSET + 1)
75#define BSP_LOWEST_OFFSET (BSP_PCI_IRQ_LOWEST_OFFSET)
76#define BSP_MAX_OFFSET (BSP_IRQ_NUMBER - 1)
77
78 /*
79 * Some Processor execption handled as rtems IRQ symbolic name definition
80 */
81#define BSP_DECREMENTER (BSP_PROCESSOR_IRQ_LOWEST_OFFSET)
82
83#include <bsp/irq_supp.h>
84
85#define BSP_INTERRUPT_VECTOR_COUNT BSP_IRQ_NUMBER
86
87#ifdef __cplusplus
88extern "C" {
89#endif
90
91void BSP_rtems_irq_mng_init(unsigned cpuId);
92
93#ifdef __cplusplus
94}
95#endif
96
97#endif
98#endif
Interrupt Handler Support.