Blackfin arch: dont clear status register bits in SWRST so we can actually use it
[safe/jmp/linux-2.6] / arch / blackfin / mach-bf533 / head.S
1 /*
2  * File:         arch/blackfin/mach-bf533/head.S
3  * Based on:
4  * Author:       Jeff Dionne <jeff@uclinux.org> COPYRIGHT 1998 D. Jeff Dionne
5  *
6  * Created:      1998
7  * Description:  bf533 startup file
8  *
9  * Modified:
10  *               Copyright 2004-2006 Analog Devices Inc.
11  *
12  * Bugs:         Enter bugs at http://blackfin.uclinux.org/
13  *
14  * This program is free software; you can redistribute it and/or modify
15  * it under the terms of the GNU General Public License as published by
16  * the Free Software Foundation; either version 2 of the License, or
17  * (at your option) any later version.
18  *
19  * This program is distributed in the hope that it will be useful,
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22  * GNU General Public License for more details.
23  *
24  * You should have received a copy of the GNU General Public License
25  * along with this program; if not, see the file COPYING, or write
26  * to the Free Software Foundation, Inc.,
27  * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
28  */
29
30 #include <linux/linkage.h>
31 #include <asm/blackfin.h>
32 #if CONFIG_BFIN_KERNEL_CLOCK
33 #include <asm/mach/mem_init.h>
34 #endif
35 #if CONFIG_DEBUG_KERNEL_START
36 #include <asm/mach-common/def_LPBlackfin.h>
37 #endif
38
39 .global __rambase
40 .global __ramstart
41 .global __ramend
42 .extern ___bss_stop
43 .extern ___bss_start
44 .extern _bf53x_relocate_l1_mem
45
46 #define INITIAL_STACK   0xFFB01000
47
48 .text
49
50 ENTRY(__start)
51 ENTRY(__stext)
52         /* R0: argument of command line string, passed from uboot, save it */
53         R7 = R0;
54         /* Set the SYSCFG register */
55         R0 = 0x36;
56         /*Enable Cycle Counter and Nesting Of Interrupts(3rd Bit)*/
57         SYSCFG = R0;
58         R0 = 0;
59
60         /*Clear Out All the data and pointer  Registers*/
61         R1 = R0;
62         R2 = R0;
63         R3 = R0;
64         R4 = R0;
65         R5 = R0;
66         R6 = R0;
67
68         P0 = R0;
69         P1 = R0;
70         P2 = R0;
71         P3 = R0;
72         P4 = R0;
73         P5 = R0;
74
75         LC0 = r0;
76         LC1 = r0;
77         L0 = r0;
78         L1 = r0;
79         L2 = r0;
80         L3 = r0;
81
82         /* Clear Out All the DAG Registers*/
83         B0 = r0;
84         B1 = r0;
85         B2 = r0;
86         B3 = r0;
87
88         I0 = r0;
89         I1 = r0;
90         I2 = r0;
91         I3 = r0;
92
93         M0 = r0;
94         M1 = r0;
95         M2 = r0;
96         M3 = r0;
97
98 #if CONFIG_DEBUG_KERNEL_START
99
100 /*
101  * Set up a temporary Event Vector Table, so if something bad happens before
102  * the kernel is fully started, it doesn't vector off into the bootloaders
103  * table
104  */
105         P0.l = lo(EVT2);
106         P0.h = hi(EVT2);
107         P1.l = lo(EVT15);
108         P1.h = hi(EVT15);
109         P2.l = debug_kernel_start_trap;
110         P2.h = debug_kernel_start_trap;
111
112         RTS = P2;
113         RTI = P2;
114         RTX = P2;
115         RTN = P2;
116         RTE = P2;
117
118 .Lfill_temp_vector_table:
119         [P0++] = P2;    /* Core Event Vector Table */
120         CC = P0 == P1;
121         if !CC JUMP .Lfill_temp_vector_table
122         P0 = r0;
123         P1 = r0;
124         P2 = r0;
125
126 #endif
127
128         p0.h = hi(FIO_MASKA_C);
129         p0.l = lo(FIO_MASKA_C);
130         r0 = 0xFFFF(Z);
131         w[p0] = r0.L;   /* Disable all interrupts */
132         ssync;
133
134         p0.h = hi(FIO_MASKB_C);
135         p0.l = lo(FIO_MASKB_C);
136         r0 = 0xFFFF(Z);
137         w[p0] = r0.L;   /* Disable all interrupts */
138         ssync;
139
140         /* Turn off the icache */
141         p0.l = (IMEM_CONTROL & 0xFFFF);
142         p0.h = (IMEM_CONTROL >> 16);
143         R1 = [p0];
144         R0 = ~ENICPLB;
145         R0 = R0 & R1;
146
147         /* Anomaly 05000125 */
148 #ifdef ANOMALY_05000125
149         CLI R2;
150         SSYNC;
151 #endif
152         [p0] = R0;
153         SSYNC;
154 #ifdef ANOMALY_05000125
155         STI R2;
156 #endif
157
158         /* Turn off the dcache */
159         p0.l = (DMEM_CONTROL & 0xFFFF);
160         p0.h = (DMEM_CONTROL >> 16);
161         R1 = [p0];
162         R0 = ~ENDCPLB;
163         R0 = R0 & R1;
164
165         /* Anomaly 05000125 */
166 #ifdef ANOMALY_05000125
167         CLI R2;
168         SSYNC;
169 #endif
170         [p0] = R0;
171         SSYNC;
172 #ifdef ANOMALY_05000125
173         STI R2;
174 #endif
175
176         /* Initialise UART */
177         p0.h = hi(UART_LCR);
178         p0.l = lo(UART_LCR);
179         r0 = 0x0(Z);
180         w[p0] = r0.L;   /* To enable DLL writes */
181         ssync;
182
183         p0.h = hi(UART_DLL);
184         p0.l = lo(UART_DLL);
185         r0 = 0x0(Z);
186         w[p0] = r0.L;
187         ssync;
188
189         p0.h = hi(UART_DLH);
190         p0.l = lo(UART_DLH);
191         r0 = 0x00(Z);
192         w[p0] = r0.L;
193         ssync;
194
195         p0.h = hi(UART_GCTL);
196         p0.l = lo(UART_GCTL);
197         r0 = 0x0(Z);
198         w[p0] = r0.L;   /* To enable UART clock */
199         ssync;
200
201         /* Initialize stack pointer */
202         sp.l = lo(INITIAL_STACK);
203         sp.h = hi(INITIAL_STACK);
204         fp = sp;
205         usp = sp;
206
207         /* Put The Code for PLL Programming and SDRAM Programming in L1 ISRAM */
208         call _bf53x_relocate_l1_mem;
209 #if CONFIG_BFIN_KERNEL_CLOCK
210         call _start_dma_code;
211 #endif
212
213         /* Code for initializing Async memory banks */
214
215         p2.h = hi(EBIU_AMBCTL1);
216         p2.l = lo(EBIU_AMBCTL1);
217         r0.h = hi(AMBCTL1VAL);
218         r0.l = lo(AMBCTL1VAL);
219         [p2] = r0;
220         ssync;
221
222         p2.h = hi(EBIU_AMBCTL0);
223         p2.l = lo(EBIU_AMBCTL0);
224         r0.h = hi(AMBCTL0VAL);
225         r0.l = lo(AMBCTL0VAL);
226         [p2] = r0;
227         ssync;
228
229         p2.h = hi(EBIU_AMGCTL);
230         p2.l = lo(EBIU_AMGCTL);
231         r0 = AMGCTLVAL;
232         w[p2] = r0;
233         ssync;
234
235         /* This section keeps the processor in supervisor mode
236          * during kernel boot.  Switches to user mode at end of boot.
237          * See page 3-9 of Hardware Reference manual for documentation.
238          */
239
240         /* EVT15 = _real_start */
241
242         p0.l = lo(EVT15);
243         p0.h = hi(EVT15);
244         p1.l = _real_start;
245         p1.h = _real_start;
246         [p0] = p1;
247         csync;
248
249         p0.l = lo(IMASK);
250         p0.h = hi(IMASK);
251         p1.l = IMASK_IVG15;
252         p1.h = 0x0;
253         [p0] = p1;
254         csync;
255
256         raise 15;
257         p0.l = .LWAIT_HERE;
258         p0.h = .LWAIT_HERE;
259         reti = p0;
260 #if defined(ANOMALY_05000281)
261         nop; nop; nop;
262 #endif
263         rti;
264
265 .LWAIT_HERE:
266         jump .LWAIT_HERE;
267
268 ENTRY(_real_start)
269         [ -- sp ] = reti;
270         p0.l = lo(WDOG_CTL);
271         p0.h = hi(WDOG_CTL);
272         r0 = 0xAD6(z);
273         w[p0] = r0;     /* watchdog off for now */
274         ssync;
275
276         /* Code update for BSS size == 0
277          * Zero out the bss region.
278          */
279
280         p1.l = ___bss_start;
281         p1.h = ___bss_start;
282         p2.l = ___bss_stop;
283         p2.h = ___bss_stop;
284         r0 = 0;
285         p2 -= p1;
286         lsetup (.L_clear_bss, .L_clear_bss) lc0 = p2;
287 .L_clear_bss:
288         B[p1++] = r0;
289
290         /* In case there is a NULL pointer reference
291          * Zero out region before stext
292          */
293
294         p1.l = 0x0;
295         p1.h = 0x0;
296         r0.l = __stext;
297         r0.h = __stext;
298         r0 = r0 >> 1;
299         p2 = r0;
300         r0 = 0;
301         lsetup (.L_clear_zero, .L_clear_zero) lc0 = p2;
302 .L_clear_zero:
303         W[p1++] = r0;
304
305 /* pass the uboot arguments to the global value command line */
306         R0 = R7;
307         call _cmdline_init;
308
309         p1.l = __rambase;
310         p1.h = __rambase;
311         r0.l = __sdata;
312         r0.h = __sdata;
313         [p1] = r0;
314
315         p1.l = __ramstart;
316         p1.h = __ramstart;
317         p3.l = ___bss_stop;
318         p3.h = ___bss_stop;
319
320         r1 = p3;
321         [p1] = r1;
322
323         /*
324          *  load the current thread pointer and stack
325          */
326         r1.l = _init_thread_union;
327         r1.h = _init_thread_union;
328
329         r2.l = 0x2000;
330         r2.h = 0x0000;
331         r1 = r1 + r2;
332         sp = r1;
333         usp = sp;
334         fp = sp;
335         call _start_kernel;
336 .L_exit:
337         jump.s  .L_exit;
338
339 .section .l1.text
340 #if CONFIG_BFIN_KERNEL_CLOCK
341 ENTRY(_start_dma_code)
342         p0.h = hi(SIC_IWR);
343         p0.l = lo(SIC_IWR);
344         r0.l = 0x1;
345         r0.h = 0x0;
346         [p0] = r0;
347         SSYNC;
348
349         /*
350          *  Set PLL_CTL
351          *   - [14:09] = MSEL[5:0] : CLKIN / VCO multiplication factors
352          *   - [8]     = BYPASS    : BYPASS the PLL, run CLKIN into CCLK/SCLK
353          *   - [7]     = output delay (add 200ps of delay to mem signals)
354          *   - [6]     = input delay (add 200ps of input delay to mem signals)
355          *   - [5]     = PDWN      : 1=All Clocks off
356          *   - [3]     = STOPCK    : 1=Core Clock off
357          *   - [1]     = PLL_OFF   : 1=Disable Power to PLL
358          *   - [0]     = DF        : 1=Pass CLKIN/2 to PLL / 0=Pass CLKIN to PLL
359          *   all other bits set to zero
360          */
361
362         p0.h = hi(PLL_LOCKCNT);
363         p0.l = lo(PLL_LOCKCNT);
364         r0 = 0x300(Z);
365         w[p0] = r0.l;
366         ssync;
367
368         P2.H = hi(EBIU_SDGCTL);
369         P2.L = lo(EBIU_SDGCTL);
370         R0 = [P2];
371         BITSET (R0, 24);
372         [P2] = R0;
373         SSYNC;
374
375         r0 = CONFIG_VCO_MULT & 63;       /* Load the VCO multiplier         */
376         r0 = r0 << 9;                    /* Shift it over,                  */
377         r1 = CLKIN_HALF;                 /* Do we need to divide CLKIN by 2?*/
378         r0 = r1 | r0;
379         r1 = PLL_BYPASS;                 /* Bypass the PLL?                 */
380         r1 = r1 << 8;                    /* Shift it over                   */
381         r0 = r1 | r0;                    /* add them all together           */
382
383         p0.h = hi(PLL_CTL);
384         p0.l = lo(PLL_CTL);              /* Load the address                */
385         cli r2;                          /* Disable interrupts              */
386         ssync;
387         w[p0] = r0.l;                    /* Set the value                   */
388         idle;                            /* Wait for the PLL to stablize    */
389         sti r2;                          /* Enable interrupts               */
390
391 .Lcheck_again:
392         p0.h = hi(PLL_STAT);
393         p0.l = lo(PLL_STAT);
394         R0 = W[P0](Z);
395         CC = BITTST(R0,5);
396         if ! CC jump .Lcheck_again;
397
398         /* Configure SCLK & CCLK Dividers */
399         r0 = (CONFIG_CCLK_ACT_DIV | CONFIG_SCLK_DIV);
400         p0.h = hi(PLL_DIV);
401         p0.l = lo(PLL_DIV);
402         w[p0] = r0.l;
403         ssync;
404
405         p0.l = lo(EBIU_SDRRC);
406         p0.h = hi(EBIU_SDRRC);
407         r0 = mem_SDRRC;
408         w[p0] = r0.l;
409         ssync;
410
411         p0.l = (EBIU_SDBCTL & 0xFFFF);
412         p0.h = (EBIU_SDBCTL >> 16);     /* SDRAM Memory Bank Control Register */
413         r0 = mem_SDBCTL;
414         w[p0] = r0.l;
415         ssync;
416
417         P2.H = hi(EBIU_SDGCTL);
418         P2.L = lo(EBIU_SDGCTL);
419         R0 = [P2];
420         BITCLR (R0, 24);
421         p0.h = hi(EBIU_SDSTAT);
422         p0.l = lo(EBIU_SDSTAT);
423         r2.l = w[p0];
424         cc = bittst(r2,3);
425         if !cc jump .Lskip;
426         NOP;
427         BITSET (R0, 23);
428 .Lskip:
429         [P2] = R0;
430         SSYNC;
431
432         R0.L = lo(mem_SDGCTL);
433         R0.H = hi(mem_SDGCTL);
434         R1 = [p2];
435         R1 = R1 | R0;
436         [P2] = R1;
437         SSYNC;
438
439         p0.h = hi(SIC_IWR);
440         p0.l = lo(SIC_IWR);
441         r0.l = lo(IWR_ENABLE_ALL)
442         r0.h = hi(IWR_ENABLE_ALL)
443         [p0] = r0;
444         SSYNC;
445
446         RTS;
447 #endif /* CONFIG_BFIN_KERNEL_CLOCK */
448
449 ENTRY(_bfin_reset)
450         /* No more interrupts to be handled*/
451         CLI R6;
452         SSYNC;
453
454 #if defined(CONFIG_BFIN_SHARED_FLASH_ENET)
455         p0.h = hi(FIO_INEN);
456         p0.l = lo(FIO_INEN);
457         r0.l = ~(1 << CONFIG_ENET_FLASH_PIN);
458         w[p0] = r0.l;
459
460         p0.h = hi(FIO_DIR);
461         p0.l = lo(FIO_DIR);
462         r0.l = (1 << CONFIG_ENET_FLASH_PIN);
463         w[p0] = r0.l;
464
465         p0.h = hi(FIO_FLAG_C);
466         p0.l = lo(FIO_FLAG_C);
467         r0.l = (1 << CONFIG_ENET_FLASH_PIN);
468         w[p0] = r0.l;
469 #endif
470
471         /* Clear the IMASK register */
472         p0.h = hi(IMASK);
473         p0.l = lo(IMASK);
474         r0 = 0x0;
475         [p0] = r0;
476
477         /* Clear the ILAT register */
478         p0.h = hi(ILAT);
479         p0.l = lo(ILAT);
480         r0 = [p0];
481         [p0] = r0;
482         SSYNC;
483
484         /* Disable the WDOG TIMER */
485         p0.h = hi(WDOG_CTL);
486         p0.l = lo(WDOG_CTL);
487         r0.l = 0xAD6;
488         w[p0] = r0.l;
489         SSYNC;
490
491         /* Clear the sticky bit incase it is already set */
492         p0.h = hi(WDOG_CTL);
493         p0.l = lo(WDOG_CTL);
494         r0.l = 0x8AD6;
495         w[p0] = r0.l;
496         SSYNC;
497
498         /* Program the count value */
499         R0.l = 0x100;
500         R0.h = 0x0;
501         P0.h = hi(WDOG_CNT);
502         P0.l = lo(WDOG_CNT);
503         [P0] = R0;
504         SSYNC;
505
506         /* Program WDOG_STAT if necessary */
507         P0.h = hi(WDOG_CTL);
508         P0.l = lo(WDOG_CTL);
509         R0 = W[P0](Z);
510         CC = BITTST(R0,1);
511         if !CC JUMP .LWRITESTAT;
512         CC = BITTST(R0,2);
513         if !CC JUMP .LWRITESTAT;
514         JUMP .LSKIP_WRITE;
515
516 .LWRITESTAT:
517         /* When watch dog timer is enabled, a write to STAT will load the contents of CNT to STAT */
518         R0 = 0x0000(z);
519         P0.h = hi(WDOG_STAT);
520         P0.l = lo(WDOG_STAT)
521         [P0] = R0;
522         SSYNC;
523
524 .LSKIP_WRITE:
525         /* Enable the reset event */
526         P0.h = hi(WDOG_CTL);
527         P0.l = lo(WDOG_CTL);
528         R0 = W[P0](Z);
529         BITCLR(R0,1);
530         BITCLR(R0,2);
531         W[P0] = R0.L;
532         SSYNC;
533         NOP;
534
535         /* Enable the wdog counter */
536         R0 = W[P0](Z);
537         BITCLR(R0,4);
538         W[P0] = R0.L;
539         SSYNC;
540
541         IDLE;
542
543         RTS;
544
545 #if CONFIG_DEBUG_KERNEL_START
546 debug_kernel_start_trap:
547         /* Set up a temp stack in L1 - SDRAM might not be working  */
548         P0.L = lo(L1_DATA_A_START + 0x100);
549         P0.H = hi(L1_DATA_A_START + 0x100);
550         SP = P0;
551
552         /* Make sure the Clocks are the way I think they should be */
553         r0 = CONFIG_VCO_MULT & 63;       /* Load the VCO multiplier         */
554         r0 = r0 << 9;                    /* Shift it over,                  */
555         r1 = CLKIN_HALF;                 /* Do we need to divide CLKIN by 2?*/
556         r0 = r1 | r0;
557         r1 = PLL_BYPASS;                 /* Bypass the PLL?                 */
558         r1 = r1 << 8;                    /* Shift it over                   */
559         r0 = r1 | r0;                    /* add them all together           */
560
561         p0.h = hi(PLL_CTL);
562         p0.l = lo(PLL_CTL);              /* Load the address                */
563         cli r2;                          /* Disable interrupts              */
564         ssync;
565         w[p0] = r0.l;                    /* Set the value                   */
566         idle;                            /* Wait for the PLL to stablize    */
567         sti r2;                          /* Enable interrupts               */
568
569 .Lcheck_again1:
570         p0.h = hi(PLL_STAT);
571         p0.l = lo(PLL_STAT);
572         R0 = W[P0](Z);
573         CC = BITTST(R0,5);
574         if ! CC jump .Lcheck_again1;
575
576         /* Configure SCLK & CCLK Dividers */
577         r0 = (CONFIG_CCLK_ACT_DIV | CONFIG_SCLK_DIV);
578         p0.h = hi(PLL_DIV);
579         p0.l = lo(PLL_DIV);
580         w[p0] = r0.l;
581         ssync;
582
583         /* Make sure UART is enabled - you can never be sure */
584
585 /*
586  * Setup for console. Argument comes from the menuconfig
587  */
588
589 #ifdef CONFIG_BAUD_9600
590 #define CONSOLE_BAUD_RATE       9600
591 #elif CONFIG_BAUD_19200
592 #define CONSOLE_BAUD_RATE       19200
593 #elif CONFIG_BAUD_38400
594 #define CONSOLE_BAUD_RATE       38400
595 #elif CONFIG_BAUD_57600
596 #define CONSOLE_BAUD_RATE       57600
597 #elif CONFIG_BAUD_115200
598 #define CONSOLE_BAUD_RATE       115200
599 #endif
600
601         p0.h = hi(UART_GCTL);
602         p0.l = lo(UART_GCTL);
603         r0 = 0x00(Z);
604         w[p0] = r0.L;   /* To Turn off UART clocks */
605         ssync;
606
607         p0.h = hi(UART_LCR);
608         p0.l = lo(UART_LCR);
609         r0 = 0x83(Z);
610         w[p0] = r0.L;   /* To enable DLL writes */
611         ssync;
612
613         R1 = (((CONFIG_CLKIN_HZ * CONFIG_VCO_MULT) / CONFIG_SCLK_DIV) / (CONSOLE_BAUD_RATE * 16));
614
615         p0.h = hi(UART_DLL);
616         p0.l = lo(UART_DLL);
617         r0 = 0xFF(Z);
618         r0 = R1 & R0;
619         w[p0] = r0.L;
620         ssync;
621
622         p0.h = hi(UART_DLH);
623         p0.l = lo(UART_DLH);
624         r1 >>= 8 ;
625         w[p0] = r1.L;
626         ssync;
627
628         p0.h = hi(UART_GCTL);
629         p0.l = lo(UART_GCTL);
630         r0 = 0x0(Z);
631         w[p0] = r0.L;   /* To enable UART clock */
632         ssync;
633
634         p0.h = hi(UART_LCR);
635         p0.l = lo(UART_LCR);
636         r0 = 0x03(Z);
637         w[p0] = r0.L;   /* To Turn on UART */
638         ssync;
639
640         p0.h = hi(UART_GCTL);
641         p0.l = lo(UART_GCTL);
642         r0 = 0x01(Z);
643         w[p0] = r0.L;   /* To Turn on UART Clocks */
644         ssync;
645
646         P0.h = hi(UART_THR);
647         P0.l = lo(UART_THR);
648         P1.h = hi(UART_LSR);
649         P1.l = lo(UART_LSR);
650
651         R0.L = 'K';
652         call .Lwait_char;
653         R0.L='e';
654         call .Lwait_char;
655         R0.L='r';
656         call .Lwait_char;
657         R0.L='n'
658         call .Lwait_char;
659         R0.L='e'
660         call .Lwait_char;
661         R0.L='l';
662         call .Lwait_char;
663         R0.L=' ';
664         call .Lwait_char;
665         R0.L='c';
666         call .Lwait_char;
667         R0.L='r';
668         call .Lwait_char;
669         R0.L='a';
670         call .Lwait_char;
671         R0.L='s';
672         call .Lwait_char;
673         R0.L='h';
674         call .Lwait_char;
675         R0.L='\r';
676         call .Lwait_char;
677         R0.L='\n';
678         call .Lwait_char;
679
680         R0.L='S';
681         call .Lwait_char;
682         R0.L='E';
683         call .Lwait_char;
684         R0.L='Q'
685         call .Lwait_char;
686         R0.L='S'
687         call .Lwait_char;
688         R0.L='T';
689         call .Lwait_char;
690         R0.L='A';
691         call .Lwait_char;
692         R0.L='T';
693         call .Lwait_char;
694         R0.L='=';
695         call .Lwait_char;
696         R2 = SEQSTAT;
697         call .Ldump_reg;
698
699         R0.L=' ';
700         call .Lwait_char;
701         R0.L='R';
702         call .Lwait_char;
703         R0.L='E'
704         call .Lwait_char;
705         R0.L='T'
706         call .Lwait_char;
707         R0.L='X';
708         call .Lwait_char;
709         R0.L='=';
710         call .Lwait_char;
711         R2 = RETX;
712         call .Ldump_reg;
713
714         R0.L='\r';
715         call .Lwait_char;
716         R0.L='\n';
717         call .Lwait_char;
718
719 .Ldebug_kernel_start_trap_done:
720         JUMP    .Ldebug_kernel_start_trap_done;
721 .Ldump_reg:
722         R3 = 32;
723         R4 = 0x0F;
724         R5 = ':';  /* one past 9 */
725
726 .Ldump_reg2:
727         R0 = R2;
728         R3 += -4;
729         R0 >>>= R3;
730         R0 = R0 & R4;
731         R0 += 0x30;
732         CC = R0 <= R5;
733         if CC JUMP .Ldump_reg1;
734         R0 += 7;
735
736 .Ldump_reg1:
737         R1.l = W[P1];
738         CC = BITTST(R1, 5);
739         if !CC JUMP .Ldump_reg1;
740         W[P0] = r0;
741
742         CC = R3 == 0;
743         if !CC JUMP .Ldump_reg2
744         RTS;
745
746 .Lwait_char:
747         R1.l = W[P1];
748         CC = BITTST(R1, 5);
749         if !CC JUMP .Lwait_char;
750         W[P0] = r0;
751         RTS;
752
753 #endif  /* CONFIG_DEBUG_KERNEL_START  */
754
755 .data
756
757 /*
758  * Set up the usable of RAM stuff. Size of RAM is determined then
759  * an initial stack set up at the end.
760  */
761
762 .align 4
763 __rambase:
764 .long   0
765 __ramstart:
766 .long   0
767 __ramend:
768 .long   0