File : a-intnam-xi-ppc-openpic.ads
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
4 -- --
5 -- A D A . I N T E R R U P T S . N A M E S --
6 -- --
7 -- S p e c --
8 -- --
9 -- Copyright (C) 2011-2015, Free Software Foundation, Inc. --
10 -- --
11 -- GNAT is free software; you can redistribute it and/or modify it under --
12 -- terms of the GNU General Public License as published by the Free Soft- --
13 -- ware Foundation; either version 3, or (at your option) any later ver- --
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
16 -- or FITNESS FOR A PARTICULAR PURPOSE. --
17 -- --
18 -- --
19 -- --
20 -- --
21 -- --
22 -- You should have received a copy of the GNU General Public License and --
23 -- a copy of the GCC Runtime Library Exception along with this program; --
24 -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
25 -- <http://www.gnu.org/licenses/>. --
26 -- --
27 -- GNARL was developed by the GNARL team at Florida State University. --
28 -- Extensive contributions were provided by Ada Core Technologies, Inc. --
29 -- --
30 ------------------------------------------------------------------------------
31
32 -- This is the version for P2020 targets of this package
33
34 pragma Restrictions (no_elaboration_code);
35
36 with System;
37 package Ada.Interrupts.Names is
38
39 -- All identifiers in this unit are implementation defined
40
41 pragma Implementation_Defined;
42
43 -- Note: do not forget to update procedures Priority_Of_Interrupt and
44 -- Initialize_Board of package System.BB.Board_Support (s-bbbosu) when
45 -- you modify this package (in particular when you add an interrupt).
46
47 -- The interrupt ID number is internal to the run-time. Use the range
48 -- corresponding to your type of interrupt (Interprocessor, External,
49 -- Iternal, etc.). For example, Internal interrupt 7 can be defined as:
50 -- Internal_Interrupt_7 : constant Internal_Interrupt_ID :=
51 -- Internal_Interrupt_ID'First + 7;
52
53 -- Do not use 0 Interrupt_ID, it is reserved by the runtime for the
54 -- spurious interrupt.
55
56 -- You can use any priority as long as it belongs to the range defined by
57 -- Interrupt_Priority'First .. Interrupt_Priority'Last - 1.
58
59 -- It is not recommended to use Interrupt_Priority'First as such priority
60 -- are always disabled by the OpenPIC.
61
62 -- Interrupt_Priority'Last is reserved for non-OpenPIC interrupts such
63 -- as the decrementer.
64
65 subtype IPI_Interrupt_ID is Interrupt_ID range 1 .. 4;
66 subtype External_Interrupt_ID is Interrupt_ID range 5 .. 16;
67 subtype Internal_Interrupt_ID is Interrupt_ID range 17 .. 80;
68 subtype Messaging_Interrupt_ID is Interrupt_ID range 81 .. 88;
69 subtype Shared_Message_Interrupt_ID is Interrupt_ID range 89 .. 96;
70
71 Interprocessor_Interrupt_0 : constant Interrupt_ID := 1;
72 Interprocessor_Interrupt_0_Priority : constant System.Interrupt_Priority :=
73 System.Interrupt_Priority'First +
74 1;
75
76 Interprocessor_Interrupt_1 : constant Interrupt_ID := 2;
77 Interprocessor_Interrupt_1_Priority : constant System.Interrupt_Priority :=
78 System.Interrupt_Priority'First +
79 4;
80
81 Interprocessor_Interrupt_2 : constant Interrupt_ID := 3;
82 Interprocessor_Interrupt_2_Priority : constant System.Interrupt_Priority :=
83 System.Interrupt_Priority'First +
84 8;
85
86 Interprocessor_Interrupt_3 : constant Interrupt_ID := 4;
87 Interprocessor_Interrupt_3_Priority : constant System.Interrupt_Priority :=
88 System.Interrupt_Priority'First +
89 12;
90 end Ada.Interrupts.Names;