Print this page
restore sparc comments
de-linting of .s files

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/sun4u/cpu/us3_common_asm.s
          +++ new/usr/src/uts/sun4u/cpu/us3_common_asm.s
↓ open down ↓ 17 lines elided ↑ open up ↑
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*
  22   22   * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  23   23   * Use is subject to license terms.
  24   24   *
  25   25   * Assembly code support for Cheetah/Cheetah+ modules
  26   26   */
  27   27  
  28      -#if !defined(lint)
  29   28  #include "assym.h"
  30      -#endif  /* !lint */
  31   29  
  32   30  #include <sys/asm_linkage.h>
  33   31  #include <sys/mmu.h>
  34   32  #include <vm/hat_sfmmu.h>
  35   33  #include <sys/machparam.h>
  36   34  #include <sys/machcpuvar.h>
  37   35  #include <sys/machthread.h>
  38   36  #include <sys/machtrap.h>
  39   37  #include <sys/privregs.h>
  40   38  #include <sys/trap.h>
↓ open down ↓ 3 lines elided ↑ open up ↑
  44   42  #include <sys/intreg.h>
  45   43  #include <sys/async.h>
  46   44  #include <sys/clock.h>
  47   45  #include <sys/cheetahasm.h>
  48   46  #include <sys/cmpregs.h>
  49   47  
  50   48  #ifdef TRAPTRACE
  51   49  #include <sys/traptrace.h>
  52   50  #endif /* TRAPTRACE */
  53   51  
  54      -#if !defined(lint)
  55      -
  56   52  /* BEGIN CSTYLED */
  57   53  
  58   54  #define DCACHE_FLUSHPAGE(arg1, arg2, tmp1, tmp2, tmp3)                  \
  59   55          ldxa    [%g0]ASI_DCU, tmp1                                      ;\
  60   56          btst    DCU_DC, tmp1            /* is dcache enabled? */        ;\
  61   57          bz,pn   %icc, 1f                                                ;\
  62   58          ASM_LD(tmp1, dcache_linesize)                                   ;\
  63   59          ASM_LD(tmp2, dflush_type)                                       ;\
  64   60          cmp     tmp2, FLUSHPAGE_TYPE                                    ;\
  65   61          be,pt   %icc, 2f                                                ;\
↓ open down ↓ 96 lines elided ↑ open up ↑
 162  158  2:                                                                      \
 163  159          stxa    %g0, [tmp3 + tmp2]ASI_DC_TAG;                           \
 164  160          membar  #Sync;                                                  \
 165  161          cmp     %g0, tmp2;                                              \
 166  162          bne,pt  %icc, 2b;                                               \
 167  163          sub     tmp2, tmp1, tmp2;                                       \
 168  164  1:
 169  165  
 170  166  /* END CSTYLED */
 171  167  
 172      -#endif  /* !lint */
 173      -
 174  168  /*
 175  169   * Cheetah MMU and Cache operations.
 176  170   */
 177  171  
 178      -#if defined(lint)
 179      -
 180      -/* ARGSUSED */
 181      -void
 182      -vtag_flushpage(caddr_t vaddr, uint64_t sfmmup)
 183      -{}
 184      -
 185      -#else   /* lint */
 186      -
 187  172          ENTRY_NP(vtag_flushpage)
 188  173          /*
 189  174           * flush page from the tlb
 190  175           *
 191  176           * %o0 = vaddr
 192  177           * %o1 = sfmmup
 193  178           */
 194  179          rdpr    %pstate, %o5
 195  180  #ifdef DEBUG
 196  181          PANIC_IF_INTR_DISABLED_PSTR(%o5, u3_di_label0, %g1)
↓ open down ↓ 48 lines elided ↑ open up ↑
 245  230          stxa    %g0, [%o0]ASI_DTLB_DEMAP
 246  231          stxa    %g0, [%o0]ASI_ITLB_DEMAP
 247  232          stxa    %o2, [%o4]ASI_DMMU              /* restore old ctxnum */
 248  233          flush   %o3
 249  234          wrpr    %g0, 0, %tl
 250  235  
 251  236          retl
 252  237          wrpr    %g0, %o5, %pstate               /* enable interrupts */
 253  238          SET_SIZE(vtag_flushpage)
 254  239  
 255      -#endif  /* lint */
 256      -
 257      -#if defined(lint)
 258      -
 259      -void
 260      -vtag_flushall(void)
 261      -{}
 262      -
 263      -#else   /* lint */
 264      -
 265  240          ENTRY_NP2(vtag_flushall, demap_all)
 266  241          /*
 267  242           * flush the tlb
 268  243           */
 269  244          sethi   %hi(FLUSH_ADDR), %o3
 270  245          set     DEMAP_ALL_TYPE, %g1
 271  246          stxa    %g0, [%g1]ASI_DTLB_DEMAP
 272  247          stxa    %g0, [%g1]ASI_ITLB_DEMAP
 273  248          flush   %o3
 274  249          retl
 275  250          nop
 276  251          SET_SIZE(demap_all)
 277  252          SET_SIZE(vtag_flushall)
 278  253  
 279      -#endif  /* lint */
 280  254  
 281      -
 282      -#if defined(lint)
 283      -
 284      -/* ARGSUSED */
 285      -void
 286      -vtag_flushpage_tl1(uint64_t vaddr, uint64_t sfmmup)
 287      -{}
 288      -
 289      -#else   /* lint */
 290      -
 291  255          ENTRY_NP(vtag_flushpage_tl1)
 292  256          /*
 293  257           * x-trap to flush page from tlb and tsb
 294  258           *
 295  259           * %g1 = vaddr, zero-extended on 32-bit kernel
 296  260           * %g2 = sfmmup
 297  261           *
 298  262           * assumes TSBE_TAG = 0
 299  263           */
 300  264          srln    %g1, MMU_PAGESHIFT, %g1
↓ open down ↓ 24 lines elided ↑ open up ↑
 325  289          srlx    %g5, CTXREG_NEXT_SHIFT, %g2     /* %g2 = nucleus pgsz */
 326  290          sllx    %g2, CTXREG_NEXT_SHIFT, %g2     /* preserve nucleus pgsz */
 327  291          or      %g6, %g2, %g6                   /* %g6 = nucleus pgsz | primary pgsz | cnum */
 328  292          stxa    %g6, [%g4]ASI_DMMU              /* wr new ctxum */
 329  293          stxa    %g0, [%g1]ASI_DTLB_DEMAP
 330  294          stxa    %g0, [%g1]ASI_ITLB_DEMAP
 331  295          stxa    %g5, [%g4]ASI_DMMU              /* restore old ctxnum */
 332  296          retry
 333  297          SET_SIZE(vtag_flushpage_tl1)
 334  298  
 335      -#endif  /* lint */
 336  299  
 337      -
 338      -#if defined(lint)
 339      -
 340      -/* ARGSUSED */
 341      -void
 342      -vtag_flush_pgcnt_tl1(uint64_t vaddr, uint64_t sfmmup_pgcnt)
 343      -{}
 344      -
 345      -#else   /* lint */
 346      -
 347  300          ENTRY_NP(vtag_flush_pgcnt_tl1)
 348  301          /*
 349  302           * x-trap to flush pgcnt MMU_PAGESIZE pages from tlb
 350  303           *
 351  304           * %g1 = vaddr, zero-extended on 32-bit kernel
 352  305           * %g2 = <sfmmup58|pgcnt6>, (pgcnt - 1) is pass'ed in via pgcnt6 bits.
 353  306           *
 354  307           * NOTE: this handler relies on the fact that no
 355  308           *      interrupts or traps can occur during the loop
 356  309           *      issuing the TLB_DEMAP operations. It is assumed
↓ open down ↓ 58 lines elided ↑ open up ↑
 415  368          flush   %g5                             ! flush required by immu
 416  369  
 417  370          deccc   %g3                             /* decr pgcnt */
 418  371          bnz,pt  %icc,3b
 419  372            add   %g1, %g2, %g1                   /* next page */
 420  373  
 421  374          stxa    %g6, [%g4]ASI_DMMU              /* restore old ctxnum */
 422  375          retry
 423  376          SET_SIZE(vtag_flush_pgcnt_tl1)
 424  377  
 425      -#endif  /* lint */
 426      -
 427      -#if defined(lint)
 428      -
 429      -/*ARGSUSED*/
 430      -void
 431      -vtag_flushall_tl1(uint64_t dummy1, uint64_t dummy2)
 432      -{}
 433      -
 434      -#else   /* lint */
 435      -
 436  378          ENTRY_NP(vtag_flushall_tl1)
 437  379          /*
 438  380           * x-trap to flush tlb
 439  381           */
 440  382          set     DEMAP_ALL_TYPE, %g4
 441  383          stxa    %g0, [%g4]ASI_DTLB_DEMAP
 442  384          stxa    %g0, [%g4]ASI_ITLB_DEMAP
 443  385          retry
 444  386          SET_SIZE(vtag_flushall_tl1)
 445  387  
 446      -#endif  /* lint */
 447  388  
 448      -
 449      -#if defined(lint)
 450      -
 451      -/* ARGSUSED */
 452      -void
 453      -vac_flushpage(pfn_t pfnum, int vcolor)
 454      -{}
 455      -
 456      -#else   /* lint */
 457      -
 458  389  /*
 459  390   * vac_flushpage(pfnum, color)
 460  391   *      Flush 1 8k page of the D-$ with physical page = pfnum
 461  392   *      Algorithm:
 462  393   *              The cheetah dcache is a 64k psuedo 4 way accaociative cache.
 463  394   *              It is virtual indexed, physically tagged cache.
 464  395   */
 465  396          .seg    ".data"
 466  397          .align  8
 467  398          .global dflush_type
