-
Notifications
You must be signed in to change notification settings - Fork 47
/
s-bbpara__zynqmp-el2.ads
128 lines (101 loc) · 5.49 KB
/
s-bbpara__zynqmp-el2.ads
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
-- --
-- S Y S T E M . B B . P A R A M E T E R S --
-- --
-- S p e c --
-- --
-- Copyright (C) 1999-2002 Universidad Politecnica de Madrid --
-- Copyright (C) 2003-2005 The European Space Agency --
-- Copyright (C) 2003-2017, AdaCore --
-- --
-- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNARL is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNARL was developed by the GNARL team at Florida State University. --
-- Extensive contributions were provided by Ada Core Technologies, Inc. --
-- --
-- The port of GNARL to bare board targets was initially developed by the --
-- Real-Time Systems Group at the Technical University of Madrid. --
-- --
------------------------------------------------------------------------------
-- This package defines basic parameters used by the low level tasking system
-- This is the Xilinx Ultrascale+ MPSoC version of this package
pragma Restrictions (No_Elaboration_Code);
package System.BB.Parameters is
pragma Pure;
--------------------
-- Hardware clock --
--------------------
Clock_Frequency : constant := 1_099_989_000;
-- CPU frequency
Ticks_Per_Second : constant := 99_999_000;
-- Frequency of the Global timestamp timer in Hz.
----------------
-- Interrupts --
----------------
-- These definitions are in this package in order to isolate target
-- dependencies.
subtype Interrupt_Range is Natural range 0 .. 187;
-- Number of interrupts supported by RPI2.
Trap_Vectors : constant := 7;
-- ARM in general has these traps:
-- 0 (at 16#0000#) Reset
-- 1 (at 16#0004#) Undefined Instruction (synchronous)
-- 2 (at 16#0008#) Supervisor Call (synchronous)
-- 3 (at 16#000C#) Abort - Prefetch (synchronous)
-- 4 (at 16#0010#) Abort - Data (asynchronous)
-- 5 (at 16#0014#) IRQ Trap (asynchronous)
-- 6 (at 16#0018#) FIQ Trap (asynchronous)
------------------------
-- Context Management --
------------------------
-- The run time stores a minimal amount of state in the thread context.
-- Most state will be saved on the task's stack when calling a potentially
-- blocking operation, or on the interrupt stack when the task is pre-
-- empted. Most of the space is currently required for floating point
-- state, which is saved lazily.
-- The TMS570 processor needs to save:
-- * 6 integer registers of 32 bits (r0, r1, PC, CPSR, R12, SP)
-- for normal processing
-- * 33 floating point registers of 32 bits (s0 .. s31, FPCSR)
-- This amounts to 39 registers, rounded up to 40 for alignment.
Context_Buffer_Capacity : constant := 40;
------------
-- Stacks --
------------
Interrupt_Stack_Size : constant := 8192;
-- Size of each of the interrupt stacks. Each processor has its own
-- interrupt stack. In case interrupts are nested, the same stack is used.
Interrupt_Sec_Stack_Size : constant := 128;
-- Size of the secondary stack for interrupt handlers
----------
-- CPUS --
----------
Max_Number_Of_CPUs : constant := 4;
-- Maximum number of CPUs
Multiprocessor : constant Boolean := Max_Number_Of_CPUs /= 1;
-- Are we on a multiprocessor board?
---------------
-- Privilege --
---------------
type Runtime_EL_Type is range 1 .. 2;
Runtime_EL : constant Runtime_EL_Type := 2;
-- Exception level for the runtime (currently used only on aarch64). Only
-- EL1 and EL2 are supported. EL0 and EL3 are excluded as they don't
-- provide timers.
end System.BB.Parameters;