Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(263)

Side by Side Diff: arch/arm/include/asm/arch-tegra2/nvbl_assembly.h

Issue 4841001: Tegra2: implement Warmboot code and lp0_vec (Closed) Base URL: http://git.chromium.org/git/u-boot-next.git@chromeos-v2010.09
Patch Set: Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 /*
2 * (C) Copyright 2010
3 * NVIDIA Corporation <www.nvidia.com>
4 *
5 * See file CREDITS for list of people who contributed to this
6 * project.
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 2 of
11 * the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
21 * MA 02111-1307 USA
22 */
23
24 /**
25 * @file
26 * <b>NVIDIA Tegra Boot Loader API</b>
27 */
28
29 #ifndef INCLUDED_NVBL_ASSEMBLY_H
30 #define INCLUDED_NVBL_ASSEMBLY_H 1
31
32 /* For AP20, use ARM v7 instruction mnemonics if nonzero -- has no effect for A P15.
33 * NOTE: Requires support in Microsoft assembler before this can be enabled.
34 */
35 #if !defined(NVBL_USE_ARM_V7_MNEMONICS)
36 #define NVBL_USE_ARM_V7_MNEMONICS 0
37 #endif
38
39 /* For AP20, use ARM UAL instruction mnemonics if nonzero -- has no effect for AP15.
40 * NOTE: Requires support in Microsoft assembler before this can be enabled.
41 */
42 #if !defined(NVBL_USE_ARM_UAL_MNEMONICS)
43 #define NVBL_USE_ARM_UAL_MNEMONICS 0
44 #endif
45
46 /* For AP20, use ARM TrustZone support if nonzero -- has no effect for AP15.
47 * NOTE: Requires support in Microsoft assembler before this can be enabled.
48 */
49 #if !defined(NVBL_USE_ARM_TZ_SUPPORT)
50 #define NVBL_USE_ARM_TZ_SUPPORT 0
51 #endif
52
53 /* For AP20, use ARM MOV32 pseudo-op if nonzero -- has no effect for AP15.
54 * NOTE: Requires support in Microsoft assembler before this can be enabled.
55 */
56 #if !defined(NVBL_USE_ARM_MOV32_MNEMONIC)
57 #define NVBL_USE_ARM_MOV32_MNEMONIC 0
58 #endif
59
60
61 /**
62 * @defgroup nvbl_assembly_group NvBL Assembly API
63 *
64 *
65 *
66 * @ingroup nvbl_group
67 * @{
68 */
69
70 #if defined(ASSEMBLY_SOURCE_FILE)
71 #ifndef INCLUDED_NVCOMMON_H
72 /* OS-related #define's copied from nvcommon.h because nvcommon.h can't be
73 * included here.
74 */
75 #if defined(_WIN32)
76 #define NVOS_IS_WINDOWS 1
Tom Warren 2010/11/12 00:12:40 Remove all references to Windows/WIN32 - this is U
yelin 2010/11/15 23:21:21 This file is gone.
77 #if defined(_WIN32_WCE)
78 #define NVOS_IS_WINDOWS_CE 1
79 #endif
80 #elif defined(__linux__)
81 #define NVOS_IS_LINUX 1
82 #define NVOS_IS_UNIX 1
83 #elif defined(__arm__) && defined(__ARM_EABI__)
84 /* GCC arm eabi compiler, potentially used for kernel compilation without
85 * __linux__, but also for straight EABI (AOS) executable builds */
86 # if defined(__KERNEL__)
87 # define NVOS_IS_LINUX 1
88 # define NVOS_IS_UNIX 1
89 # define NVOS_IS_LINUX_KERNEL 1
90 # endif
91 /* Nothing to define for AOS */
92 #elif defined(__arm)
93 /* For ARM RVDS compiler, we don't know the final target OS at compile time */
94 #else
95 #error Unknown OS
96 #endif
97
98 #if !defined(NVOS_IS_WINDOWS)
99 #define NVOS_IS_WINDOWS 0
100 #endif
101 #if !defined(NVOS_IS_WINDOWS_CE)
102 #define NVOS_IS_WINDOWS_CE 0
103 #endif
104 #if !defined(NVOS_IS_LINUX)
105 #define NVOS_IS_LINUX 0
106 #endif
107 #if !defined(NVOS_IS_UNIX)
108 #define NVOS_IS_UNIX 0
109 #endif
110 #if !defined(NVOS_IS_LINUX_KERNEL)
111 #define NVOS_IS_LINUX_KERNEL 0
112 #endif
113 #endif /* !INCLUDED_NVCOMMON_H */
114
115 /* -----------------------------------------------------------------------------
116 * Assemblers don't like C-style constant suffix operators in spec-generated
117 * headers.
118 * -----------------------------------------------------------------------------
119 */
120 #undef _MK_ENUM_CONST
121 #define _MK_ENUM_CONST(_constant_) (_constant_)
122
123 /* -----------------------------------------------------------------------------
124 * Abstract assember operator because some ARM assemblers don't accept
125 * the common ARM-defined assembler operators. They want their own operators.
126 * -----------------------------------------------------------------------------
127 */
128
Tom Warren 2010/11/12 00:12:40 This crap shouldn't be needed with our ARM gcc/ar/
129 #if defined(__GNUC__) /* GNU compiler */
130 #define IMPORT .extern
131 #define ALIGN .align
132 #define EXPORT .globl
133 #define AREA .section
134 #define LABEL :
135 #define END .end
136 #define LTORG .ltorg
137 #define SPACE .space
138 #define DCD .word
139 #define DCB .byte
140 #define IF .if
141 #define ENDIF .endif
142 #define EQUATE(A,B) .EQU A, B
143 #define TEXT .section .text
144 #else
145 #define LABEL
146 #define EQUATE(A,B) (A) EQU (B)
147 #define TEXT AREA |.text|,ALIGN=4,CODE,READONLY
148 #endif
149
150 /*-----------------------------------------------------------------------------
151 * Abstract logical operations because some ARM assemblers don't
152 * understand C operators.
153 *-----------------------------------------------------------------------------
154 */
155
156 #if !defined(_AND_)
157 #if defined(_MSC_VER)
158 #define _AND_ :AND:
159 #else
160 #define _AND_ &
161 #endif
162 #endif
163
164 #if !defined(_OR_)
165 #if defined(_MSC_VER)
166 #define _OR_ :OR:
167 #else
168 #define _OR_ |
169 #endif
170 #endif
171
172 #if !defined(_SHL_)
173 #if defined(_MSC_VER)
174 #define _SHL_ :SHL:
175 #else
176 #define _SHL_ <<
177 #endif
178 #endif
179
180 #if !defined(_SHR_)
181 #if defined(_MSC_VER)
182 #define _SHR_ :SHR:
183 #else
184 #define _SHR_ >>
185 #endif
186 #endif
187
188 /*-----------------------------------------------------------------------------
189 * Abstract debug build EXPORTs whose only purpose is to make symbols visible
190 * to debuggers.
191 *-----------------------------------------------------------------------------
192 */
193
194 #if !defined(NV_DEBUG)
195 #define NV_DEBUG 0
196 #define DEBUG_EXPORT(x)
197 #elif NV_DEBUG
198 #define DEBUG_EXPORT(x) EXPORT x
199 #else
200 #define DEBUG_EXPORT(x)
201 #endif
202
203 #if defined(_MSC_VER) || defined (__ARMCC_VERSION) /* Microsoft or RVDS compile r */
204
205
206 #if !NVBL_USE_ARM_V7_MNEMONICS
207 #define CLREX DCD 0xF57FF01F /* Clear Exclusive */
208 #define DMB DCD 0xF57FF05F /* Data Memory Barrier */
209 #define DSB DCD 0xF57FF04F /* Data Synchronization Barrier */
210 #define ISB DCD 0xF57FF06F /* Instruction Synchronization Barrier * /
211 #define POP LDMFD sp!, /* Pop */
212 #define PUSH STMFD sp!, /* Push */
213 #define SEVAL DCD 0xE320F004 /* Send Event Always */
214 #define SEV SEVAL /* Send Event */
215 #define VLDM FLDMIAD /* Vector Load Multiple (double precisio n only) */
216 #define VMRS FMRX /* Move VFP System Reg to General Purpos e Reg */
217 #define VMSR FMXR /* Move General Purpose Reg to VFP Syste m Reg */
218 #define VSTM FSTMIAD /* Vector Store Multiple (double precisi on only) */
219 #define WFEAL DCD 0xE320F002 /* Wait For Exception Always */
220 #define WFE WFEAL /* Wait For Exception */
221 #define WFIAL DCD 0xE320F003 /* Wait For Interrupt Always */
222 #define WFI WFIAL /* Wait For Exception */
223 #endif /* !NVBL_USE_ARM_V7_MNEMONICS */
224
225 #if !NVBL_USE_ARM_UAL_MNEMONICS
226 #define ITTT ; /* If-Then-Then-Then instruction */
227 #define LDM LDMIA /* Load Multiple */
228 #define STM STMIA /* Store Multiple */
229 #define SUBSNE SUBNES /* Subtract if NE set condition codes */
230 #endif
231
232 #endif /* defined(_MSC_VER) || defined(__ARMCC_VERSION) */
233
234 #endif /* defined(ASSEMBLY_SOURCE_FILE) */
235
236 /** @} */
237
238 #endif
239
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698