]> git.sur5r.net Git - freertos/blob - FreeRTOS/Demo/CORTEX_A53_64-bit_UltraScale_MPSoC/RTOSDemo_A53_bsp/psu_cortexa53_0/libsrc/standalone_v5_0/src/xreg_cortexa53.h
Completely re-generate the Zynq 7000 demo using the 2016.1 SDK tools.
[freertos] / FreeRTOS / Demo / CORTEX_A53_64-bit_UltraScale_MPSoC / RTOSDemo_A53_bsp / psu_cortexa53_0 / libsrc / standalone_v5_0 / src / xreg_cortexa53.h
1 /******************************************************************************
2 *
3 * Copyright (C) 2014 Xilinx, Inc. All rights reserved.
4 *
5 * Permission is hereby granted, free of charge, to any person obtaining a copy
6 * of this software and associated documentation files (the "Software"), to deal
7 * in the Software without restriction, including without limitation the rights
8 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 * copies of the Software, and to permit persons to whom the Software is
10 * furnished to do so, subject to the following conditions:
11 *
12 * The above copyright notice and this permission notice shall be included in
13 * all copies or substantial portions of the Software.
14 *
15 * Use of the Software is limited solely to applications:
16 * (a) running on a Xilinx device, or
17 * (b) that interact with a Xilinx device through a bus or interconnect.
18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
22 * XILINX  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
23 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
24 * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25 * SOFTWARE.
26 *
27 * Except as contained in this notice, the name of the Xilinx shall not be used
28 * in advertising or otherwise to promote the sale, use or other dealings in
29 * this Software without prior written authorization from Xilinx.
30 *
31 ******************************************************************************/
32 /*****************************************************************************/
33 /**
34 *
35 * @file xreg_cortexa53.h
36 *
37 * This header file contains definitions for using inline assembler code. It is
38 * written specifically for the GNU compiler.
39 *
40 * All of the ARM Cortex A53 GPRs, SPRs, and Debug Registers are defined along
41 * with the positions of the bits within the registers.
42 *
43 * <pre>
44 * MODIFICATION HISTORY:
45 *
46 * Ver   Who      Date     Changes
47 * ----- -------- -------- -----------------------------------------------
48 * 5.00  pkp  05/29/14 First release
49 * </pre>
50 *
51 ******************************************************************************/
52 #ifndef XREG_CORTEXA53_H
53 #define XREG_CORTEXA53_H
54
55 #ifdef __cplusplus
56 extern "C" {
57 #endif /* __cplusplus */
58
59
60 /* GPRs */
61 #define XREG_GPR0                               x0
62 #define XREG_GPR1                               x1
63 #define XREG_GPR2                               x2
64 #define XREG_GPR3                               x3
65 #define XREG_GPR4                               x4
66 #define XREG_GPR5                               x5
67 #define XREG_GPR6                               x6
68 #define XREG_GPR7                               x7
69 #define XREG_GPR8                               x8
70 #define XREG_GPR9                               x9
71 #define XREG_GPR10                              x10
72 #define XREG_GPR11                              x11
73 #define XREG_GPR12                              x12
74 #define XREG_GPR13                              x13
75 #define XREG_GPR14                              x14
76 #define XREG_GPR15                              x15
77 #define XREG_GPR16                              x16
78 #define XREG_GPR17                              x17
79 #define XREG_GPR18                              x18
80 #define XREG_GPR19                              x19
81 #define XREG_GPR20                              x20
82 #define XREG_GPR21                              x21
83 #define XREG_GPR22                              x22
84 #define XREG_GPR23                              x23
85 #define XREG_GPR24                              x24
86 #define XREG_GPR25                              x25
87 #define XREG_GPR26                              x26
88 #define XREG_GPR27                              x27
89 #define XREG_GPR28                              x28
90 #define XREG_GPR29                              x29
91 #define XREG_GPR30                              x30
92 #define XREG_CPSR                               cpsr
93
94 /* Current Processor Status Register (CPSR) Bits */
95 #define XREG_CPSR_MODE_BITS                     0x1F
96 #define XREG_CPSR_EL3h_MODE                     0xD
97 #define XREG_CPSR_EL3t_MODE                     0xC
98 #define XREG_CPSR_EL2h_MODE                     0x9
99 #define XREG_CPSR_EL2t_MODE                     0x8
100 #define XREG_CPSR_EL1h_MODE                     0x5
101 #define XREG_CPSR_EL1t_MODE                     0x4
102 #define XREG_CPSR_EL0t_MODE                     0x0
103
104 #define XREG_CPSR_IRQ_ENABLE            0x80
105 #define XREG_CPSR_FIQ_ENABLE            0x40
106
107 #define XREG_CPSR_N_BIT                         0x80000000U
108 #define XREG_CPSR_Z_BIT                         0x40000000U
109 #define XREG_CPSR_C_BIT                         0x20000000U
110 #define XREG_CPSR_V_BIT                         0x10000000U
111
112 /* FPSID bits */
113 #define XREG_FPSID_IMPLEMENTER_BIT      (24U)
114 #define XREG_FPSID_IMPLEMENTER_MASK     (0x000000FFU << FPSID_IMPLEMENTER_BIT)
115 #define XREG_FPSID_SOFTWARE             (0X00000001U<<23U)
116 #define XREG_FPSID_ARCH_BIT             (16U)
117 #define XREG_FPSID_ARCH_MASK            (0x0000000FU  << FPSID_ARCH_BIT)
118 #define XREG_FPSID_PART_BIT             (8U)
119 #define XREG_FPSID_PART_MASK            (0x000000FFU << FPSID_PART_BIT)
120 #define XREG_FPSID_VARIANT_BIT          (4U)
121 #define XREG_FPSID_VARIANT_MASK         (0x0000000FU  << FPSID_VARIANT_BIT)
122 #define XREG_FPSID_REV_BIT              (0U)
123 #define XREG_FPSID_REV_MASK             (0x0000000FU  << FPSID_REV_BIT)
124
125 /* FPSCR bits */
126 #define XREG_FPSCR_N_BIT                (0X00000001U << 31U)
127 #define XREG_FPSCR_Z_BIT                (0X00000001U << 30U)
128 #define XREG_FPSCR_C_BIT                (0X00000001U << 29U)
129 #define XREG_FPSCR_V_BIT                (0X00000001U << 28U)
130 #define XREG_FPSCR_QC                   (0X00000001U << 27U)
131 #define XREG_FPSCR_AHP                  (0X00000001U << 26U)
132 #define XREG_FPSCR_DEFAULT_NAN          (0X00000001U << 25U)
133 #define XREG_FPSCR_FLUSHTOZERO          (0X00000001U << 24U)
134 #define XREG_FPSCR_ROUND_NEAREST        (0X00000000U << 22U)
135 #define XREG_FPSCR_ROUND_PLUSINF        (0X00000001U << 22U)
136 #define XREG_FPSCR_ROUND_MINUSINF       (0X00000002U << 22U)
137 #define XREG_FPSCR_ROUND_TOZERO         (0X00000003U << 22U)
138 #define XREG_FPSCR_RMODE_BIT            (22U)
139 #define XREG_FPSCR_RMODE_MASK           (0X00000003U << FPSCR_RMODE_BIT)
140 #define XREG_FPSCR_STRIDE_BIT           (20U)
141 #define XREG_FPSCR_STRIDE_MASK          (0X00000003U << FPSCR_STRIDE_BIT)
142 #define XREG_FPSCR_LENGTH_BIT           (16U)
143 #define XREG_FPSCR_LENGTH_MASK          (0X00000007U << FPSCR_LENGTH_BIT)
144 #define XREG_FPSCR_IDC                  (0X00000001U << 7U)
145 #define XREG_FPSCR_IXC                  (0X00000001U << 4U)
146 #define XREG_FPSCR_UFC                  (0X00000001U << 3U)
147 #define XREG_FPSCR_OFC                  (0X00000001U << 2U)
148 #define XREG_FPSCR_DZC                  (0X00000001U << 1U)
149 #define XREG_FPSCR_IOC                  (0X00000001U << 0U)
150
151 /* MVFR0 bits */
152 #define XREG_MVFR0_RMODE_BIT            (28U)
153 #define XREG_MVFR0_RMODE_MASK           (0x0000000FU << XREG_MVFR0_RMODE_BIT)
154 #define XREG_MVFR0_SHORT_VEC_BIT        (24U)
155 #define XREG_MVFR0_SHORT_VEC_MASK       (0x0000000FU << XREG_MVFR0_SHORT_VEC_BIT)
156 #define XREG_MVFR0_SQRT_BIT             (20U)
157 #define XREG_MVFR0_SQRT_MASK            (0x0000000FU << XREG_MVFR0_SQRT_BIT)
158 #define XREG_MVFR0_DIVIDE_BIT           (16U)
159 #define XREG_MVFR0_DIVIDE_MASK          (0x0000000FU << XREG_MVFR0_DIVIDE_BIT)
160 #define XREG_MVFR0_EXEC_TRAP_BIT        (0X00000012U)
161 #define XREG_MVFR0_EXEC_TRAP_MASK       (0X0000000FU << XREG_MVFR0_EXEC_TRAP_BIT)
162 #define XREG_MVFR0_DP_BIT               (8U)
163 #define XREG_MVFR0_DP_MASK              (0x0000000FU << XREG_MVFR0_DP_BIT)
164 #define XREG_MVFR0_SP_BIT               (4U)
165 #define XREG_MVFR0_SP_MASK              (0x0000000FU << XREG_MVFR0_SP_BIT)
166 #define XREG_MVFR0_A_SIMD_BIT           (0U)
167 #define XREG_MVFR0_A_SIMD_MASK          (0x0000000FU << MVFR0_A_SIMD_BIT)
168
169 /* FPEXC bits */
170 #define XREG_FPEXC_EX                   (0X00000001U << 31U)
171 #define XREG_FPEXC_EN                   (0X00000001U << 30U)
172 #define XREG_FPEXC_DEX                  (0X00000001U << 29U)
173
174
175 #define XREG_CONTROL_DCACHE_BIT (0X00000001U<<2U)
176 #define XREG_CONTROL_ICACHE_BIT (0X00000001U<<12U)
177
178 #ifdef __cplusplus
179 }
180 #endif /* __cplusplus */
181
182 #endif /* XREG_CORTEXA53_H */