2 * Copyright (C) 1998-2003 Hewlett-Packard Co
3 * David Mosberger-Tang <davidm@hpl.hp.com>
6 #include <asm/asmmacro.h>
15 /* This needs to be defined because lib/string.c:strlcat() calls it in case of error... */
25 movl sp = stack_mem+16384-16
27 br.call.sptk.many rp=start_bootloader
31 * Set a break point on this function so that symbols are available to set breakpoints in
32 * the kernel being debugged.
34 GLOBAL_ENTRY(debug_break)
45 GLOBAL_ENTRY(jmp_to_kernel)
53 GLOBAL_ENTRY(pal_emulator_static)
57 cmp.gtu p6,p7=r9,r28 /* r28 <= 255? */
58 (p6) br.cond.sptk.few static
63 (p6) br.cond.sptk.few stacked
65 static: cmp.eq p6,p7=6,r28 /* PAL_PTCE_INFO */
66 (p7) br.cond.sptk.few 1f
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] */
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) */
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 */
87 1: cmp.eq p6,p7=1,r28 /* PAL_CACHE_FLUSH */
88 (p7) br.cond.sptk.few 1f
90 movl r8=524288 /* flush 512k million cache lines (16MB) */
93 movl r8=0xe000000000000000
97 br.cloop.sptk.few .loop
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 */
115 st8 [r29]=r16,16 /* store implemented PMC */
116 st8 [r18]=r0,16 /* clear remaining bits */
118 st8 [r29]=r0,16 /* clear remaining bits */
119 st8 [r18]=r0,16 /* clear remaining bits */
121 st8 [r29]=r17,16 /* store implemented PMD */
122 st8 [r18]=r0,16 /* clear remaining bits */
123 mov r16=0xf0 /* cycles count capable PMC */
125 st8 [r29]=r0,16 /* clear remaining bits */
126 st8 [r18]=r0,16 /* clear remaining bits */
127 mov r17=0xf0 /* retired bundles capable PMC */
129 st8 [r29]=r16,16 /* store cycles capable */
130 st8 [r18]=r0,16 /* clear remaining bits */
132 st8 [r29]=r0,16 /* clear remaining bits */
133 st8 [r18]=r0,16 /* clear remaining bits */
135 st8 [r29]=r17,16 /* store retired bundle capable */
136 st8 [r18]=r0,16 /* clear remaining bits */
138 st8 [r29]=r0,16 /* clear remaining bits */
139 st8 [r18]=r0,16 /* clear remaining bits */
141 1: br.cond.sptk.few rp
144 END(pal_emulator_static)