Changeset 965dc18 in mainline for kernel/arch/sparc64/src/start.S
- Timestamp:
- 2008-12-05T19:59:03Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 49093a4
- Parents:
- 0258e67
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/sparc64/src/start.S
r0258e67 r965dc18 28 28 29 29 #include <arch/arch.h> 30 #include <arch/cpu.h> 30 31 #include <arch/regdef.h> 31 32 #include <arch/boot/boot.h> … … 46 47 47 48 #define BSP_FLAG 1 49 50 /* 51 * 2^PHYSMEM_ADDR_SIZE is the size of the physical address space on 52 * a given processor. 53 */ 54 #if defined (US) 55 #define PHYSMEM_ADDR_SIZE 41 56 #elif defined (US3) 57 #define PHYSMEM_ADDR_SIZE 43 58 #endif 48 59 49 60 /* … … 68 79 andn %o0, %l0, %l6 ! l6 <= start of physical memory 69 80 70 ! Get bits 40:13 of physmem_base.81 ! Get bits (PHYSMEM_ADDR_SIZE - 1):13 of physmem_base. 71 82 srlx %l6, 13, %l5 72 sllx %l5, 13 + (63 - 40), %l5 73 srlx %l5, 63 - 40, %l5 ! l5 <= physmem_base[40:13] 83 84 ! l5 <= physmem_base[(PHYSMEM_ADDR_SIZE - 1):13] 85 sllx %l5, 13 + (63 - (PHYSMEM_ADDR_SIZE - 1)), %l5 86 srlx %l5, 63 - (PHYSMEM_ADDR_SIZE - 1), %l5 74 87 75 88 /* … … 84 97 wrpr %g0, NWINDOWS - 1, %cleanwin ! prevent needless clean_window 85 98 ! traps for kernel 99 100 wrpr %g0, 0, %wstate ! use default spill/fill trap 86 101 87 102 wrpr %g0, 0, %tl ! TL = 0, primary context … … 245 260 /* 246 261 * Precompute kernel 8K TLB data template. 247 * %l5 contains starting physical address bits [40:13] 262 * %l5 contains starting physical address 263 * bits [(PHYSMEM_ADDR_SIZE - 1):13] 248 264 */ 249 265 sethi %hi(kernel_8k_tlb_data_template), %l4 … … 283 299 284 300 301 1: 302 #ifdef CONFIG_SMP 303 /* 304 * Determine the width of the MID and save its mask to %g3. The width 305 * is 306 * * 5 for US and US-IIIi, 307 * * 10 for US3 except US-IIIi. 308 */ 309 #if defined(US) 310 mov 0x1f, %g3 311 #elif defined(US3) 312 mov 0x3ff, %g3 313 rdpr %ver, %g2 314 sllx %g2, 16, %g2 315 srlx %g2, 48, %g2 316 cmp %g2, IMPL_ULTRASPARCIII_I 317 move %xcc, 0x1f, %g3 318 #endif 319 285 320 /* 286 321 * Read MID from the processor. 287 322 */ 288 1: 289 ldxa [%g0] ASI_UPA_CONFIG, %g1 290 srlx %g1, UPA_CONFIG_MID_SHIFT, %g1 291 and %g1, UPA_CONFIG_MID_MASK, %g1 292 293 #ifdef CONFIG_SMP 323 ldxa [%g0] ASI_ICBUS_CONFIG, %g1 324 srlx %g1, ICBUS_CONFIG_MID_SHIFT, %g1 325 and %g1, %g3, %g1 326 294 327 /* 295 328 * Active loop for APs until the BSP picks them up. A processor cannot
Note:
See TracChangeset
for help on using the changeset viewer.