↓ open down ↓ 4 lines elided ↑ open up ↑
 472  403          /*
 473  404           * flush page from the d$
 474  405           *
 475  406           * %o0 = pfnum, %o1 = color
 476  407           */
 477  408          DCACHE_FLUSHPAGE(%o0, %o1, %o2, %o3, %o4)
 478  409          retl
 479  410            nop
 480  411          SET_SIZE(vac_flushpage)
 481  412  
 482      -#endif  /* lint */
 483  413  
 484      -
 485      -#if defined(lint)
 486      -
 487      -/* ARGSUSED */
 488      -void
 489      -vac_flushpage_tl1(uint64_t pfnum, uint64_t vcolor)
 490      -{}
 491      -
 492      -#else   /* lint */
 493      -
 494  414          ENTRY_NP(vac_flushpage_tl1)
 495  415          /*
 496  416           * x-trap to flush page from the d$
 497  417           *
 498  418           * %g1 = pfnum, %g2 = color
 499  419           */
 500  420          DCACHE_FLUSHPAGE(%g1, %g2, %g3, %g4, %g5)
 501  421          retry
 502  422          SET_SIZE(vac_flushpage_tl1)
 503  423  
 504      -#endif  /* lint */
 505  424  
 506      -
 507      -#if defined(lint)
 508      -
 509      -/* ARGSUSED */
 510      -void
 511      -vac_flushcolor(int vcolor, pfn_t pfnum)
 512      -{}
 513      -
 514      -#else   /* lint */
 515      -
 516  425          ENTRY(vac_flushcolor)
 517  426          /*
 518  427           * %o0 = vcolor
 519  428           */
 520  429          DCACHE_FLUSHCOLOR(%o0, 0, %o1, %o2, %o3)
 521  430          DCACHE_FLUSHCOLOR(%o0, 1, %o1, %o2, %o3)
 522  431          DCACHE_FLUSHCOLOR(%o0, 2, %o1, %o2, %o3)
 523  432          DCACHE_FLUSHCOLOR(%o0, 3, %o1, %o2, %o3)
 524  433          retl
 525  434            nop
 526  435          SET_SIZE(vac_flushcolor)
 527  436  
 528      -#endif  /* lint */
 529  437  
 530      -
 531      -#if defined(lint)
 532      -
 533      -/* ARGSUSED */
 534      -void
 535      -vac_flushcolor_tl1(uint64_t vcolor, uint64_t pfnum)
 536      -{}
 537      -
 538      -#else   /* lint */
 539      -
 540  438          ENTRY(vac_flushcolor_tl1)
 541  439          /*
 542  440           * %g1 = vcolor
 543  441           */
 544  442          DCACHE_FLUSHCOLOR(%g1, 0, %g2, %g3, %g4)
 545  443          DCACHE_FLUSHCOLOR(%g1, 1, %g2, %g3, %g4)
 546  444          DCACHE_FLUSHCOLOR(%g1, 2, %g2, %g3, %g4)
 547  445          DCACHE_FLUSHCOLOR(%g1, 3, %g2, %g3, %g4)
 548  446          retry
 549  447          SET_SIZE(vac_flushcolor_tl1)
 550  448  
 551      -#endif  /* lint */
 552      -
 553      -#if defined(lint)
 554      - 
 555      -int
 556      -idsr_busy(void)
 557      -{
 558      -        return (0);
 559      -}
 560      -
 561      -#else   /* lint */
 562      -
 563  449  /*
 564  450   * Determine whether or not the IDSR is busy.
 565  451   * Entry: no arguments
 566  452   * Returns: 1 if busy, 0 otherwise
 567  453   */
 568  454          ENTRY(idsr_busy)
 569  455          ldxa    [%g0]ASI_INTR_DISPATCH_STATUS, %g1
 570  456          clr     %o0
 571  457          btst    IDSR_BUSY, %g1
 572  458          bz,a,pt %xcc, 1f
 573  459          mov     1, %o0
 574  460  1:
 575  461          retl
 576  462          nop
 577  463          SET_SIZE(idsr_busy)
 578  464  
 579      -#endif  /* lint */
 580      -
 581      -#if defined(lint)
 582      -
 583      -/* ARGSUSED */
 584      -void
 585      -init_mondo(xcfunc_t *func, uint64_t arg1, uint64_t arg2)
 586      -{}
 587      -
 588      -/* ARGSUSED */
 589      -void
 590      -init_mondo_nocheck(xcfunc_t *func, uint64_t arg1, uint64_t arg2)
 591      -{}
 592      -
 593      -#else   /* lint */
 594      -
 595  465          .global _dispatch_status_busy
 596  466  _dispatch_status_busy:
 597  467          .asciz  "ASI_INTR_DISPATCH_STATUS error: busy"
 598  468          .align  4
 599  469  
 600  470  /*
 601  471   * Setup interrupt dispatch data registers
 602  472   * Entry:
 603  473   *      %o0 - function or inumber to call
 604  474   *      %o1, %o2 - arguments (2 uint64_t's)
↓ open down ↓ 33 lines elided ↑ open up ↑
 638  508          ! interrupt vector dispatch data reg 2
 639  509          !
 640  510          stxa    %o2, [%g3]ASI_INTR_DISPATCH
 641  511  
 642  512          membar  #Sync
 643  513          retl
 644  514          nop
 645  515          SET_SIZE(init_mondo_nocheck)
 646  516          SET_SIZE(init_mondo)
 647  517  
 648      -#endif  /* lint */
 649  518  
 650      -
 651  519  #if !(defined(JALAPENO) || defined(SERRANO))
 652  520  
 653      -#if defined(lint)
 654      -
 655      -/* ARGSUSED */
 656      -void
 657      -shipit(int upaid, int bn)
 658      -{ return; }
 659      -
 660      -#else   /* lint */
 661      -
 662  521  /*
 663  522   * Ship mondo to aid using busy/nack pair bn
 664  523   */
 665  524          ENTRY_NP(shipit)
 666  525          sll     %o0, IDCR_PID_SHIFT, %g1        ! IDCR<18:14> = agent id
 667  526          sll     %o1, IDCR_BN_SHIFT, %g2         ! IDCR<28:24> = b/n pair
 668  527          or      %g1, IDCR_OFFSET, %g1           ! IDCR<13:0> = 0x70
 669  528          or      %g1, %g2, %g1
 670  529          stxa    %g0, [%g1]ASI_INTR_DISPATCH     ! interrupt vector dispatch
 671  530          membar  #Sync
 672  531          retl
 673  532          nop
 674  533          SET_SIZE(shipit)
 675  534  
 676      -#endif  /* lint */
 677      -
 678  535  #endif  /* !(JALAPENO || SERRANO) */
 679  536  
 680  537  
 681      -#if defined(lint)
 682      -
 683      -/* ARGSUSED */
 684      -void
 685      -flush_instr_mem(caddr_t vaddr, size_t len)
 686      -{}
 687      -
 688      -#else   /* lint */
 689      -
 690  538  /*
 691  539   * flush_instr_mem:
 692  540   *      Flush 1 page of the I-$ starting at vaddr
 693  541   *      %o0 vaddr
 694  542   *      %o1 bytes to be flushed
 695  543   * UltraSPARC-III maintains consistency of the on-chip Instruction Cache with
 696  544   * the stores from all processors so that a FLUSH instruction is only needed
 697  545   * to ensure pipeline is consistent. This means a single flush is sufficient at
 698  546   * the end of a sequence of stores that updates the instruction stream to
 699  547   * ensure correct operation.
 700  548   */
 701  549  
 702  550          ENTRY(flush_instr_mem)
 703  551          flush   %o0                     ! address irrelevant
 704  552          retl
 705  553          nop
 706  554          SET_SIZE(flush_instr_mem)
 707  555  
 708      -#endif  /* lint */
 709  556  
 710      -
 711  557  #if defined(CPU_IMP_ECACHE_ASSOC)
 712  558  
 713      -#if defined(lint)
 714      -
 715      -/* ARGSUSED */
 716      -uint64_t
 717      -get_ecache_ctrl(void)
 718      -{ return (0); }
 719      -
 720      -#else   /* lint */
 721      -
 722  559          ENTRY(get_ecache_ctrl)
 723  560          GET_CPU_IMPL(%o0)
 724  561          cmp     %o0, JAGUAR_IMPL
 725  562          !
 726  563          ! Putting an ASI access in the delay slot may
 727  564          ! cause it to be accessed, even when annulled.
 728  565          !
 729  566          bne     1f
 730  567            nop
 731  568          ldxa    [%g0]ASI_EC_CFG_TIMING, %o0     ! read Jaguar shared E$ ctrl reg
 732  569          b       2f
 733  570            nop
 734  571  1:      
 735  572          ldxa    [%g0]ASI_EC_CTRL, %o0           ! read Ch/Ch+ E$ control reg
 736  573  2:
 737  574          retl
 738  575            nop
 739  576          SET_SIZE(get_ecache_ctrl)
 740  577  
 741      -#endif  /* lint */
 742      -
 743  578  #endif  /* CPU_IMP_ECACHE_ASSOC */
 744  579  
 745  580  
 746  581  #if !(defined(JALAPENO) || defined(SERRANO))
 747  582  
 748  583  /*
 749  584   * flush_ecache:
 750  585   *      %o0 - 64 bit physical address
 751  586   *      %o1 - ecache size
 752  587   *      %o2 - ecache linesize
 753  588   */
 754      -#if defined(lint)
 755  589  
 756      -/*ARGSUSED*/
 757      -void
 758      -flush_ecache(uint64_t physaddr, size_t ecache_size, size_t ecache_linesize)
 759      -{}
 760      -
 761      -#else /* !lint */
 762      -
 763  590          ENTRY(flush_ecache)
 764  591  
 765  592          /*
 766  593           * For certain CPU implementations, we have to flush the L2 cache
 767  594           * before flushing the ecache.
 768  595           */
 769  596          PN_L2_FLUSHALL(%g3, %g4, %g5)
 770  597  
 771  598          /*
 772  599           * Flush the entire Ecache using displacement flush.
 773  600           */
 774  601          ECACHE_FLUSHALL(%o1, %o2, %o0, %o4)
 775  602  
 776  603          retl
 777  604          nop
 778  605          SET_SIZE(flush_ecache)
 779  606  
 780      -#endif /* lint */
 781      -
 782  607  #endif  /* !(JALAPENO || SERRANO) */
 783  608  
 784  609  
 785      -#if defined(lint)
 786      -
 787      -void
 788      -flush_dcache(void)
 789      -{}
 790      -
 791      -#else   /* lint */
 792      -
 793  610          ENTRY(flush_dcache)
 794  611          ASM_LD(%o0, dcache_size)
 795  612          ASM_LD(%o1, dcache_linesize)
 796  613          CH_DCACHE_FLUSHALL(%o0, %o1, %o2)
 797  614          retl
 798  615          nop
 799  616          SET_SIZE(flush_dcache)
 800  617  
 801      -#endif  /* lint */
 802  618  
 803      -
 804      -#if defined(lint)
 805      -
 806      -void
 807      -flush_icache(void)
 808      -{}
 809      -
 810      -#else   /* lint */
 811      -
 812  619          ENTRY(flush_icache)
 813  620          GET_CPU_PRIVATE_PTR(%g0, %o0, %o2, flush_icache_1);
 814  621          ld      [%o0 + CHPR_ICACHE_LINESIZE], %o1
 815  622          ba,pt   %icc, 2f
 816  623            ld    [%o0 + CHPR_ICACHE_SIZE], %o0
 817  624  flush_icache_1:
 818  625          ASM_LD(%o0, icache_size)
 819  626          ASM_LD(%o1, icache_linesize)
 820  627  2:
 821  628          CH_ICACHE_FLUSHALL(%o0, %o1, %o2, %o4)
 822  629          retl
 823  630          nop
 824  631          SET_SIZE(flush_icache)
 825  632  
 826      -#endif  /* lint */
 827      -
 828      -#if defined(lint)
 829      -
 830      -/*ARGSUSED*/
 831      -void
 832      -kdi_flush_idcache(int dcache_size, int dcache_lsize, int icache_size, 
 833      -    int icache_lsize)
 834      -{
 835      -}
 836      -
 837      -#else   /* lint */
 838      -
 839  633          ENTRY(kdi_flush_idcache)
 840  634          CH_DCACHE_FLUSHALL(%o0, %o1, %g1)
 841  635          CH_ICACHE_FLUSHALL(%o2, %o3, %g1, %g2)
 842  636          membar  #Sync
 843  637          retl
 844  638          nop
 845  639          SET_SIZE(kdi_flush_idcache)
 846  640  
 847      -#endif  /* lint */
 848      -
 849      -#if defined(lint)
 850      -
 851      -void
 852      -flush_pcache(void)
 853      -{}
 854      -
 855      -#else   /* lint */
 856      -
 857  641          ENTRY(flush_pcache)
 858  642          PCACHE_FLUSHALL(%o0, %o1, %o2)
 859  643          retl
 860  644          nop
 861  645          SET_SIZE(flush_pcache)
 862  646  
 863      -#endif  /* lint */
 864  647  
 865      -
 866  648  #if defined(CPU_IMP_L1_CACHE_PARITY)
 867  649  
 868      -#if defined(lint)
 869      -
 870      -/* ARGSUSED */
 871      -void
 872      -get_dcache_dtag(uint32_t dcache_idx, uint64_t *data)
 873      -{}
 874      -
 875      -#else   /* lint */
 876      -
 877  650  /*
 878  651   * Get dcache data and tag.  The Dcache data is a pointer to a ch_dc_data_t
 879  652   * structure (see cheetahregs.h):
 880  653   * The Dcache *should* be turned off when this code is executed.
 881  654   */
 882  655          .align  128
 883  656          ENTRY(get_dcache_dtag)
 884  657          rdpr    %pstate, %o5
 885  658          andn    %o5, PSTATE_IE | PSTATE_AM, %o3
 886  659          wrpr    %g0, %o3, %pstate
