[INET]: compile errors when DEBUG is defined
[linux-2.6.git] / arch / ia64 / hp / sim / boot / boot_head.S
1 /*
2  * Copyright (C) 1998-2003 Hewlett-Packard Co
3  *      David Mosberger-Tang <davidm@hpl.hp.com>
4  */
5
6 #include <asm/asmmacro.h>
7
8         .bss
9         .align 16
10 stack_mem:
11         .skip 16834
12
13         .text
14
15 /* This needs to be defined because lib/string.c:strlcat() calls it in case of error... */
16 GLOBAL_ENTRY(printk)
17         break 0
18 END(printk)
19
20 GLOBAL_ENTRY(_start)
21         .prologue
22         .save rp, r0
23         .body
24         movl gp = __gp
25         movl sp = stack_mem+16384-16
26         bsw.1
27         br.call.sptk.many rp=start_bootloader
28 END(_start)
29
30 /*
31  * Set a break point on this function so that symbols are available to set breakpoints in
32  * the kernel being debugged.
33  */
34 GLOBAL_ENTRY(debug_break)
35         br.ret.sptk.many b0
36 END(debug_break)
37
38 GLOBAL_ENTRY(ssc)
39         .regstk 5,0,0,0
40         mov r15=in4
41         break 0x80001
42         br.ret.sptk.many b0
43 END(ssc)
44
45 GLOBAL_ENTRY(jmp_to_kernel)
46         .regstk 2,0,0,0
47         mov r28=in0
48         mov b7=in1
49         br.sptk.few b7
50 END(jmp_to_kernel)
51
52
53 GLOBAL_ENTRY(pal_emulator_static)
54         mov r8=-1
55         mov r9=256
56         ;;
57         cmp.gtu p6,p7=r9,r28            /* r28 <= 255? */
58 (p6)    br.cond.sptk.few static
59         ;;
60         mov r9=512
61         ;;
62         cmp.gtu p6,p7=r9,r28
63 (p6)    br.cond.sptk.few stacked
64         ;;
65 static: cmp.eq p6,p7=6,r28              /* PAL_PTCE_INFO */
66 (p7)    br.cond.sptk.few 1f
67         ;;
68         mov r8=0                        /* status = 0 */
69         movl r9=0x100000000             /* tc.base */
70         movl r10=0x0000000200000003     /* count[0], count[1] */
71         movl r11=0x1000000000002000     /* stride[0], stride[1] */
72         br.cond.sptk.few rp
73 1:      cmp.eq p6,p7=14,r28             /* PAL_FREQ_RATIOS */
74 (p7)    br.cond.sptk.few 1f
75         mov r8=0                        /* status = 0 */
76         movl r9 =0x100000064            /* proc_ratio (1/100) */
77         movl r10=0x100000100            /* bus_ratio<<32 (1/256) */
78         movl r11=0x100000064            /* itc_ratio<<32 (1/100) */
79         ;;
80 1:      cmp.eq p6,p7=19,r28             /* PAL_RSE_INFO */
81 (p7)    br.cond.sptk.few 1f
82         mov r8=0                        /* status = 0 */
83         mov r9=96                       /* num phys stacked */
84         mov r10=0                       /* hints */
85         mov r11=0
86         br.cond.sptk.few rp
87 1:      cmp.eq p6,p7=1,r28              /* PAL_CACHE_FLUSH */
88 (p7)    br.cond.sptk.few 1f
89         mov r9=ar.lc
90         movl r8=524288                  /* flush 512k million cache lines (16MB) */
91         ;;
92         mov ar.lc=r8
93         movl r8=0xe000000000000000
94         ;;
95 .loop:  fc r8
96         add r8=32,r8
97         br.cloop.sptk.few .loop
98         sync.i
99         ;;
100         srlz.i
101         ;;
102         mov ar.lc=r9
103         mov r8=r0
104         ;;
105 1:      cmp.eq p6,p7=15,r28             /* PAL_PERF_MON_INFO */
106 (p7)    br.cond.sptk.few 1f
107         mov r8=0                        /* status = 0 */
108         movl r9 =0x08122f04             /* generic=4 width=47 retired=8 cycles=18 */
109         mov r10=0                       /* reserved */
110         mov r11=0                       /* reserved */
111         mov r16=0xffff                  /* implemented PMC */
112         mov r17=0x3ffff                 /* implemented PMD */
113         add r18=8,r29                   /* second index */
114         ;;
115         st8 [r29]=r16,16                /* store implemented PMC */
116         st8 [r18]=r0,16                 /* clear remaining bits  */
117         ;;
118         st8 [r29]=r0,16                 /* clear remaining bits  */
119         st8 [r18]=r0,16                 /* clear remaining bits  */
120         ;;
121         st8 [r29]=r17,16                /* store implemented PMD */
122         st8 [r18]=r0,16                 /* clear remaining bits  */
123         mov r16=0xf0                    /* cycles count capable PMC */
124         ;;
125         st8 [r29]=r0,16                 /* clear remaining bits  */
126         st8 [r18]=r0,16                 /* clear remaining bits  */
127         mov r17=0xf0                    /* retired bundles capable PMC */
128         ;;
129         st8 [r29]=r16,16                /* store cycles capable */
130         st8 [r18]=r0,16                 /* clear remaining bits  */
131         ;;
132         st8 [r29]=r0,16                 /* clear remaining bits  */
133         st8 [r18]=r0,16                 /* clear remaining bits  */
134         ;;
135         st8 [r29]=r17,16                /* store retired bundle capable */
136         st8 [r18]=r0,16                 /* clear remaining bits  */
137         ;;
138         st8 [r29]=r0,16                 /* clear remaining bits  */
139         st8 [r18]=r0,16                 /* clear remaining bits  */
140         ;;
141 1:      br.cond.sptk.few rp
142 stacked:
143         br.ret.sptk.few rp
144 END(pal_emulator_static)