aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/kernel/head_64.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc/kernel/head_64.S')
-rw-r--r--arch/sparc/kernel/head_64.S52
1 files changed, 51 insertions, 1 deletions
diff --git a/arch/sparc/kernel/head_64.S b/arch/sparc/kernel/head_64.S
index aa594c792d19..0d810c2f1d00 100644
--- a/arch/sparc/kernel/head_64.S
+++ b/arch/sparc/kernel/head_64.S
@@ -132,6 +132,8 @@ prom_sun4v_name:
132 .asciz "sun4v" 132 .asciz "sun4v"
133prom_niagara_prefix: 133prom_niagara_prefix:
134 .asciz "SUNW,UltraSPARC-T" 134 .asciz "SUNW,UltraSPARC-T"
135prom_sparc_prefix:
136 .asciz "SPARC-"
135 .align 4 137 .align 4
136prom_root_compatible: 138prom_root_compatible:
137 .skip 64 139 .skip 64
@@ -382,6 +384,22 @@ sun4v_chip_type:
38290: ldub [%g7], %g2 38490: ldub [%g7], %g2
383 ldub [%g1], %g4 385 ldub [%g1], %g4
384 cmp %g2, %g4 386 cmp %g2, %g4
387 bne,pn %icc, 89f
388 add %g7, 1, %g7
389 subcc %g3, 1, %g3
390 bne,pt %xcc, 90b
391 add %g1, 1, %g1
392 ba,pt %xcc, 91f
393 nop
394
39589: sethi %hi(prom_cpu_compatible), %g1
396 or %g1, %lo(prom_cpu_compatible), %g1
397 sethi %hi(prom_sparc_prefix), %g7
398 or %g7, %lo(prom_sparc_prefix), %g7
399 mov 6, %g3
40090: ldub [%g7], %g2
401 ldub [%g1], %g4
402 cmp %g2, %g4
385 bne,pn %icc, 4f 403 bne,pn %icc, 4f
386 add %g7, 1, %g7 404 add %g7, 1, %g7
387 subcc %g3, 1, %g3 405 subcc %g3, 1, %g3
@@ -390,6 +408,28 @@ sun4v_chip_type:
390 408
391 sethi %hi(prom_cpu_compatible), %g1 409 sethi %hi(prom_cpu_compatible), %g1
392 or %g1, %lo(prom_cpu_compatible), %g1 410 or %g1, %lo(prom_cpu_compatible), %g1
411 ldub [%g1 + 6], %g2
412 cmp %g2, 'T'
413 be,pt %xcc, 70f
414 cmp %g2, 'M'
415 bne,pn %xcc, 4f
416 nop
417
41870: ldub [%g1 + 7], %g2
419 cmp %g2, '3'
420 be,pt %xcc, 5f
421 mov SUN4V_CHIP_NIAGARA3, %g4
422 cmp %g2, '4'
423 be,pt %xcc, 5f
424 mov SUN4V_CHIP_NIAGARA4, %g4
425 cmp %g2, '5'
426 be,pt %xcc, 5f
427 mov SUN4V_CHIP_NIAGARA5, %g4
428 ba,pt %xcc, 4f
429 nop
430
43191: sethi %hi(prom_cpu_compatible), %g1
432 or %g1, %lo(prom_cpu_compatible), %g1
393 ldub [%g1 + 17], %g2 433 ldub [%g1 + 17], %g2
394 cmp %g2, '1' 434 cmp %g2, '1'
395 be,pt %xcc, 5f 435 be,pt %xcc, 5f
@@ -397,6 +437,7 @@ sun4v_chip_type:
397 cmp %g2, '2' 437 cmp %g2, '2'
398 be,pt %xcc, 5f 438 be,pt %xcc, 5f
399 mov SUN4V_CHIP_NIAGARA2, %g4 439 mov SUN4V_CHIP_NIAGARA2, %g4
440
4004: 4414:
401 mov SUN4V_CHIP_UNKNOWN, %g4 442 mov SUN4V_CHIP_UNKNOWN, %g4
4025: sethi %hi(sun4v_chip_type), %g2 4435: sethi %hi(sun4v_chip_type), %g2
@@ -514,6 +555,15 @@ niagara_tlb_fixup:
514 cmp %g1, SUN4V_CHIP_NIAGARA2 555 cmp %g1, SUN4V_CHIP_NIAGARA2
515 be,pt %xcc, niagara2_patch 556 be,pt %xcc, niagara2_patch
516 nop 557 nop
558 cmp %g1, SUN4V_CHIP_NIAGARA3
559 be,pt %xcc, niagara2_patch
560 nop
561 cmp %g1, SUN4V_CHIP_NIAGARA4
562 be,pt %xcc, niagara2_patch
563 nop
564 cmp %g1, SUN4V_CHIP_NIAGARA5
565 be,pt %xcc, niagara2_patch
566 nop
517 567
518 call generic_patch_copyops 568 call generic_patch_copyops
519 nop 569 nop
@@ -528,7 +578,7 @@ niagara2_patch:
528 nop 578 nop
529 call niagara_patch_bzero 579 call niagara_patch_bzero
530 nop 580 nop
531 call niagara2_patch_pageops 581 call niagara_patch_pageops
532 nop 582 nop
533 583
534 ba,a,pt %xcc, 80f 584 ba,a,pt %xcc, 80f