↓ open down ↓ 57 lines elided ↑ open up ↑
 944  717          stb     %o2, [%o1]
 945  718          dec     %o1
 946  719          cmp     %o3, CH_DC_DATA_REG_SIZE - 8
 947  720          blt     3b
 948  721            add   %o3, 8, %o3
 949  722  4:
 950  723          retl
 951  724            wrpr  %g0, %o5, %pstate       
 952  725          SET_SIZE(get_dcache_dtag)
 953  726  
 954      -#endif  /* lint */
 955  727  
 956      -
 957      -#if defined(lint)
 958      -
 959      -/* ARGSUSED */
 960      -void
 961      -get_icache_dtag(uint32_t ecache_idx, uint64_t *data)
 962      -{}
 963      -
 964      -#else   /* lint */
 965      -
 966  728  /*
 967  729   * Get icache data and tag.  The data argument is a pointer to a ch_ic_data_t
 968  730   * structure (see cheetahregs.h):
 969  731   * The Icache *Must* be turned off when this function is called.
 970  732   * This is because diagnostic accesses to the Icache interfere with cache
 971  733   * consistency.
 972  734   */
 973  735          .align  128
 974  736          ENTRY(get_icache_dtag)
 975  737          rdpr    %pstate, %o5
↓ open down ↓ 21 lines elided ↑ open up ↑
 997  759          ldxa    [%o0 + %o3]ASI_IC_DATA, %o2
 998  760          stx     %o2, [%o1 + %o3]
 999  761          cmp     %o3, PN_IC_DATA_REG_SIZE - 8
