xref: /OK3568_Linux_fs/u-boot/arch/m68k/cpu/mcf52x2/start.S (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun/*
2*4882a593Smuzhiyun * Copyright (C) 2003	Josef Baumgartner <josef.baumgartner@telex.de>
3*4882a593Smuzhiyun * Based on code from Bernhard Kuhn <bkuhn@metrowerks.com>
4*4882a593Smuzhiyun *
5*4882a593Smuzhiyun * SPDX-License-Identifier:	GPL-2.0+
6*4882a593Smuzhiyun */
7*4882a593Smuzhiyun
8*4882a593Smuzhiyun#include <asm-offsets.h>
9*4882a593Smuzhiyun#include <config.h>
10*4882a593Smuzhiyun#include "version.h"
11*4882a593Smuzhiyun#include <asm/cache.h>
12*4882a593Smuzhiyun
13*4882a593Smuzhiyun#define _START	_start
14*4882a593Smuzhiyun#define _FAULT	_fault
15*4882a593Smuzhiyun
16*4882a593Smuzhiyun
17*4882a593Smuzhiyun#define SAVE_ALL						\
18*4882a593Smuzhiyun	move.w	#0x2700,%sr;		/* disable intrs */	\
19*4882a593Smuzhiyun	subl	#60,%sp;		/* space for 15 regs */ \
20*4882a593Smuzhiyun	moveml	%d0-%d7/%a0-%a6,%sp@;				\
21*4882a593Smuzhiyun
22*4882a593Smuzhiyun#define RESTORE_ALL						\
23*4882a593Smuzhiyun	moveml	%sp@,%d0-%d7/%a0-%a6;				\
24*4882a593Smuzhiyun	addl	#60,%sp;		/* space for 15 regs */ \
25*4882a593Smuzhiyun	rte
26*4882a593Smuzhiyun
27*4882a593Smuzhiyun/* If we come from a pre-loader we don't need an initial exception
28*4882a593Smuzhiyun * table.
29*4882a593Smuzhiyun */
30*4882a593Smuzhiyun#if !defined(CONFIG_MONITOR_IS_IN_RAM)
31*4882a593Smuzhiyun
32*4882a593Smuzhiyun.text
33*4882a593Smuzhiyun
34*4882a593Smuzhiyun/*
35*4882a593Smuzhiyun * Vector table. This is used for initial platform startup.
36*4882a593Smuzhiyun * These vectors are to catch any un-intended traps.
37*4882a593Smuzhiyun */
38*4882a593Smuzhiyun_vectors:
39*4882a593Smuzhiyun.long	0x00000000		/* Flash offset is 0 until we setup CS0 */
40*4882a593Smuzhiyun#if defined(CONFIG_M5282) && (CONFIG_SYS_TEXT_BASE == CONFIG_SYS_INT_FLASH_BASE)
41*4882a593Smuzhiyun.long	_start - CONFIG_SYS_TEXT_BASE
42*4882a593Smuzhiyun#else
43*4882a593Smuzhiyun.long	_START
44*4882a593Smuzhiyun#endif
45*4882a593Smuzhiyun
46*4882a593Smuzhiyun.long	_FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT
47*4882a593Smuzhiyun.long	_FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT
48*4882a593Smuzhiyun.long	_FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT
49*4882a593Smuzhiyun.long	_FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT
50*4882a593Smuzhiyun.long	_FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT
51*4882a593Smuzhiyun.long	_FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT
52*4882a593Smuzhiyun.long	_FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT
53*4882a593Smuzhiyun.long	_FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT
54*4882a593Smuzhiyun
55*4882a593Smuzhiyun.long	_FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT
56*4882a593Smuzhiyun.long	_FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT
57*4882a593Smuzhiyun.long	_FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT
58*4882a593Smuzhiyun.long	_FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT
59*4882a593Smuzhiyun.long	_FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT
60*4882a593Smuzhiyun.long	_FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT
61*4882a593Smuzhiyun.long	_FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT
62*4882a593Smuzhiyun.long	_FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT
63*4882a593Smuzhiyun
64*4882a593Smuzhiyun.long	_FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT
65*4882a593Smuzhiyun.long	_FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT
66*4882a593Smuzhiyun.long	_FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT
67*4882a593Smuzhiyun.long	_FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT
68*4882a593Smuzhiyun.long	_FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT
69*4882a593Smuzhiyun.long	_FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT
70*4882a593Smuzhiyun.long	_FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT
71*4882a593Smuzhiyun.long	_FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT
72*4882a593Smuzhiyun
73*4882a593Smuzhiyun.long	_FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT
74*4882a593Smuzhiyun.long	_FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT
75*4882a593Smuzhiyun.long	_FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT
76*4882a593Smuzhiyun.long	_FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT
77*4882a593Smuzhiyun.long	_FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT
78*4882a593Smuzhiyun.long	_FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT
79*4882a593Smuzhiyun.long	_FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT
80*4882a593Smuzhiyun.long	_FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT, _FAULT
81*4882a593Smuzhiyun
82*4882a593Smuzhiyun#endif
83*4882a593Smuzhiyun
84*4882a593Smuzhiyun.text
85*4882a593Smuzhiyun
86*4882a593Smuzhiyun#if defined(CONFIG_SYS_INT_FLASH_BASE) && \
87*4882a593Smuzhiyun    (defined(CONFIG_M5282) || defined(CONFIG_M5281))
88*4882a593Smuzhiyun#if (CONFIG_SYS_TEXT_BASE == CONFIG_SYS_INT_FLASH_BASE)
89*4882a593Smuzhiyun.long	0x55AA55AA,0xAA55AA55		/* CFM Backdoorkey */
90*4882a593Smuzhiyun.long	0xFFFFFFFF			/* all sectors protected */
91*4882a593Smuzhiyun.long	0x00000000			/* supervisor/User restriction */
92*4882a593Smuzhiyun.long	0x00000000			/* programm/data space restriction */
93*4882a593Smuzhiyun.long	0x00000000			/* Flash security */
94*4882a593Smuzhiyun#endif
95*4882a593Smuzhiyun#endif
96*4882a593Smuzhiyun
97*4882a593Smuzhiyun.globl _start
98*4882a593Smuzhiyun_start:
99*4882a593Smuzhiyun	nop
100*4882a593Smuzhiyun	nop
101*4882a593Smuzhiyun	move.w	#0x2700,%sr
102*4882a593Smuzhiyun
103*4882a593Smuzhiyun#if defined(CONFIG_M5208)
104*4882a593Smuzhiyun	/* Initialize RAMBAR: locate SRAM and validate it */
105*4882a593Smuzhiyun	move.l	#(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_RAM_CTRL), %d0
106*4882a593Smuzhiyun	movec	%d0, %RAMBAR1
107*4882a593Smuzhiyun#endif
108*4882a593Smuzhiyun
109*4882a593Smuzhiyun#if defined(CONFIG_M5272) || defined(CONFIG_M5249) || defined(CONFIG_M5253)
110*4882a593Smuzhiyun	/* set MBAR address + valid flag */
111*4882a593Smuzhiyun	move.l	#(CONFIG_SYS_MBAR + 1), %d0
112*4882a593Smuzhiyun	move.c	%d0, %MBAR
113*4882a593Smuzhiyun
114*4882a593Smuzhiyun	/*** The 5249 has MBAR2 as well ***/
115*4882a593Smuzhiyun#ifdef CONFIG_SYS_MBAR2
116*4882a593Smuzhiyun	/* Get MBAR2 address */
117*4882a593Smuzhiyun	move.l	#(CONFIG_SYS_MBAR2 + 1), %d0
118*4882a593Smuzhiyun	 /* Set MBAR2 */
119*4882a593Smuzhiyun	movec	%d0, #0xc0e
120*4882a593Smuzhiyun#endif
121*4882a593Smuzhiyun	move.l	#(CONFIG_SYS_INIT_RAM_ADDR + 1), %d0
122*4882a593Smuzhiyun	movec	%d0, %RAMBAR0
123*4882a593Smuzhiyun#endif /* CONFIG_M5272 || CONFIG_M5249 || CONFIG_M5253 */
124*4882a593Smuzhiyun
125*4882a593Smuzhiyun#if defined(CONFIG_M5282) || defined(CONFIG_M5271)
126*4882a593Smuzhiyun	/* set MBAR address + valid flag */
127*4882a593Smuzhiyun	move.l	#(CONFIG_SYS_MBAR + 1), %d0
128*4882a593Smuzhiyun	move.l	%d0, 0x40000000
129*4882a593Smuzhiyun
130*4882a593Smuzhiyun	/* Initialize RAMBAR1: locate SRAM and validate it */
131*4882a593Smuzhiyun	move.l	#(CONFIG_SYS_INIT_RAM_ADDR + 0x21), %d0
132*4882a593Smuzhiyun	movec	%d0, %RAMBAR1
133*4882a593Smuzhiyun
134*4882a593Smuzhiyun#if defined(CONFIG_M5282)
135*4882a593Smuzhiyun#if (CONFIG_SYS_TEXT_BASE == CONFIG_SYS_INT_FLASH_BASE)
136*4882a593Smuzhiyun	/*
137*4882a593Smuzhiyun	 * Setup code in SRAM to initialize FLASHBAR,
138*4882a593Smuzhiyun	 * if start from internal Flash
139*4882a593Smuzhiyun	 */
140*4882a593Smuzhiyun	move.l	#(_flashbar_setup-CONFIG_SYS_INT_FLASH_BASE), %a0
141*4882a593Smuzhiyun	move.l	#(_flashbar_setup_end-CONFIG_SYS_INT_FLASH_BASE), %a1
142*4882a593Smuzhiyun	move.l	#(CONFIG_SYS_INIT_RAM_ADDR), %a2
143*4882a593Smuzhiyun_copy_flash:
144*4882a593Smuzhiyun	move.l	(%a0)+, (%a2)+
145*4882a593Smuzhiyun	cmp.l	%a0, %a1
146*4882a593Smuzhiyun	bgt.s	_copy_flash
147*4882a593Smuzhiyun	jmp	CONFIG_SYS_INIT_RAM_ADDR
148*4882a593Smuzhiyun
149*4882a593Smuzhiyun_flashbar_setup:
150*4882a593Smuzhiyun	/* Initialize FLASHBAR: locate internal Flash and validate it */
151*4882a593Smuzhiyun	move.l	#(CONFIG_SYS_INT_FLASH_BASE + CONFIG_SYS_INT_FLASH_ENABLE), %d0
152*4882a593Smuzhiyun	movec	%d0, %FLASHBAR
153*4882a593Smuzhiyun	jmp	_after_flashbar_copy.L	/* Force jump to absolute address */
154*4882a593Smuzhiyun_flashbar_setup_end:
155*4882a593Smuzhiyun	nop
156*4882a593Smuzhiyun_after_flashbar_copy:
157*4882a593Smuzhiyun#else
158*4882a593Smuzhiyun	/* Setup code to initialize FLASHBAR, if start from external Memory */
159*4882a593Smuzhiyun	move.l	#(CONFIG_SYS_INT_FLASH_BASE + CONFIG_SYS_INT_FLASH_ENABLE), %d0
160*4882a593Smuzhiyun	movec	%d0, %FLASHBAR
161*4882a593Smuzhiyun#endif /* (CONFIG_SYS_TEXT_BASE == CONFIG_SYS_INT_FLASH_BASE) */
162*4882a593Smuzhiyun
163*4882a593Smuzhiyun#endif
164*4882a593Smuzhiyun#endif
165*4882a593Smuzhiyun	/*
166*4882a593Smuzhiyun	 * if we come from a pre-loader we have no exception table and
167*4882a593Smuzhiyun	 * therefore no VBR to set
168*4882a593Smuzhiyun	 */
169*4882a593Smuzhiyun#if !defined(CONFIG_MONITOR_IS_IN_RAM)
170*4882a593Smuzhiyun#if defined(CONFIG_M5282) && (CONFIG_SYS_TEXT_BASE == CONFIG_SYS_INT_FLASH_BASE)
171*4882a593Smuzhiyun	move.l	#CONFIG_SYS_INT_FLASH_BASE, %d0
172*4882a593Smuzhiyun#else
173*4882a593Smuzhiyun	move.l	#CONFIG_SYS_FLASH_BASE, %d0
174*4882a593Smuzhiyun#endif
175*4882a593Smuzhiyun	movec	%d0, %VBR
176*4882a593Smuzhiyun#endif
177*4882a593Smuzhiyun
178*4882a593Smuzhiyun#ifdef CONFIG_M5275
179*4882a593Smuzhiyun	/* set MBAR address + valid flag */
180*4882a593Smuzhiyun	move.l	#(CONFIG_SYS_MBAR + 1), %d0
181*4882a593Smuzhiyun	move.l	%d0, 0x40000000
182*4882a593Smuzhiyun/*	movec	%d0, %MBAR */
183*4882a593Smuzhiyun
184*4882a593Smuzhiyun	/* Initialize RAMBAR: locate SRAM and validate it */
185*4882a593Smuzhiyun	move.l	#(CONFIG_SYS_INIT_RAM_ADDR + 0x21), %d0
186*4882a593Smuzhiyun	movec	%d0, %RAMBAR1
187*4882a593Smuzhiyun#endif
188*4882a593Smuzhiyun
189*4882a593Smuzhiyun	/* initialize general use internal ram */
190*4882a593Smuzhiyun	move.l	#0, %d0
191*4882a593Smuzhiyun	move.l	#(ICACHE_STATUS), %a1	/* icache */
192*4882a593Smuzhiyun	move.l	#(DCACHE_STATUS), %a2	/* icache */
193*4882a593Smuzhiyun	move.l	%d0, (%a1)
194*4882a593Smuzhiyun	move.l	%d0, (%a2)
195*4882a593Smuzhiyun
196*4882a593Smuzhiyun	/* put relocation table address to a5 */
197*4882a593Smuzhiyun	move.l	#__got_start, %a5
198*4882a593Smuzhiyun
199*4882a593Smuzhiyun	/* setup stack initially on top of internal static ram  */
200*4882a593Smuzhiyun	move.l	#(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_RAM_SIZE), %sp
201*4882a593Smuzhiyun
202*4882a593Smuzhiyun	/*
203*4882a593Smuzhiyun	 * if configured, malloc_f arena will be reserved first,
204*4882a593Smuzhiyun	 * then (and always) gd struct space will be reserved
205*4882a593Smuzhiyun	 */
206*4882a593Smuzhiyun	move.l	%sp, -(%sp)
207*4882a593Smuzhiyun	move.l	#board_init_f_alloc_reserve, %a1
208*4882a593Smuzhiyun	jsr	(%a1)
209*4882a593Smuzhiyun
210*4882a593Smuzhiyun	/* update stack and frame-pointers */
211*4882a593Smuzhiyun	move.l	%d0, %sp
212*4882a593Smuzhiyun	move.l	%sp, %fp
213*4882a593Smuzhiyun
214*4882a593Smuzhiyun	/* initialize reserved area */
215*4882a593Smuzhiyun	move.l	%d0, -(%sp)
216*4882a593Smuzhiyun	move.l	#board_init_f_init_reserve, %a1
217*4882a593Smuzhiyun	jsr	(%a1)
218*4882a593Smuzhiyun
219*4882a593Smuzhiyun	/* run low-level CPU init code (from flash) */
220*4882a593Smuzhiyun	move.l	#cpu_init_f, %a1
221*4882a593Smuzhiyun	jsr	(%a1)
222*4882a593Smuzhiyun
223*4882a593Smuzhiyun	/* run low-level board init code (from flash) */
224*4882a593Smuzhiyun	clr.l	%sp@-
225*4882a593Smuzhiyun	move.l	#board_init_f, %a1
226*4882a593Smuzhiyun	jsr	(%a1)
227*4882a593Smuzhiyun
228*4882a593Smuzhiyun	/* board_init_f() does not return */
229*4882a593Smuzhiyun
230*4882a593Smuzhiyun/******************************************************************************/
231*4882a593Smuzhiyun
232*4882a593Smuzhiyun/*
233*4882a593Smuzhiyun * void relocate_code (addr_sp, gd, addr_moni)
234*4882a593Smuzhiyun *
235*4882a593Smuzhiyun * This "function" does not return, instead it continues in RAM
236*4882a593Smuzhiyun * after relocating the monitor code.
237*4882a593Smuzhiyun *
238*4882a593Smuzhiyun * r3 = dest
239*4882a593Smuzhiyun * r4 = src
240*4882a593Smuzhiyun * r5 = length in bytes
241*4882a593Smuzhiyun * r6 = cachelinesize
242*4882a593Smuzhiyun */
243*4882a593Smuzhiyun.globl relocate_code
244*4882a593Smuzhiyunrelocate_code:
245*4882a593Smuzhiyun	link.w	%a6,#0
246*4882a593Smuzhiyun	move.l	8(%a6), %sp		/* set new stack pointer */
247*4882a593Smuzhiyun
248*4882a593Smuzhiyun	move.l	12(%a6), %d0		/* Save copy of Global Data pointer */
249*4882a593Smuzhiyun	move.l	16(%a6), %a0		/* Save copy of Destination Address */
250*4882a593Smuzhiyun
251*4882a593Smuzhiyun	move.l	#CONFIG_SYS_MONITOR_BASE, %a1
252*4882a593Smuzhiyun	move.l	#__init_end, %a2
253*4882a593Smuzhiyun	move.l	%a0, %a3
254*4882a593Smuzhiyun	/* copy the code to RAM */
255*4882a593Smuzhiyun1:
256*4882a593Smuzhiyun	move.l	(%a1)+, (%a3)+
257*4882a593Smuzhiyun	cmp.l	%a1,%a2
258*4882a593Smuzhiyun	bgt.s	1b
259*4882a593Smuzhiyun
260*4882a593Smuzhiyun/*
261*4882a593Smuzhiyun * We are done. Do not return, instead branch to second part of board
262*4882a593Smuzhiyun * initialization, now running from RAM.
263*4882a593Smuzhiyun */
264*4882a593Smuzhiyun	move.l	%a0, %a1
265*4882a593Smuzhiyun	add.l	#(in_ram - CONFIG_SYS_MONITOR_BASE), %a1
266*4882a593Smuzhiyun	jmp	(%a1)
267*4882a593Smuzhiyun
268*4882a593Smuzhiyunin_ram:
269*4882a593Smuzhiyun
270*4882a593Smuzhiyunclear_bss:
271*4882a593Smuzhiyun	/*
272*4882a593Smuzhiyun	 * Now clear BSS segment
273*4882a593Smuzhiyun	 */
274*4882a593Smuzhiyun	move.l	%a0, %a1
275*4882a593Smuzhiyun	add.l	#(_sbss - CONFIG_SYS_MONITOR_BASE),%a1
276*4882a593Smuzhiyun	move.l	%a0, %d1
277*4882a593Smuzhiyun	add.l	#(_ebss - CONFIG_SYS_MONITOR_BASE),%d1
278*4882a593Smuzhiyun6:
279*4882a593Smuzhiyun	clr.l	(%a1)+
280*4882a593Smuzhiyun	cmp.l	%a1,%d1
281*4882a593Smuzhiyun	bgt.s	6b
282*4882a593Smuzhiyun
283*4882a593Smuzhiyun	/*
284*4882a593Smuzhiyun	 * fix got table in RAM
285*4882a593Smuzhiyun	 */
286*4882a593Smuzhiyun	move.l	%a0, %a1
287*4882a593Smuzhiyun	add.l	#(__got_start - CONFIG_SYS_MONITOR_BASE),%a1
288*4882a593Smuzhiyun	move.l	%a1,%a5			/* fix got pointer register a5 */
289*4882a593Smuzhiyun
290*4882a593Smuzhiyun	move.l	%a0, %a2
291*4882a593Smuzhiyun	add.l	#(__got_end - CONFIG_SYS_MONITOR_BASE),%a2
292*4882a593Smuzhiyun
293*4882a593Smuzhiyun7:
294*4882a593Smuzhiyun	move.l	(%a1),%d1
295*4882a593Smuzhiyun	sub.l	#_start,%d1
296*4882a593Smuzhiyun	add.l	%a0,%d1
297*4882a593Smuzhiyun	move.l	%d1,(%a1)+
298*4882a593Smuzhiyun	cmp.l	%a2, %a1
299*4882a593Smuzhiyun	bne	7b
300*4882a593Smuzhiyun
301*4882a593Smuzhiyun	/* calculate relative jump to board_init_r in ram */
302*4882a593Smuzhiyun	move.l	%a0, %a1
303*4882a593Smuzhiyun	add.l	#(board_init_r - CONFIG_SYS_MONITOR_BASE), %a1
304*4882a593Smuzhiyun
305*4882a593Smuzhiyun	/* set parameters for board_init_r */
306*4882a593Smuzhiyun	move.l	%a0,-(%sp)		/* dest_addr */
307*4882a593Smuzhiyun	move.l	%d0,-(%sp)		/* gd */
308*4882a593Smuzhiyun#if defined(DEBUG) && (CONFIG_SYS_TEXT_BASE != CONFIG_SYS_INT_FLASH_BASE) && \
309*4882a593Smuzhiyun    defined(CONFIG_SYS_HALT_BEFOR_RAM_JUMP)
310*4882a593Smuzhiyun	halt
311*4882a593Smuzhiyun#endif
312*4882a593Smuzhiyun	jsr	(%a1)
313*4882a593Smuzhiyun
314*4882a593Smuzhiyun/******************************************************************************/
315*4882a593Smuzhiyun
316*4882a593Smuzhiyun/* exception code */
317*4882a593Smuzhiyun.globl _fault
318*4882a593Smuzhiyun_fault:
319*4882a593Smuzhiyun	bra	_fault
320*4882a593Smuzhiyun
321*4882a593Smuzhiyun.globl _exc_handler
322*4882a593Smuzhiyun_exc_handler:
323*4882a593Smuzhiyun	SAVE_ALL
324*4882a593Smuzhiyun	movel	%sp,%sp@-
325*4882a593Smuzhiyun	bsr	exc_handler
326*4882a593Smuzhiyun	addql	#4,%sp
327*4882a593Smuzhiyun	RESTORE_ALL
328*4882a593Smuzhiyun
329*4882a593Smuzhiyun.globl _int_handler
330*4882a593Smuzhiyun_int_handler:
331*4882a593Smuzhiyun	SAVE_ALL
332*4882a593Smuzhiyun	movel	%sp,%sp@-
333*4882a593Smuzhiyun	bsr	int_handler
334*4882a593Smuzhiyun	addql	#4,%sp
335*4882a593Smuzhiyun	RESTORE_ALL
336*4882a593Smuzhiyun
337*4882a593Smuzhiyun/******************************************************************************/
338*4882a593Smuzhiyun
339*4882a593Smuzhiyun.globl version_string
340*4882a593Smuzhiyunversion_string:
341*4882a593Smuzhiyun.ascii U_BOOT_VERSION_STRING, "\0"
342*4882a593Smuzhiyun.align 4
343