Changes in kernel/arch/ia64/src/start.S [fe7abd0:d9ee2ea] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia64/src/start.S
rfe7abd0 rd9ee2ea 47 47 48 48 stack0: 49 50 #51 # Kernel entry point.52 #53 # This is where we are passed control from the boot code.54 # Register contents:55 #56 # r2 Address of the boot code's bootinfo structure.57 #58 49 kernel_image_start: 59 50 .auto 51 52 #ifdef CONFIG_SMP 53 # Identify self(CPU) in OS structures by ID / EID 54 55 mov r9 = cr64 56 mov r10 = 1 57 movl r12 = 0xffffffff 58 movl r8 = cpu_by_id_eid_list 59 and r8 = r8, r12 60 shr r9 = r9, 16 61 add r8 = r8, r9 62 st1 [r8] = r10 63 #endif 60 64 61 65 mov psr.l = r0 … … 160 164 bsw.1 161 165 166 #ifdef CONFIG_SMP 167 # Am I BSP or AP? 168 movl r20 = bsp_started ;; 169 ld8 r20 = [r20] ;; 170 cmp.eq p3, p2 = r20, r0 ;; 171 #else 172 cmp.eq p3, p2 = r0, r0 ;; /* you are BSP */ 173 #endif /* CONFIG_SMP */ 174 162 175 # Initialize register stack 163 176 mov ar.rsc = r0 … … 166 179 loadrs 167 180 168 # 169 # Initialize memory stack to some sane value and allocate a scratch are 170 # on it. 171 # 172 movl sp = stack0 ;; 173 add sp = -16, sp 181 # Initialize memory stack to some sane value 182 movl r12 = stack0 ;; 183 add r12 = -16, r12 /* allocate a scratch area on the stack */ 174 184 175 185 # Initialize gp (Global Pointer) register 176 movl gp = kernel_image_start177 178 #179 # Initialize bootinfo on BSP.180 #181 186 movl r20 = (VRN_KERNEL << VRN_SHIFT) ;; 182 or r20 = r20, r2 ;; 183 addl r21 = @gprel(bootinfo), gp ;; 184 st8 [r21] = r20 187 or r20 = r20, r1 ;; 188 movl r1 = kernel_image_start 189 190 /* 191 * Initialize bootinfo on BSP. 192 */ 193 (p3) addl r21 = @gprel(bootinfo), gp ;; 194 (p3) st8 [r21] = r20 185 195 186 196 ssm (1 << 19) ;; /* Disable f32 - f127 */ … … 188 198 srlz.d ;; 189 199 200 #ifdef CONFIG_SMP 201 (p2) movl r18 = main_ap ;; 202 (p2) mov b1 = r18 ;; 203 (p2) br.call.sptk.many b0 = b1 204 205 # Mark that BSP is on 206 207 mov r20 = 1 ;; 208 movl r21 = bsp_started ;; 209 st8 [r21] = r20 ;; 210 #endif 211 190 212 br.call.sptk.many b0 = arch_pre_main 191 0: 192 br.call.sptk.many b0 = main_bsp 213 214 movl r18 = main_bsp ;; 215 mov b1 = r18 ;; 216 br.call.sptk.many b0 = b1 217 193 218 0: 194 219 br 0b 220 221 #ifdef CONFIG_SMP 222 223 .align 4096 224 kernel_image_ap_start: 225 .auto 226 227 # Identify self(CPU) in OS structures by ID / EID 228 229 mov r9 = cr64 230 mov r10 = 1 231 movl r12 = 0xffffffff 232 movl r8 = cpu_by_id_eid_list 233 and r8 = r8, r12 234 shr r9 = r9, 16 235 add r8 = r8, r9 236 st1 [r8] = r10 237 238 # Wait for wakeup synchro signal (#3 in cpu_by_id_eid_list) 239 240 kernel_image_ap_start_loop: 241 movl r11 = kernel_image_ap_start_loop 242 and r11 = r11, r12 243 mov b1 = r11 244 245 ld1 r20 = [r8] 246 movl r21 = 3 247 cmp.eq p2, p3 = r20, r21 248 (p3) br.call.sptk.many b0 = b1 249 250 movl r11 = kernel_image_start 251 and r11 = r11, r12 252 mov b1 = r11 253 br.call.sptk.many b0 = b1 254 255 .align 16 256 .global bsp_started 257 bsp_started: 258 .space 8 259 260 .align 4096 261 .global cpu_by_id_eid_list 262 cpu_by_id_eid_list: 263 .space 65536 264 265 #endif /* CONFIG_SMP */
Note:
See TracChangeset
for help on using the changeset viewer.