1000  762          blt     2b
1001  763            add   %o3, 8, %o3
1002  764  
1003  765          retl
1004  766            wrpr  %g0, %o5, %pstate       
1005  767          SET_SIZE(get_icache_dtag)
1006  768  
1007      -#endif  /* lint */
1008      -
1009      -#if defined(lint)
1010      -
1011      -/* ARGSUSED */
1012      -void
1013      -get_pcache_dtag(uint32_t pcache_idx, uint64_t *data)
1014      -{}
1015      -
1016      -#else   /* lint */
1017      -
1018  769  /*
1019  770   * Get pcache data and tags.
1020  771   * inputs:
1021  772   *   pcache_idx - fully constructed VA for for accessing P$ diagnostic
1022  773   *                registers. Contains PC_way and PC_addr shifted into
1023  774   *                the correct bit positions. See the PRM for more details.
1024  775   *   data       - pointer to a ch_pc_data_t
1025  776   * structure (see cheetahregs.h):
1026  777   */
1027  778          .align  128
↓ open down ↓ 15 lines elided ↑ open up ↑
1043  794          ldxa    [%o0 + %o3]ASI_PC_DATA, %o2
1044  795          stx     %o2, [%o1 + %o3]
1045  796          cmp     %o3, CH_PC_DATA_REG_SIZE - 8
1046  797          blt     2b
1047  798            add   %o3, 8, %o3
1048  799  
1049  800          retl
1050  801            wrpr  %g0, %o5, %pstate       
1051  802          SET_SIZE(get_pcache_dtag)
1052  803  
1053      -#endif  /* lint */
1054      -
1055  804  #endif  /* CPU_IMP_L1_CACHE_PARITY */
1056  805  
1057      -#if defined(lint)
1058      -
1059      -/* ARGSUSED */
1060      -void
1061      -set_dcu(uint64_t dcu)
1062      -{}
1063      -
1064      -#else   /* lint */
1065      -
1066  806  /*
1067  807   * re-enable the i$, d$, w$, and p$ according to bootup cache state.
1068  808   * Turn on WE, HPE, SPE, PE, IC, and DC bits defined as DCU_CACHE.
1069  809   *   %o0 - 64 bit constant
1070  810   */
1071  811          ENTRY(set_dcu)
1072  812          stxa    %o0, [%g0]ASI_DCU       ! Store to DCU
1073  813          flush   %g0     /* flush required after changing the IC bit */
1074  814          retl
1075  815          nop
1076  816          SET_SIZE(set_dcu)
1077  817  
1078      -#endif  /* lint */
1079  818  
1080      -
1081      -#if defined(lint)
1082      -
1083      -uint64_t
1084      -get_dcu(void)
1085      -{
1086      -        return ((uint64_t)0);
1087      -}
1088      -
1089      -#else   /* lint */
1090      -
1091  819  /*
1092  820   * Return DCU register.
1093  821   */
1094  822          ENTRY(get_dcu)
1095  823          ldxa    [%g0]ASI_DCU, %o0               /* DCU control register */
1096  824          retl
1097  825          nop
1098  826          SET_SIZE(get_dcu)
1099  827  
1100      -#endif  /* lint */
1101      -
1102  828  /*
1103  829   * Cheetah/Cheetah+ level 15 interrupt handler trap table entry.
1104  830   *
1105  831   * This handler is used to check for softints generated by error trap
1106  832   * handlers to report errors.  On Cheetah, this mechanism is used by the
1107  833   * Fast ECC at TL>0 error trap handler and, on Cheetah+, by both the Fast
1108  834   * ECC at TL>0 error and the I$/D$ parity error at TL>0 trap handlers.
1109  835   * NB: Must be 8 instructions or less to fit in trap table and code must
1110  836   *     be relocatable.
1111  837   */
1112      -#if defined(lint)
1113  838  
1114      -void
1115      -ch_pil15_interrupt_instr(void)
1116      -{}
1117      -
1118      -#else   /* lint */
1119      -
1120  839          ENTRY_NP(ch_pil15_interrupt_instr)
1121  840          ASM_JMP(%g1, ch_pil15_interrupt)
1122  841          SET_SIZE(ch_pil15_interrupt_instr)
1123  842  
1124      -#endif
1125  843  
1126      -
1127      -#if defined(lint)
1128      -
1129      -void
1130      -ch_pil15_interrupt(void)
1131      -{}
1132      -
1133      -#else   /* lint */
1134      -
1135  844          ENTRY_NP(ch_pil15_interrupt)
1136  845  
1137  846          /*
1138  847           * Since pil_interrupt is hacked to assume that every level 15
1139  848           * interrupt is generated by the CPU to indicate a performance
1140  849           * counter overflow this gets ugly.  Before calling pil_interrupt
1141  850           * the Error at TL>0 pending status is inspected.  If it is
1142  851           * non-zero, then an error has occurred and it is handled.
1143  852           * Otherwise control is transfered to pil_interrupt.  Note that if
1144  853           * an error is detected pil_interrupt will not be called and
↓ open down ↓ 33 lines elided ↑ open up ↑
1178  887          /*
1179  888           * The logout is invalid.
1180  889           *
1181  890           * Call the default interrupt handler.
1182  891           */
1183  892          sethi   %hi(pil_interrupt), %g1
1184  893          jmp     %g1 + %lo(pil_interrupt)
1185  894            mov   PIL_15, %g4
1186  895  
1187  896          SET_SIZE(ch_pil15_interrupt)
1188      -#endif
1189  897  
1190  898  
1191  899  /*
1192  900   * Error Handling
1193  901   *
1194  902   * Cheetah provides error checking for all memory access paths between
1195  903   * the CPU, External Cache, Cheetah Data Switch and system bus. Error
1196  904   * information is logged in the AFSR, (also AFSR_EXT for Panther) and
1197  905   * AFAR and one of the following traps is generated (provided that it
1198  906   * is enabled in External Cache Error Enable Register) to handle that
↓ open down ↓ 72 lines elided ↑ open up ↑
1271  979   */
1272  980  
1273  981  /*
1274  982   * Cheetah ecc-protected E$ trap (Trap 70) at TL=0
1275  983   * tt0_fecc is replaced by fecc_err_instr in cpu_init_trap of the various
1276  984   * architecture-specific files.  
1277  985   * NB: Must be 8 instructions or less to fit in trap table and code must
1278  986   *     be relocatable.
1279  987   */
1280  988  
1281      -#if defined(lint)
1282      -
1283      -void
1284      -fecc_err_instr(void)
1285      -{}
1286      -
1287      -#else   /* lint */
1288      -
1289  989          ENTRY_NP(fecc_err_instr)
1290  990          membar  #Sync                   ! Cheetah requires membar #Sync
1291  991  
1292  992          /*
1293  993           * Save current DCU state.  Turn off the Dcache and Icache.
1294  994           */
1295  995          ldxa    [%g0]ASI_DCU, %g1       ! save DCU in %g1
1296  996          andn    %g1, DCU_DC + DCU_IC, %g4
1297  997          stxa    %g4, [%g0]ASI_DCU
1298  998          flush   %g0     /* flush required after changing the IC bit */
1299  999  
1300 1000          ASM_JMP(%g4, fast_ecc_err)
1301 1001          SET_SIZE(fecc_err_instr)
1302 1002  
1303      -#endif  /* lint */
1304 1003  
1305      -
1306 1004  #if !(defined(JALAPENO) || defined(SERRANO))
1307 1005  
1308      -#if defined(lint)
1309      -
1310      -void
1311      -fast_ecc_err(void)
1312      -{}
1313      -
1314      -#else   /* lint */
1315      -
1316 1006          .section ".text"
1317 1007          .align  64
1318 1008          ENTRY_NP(fast_ecc_err)
1319 1009  
1320 1010          /*
1321 1011           * Turn off CEEN and NCEEN.
1322 1012           */
1323 1013          ldxa    [%g0]ASI_ESTATE_ERR, %g3
1324 1014          andn    %g3, EN_REG_NCEEN + EN_REG_CEEN, %g4
1325 1015          stxa    %g4, [%g0]ASI_ESTATE_ERR
↓ open down ↓ 119 lines elided ↑ open up ↑
1445 1135           * already at PIL 15.
1446 1136           */
1447 1137          set     cpu_fast_ecc_error, %g1
1448 1138          rdpr    %pil, %g4
1449 1139          cmp     %g4, PIL_14
1450 1140          ba      sys_trap
1451 1141            movl  %icc, PIL_14, %g4
1452 1142  
1453 1143          SET_SIZE(fast_ecc_err)
1454 1144  
1455      -#endif  /* lint */
1456      -
1457 1145  #endif  /* !(JALAPENO || SERRANO) */
1458 1146  
1459 1147  
1460 1148  /*
1461 1149   * Cheetah/Cheetah+ Fast ECC at TL>0 trap strategy:
1462 1150   *
1463 1151   * The basic flow of this trap handler is as follows:
1464 1152   *
1465 1153   * 1) In the "trap 70" trap table code (fecc_err_tl1_instr), generate a
1466 1154   *    software trap 0 ("ta 0") to buy an extra set of %tpc, etc. which we
↓ open down ↓ 37 lines elided ↑ open up ↑
1504 1192  
1505 1193  /*
1506 1194   * Cheetah ecc-protected E$ trap (Trap 70) at TL>0
1507 1195   * tt1_fecc is replaced by fecc_err_tl1_instr in cpu_init_trap of the various
1508 1196   * architecture-specific files.  This generates a "Software Trap 0" at TL>0,
1509 1197   * which goes to fecc_err_tl1_cont_instr, and we continue the handling there.
1510 1198   * NB: Must be 8 instructions or less to fit in trap table and code must
1511 1199   *     be relocatable.
1512 1200   */
1513 1201  
1514      -#if defined(lint)
1515      -
1516      -void
1517      -fecc_err_tl1_instr(void)
1518      -{}
1519      -
1520      -#else   /* lint */
1521      -
1522 1202          ENTRY_NP(fecc_err_tl1_instr)
1523 1203          CH_ERR_TL1_TRAPENTRY(SWTRAP_0);
1524 1204          SET_SIZE(fecc_err_tl1_instr)
1525 1205  
1526      -#endif  /* lint */
1527      -
1528 1206  /*
1529 1207   * Software trap 0 at TL>0.
1530 1208   * tt1_swtrap0 is replaced by fecc_err_tl1_cont_instr in cpu_init_trap of
1531 1209   * the various architecture-specific files.  This is used as a continuation
1532 1210   * of the fast ecc handling where we've bought an extra TL level, so we can
1533 1211   * use %tpc, %tnpc, %tstate to temporarily save the value of registers %g1
1534 1212   * and %g2.  Note that %tstate has bits 0-2 and then bits 8-19 as r/w,
1535 1213   * there's a reserved hole from 3-7.  We only use bits 0-1 and 8-9 (the low
1536 1214   * order two bits from %g1 and %g2 respectively).
1537 1215   * NB: Must be 8 instructions or less to fit in trap table and code must
1538 1216   *     be relocatable.
1539 1217   */
1540      -#if defined(lint)
1541 1218  
1542      -void
1543      -fecc_err_tl1_cont_instr(void)
1544      -{}
1545      -
1546      -#else   /* lint */
1547      -
1548 1219          ENTRY_NP(fecc_err_tl1_cont_instr)
1549 1220          CH_ERR_TL1_SWTRAPENTRY(fast_ecc_tl1_err)
1550 1221          SET_SIZE(fecc_err_tl1_cont_instr)
1551 1222  
1552      -#endif  /* lint */
1553 1223  
1554      -
1555      -#if defined(lint)
1556      -
1557      -void
1558      -ce_err(void)
1559      -{}
1560      -
1561      -#else   /* lint */
1562      -
1563 1224  /*
1564 1225   * The ce_err function handles disrupting trap type 0x63 at TL=0.
1565 1226   *
1566 1227   * AFSR errors bits which cause this trap are:
1567 1228   *      CE, EMC, EDU:ST, EDC, WDU, WDC, CPU, CPC, IVU, IVC
1568 1229   *
1569 1230   * NCEEN Bit of Cheetah External Cache Error Enable Register enables
1570 1231   * the following AFSR disrupting traps: EDU:ST, WDU, CPU, IVU
1571 1232   *
1572 1233   * CEEN Bit of Cheetah External Cache Error Enable Register enables
↓ open down ↓ 158 lines elided ↑ open up ↑
1731 1392           * Call cpu_disrupting_error via systrap at PIL 14 unless we're
1732 1393           * already at PIL 15.
1733 1394           */
1734 1395          set     cpu_disrupting_error, %g1
1735 1396          rdpr    %pil, %g4
1736 1397          cmp     %g4, PIL_14
1737 1398          ba      sys_trap
1738 1399            movl  %icc, PIL_14, %g4
1739 1400          SET_SIZE(ce_err)
1740 1401  
1741      -#endif  /* lint */
1742 1402  
1743      -
1744      -#if defined(lint)
1745      -
1746 1403  /*
1747 1404   * This trap cannot happen at TL>0 which means this routine will never
1748 1405   * actually be called and so we treat this like a BAD TRAP panic.
1749 1406   */
1750      -void
1751      -ce_err_tl1(void)
1752      -{}
1753      -
1754      -#else   /* lint */
1755      -
1756 1407          .align  64
1757 1408          ENTRY_NP(ce_err_tl1)
1758 1409  
1759 1410          call ptl1_panic
1760 1411            mov   PTL1_BAD_TRAP, %g1
1761 1412  
1762 1413          SET_SIZE(ce_err_tl1)
1763 1414  
1764      -#endif  /* lint */
1765      -
1766 1415          
1767      -#if defined(lint)
1768      -
1769      -void
1770      -async_err(void)
1771      -{}
1772      -
1773      -#else   /* lint */
1774      -
1775 1416  /*
1776 1417   * The async_err function handles deferred trap types 0xA 
1777 1418   * (instruction_access_error) and 0x32 (data_access_error) at TL>=0.
1778 1419   *
1779 1420   * AFSR errors bits which cause this trap are:
1780 1421   *      UE, EMU, EDU:BLD, L3_EDU:BLD, TO, BERR
1781 1422   * On some platforms, EMU may causes cheetah to pull the error pin
1782 1423   * never giving Solaris a chance to take a trap.
1783 1424   *
1784 1425   * NCEEN Bit of Cheetah External Cache Error Enable Register enables
↓ open down ↓ 177 lines elided ↑ open up ↑
1962 1603           */
1963 1604          retry
1964 1605  4:
1965 1606          RESET_USER_RTT_REGS(%g4, %g5, async_err_resetskip)
1966 1607  async_err_resetskip:
1967 1608          set     cpu_deferred_error, %g1
1968 1609          ba      sys_trap
1969 1610            mov   PIL_15, %g4             ! run at pil 15
1970 1611          SET_SIZE(async_err)
1971 1612  
1972      -#endif  /* lint */
1973      -
1974 1613  #if defined(CPU_IMP_L1_CACHE_PARITY)
1975 1614  
1976 1615  /*
1977 1616   * D$ parity error trap (trap 71) at TL=0.
1978 1617   * tt0_dperr is replaced by dcache_parity_instr in cpu_init_trap of
1979 1618   * the various architecture-specific files.  This merely sets up the
1980 1619   * arguments for cpu_parity_error and calls it via sys_trap.
1981 1620   * NB: Must be 8 instructions or less to fit in trap table and code must
1982 1621   *     be relocatable.
1983 1622   */
1984      -#if defined(lint)
1985      -
1986      -void
1987      -dcache_parity_instr(void)
1988      -{}
1989      -
1990      -#else   /* lint */
1991 1623          ENTRY_NP(dcache_parity_instr)
1992 1624          membar  #Sync                   ! Cheetah+ requires membar #Sync
1993 1625          set     cpu_parity_error, %g1
1994 1626          or      %g0, CH_ERR_DPE, %g2
1995 1627          rdpr    %tpc, %g3
1996 1628          sethi   %hi(sys_trap), %g7
1997 1629          jmp     %g7 + %lo(sys_trap)
1998 1630            mov   PIL_15, %g4             ! run at pil 15
1999 1631          SET_SIZE(dcache_parity_instr)
2000 1632  
2001      -#endif  /* lint */
2002 1633  
2003      -
2004 1634  /*
2005 1635   * D$ parity error trap (trap 71) at TL>0.
2006 1636   * tt1_dperr is replaced by dcache_parity_tl1_instr in cpu_init_trap of
2007 1637   * the various architecture-specific files.  This generates a "Software
2008 1638   * Trap 1" at TL>0, which goes to dcache_parity_tl1_cont_instr, and we
2009 1639   * continue the handling there.
2010 1640   * NB: Must be 8 instructions or less to fit in trap table and code must
2011 1641   *     be relocatable.
2012 1642   */
2013      -#if defined(lint)
2014      -
2015      -void
2016      -dcache_parity_tl1_instr(void)
2017      -{}
2018      -
2019      -#else   /* lint */
2020 1643          ENTRY_NP(dcache_parity_tl1_instr)
2021 1644          CH_ERR_TL1_TRAPENTRY(SWTRAP_1);
2022 1645          SET_SIZE(dcache_parity_tl1_instr)
2023 1646  
2024      -#endif  /* lint */
2025 1647  
2026      -
2027 1648  /*
2028 1649   * Software trap 1 at TL>0.
2029 1650   * tt1_swtrap1 is replaced by dcache_parity_tl1_cont_instr in cpu_init_trap
2030 1651   * of the various architecture-specific files.  This is used as a continuation
2031 1652   * of the dcache parity handling where we've bought an extra TL level, so we
2032 1653   * can use %tpc, %tnpc, %tstate to temporarily save the value of registers %g1
2033 1654   * and %g2.  Note that %tstate has bits 0-2 and then bits 8-19 as r/w,
2034 1655   * there's a reserved hole from 3-7.  We only use bits 0-1 and 8-9 (the low
2035 1656   * order two bits from %g1 and %g2 respectively).
2036 1657   * NB: Must be 8 instructions or less to fit in trap table and code must
2037 1658   *     be relocatable.
2038 1659   */
2039      -#if defined(lint)
2040      -
2041      -void
2042      -dcache_parity_tl1_cont_instr(void)
2043      -{}
2044      -
2045      -#else   /* lint */
2046 1660          ENTRY_NP(dcache_parity_tl1_cont_instr)
2047 1661          CH_ERR_TL1_SWTRAPENTRY(dcache_parity_tl1_err);
2048 1662          SET_SIZE(dcache_parity_tl1_cont_instr)
2049 1663  
2050      -#endif  /* lint */
2051      -
2052 1664  /*
2053 1665   * D$ parity error at TL>0 handler
2054 1666   * We get here via trap 71 at TL>0->Software trap 1 at TL>0.  We enter
2055 1667   * this routine with %g1 and %g2 already saved in %tpc, %tnpc and %tstate.
2056 1668   */
2057      -#if defined(lint)
2058 1669  
2059      -void
2060      -dcache_parity_tl1_err(void)
2061      -{}
2062      -
2063      -#else   /* lint */
2064      -
2065 1670          ENTRY_NP(dcache_parity_tl1_err)
2066 1671  
2067 1672          /*
2068 1673           * This macro saves all the %g registers in the ch_err_tl1_data
2069 1674           * structure, updates the ch_err_tl1_flags and saves the %tpc in
2070 1675           * ch_err_tl1_tpc.  At the end of this macro, %g1 will point to
2071 1676           * the ch_err_tl1_data structure and %g2 will have the original
2072 1677           * flags in the ch_err_tl1_data structure.  All %g registers
2073 1678           * except for %g1 and %g2 will be available.
2074 1679           */
↓ open down ↓ 70 lines elided ↑ open up ↑
2145 1750  
2146 1751          /*
2147 1752           * We fall into this macro if we've successfully logged the error in
2148 1753           * the ch_err_tl1_data structure and want the PIL15 softint to pick
2149 1754           * it up and log it.  %g1 must point to the ch_err_tl1_data structure.
2150 1755           * Restores the %g registers and issues retry.
2151 1756           */
2152 1757          CH_ERR_TL1_EXIT;
2153 1758          SET_SIZE(dcache_parity_tl1_err)
2154 1759  
2155      -#endif  /* lint */
2156      -
2157 1760  /*
2158 1761   * I$ parity error trap (trap 72) at TL=0.
2159 1762   * tt0_iperr is replaced by icache_parity_instr in cpu_init_trap of
2160 1763   * the various architecture-specific files.  This merely sets up the
2161 1764   * arguments for cpu_parity_error and calls it via sys_trap.
2162 1765   * NB: Must be 8 instructions or less to fit in trap table and code must
2163 1766   *     be relocatable.
2164 1767   */
2165      -#if defined(lint)
2166 1768  
2167      -void
2168      -icache_parity_instr(void)
2169      -{}
2170      -
2171      -#else   /* lint */
2172      -
2173 1769          ENTRY_NP(icache_parity_instr)
2174 1770          membar  #Sync                   ! Cheetah+ requires membar #Sync
2175 1771          set     cpu_parity_error, %g1
2176 1772          or      %g0, CH_ERR_IPE, %g2
2177 1773          rdpr    %tpc, %g3
2178 1774          sethi   %hi(sys_trap), %g7
2179 1775          jmp     %g7 + %lo(sys_trap)
2180 1776            mov   PIL_15, %g4             ! run at pil 15
2181 1777          SET_SIZE(icache_parity_instr)
2182 1778  
2183      -#endif  /* lint */
2184      -
2185 1779  /*
2186 1780   * I$ parity error trap (trap 72) at TL>0.
2187 1781   * tt1_iperr is replaced by icache_parity_tl1_instr in cpu_init_trap of
2188 1782   * the various architecture-specific files.  This generates a "Software
2189 1783   * Trap 2" at TL>0, which goes to icache_parity_tl1_cont_instr, and we
2190 1784   * continue the handling there.
2191 1785   * NB: Must be 8 instructions or less to fit in trap table and code must
2192 1786   *     be relocatable.
2193 1787   */
2194      -#if defined(lint)
2195      -
2196      -void
2197      -icache_parity_tl1_instr(void)
2198      -{}
2199      -
2200      -#else   /* lint */
2201 1788          ENTRY_NP(icache_parity_tl1_instr)
2202 1789          CH_ERR_TL1_TRAPENTRY(SWTRAP_2);
2203 1790          SET_SIZE(icache_parity_tl1_instr)
2204 1791  
2205      -#endif  /* lint */
2206      -
2207 1792  /*
2208 1793   * Software trap 2 at TL>0.
2209 1794   * tt1_swtrap2 is replaced by icache_parity_tl1_cont_instr in cpu_init_trap
2210 1795   * of the various architecture-specific files.  This is used as a continuation
2211 1796   * of the icache parity handling where we've bought an extra TL level, so we
2212 1797   * can use %tpc, %tnpc, %tstate to temporarily save the value of registers %g1
2213 1798   * and %g2.  Note that %tstate has bits 0-2 and then bits 8-19 as r/w,
2214 1799   * there's a reserved hole from 3-7.  We only use bits 0-1 and 8-9 (the low
2215 1800   * order two bits from %g1 and %g2 respectively).
2216 1801   * NB: Must be 8 instructions or less to fit in trap table and code must
2217 1802   *     be relocatable.
2218 1803   */
2219      -#if defined(lint)
2220      -
2221      -void
2222      -icache_parity_tl1_cont_instr(void)
2223      -{}
2224      -
2225      -#else   /* lint */
2226 1804          ENTRY_NP(icache_parity_tl1_cont_instr)
2227 1805          CH_ERR_TL1_SWTRAPENTRY(icache_parity_tl1_err);
2228 1806          SET_SIZE(icache_parity_tl1_cont_instr)
2229 1807  
2230      -#endif  /* lint */
2231 1808  
2232      -
2233 1809  /*
2234 1810   * I$ parity error at TL>0 handler
2235 1811   * We get here via trap 72 at TL>0->Software trap 2 at TL>0.  We enter
2236 1812   * this routine with %g1 and %g2 already saved in %tpc, %tnpc and %tstate.
2237 1813   */
2238      -#if defined(lint)
2239 1814  
2240      -void
2241      -icache_parity_tl1_err(void)
2242      -{}
2243      -
2244      -#else   /* lint */
2245      -
2246 1815          ENTRY_NP(icache_parity_tl1_err)
2247 1816  
2248 1817          /*
2249 1818           * This macro saves all the %g registers in the ch_err_tl1_data
2250 1819           * structure, updates the ch_err_tl1_flags and saves the %tpc in
2251 1820           * ch_err_tl1_tpc.  At the end of this macro, %g1 will point to
2252 1821           * the ch_err_tl1_data structure and %g2 will have the original
2253 1822           * flags in the ch_err_tl1_data structure.  All %g registers
2254 1823           * except for %g1 and %g2 will be available.
2255 1824           */
↓ open down ↓ 55 lines elided ↑ open up ↑
2311 1880          /*
2312 1881           * We fall into this macro if we've successfully logged the error in
2313 1882           * the ch_err_tl1_data structure and want the PIL15 softint to pick
2314 1883           * it up and log it.  %g1 must point to the ch_err_tl1_data structure.
2315 1884           * Restores the %g registers and issues retry.
2316 1885           */
2317 1886          CH_ERR_TL1_EXIT;
2318 1887  
2319 1888          SET_SIZE(icache_parity_tl1_err)
2320 1889  
2321      -#endif  /* lint */
2322      -
2323 1890  #endif  /* CPU_IMP_L1_CACHE_PARITY */
2324 1891  
2325 1892  
2326 1893  /*
2327 1894   * The itlb_rd_entry and dtlb_rd_entry functions return the tag portion of the
2328 1895   * tte, the virtual address, and the ctxnum of the specified tlb entry.  They
2329 1896   * should only be used in places where you have no choice but to look at the
2330 1897   * tlb itself.
2331 1898   *
2332 1899   * Note: These two routines are required by the Estar "cpr" loadable module.
2333 1900   */
2334 1901  
2335      -#if defined(lint)
2336      -
2337      -/* ARGSUSED */
2338      -void
2339      -itlb_rd_entry(uint_t entry, tte_t *tte, uint64_t *va_tag)
2340      -{}
2341      -
2342      -#else   /* lint */
2343      -
2344 1902          ENTRY_NP(itlb_rd_entry)
2345 1903          sllx    %o0, 3, %o0
2346 1904          ldxa    [%o0]ASI_ITLB_ACCESS, %g1
2347 1905          stx     %g1, [%o1]
2348 1906          ldxa    [%o0]ASI_ITLB_TAGREAD, %g2
2349 1907          set     TAGREAD_CTX_MASK, %o4
2350 1908          andn    %g2, %o4, %o5
2351 1909          retl
2352 1910            stx   %o5, [%o2]
2353 1911          SET_SIZE(itlb_rd_entry)
2354 1912  
2355      -#endif  /* lint */
2356 1913  
2357      -
2358      -#if defined(lint)
2359      -
2360      -/* ARGSUSED */
2361      -void
2362      -dtlb_rd_entry(uint_t entry, tte_t *tte, uint64_t *va_tag)
2363      -{}
2364      -
2365      -#else   /* lint */
2366      -
2367 1914          ENTRY_NP(dtlb_rd_entry)
2368 1915          sllx    %o0, 3, %o0
2369 1916          ldxa    [%o0]ASI_DTLB_ACCESS, %g1
2370 1917          stx     %g1, [%o1]
2371 1918          ldxa    [%o0]ASI_DTLB_TAGREAD, %g2
2372 1919          set     TAGREAD_CTX_MASK, %o4
2373 1920          andn    %g2, %o4, %o5
2374 1921          retl
2375 1922            stx   %o5, [%o2]
2376 1923          SET_SIZE(dtlb_rd_entry)
2377      -#endif  /* lint */
2378 1924  
2379 1925  
2380 1926  #if !(defined(JALAPENO) || defined(SERRANO))
2381 1927  
2382      -#if defined(lint)
2383      -
2384      -uint64_t
2385      -get_safari_config(void)
2386      -{ return (0); }
2387      -
2388      -#else   /* lint */
2389      -
2390 1928          ENTRY(get_safari_config)
2391 1929          ldxa    [%g0]ASI_SAFARI_CONFIG, %o0
2392 1930          retl
2393 1931          nop
2394 1932          SET_SIZE(get_safari_config)
2395 1933  
2396      -#endif  /* lint */
2397 1934  
2398      -
2399      -#if defined(lint)
2400      -
2401      -/* ARGSUSED */
2402      -void
2403      -set_safari_config(uint64_t safari_config)
2404      -{}
2405      -
2406      -#else   /* lint */
2407      -
2408 1935          ENTRY(set_safari_config)
2409 1936          stxa    %o0, [%g0]ASI_SAFARI_CONFIG
2410 1937          membar  #Sync
2411 1938          retl
2412 1939          nop
2413 1940          SET_SIZE(set_safari_config)
2414 1941  
2415      -#endif  /* lint */
2416      -
2417 1942  #endif  /* !(JALAPENO || SERRANO) */
2418 1943  
2419 1944  
2420      -#if defined(lint)
2421      -
2422      -void
2423      -cpu_cleartickpnt(void)
2424      -{}
2425      -
2426      -#else   /* lint */
2427 1945          /*
2428 1946           * Clear the NPT (non-privileged trap) bit in the %tick/%stick
2429 1947           * registers. In an effort to make the change in the
2430 1948           * tick/stick counter as consistent as possible, we disable
2431 1949           * all interrupts while we're changing the registers. We also
2432 1950           * ensure that the read and write instructions are in the same
2433 1951           * line in the instruction cache.
2434 1952           */
2435 1953          ENTRY_NP(cpu_clearticknpt)
2436 1954          rdpr    %pstate, %g1            /* save processor state */
↓ open down ↓ 19 lines elided ↑ open up ↑
2456 1974  4:
2457 1975          rd      STICK, %g2              /* get stick register */
2458 1976          wr      %g3, %g2, STICK         /* write stick register, */
2459 1977                                          /*   clearing NPT bit   */
2460 1978  3:
2461 1979          jmp     %g4 + 4
2462 1980          wrpr    %g0, %g1, %pstate       /* restore processor state */
2463 1981          
2464 1982          SET_SIZE(cpu_clearticknpt)
2465 1983  
2466      -#endif  /* lint */
2467 1984  
2468      -
2469 1985  #if defined(CPU_IMP_L1_CACHE_PARITY)
2470 1986  
2471      -#if defined(lint)
2472 1987  /*
2473 1988   * correct_dcache_parity(size_t size, size_t linesize)
2474 1989   *
2475 1990   * Correct D$ data parity by zeroing the data and initializing microtag
2476 1991   * for all indexes and all ways of the D$.
2477      - * 
     1992 + *
2478 1993   */
2479      -/* ARGSUSED */
2480      -void
2481      -correct_dcache_parity(size_t size, size_t linesize)
2482      -{}
2483      -
2484      -#else   /* lint */
2485      -
2486 1994          ENTRY(correct_dcache_parity)
2487 1995          /*
2488 1996           * Register Usage:
2489 1997           *
2490 1998           * %o0 = input D$ size
2491 1999           * %o1 = input D$ line size
2492 2000           * %o2 = scratch
2493 2001           * %o3 = scratch
2494 2002           * %o4 = scratch
2495 2003           */
↓ open down ↓ 41 lines elided ↑ open up ↑
2537 2045          nop
2538 2046  
2539 2047          subcc   %o0, %o1, %o0
2540 2048          bge     1b
2541 2049          nop
2542 2050  
2543 2051          retl
2544 2052            nop
2545 2053          SET_SIZE(correct_dcache_parity)
2546 2054  
2547      -#endif  /* lint */
2548      -
2549 2055  #endif  /* CPU_IMP_L1_CACHE_PARITY */
2550 2056  
2551 2057  
2552      -#if defined(lint)
2553      -/*
2554      - *  Get timestamp (stick).
2555      - */
2556      -/* ARGSUSED */
2557      -void
2558      -stick_timestamp(int64_t *ts)
2559      -{
2560      -}
2561      -
2562      -#else   /* lint */
2563      -
2564 2058          ENTRY_NP(stick_timestamp)
2565 2059          rd      STICK, %g1      ! read stick reg
2566 2060          sllx    %g1, 1, %g1
2567 2061          srlx    %g1, 1, %g1     ! clear npt bit
2568 2062  
2569 2063          retl
2570 2064          stx     %g1, [%o0]      ! store the timestamp
2571 2065          SET_SIZE(stick_timestamp)
2572 2066  
2573      -#endif  /* lint */
2574 2067  
2575      -
2576      -#if defined(lint)
2577      -/*
2578      - * Set STICK adjusted by skew.
2579      - */
2580      -/* ARGSUSED */  
2581      -void
2582      -stick_adj(int64_t skew)
2583      -{
2584      -}
2585      -
2586      -#else   /* lint */
2587      -                
2588 2068          ENTRY_NP(stick_adj)
2589 2069          rdpr    %pstate, %g1            ! save processor state
2590 2070          andn    %g1, PSTATE_IE, %g3
2591 2071          ba      1f                      ! cache align stick adj
2592 2072          wrpr    %g0, %g3, %pstate       ! turn off interrupts
2593 2073  
2594 2074          .align  16
2595 2075  1:      nop
2596 2076  
2597 2077          rd      STICK, %g4              ! read stick reg
2598 2078          add     %g4, %o0, %o1           ! adjust stick with skew
2599 2079          wr      %o1, %g0, STICK         ! write stick reg
2600 2080  
2601 2081          retl
2602 2082          wrpr    %g1, %pstate            ! restore processor state
2603 2083          SET_SIZE(stick_adj)
2604 2084  
2605      -#endif  /* lint */
2606      -
2607      -#if defined(lint)
2608      -/*
2609      - * Debugger-specific stick retrieval
2610      - */
2611      -/*ARGSUSED*/
2612      -int
2613      -kdi_get_stick(uint64_t *stickp)
2614      -{
2615      -        return (0);
2616      -}
2617      -
2618      -#else   /* lint */
2619      -
2620 2085          ENTRY_NP(kdi_get_stick)
2621 2086          rd      STICK, %g1
2622 2087          stx     %g1, [%o0]
2623 2088          retl
2624 2089          mov     %g0, %o0
2625 2090          SET_SIZE(kdi_get_stick)
2626 2091  
2627      -#endif  /* lint */
2628      -
2629      -#if defined(lint)
2630 2092  /*
2631 2093   * Invalidate the specified line from the D$.
2632 2094   *
2633 2095   * Register usage:
2634 2096   *      %o0 - index for the invalidation, specifies DC_way and DC_addr
2635 2097   *
2636 2098   * ASI_DC_TAG, 0x47, is used in the following manner. A 64-bit value is
2637 2099   * stored to a particular DC_way and DC_addr in ASI_DC_TAG.
2638 2100   *
2639 2101   * The format of the stored 64-bit value is:
↓ open down ↓ 12 lines elided ↑ open up ↑
2652 2114   *      | Reserved | DC_way | DC_addr  | Reserved |
2653 2115   *      +----------+--------+----------+----------+
2654 2116   *       63      16 15    14 13       5 4        0
2655 2117   *
2656 2118   * DC_way is a 2-bit index that selects one of the 4 ways.
2657 2119   * DC_addr is a 9-bit index that selects one of 512 tag/valid fields.
2658 2120   *
2659 2121   * Setting the DC_valid bit to zero for the specified DC_way and
2660 2122   * DC_addr index into the D$ results in an invalidation of a D$ line.
2661 2123   */
2662      -/*ARGSUSED*/
2663      -void
2664      -dcache_inval_line(int index)
2665      -{
2666      -}
2667      -#else   /* lint */
2668 2124          ENTRY(dcache_inval_line)
2669 2125          sll     %o0, 5, %o0             ! shift index into DC_way and DC_addr
2670 2126          stxa    %g0, [%o0]ASI_DC_TAG    ! zero the DC_valid and DC_tag bits
2671 2127          membar  #Sync
2672 2128          retl
2673 2129          nop
2674 2130          SET_SIZE(dcache_inval_line)
2675      -#endif  /* lint */
2676 2131  
2677      -#if defined(lint)
2678 2132  /*
2679 2133   * Invalidate the entire I$
2680 2134   *
2681 2135   * Register usage:
2682 2136   *      %o0 - specifies IC_way, IC_addr, IC_tag
2683 2137   *      %o1 - scratch
2684 2138   *      %o2 - used to save and restore DCU value
2685 2139   *      %o3 - scratch
2686 2140   *      %o5 - used to save and restore PSTATE
2687 2141   *
↓ open down ↓ 27 lines elided ↑ open up ↑
2715 2169   *
2716 2170   * IC_way is a 2-bit index that selects one of the 4 ways.
2717 2171   * IC_addr[13:6] is an 8-bit index that selects one of 256 valid fields.
2718 2172   * IC_addr[5] is a "don't care" for a store.
2719 2173   * IC_tag set to 2 specifies that the stored value is to be interpreted
2720 2174   *      as containing Valid and IC_vpred as described above.
2721 2175   *
2722 2176   * Setting the Valid bit to zero for the specified IC_way and
2723 2177   * IC_addr index into the I$ results in an invalidation of an I$ line.
2724 2178   */
2725      -/*ARGSUSED*/
2726      -void
2727      -icache_inval_all(void)
2728      -{
2729      -}
2730      -#else   /* lint */
2731 2179          ENTRY(icache_inval_all)
2732 2180          rdpr    %pstate, %o5
2733 2181          andn    %o5, PSTATE_IE, %o3
2734 2182          wrpr    %g0, %o3, %pstate       ! clear IE bit
2735 2183  
2736 2184          GET_CPU_PRIVATE_PTR(%g0, %o0, %o2, icache_inval_all_1);
2737 2185          ld      [%o0 + CHPR_ICACHE_LINESIZE], %o1
2738 2186          ba,pt   %icc, 2f
2739 2187            ld    [%o0 + CHPR_ICACHE_SIZE], %o0
2740 2188  icache_inval_all_1:
2741 2189          ASM_LD(%o0, icache_size)
2742 2190          ASM_LD(%o1, icache_linesize)
2743 2191  2:
2744 2192          CH_ICACHE_FLUSHALL(%o0, %o1, %o2, %o4)
2745 2193  
2746 2194          retl
2747 2195          wrpr    %g0, %o5, %pstate       ! restore earlier pstate
2748 2196          SET_SIZE(icache_inval_all)
2749      -#endif  /* lint */
2750 2197  
2751 2198  
2752      -#if defined(lint)
2753      -/* ARGSUSED */
2754      -void
2755      -cache_scrubreq_tl1(uint64_t inum, uint64_t index)
2756      -{
2757      -}
2758      -
2759      -#else   /* lint */
2760 2199  /*
2761 2200   * cache_scrubreq_tl1 is the crosstrap handler called on offlined cpus via a 
2762 2201   * crosstrap.  It atomically increments the outstanding request counter and,
2763 2202   * if there was not already an outstanding request, branches to setsoftint_tl1
2764 2203   * to enqueue an intr_vec for the given inum.
2765 2204   */
2766 2205  
2767 2206          ! Register usage:
2768 2207          !
2769 2208          ! Arguments:
↓ open down ↓ 17 lines elided ↑ open up ↑
2787 2226          !
2788 2227          add     %g2, 0x1, %g3
2789 2228          brnz,pn %g2, 1f                 ! no need to enqueue more intr_vec
2790 2229            st    %g3, [%g4]              ! delay - store incremented counter
2791 2230          ASM_JMP(%g6, setsoftint_tl1)
2792 2231          ! not reached
2793 2232  1:
2794 2233          retry
2795 2234          SET_SIZE(cache_scrubreq_tl1)
2796 2235  
2797      -#endif  /* lint */
2798 2236  
2799      -
2800      -#if defined(lint)
2801      -
2802      -/* ARGSUSED */
2803      -void
2804      -get_cpu_error_state(ch_cpu_errors_t *cpu_error_regs)
2805      -{}
2806      -
2807      -#else   /* lint */
2808      -
2809 2237  /*
2810 2238   * Get the error state for the processor.
2811 2239   * Note that this must not be used at TL>0
2812 2240   */
2813 2241          ENTRY(get_cpu_error_state)
2814 2242  #if defined(CHEETAH_PLUS)
2815 2243          set     ASI_SHADOW_REG_VA, %o2
2816 2244          ldxa    [%o2]ASI_AFSR, %o1              ! shadow afsr reg
2817 2245          stx     %o1, [%o0 + CH_CPU_ERRORS_SHADOW_AFSR]
2818 2246          ldxa    [%o2]ASI_AFAR, %o1              ! shadow afar reg
↓ open down ↓ 27 lines elided ↑ open up ↑
2846 2274          set     ASI_MCU_AFAR2_VA, %o2
2847 2275          ldxa    [%o2]ASI_MCU_CTRL, %o1
2848 2276          stx     %o1, [%o0 + CH_CPU_ERRORS_AFAR2]
2849 2277  #endif  /* SERRANO */
2850 2278          ldxa    [%g0]ASI_AFSR, %o1              ! primary afsr reg
2851 2279          stx     %o1, [%o0 + CH_CPU_ERRORS_AFSR]
2852 2280          ldxa    [%g0]ASI_AFAR, %o1              ! primary afar reg
2853 2281          retl
2854 2282          stx     %o1, [%o0 + CH_CPU_ERRORS_AFAR]
2855 2283          SET_SIZE(get_cpu_error_state)
2856      -#endif  /* lint */
2857 2284  
2858      -#if defined(lint)
2859      -
2860 2285  /*
2861 2286   * Check a page of memory for errors.
2862 2287   *
2863 2288   * Load each 64 byte block from physical memory.
2864 2289   * Check AFSR after each load to see if an error
2865 2290   * was caused. If so, log/scrub that error.
2866 2291   *
2867 2292   * Used to determine if a page contains
2868 2293   * CEs when CEEN is disabled.
2869 2294   */
2870      -/*ARGSUSED*/
2871      -void
2872      -cpu_check_block(caddr_t va, uint_t psz)
2873      -{}
2874      -
2875      -#else   /* lint */
2876      -
2877 2295          ENTRY(cpu_check_block)
2878 2296          !
2879 2297          ! get a new window with room for the error regs
2880 2298          !
2881 2299          save    %sp, -SA(MINFRAME + CH_CPU_ERROR_SIZE), %sp
2882 2300          srl     %i1, 6, %l4             ! clear top bits of psz
2883 2301                                          ! and divide by 64
2884 2302          rd      %fprs, %l2              ! store FP
2885 2303          wr      %g0, FPRS_FEF, %fprs    ! enable FP
2886 2304  1:
↓ open down ↓ 18 lines elided ↑ open up ↑
2905 2323          dec     %l4                     ! next 64-byte block
2906 2324          brnz,a,pt  %l4, 1b
2907 2325          add     %i0, 64, %i0            ! increment block addr
2908 2326  
2909 2327          wr      %l2, %g0, %fprs         ! restore FP
2910 2328          ret
2911 2329          restore
2912 2330  
2913 2331          SET_SIZE(cpu_check_block)
2914 2332  
2915      -#endif  /* lint */
2916      -
2917      -#if defined(lint)
2918      -
2919 2333  /*
2920 2334   * Perform a cpu logout called from C.  This is used where we did not trap
2921 2335   * for the error but still want to gather "what we can".  Caller must make
2922 2336   * sure cpu private area exists and that the indicated logout area is free
2923 2337   * for use, and that we are unable to migrate cpus.
2924 2338   */
2925      -/*ARGSUSED*/
2926      -void
2927      -cpu_delayed_logout(uint64_t afar, ch_cpu_logout_t *clop)
2928      -{ }
2929      -
2930      -#else
2931 2339          ENTRY(cpu_delayed_logout)
2932 2340          rdpr    %pstate, %o2
2933 2341          andn    %o2, PSTATE_IE, %o2
2934 2342          wrpr    %g0, %o2, %pstate               ! disable interrupts
2935 2343          PARK_SIBLING_CORE(%o2, %o3, %o4)        ! %o2 has DCU value
2936 2344          add     %o1, CH_CLO_DATA + CH_CHD_EC_DATA, %o1
2937 2345          rd      %asi, %g1
2938 2346          wr      %g0, ASI_P, %asi
2939 2347          GET_ECACHE_DTAGS(%o0, %o1, %o3, %o4, %o5)
2940 2348          wr      %g1, %asi
2941 2349          UNPARK_SIBLING_CORE(%o2, %o3, %o4)      ! can use %o2 again
2942 2350          rdpr    %pstate, %o2
2943 2351          or      %o2, PSTATE_IE, %o2
2944 2352          wrpr    %g0, %o2, %pstate
2945 2353          retl
2946 2354            nop
2947 2355          SET_SIZE(cpu_delayed_logout)
2948 2356  
2949      -#endif  /* lint */
2950      -
2951      -#if defined(lint)
2952      -
2953      -/*ARGSUSED*/
2954      -int
2955      -dtrace_blksuword32(uintptr_t addr, uint32_t *data, int tryagain)
2956      -{ return (0); }
2957      -
2958      -#else
2959      -
2960 2357          ENTRY(dtrace_blksuword32)
2961 2358          save    %sp, -SA(MINFRAME + 4), %sp
2962 2359  
2963 2360          rdpr    %pstate, %l1
2964 2361          andn    %l1, PSTATE_IE, %l2             ! disable interrupts to
2965 2362          wrpr    %g0, %l2, %pstate               ! protect our FPU diddling
2966 2363  
2967 2364          rd      %fprs, %l0
2968 2365          andcc   %l0, FPRS_FEF, %g0
2969 2366          bz,a,pt %xcc, 1f                        ! if the fpu is disabled
↓ open down ↓ 44 lines elided ↑ open up ↑
3014 2411          brnz,pt %i2, 1f
3015 2412          nop
3016 2413          ret
3017 2414          restore %g0, -1, %o0
3018 2415  1:
3019 2416          call    dtrace_blksuword32_err
3020 2417          restore
3021 2418  
3022 2419          SET_SIZE(dtrace_blksuword32)
3023 2420  
3024      -#endif /* lint */
3025      -
3026 2421  #ifdef  CHEETAHPLUS_ERRATUM_25
3027 2422  
3028      -#if     defined(lint)
3029      -/*
3030      - * Claim a chunk of physical address space.
3031      - */
3032      -/*ARGSUSED*/
3033      -void
3034      -claimlines(uint64_t pa, size_t sz, int stride)
3035      -{}
3036      -#else   /* lint */
3037 2423          ENTRY(claimlines)
3038 2424  1:
3039 2425          subcc   %o1, %o2, %o1
3040 2426          add     %o0, %o1, %o3
3041 2427          bgeu,a,pt       %xcc, 1b
3042 2428          casxa   [%o3]ASI_MEM, %g0, %g0
3043 2429          membar  #Sync
3044 2430          retl
3045 2431          nop
3046 2432          SET_SIZE(claimlines)
3047      -#endif  /* lint */
3048 2433  
3049      -#if     defined(lint)
3050      -/*
3051      - * CPU feature initialization,
3052      - * turn BPE off,
3053      - * get device id.
3054      - */
3055      -/*ARGSUSED*/
3056      -void
3057      -cpu_feature_init(void)
3058      -{}
3059      -#else   /* lint */
3060 2434          ENTRY(cpu_feature_init)
3061 2435          save    %sp, -SA(MINFRAME), %sp
3062 2436          sethi   %hi(cheetah_bpe_off), %o0
3063 2437          ld      [%o0 + %lo(cheetah_bpe_off)], %o0
3064 2438          brz     %o0, 1f
3065 2439          nop
3066 2440          rd      ASR_DISPATCH_CONTROL, %o0
3067 2441          andn    %o0, ASR_DISPATCH_CONTROL_BPE, %o0
3068 2442          wr      %o0, 0, ASR_DISPATCH_CONTROL
3069 2443  1:
↓ open down ↓ 12 lines elided ↑ open up ↑
3082 2456          ! apply Cheetah+ erratum 34 workaround
3083 2457          !
3084 2458          call itlb_erratum34_fixup
3085 2459            nop
3086 2460          call dtlb_erratum34_fixup
3087 2461            nop
3088 2462  #endif  /* CHEETAHPLUS_ERRATUM_34 */
3089 2463          ret
3090 2464            restore
3091 2465          SET_SIZE(cpu_feature_init)
3092      -#endif  /* lint */
3093 2466  
3094      -#if     defined(lint)
3095 2467  /*
3096 2468   * Copy a tsb entry atomically, from src to dest.
3097 2469   * src must be 128 bit aligned.
3098 2470   */
3099      -/*ARGSUSED*/
3100      -void
3101      -copy_tsb_entry(uintptr_t src, uintptr_t dest)
3102      -{}
3103      -#else   /* lint */
3104 2471          ENTRY(copy_tsb_entry)
3105 2472          ldda    [%o0]ASI_NQUAD_LD, %o2          ! %o2 = tag, %o3 = data
3106 2473          stx     %o2, [%o1]
3107 2474          stx     %o3, [%o1 + 8 ] 
3108 2475          retl
3109 2476          nop
3110 2477          SET_SIZE(copy_tsb_entry)
3111      -#endif  /* lint */
3112 2478  
3113 2479  #endif  /* CHEETAHPLUS_ERRATUM_25 */
3114 2480  
3115 2481  #ifdef  CHEETAHPLUS_ERRATUM_34
3116 2482  
3117      -#if     defined(lint)
3118      -
3119      -/*ARGSUSED*/
3120      -void
3121      -itlb_erratum34_fixup(void)
3122      -{}
3123      -
3124      -#else   /* lint */
3125      -
3126 2483          !
3127 2484          ! In Cheetah+ erratum 34, under certain conditions an ITLB locked
3128 2485          ! index 0 TTE will erroneously be displaced when a new TTE is
3129 2486          ! loaded via ASI_ITLB_IN.  In order to avoid cheetah+ erratum 34,
3130 2487          ! locked index 0 TTEs must be relocated.
3131 2488          !
3132 2489          ! NOTE: Care must be taken to avoid an ITLB miss in this routine.
3133 2490          !
3134 2491          ENTRY_NP(itlb_erratum34_fixup)
3135 2492          rdpr    %pstate, %o3
↓ open down ↓ 44 lines elided ↑ open up ↑
3180 2537          !
3181 2538          sethi   %hi(FLUSH_ADDR), %o4
3182 2539          set     MMU_TAG_ACCESS, %g4
3183 2540          stxa    %o2, [%g4]ASI_IMMU
3184 2541          stxa    %o1, [%g3]ASI_ITLB_ACCESS
3185 2542          flush   %o4                             ! Flush required for I-MMU
3186 2543          retl
3187 2544            wrpr  %g0, %o3, %pstate               ! Enable interrupts
3188 2545          SET_SIZE(itlb_erratum34_fixup)
3189 2546  
3190      -#endif  /* lint */
3191      -
3192      -#if     defined(lint)
3193      -
3194      -/*ARGSUSED*/
3195      -void
3196      -dtlb_erratum34_fixup(void)
3197      -{}
3198      -
3199      -#else   /* lint */
3200      -
3201 2547          !
3202 2548          ! In Cheetah+ erratum 34, under certain conditions a DTLB locked
3203 2549          ! index 0 TTE will erroneously be displaced when a new TTE is
3204 2550          ! loaded.  In order to avoid cheetah+ erratum 34, locked index 0
3205 2551          ! TTEs must be relocated.
3206 2552          !
3207 2553          ENTRY_NP(dtlb_erratum34_fixup)
3208 2554          rdpr    %pstate, %o3
3209 2555  #ifdef DEBUG
3210 2556          PANIC_IF_INTR_DISABLED_PSTR(%o3, u3_di_label2, %g1)
↓ open down ↓ 38 lines elided ↑ open up ↑
3249 2595          ! the former index 0 entry here.
3250 2596          !
3251 2597          set     MMU_TAG_ACCESS, %g4
3252 2598          stxa    %o2, [%g4]ASI_DMMU
3253 2599          stxa    %o1, [%g3]ASI_DTLB_ACCESS
3254 2600          membar  #Sync
3255 2601          retl
3256 2602            wrpr  %g0, %o3, %pstate               ! Enable interrupts
3257 2603          SET_SIZE(dtlb_erratum34_fixup)
3258 2604  
3259      -#endif  /* lint */
3260      -
3261 2605  #endif  /* CHEETAHPLUS_ERRATUM_34 */
3262 2606  
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX